mirror of
https://github.com/mue/mue.git
synced 2026-07-17 14:04:09 +02:00
feat: add experimental send event feature
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Checkbox from '../Checkbox';
|
||||
import Slider from '../Slider';
|
||||
import EventBus from '../../../../../modules/helpers/eventbus';
|
||||
|
||||
export default function ExperimentalSettings() {
|
||||
const { experimental } = window.language.modals.main.settings.sections;
|
||||
@@ -12,8 +13,15 @@ export default function ExperimentalSettings() {
|
||||
<h3>{experimental.developer}</h3>
|
||||
<Checkbox name='debug' text='Debug hotkey (Ctrl + #)' element='.other'/>
|
||||
<Slider title='Debug timeout' name='debugtimeout' min='0' max='5000' default='0' step='100' display=' miliseconds' element='.other' />
|
||||
<br/>
|
||||
<p>Send Event</p>
|
||||
Type <input type='text' id='eventType'/>
|
||||
<br/><br/>
|
||||
<button className='reset' style={{'marginLeft': '0px'}} onClick={() => localStorage.clear()}>Clear LocalStorage</button>
|
||||
Name <input type='text' id='eventName'/>
|
||||
<br/><br/>
|
||||
<button className='uploadbg' onClick={() => EventBus.dispatch(document.getElementById('eventType').value, document.getElementById('eventName').value)}>Send</button>
|
||||
<br/><br/>
|
||||
<button className='reset' style={{ 'marginLeft': '0px' }} onClick={() => localStorage.clear()}>Clear LocalStorage</button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'react-toastify/dist/ReactToastify.min.css';
|
||||
import '@fontsource/lexend-deca/400.css';
|
||||
|
||||
// this is opt-in btw
|
||||
//import Analytics from './modules/helpers/analytics';
|
||||
import Analytics from './modules/helpers/analytics';
|
||||
|
||||
// language
|
||||
import merge from '@material-ui/utils/esm/deepmerge';
|
||||
@@ -40,7 +40,7 @@ if (window.languagecode !== 'en_GB' || window.languagecode !== 'en_US') {
|
||||
|
||||
window.constants = Constants;
|
||||
if (localStorage.getItem('analytics') === 'true' && localStorage.getItem('offlineMode') !== 'true') {
|
||||
//window.analytics = new Analytics(window.constants.UMAMI_ID);
|
||||
window.analytics = new Analytics(window.constants.UMAMI_ID);
|
||||
} else {
|
||||
window.analytics = {
|
||||
tabLoad: () => '',
|
||||
|
||||
Reference in New Issue
Block a user