mirror of
https://github.com/mue/mue.git
synced 2026-07-28 03:01:10 +02:00
chore: comment out unfinished things
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent, Suspense, lazy } from 'react';
|
||||
import Modal from 'react-modal';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import Main from './main/Main';
|
||||
import Navbar from '../widgets/navbar/Navbar';
|
||||
@@ -89,7 +89,7 @@ export default class Modals extends PureComponent {
|
||||
</Modal>
|
||||
</Suspense>
|
||||
{this.state.preview ? <Preview setup={() => window.location.reload()}/> : null}
|
||||
{variables.keybinds.toggleModal && variables.keybinds.toggleModal !== '' ? <Hotkeys keyName={variables.keybinds.toggleModal} onKeyDown={() => this.toggleModal('mainModal', (this.state.mainModal === true ? false : true))}/> : null}
|
||||
{/*variables.keybinds.toggleModal && variables.keybinds.toggleModal !== '' ? <Hotkeys keyName={variables.keybinds.toggleModal} onKeyDown={() => this.toggleModal('mainModal', (this.state.mainModal === true ? false : true))}/> : null*/}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ export default class BackgroundSettings extends PureComponent {
|
||||
<Checkbox name='ddgProxy' text={getMessage('modals.main.settings.sections.background.ddg_image_proxy')} element='.other' disabled={!usingImage} />
|
||||
<Checkbox name='bgtransition' text={getMessage('modals.main.settings.sections.background.transition')} element='.other' disabled={!usingImage} />
|
||||
<Checkbox name='photoInformation' text={getMessage('modals.main.settings.sections.background.photo_information')} element='.other' disabled={this.state.backgroundType !== 'api' && this.state.backgroundType !== 'marketplace'} />
|
||||
<Checkbox name='photoMap' text={getMessage('modals.main.settings.sections.background.show_map')} element='.other' disabled={this.state.backgroundAPI !== 'unsplash'}/>
|
||||
{/*<Checkbox name='photoMap' text={getMessage('modals.main.settings.sections.background.show_map')} element='.other' disabled={this.state.backgroundAPI !== 'unsplash'}/>*/}
|
||||
|
||||
<h3>{getMessage('modals.main.settings.sections.background.source.title')}</h3>
|
||||
<Dropdown label={getMessage('modals.main.settings.sections.background.type.title')} name='backgroundType' onChange={(value) => this.setState({ backgroundType: value })} category='background'>
|
||||
|
||||
@@ -15,7 +15,7 @@ import Order from '../settings/sections/Order';
|
||||
import Appearance from '../settings/sections/Appearance';
|
||||
import Language from '../settings/sections/Language';
|
||||
import Advanced from '../settings/sections/Advanced';
|
||||
import Keybinds from '../settings/sections/Keybinds';
|
||||
//import Keybinds from '../settings/sections/Keybinds';
|
||||
import Stats from '../settings/sections/Stats';
|
||||
import Experimental from '../settings/sections/Experimental';
|
||||
import Changelog from '../settings/sections/Changelog';
|
||||
@@ -41,7 +41,7 @@ export default function Settings() {
|
||||
<div label={getMessage('modals.main.settings.sections.appearance.title')} name='appearance'><Appearance/></div>
|
||||
<div label={getMessage('modals.main.settings.sections.language.title')} name='language'><Language/></div>
|
||||
<div label={getMessage('modals.main.settings.sections.advanced.title')} name='advanced'><Advanced/></div>
|
||||
<div label={getMessage('modals.main.settings.sections.keybinds.title')} name='keybinds'><Keybinds/></div>
|
||||
{/*<div label={getMessage('modals.main.settings.sections.keybinds.title')} name='keybinds'><Keybinds/></div>*/}
|
||||
<div label={getMessage('modals.main.settings.sections.stats.title')} name='stats'><Stats/></div>
|
||||
<div label={getMessage('modals.main.settings.sections.experimental.title')} name='experimental'><Experimental/></div>
|
||||
<div label={getMessage('modals.main.settings.sections.changelog.title')} name='changelog'><Changelog/></div>
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
Translate as Language,
|
||||
SettingsOutlined as Advanced,
|
||||
BugReportOutlined as Experimental,
|
||||
KeyboardAltOutlined as Keybinds,
|
||||
//KeyboardAltOutlined as Keybinds,
|
||||
AssessmentOutlined as Stats,
|
||||
NewReleasesOutlined as Changelog,
|
||||
InfoOutlined as About,
|
||||
@@ -66,7 +66,7 @@ function Tab({ label, currentTab, onClick, navbarTab }) {
|
||||
case getMessage('modals.main.settings.sections.appearance.title'): icon = <Appearance/>; break;
|
||||
case getMessage('modals.main.settings.sections.language.title'): icon = <Language/>; divider = true; break;
|
||||
case getMessage('modals.main.settings.sections.advanced.title'): icon = <Advanced/>; break;
|
||||
case getMessage('modals.main.settings.sections.keybinds.title'): icon = <Keybinds/>; break;
|
||||
//case getMessage('modals.main.settings.sections.keybinds.title'): icon = <Keybinds/>; break;
|
||||
case getMessage('modals.main.settings.sections.stats.title'): icon = <Stats/>; break;
|
||||
case getMessage('modals.main.settings.sections.experimental.title'): icon = <Experimental/>; divider = true; break;
|
||||
case getMessage('modals.main.settings.sections.changelog.title'): icon = <Changelog/>; break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import { Star, StarBorder } from '@mui/icons-material';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
||||
@@ -81,7 +81,7 @@ export default class Favourite extends PureComponent {
|
||||
return (
|
||||
<Tooltip title={variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.background.buttons.favourite')}>
|
||||
{this.state.favourited}
|
||||
{variables.keybinds.favouriteBackground && variables.keybinds.favouriteBackground !== '' ? <Hotkeys keyName={variables.keybinds.favouriteBackground} onKeyDown={() => this.favourite()} /> : null}
|
||||
{/*variables.keybinds.favouriteBackground && variables.keybinds.favouriteBackground !== '' ? <Hotkeys keyName={variables.keybinds.favouriteBackground} onKeyDown={() => this.favourite()} /> : null*/}
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import { Fullscreen } from '@mui/icons-material';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class Maximise extends PureComponent {
|
||||
return (
|
||||
<Tooltip title={variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.background.buttons.view')}>
|
||||
<Fullscreen onClick={this.maximise} className='topicons' />
|
||||
{variables.keybinds.maximiseBackground && variables.keybinds.maximiseBackground !== '' ? <Hotkeys keyName={variables.keybinds.maximiseBackground} onKeyDown={this.maximise} /> : null}
|
||||
{/*variables.keybinds.maximiseBackground && variables.keybinds.maximiseBackground !== '' ? <Hotkeys keyName={variables.keybinds.maximiseBackground} onKeyDown={this.maximise} /> : null*/}
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import variables from 'modules/variables';
|
||||
import { useState, Fragment } from 'react';
|
||||
import { Info, LocationOn, PhotoCamera, Crop as Resolution, Person as Photographer, GetApp as Download } from '@mui/icons-material';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
import { lat2tile, lon2tile } from 'modules/helpers/background/widget';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
//import { lat2tile, lon2tile } from 'modules/helpers/background/widget';
|
||||
|
||||
const toDataURL = async (url) => {
|
||||
const res = await fetch(url);
|
||||
@@ -75,7 +75,7 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
}
|
||||
|
||||
const downloadEnabled = (localStorage.getItem('downloadbtn') === 'true') && !info.offline && !info.photographerURL && api;
|
||||
const downloadBackground = () => {
|
||||
/*const downloadBackground = () => {
|
||||
if (downloadEnabled) {
|
||||
downloadImage(info);
|
||||
}
|
||||
@@ -90,9 +90,9 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
element.style.display = 'none';
|
||||
}
|
||||
}
|
||||
};
|
||||
};*/
|
||||
|
||||
const photoMap = () => {
|
||||
{/*const photoMap = () => {
|
||||
if (localStorage.getItem('photoMap') !== 'true' || !info.latitude || !info.longitude) {
|
||||
return null;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
</span>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}*/}
|
||||
|
||||
return (
|
||||
<div className='photoInformation'>
|
||||
@@ -129,7 +129,7 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
<Info className='infoIcon'/>
|
||||
<h1>{variables.language.getMessage(variables.languagecode, 'widgets.background.information')}</h1>
|
||||
<hr/>
|
||||
{photoMap()}
|
||||
{/*photoMap()*/}
|
||||
{/* fix console error by using fragment and key */}
|
||||
{info.location && info.location !== 'N/A' ? <Fragment key='location'>
|
||||
<LocationOn/>
|
||||
@@ -150,8 +150,8 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
</>
|
||||
: null}
|
||||
</div>
|
||||
{variables.keybinds.downloadBackground && variables.keybinds.downloadBackground !== '' ? <Hotkeys keyName={variables.keybinds.downloadBackground} onKeyDown={() => downloadBackground()} /> : null}
|
||||
{variables.keybinds.showBackgroundInformation && variables.keybinds.showBackgroundInformation !== '' ? <Hotkeys keyName={variables.keybinds.showBackgroundInformation} onKeyDown={() => showBackgroundInformation()} /> : null}
|
||||
{/*variables.keybinds.downloadBackground && variables.keybinds.downloadBackground !== '' ? <Hotkeys keyName={variables.keybinds.downloadBackground} onKeyDown={() => downloadBackground()} /> : null*/}
|
||||
{/*variables.keybinds.showBackgroundInformation && variables.keybinds.showBackgroundInformation !== '' ? <Hotkeys keyName={variables.keybinds.showBackgroundInformation} onKeyDown={() => showBackgroundInformation()} /> : null*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
||||
import { FileCopyRounded, AssignmentRounded as NotesRounded, PushPin } from '@mui/icons-material';
|
||||
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
import { toast } from 'react-toastify';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
export default class Notes extends PureComponent {
|
||||
constructor() {
|
||||
@@ -54,8 +54,8 @@ export default class Notes extends PureComponent {
|
||||
<TextareaAutosize rowsmax={50} placeholder={variables.language.getMessage(variables.languagecode, 'widgets.navbar.notes.placeholder')} value={this.state.notes} onChange={this.setNotes}/>
|
||||
<button onClick={() => this.pin()} className='pinNote'><PushPin/></button>
|
||||
<button onClick={() => this.copy()} className='copyNote'><FileCopyRounded/></button>
|
||||
{variables.keybinds.pinNotes && variables.keybinds.pinNotes !== '' ? <Hotkeys keyName={variables.keybinds.pinNotes} onKeyDown={() => this.pin()}/> : null}
|
||||
{variables.keybinds.copyNotes && variables.keybinds.copyNotes !== '' ? <Hotkeys keyName={variables.keybinds.copyNotes} onKeyDown={() => this.copy()}/> : null}
|
||||
{/*variables.keybinds.pinNotes && variables.keybinds.pinNotes !== '' ? <Hotkeys keyName={variables.keybinds.pinNotes} onKeyDown={() => this.pin()}/> : null*/}
|
||||
{/*variables.keybinds.copyNotes && variables.keybinds.copyNotes !== '' ? <Hotkeys keyName={variables.keybinds.copyNotes} onKeyDown={() => this.copy()}/> : null*/}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent, createRef } from 'react';
|
||||
import { TextareaAutosize } from '@mui/material';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
||||
@@ -199,7 +199,7 @@ export default class QuickLinks extends PureComponent {
|
||||
<button className='pinNote' onClick={this.addLink}>{this.getMessage('widgets.quicklinks.add')}</button>
|
||||
</div>
|
||||
</span>
|
||||
{variables.keybinds.toggleQuicklinks && variables.keybinds.toggleQuicklinks !== '' ? <Hotkeys keyName={variables.keybinds.toggleQuicklinks} onKeyDown={this.toggleAdd} /> : null}
|
||||
{/*variables.keybinds.toggleQuicklinks && variables.keybinds.toggleQuicklinks !== '' ? <Hotkeys keyName={variables.keybinds.toggleQuicklinks} onKeyDown={this.toggleAdd} /> : null*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import variables from 'modules/variables';
|
||||
import { PureComponent, createRef } from 'react';
|
||||
import { FilterNone as FileCopy, Twitter, Star, StarBorder } from '@mui/icons-material';
|
||||
import { toast } from 'react-toastify';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import Interval from 'modules/helpers/interval';
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
@@ -277,9 +277,9 @@ export default class Quote extends PureComponent {
|
||||
<br/>
|
||||
{this.state.copy} {this.state.tweet} {this.state.favourited}
|
||||
</h1>
|
||||
{variables.keybinds.favouriteQuote && variables.keybinds.favouriteQuote !== '' ? <Hotkeys keyName={variables.keybinds.favouriteQuote} onKeyDown={() => this.favourite()} /> : null}
|
||||
{variables.keybinds.tweetQuote && variables.keybinds.tweetQuote !== '' ? <Hotkeys keyName={variables.keybinds.tweetQuote} onKeyDown={() => this.tweetQuote()} /> : null}
|
||||
{variables.keybinds.copyQuote && variables.keybinds.copyQuote !== '' ? <Hotkeys keyName={variables.keybinds.copyQuote} onKeyDown={() => this.copyQuote()} /> : null}
|
||||
{/*variables.keybinds.favouriteQuote && variables.keybinds.favouriteQuote !== '' ? <Hotkeys keyName={variables.keybinds.favouriteQuote} onKeyDown={() => this.favourite()} /> : null*/}
|
||||
{/*variables.keybinds.tweetQuote && variables.keybinds.tweetQuote !== '' ? <Hotkeys keyName={variables.keybinds.tweetQuote} onKeyDown={() => this.tweetQuote()} /> : null*/}
|
||||
{/*variables.keybinds.copyQuote && variables.keybinds.copyQuote !== '' ? <Hotkeys keyName={variables.keybinds.copyQuote} onKeyDown={() => this.copyQuote()} /> : null*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent, Fragment } from 'react';
|
||||
import { Search as SearchIcon, Mic } from '@mui/icons-material';
|
||||
import Hotkeys from 'react-hot-keys';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
|
||||
import AutocompleteInput from 'components/helpers/autocomplete/Autocomplete';
|
||||
|
||||
@@ -178,7 +178,7 @@ export default class Search extends PureComponent {
|
||||
<div className='searchDropdown' style={{ visibility: this.state.searchDropdown }}>
|
||||
{searchEngines.map(({ name }) => {
|
||||
if (name === this.state.currentSearch) {
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -193,7 +193,7 @@ export default class Search extends PureComponent {
|
||||
{this.state.microphone}
|
||||
<SearchIcon onClick={this.searchButton}/>
|
||||
<AutocompleteInput placeholder={variables.language.getMessage(variables.languagecode, 'widgets.search')} id='searchtext' suggestions={this.state.suggestions} onChange={(e) => this.getSuggestions(e)} onClick={this.searchButton}/>
|
||||
{variables.keybinds.focusSearch && variables.keybinds.focusSearch !== '' ? <Hotkeys keyName={variables.keybinds.focusSearch} onKeyDown={() => document.getElementById('searchtext').focus()}/> : null}
|
||||
{/*variables.keybinds.focusSearch && variables.keybinds.focusSearch !== '' ? <Hotkeys keyName={variables.keybinds.focusSearch} onKeyDown={() => document.getElementById('searchtext').focus()}/> : null*/}
|
||||
</form>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user