mirror of
https://github.com/mue/mue.git
synced 2026-07-25 17:51:14 +02:00
chore: comment out unfinished things
This commit is contained in:
@@ -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