Complete rebranding of all components: - Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt) - Proxy: xmrig-proxy -> miner-proxy - CUDA plugin: xmrig-cuda -> miner-cuda - Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap - Go CLI wrapper: miner-cli -> miner-ctrl Vendored XMRig ecosystem into miner/ directory: - miner/core - XMRig CPU/GPU miner - miner/proxy - Stratum proxy - miner/cuda - NVIDIA CUDA plugin - miner/heatmap - Nonce visualization tool - miner/config - Configuration UI - miner/deps - Pre-built dependencies Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0) Updated branding to Lethean (domain, copyright, version 0.1.0) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
76 lines
1.8 KiB
JavaScript
76 lines
1.8 KiB
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
import * as types from '../constants/ModalTypes';
|
|
import { dismiss } from '../actions/modals';
|
|
|
|
|
|
const MODALS = {
|
|
[types.MODAL_ADD_WORKER]: require('../components/modals/AddWorkerModal').default,
|
|
[types.MODAL_DEL_WORKER]: require('../components/modals/DeleteWorkerModal').default,
|
|
[types.MODAL_EXPORT]: require('../components/modals/ExportModal').default,
|
|
[types.MODAL_CPU]: require('../components/modals/CpuModal').default,
|
|
[types.MODAL_FEATURE]: require('../components/modals/FeatureModal').default,
|
|
[types.MODAL_OCL_PLATFORM]: require('../components/modals/OclPlatformModal').default
|
|
};
|
|
|
|
|
|
class ModalContainer extends React.PureComponent {
|
|
render() {
|
|
return <div className="modal fade" ref="modal" tabIndex="-1">{this.renderModal()}</div>;
|
|
}
|
|
|
|
|
|
renderModal() {
|
|
const Component = MODALS[this.props.type];
|
|
if (!Component) {
|
|
return;
|
|
}
|
|
|
|
const props = {...this.props.data, dismiss: this.dismiss};
|
|
return <Component {...props} />;
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
this.$modal = $(this.refs.modal);
|
|
|
|
this.$modal.on('shown.bs.modal', () => {
|
|
this.$modal.find('.autofocus').focus();
|
|
});
|
|
|
|
this.$modal.on('hidden.bs.modal', () => {
|
|
this.props.dismiss();
|
|
});
|
|
}
|
|
|
|
|
|
componentDidUpdate() {
|
|
if (this.props.type !== types.MODAL_NONE) {
|
|
this.$modal.modal('show');
|
|
}
|
|
}
|
|
|
|
|
|
dismiss = () => {
|
|
this.$modal.modal('hide');
|
|
}
|
|
}
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
type: state.modal.type,
|
|
data: state.modal.data
|
|
});
|
|
|
|
|
|
const mapDispatchToProps = (dispatch, ownProps) => ({
|
|
dismiss: () => dispatch(dismiss())
|
|
});
|
|
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(ModalContainer);
|