mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
fix: favourite button, greeting, lightbox etc (thanks @eartharoid)
This commit is contained in:
@@ -9,7 +9,7 @@ export default function Preview(props) {
|
||||
<div className='preview-mode'>
|
||||
<h3>{getMessage('modals.main.settings.reminder.title')}</h3>
|
||||
<h1>{getMessage('modals.welcome.preview.description')}</h1>
|
||||
<button className='uploadbg' onClick={() => props.setup()}>{getMessage('modals.welcome.preview.continue')}</button>
|
||||
<button className='close' onClick={() => props.setup()}>{getMessage('modals.welcome.preview.continue')}</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import variables from 'modules/variables';
|
||||
|
||||
export default function Lightbox({ modalClose, img }) {
|
||||
variables.stats.postEvent('modal', 'Opened lightbox');
|
||||
|
||||
|
||||
@@ -42,13 +42,16 @@ export default class AdvancedSettings extends PureComponent {
|
||||
<h3>{getMessage('modals.main.settings.sections.advanced.data')}</h3>
|
||||
<br/>
|
||||
<div className='data-buttons-row'>
|
||||
<button onClick={() => this.setState({ resetModal: true })}>{getMessage('modals.main.settings.buttons.reset')}
|
||||
<button onClick={() => this.setState({ resetModal: true })}>
|
||||
{getMessage('modals.main.settings.buttons.reset')}
|
||||
<ResetIcon/>
|
||||
</button>
|
||||
<button onClick={() => exportSettings()}>{getMessage('modals.main.settings.buttons.export')}
|
||||
<button onClick={() => exportSettings()}>
|
||||
{getMessage('modals.main.settings.buttons.export')}
|
||||
<ExportIcon/>
|
||||
</button>
|
||||
<button onClick={() => document.getElementById('file-input').click()}>{getMessage('modals.main.settings.buttons.import')}
|
||||
<button onClick={() => document.getElementById('file-input').click()}>
|
||||
{getMessage('modals.main.settings.buttons.import')}
|
||||
<ImportIcon/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default class GreetingSettings extends PureComponent {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header title={getMessage('modals.main.settings.sections.greeting.title')} category='greeting' element='.greeting' zoomSetting='zoomGreeting'/>
|
||||
<Header title={getMessage('modals.main.settings.sections.greeting.title')} setting='greeting' category='greeting' element='.greeting' zoomSetting='zoomGreeting'/>
|
||||
<Checkbox name='events' text={getMessage('modals.main.settings.sections.greeting.events')} category='greeting'/>
|
||||
<Checkbox name='defaultGreetingMessage' text={getMessage('modals.main.settings.sections.greeting.default')} category='greeting'/>
|
||||
<Text title={getMessage('modals.main.settings.sections.greeting.name')} name='greetingName' category='greeting'/>
|
||||
|
||||
@@ -41,14 +41,14 @@ export default class WelcomeModal extends PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.state.buttonText === this.getMessage('modals.welcome.buttons.close')) {
|
||||
if (this.state.buttonText === this.getMessage('modals.main.addons.create.finish.title')) {
|
||||
return this.props.modalClose();
|
||||
}
|
||||
|
||||
this.setState({
|
||||
currentTab: this.state.currentTab + 1,
|
||||
image: this.images[this.state.currentTab + 1],
|
||||
buttonText: (this.state.currentTab !== this.state.finalTab) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.welcome.buttons.close')
|
||||
buttonText: (this.state.currentTab !== this.state.finalTab) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.main.addons.create.finish.title')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default class WelcomeModal extends PureComponent {
|
||||
this.setState({
|
||||
currentTab: tab,
|
||||
image: this.images[tab],
|
||||
buttonText: (tab !== this.state.finalTab + 1) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.welcome.buttons.close')
|
||||
buttonText: (tab !== this.state.finalTab + 1) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.main.addons.create.finish.title')
|
||||
});
|
||||
|
||||
localStorage.setItem('bgtransition', true);
|
||||
@@ -70,7 +70,7 @@ export default class WelcomeModal extends PureComponent {
|
||||
this.setState({
|
||||
currentTab: Number(welcomeTab),
|
||||
image: this.images[Number(welcomeTab)],
|
||||
buttonText: (Number(welcomeTab) !== this.state.finalTab + 1) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.welcome.buttons.close')
|
||||
buttonText: (Number(welcomeTab) !== this.state.finalTab + 1) ? this.getMessage('modals.welcome.buttons.next') : this.getMessage('modals.main.addons.create.finish.title')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ export default class WelcomeModal extends PureComponent {
|
||||
<WelcomeSections currentTab={this.state.currentTab} switchTab={(tab) => this.switchTab(tab)}/>
|
||||
</div>
|
||||
<div className='buttons'>
|
||||
{(this.state.currentTab === 0) ? <button className='close' style={{ marginRight: '20px' }} onClick={() => this.props.modalSkip()}>Preview</button> : null}
|
||||
{(this.state.currentTab === 0) ? <button className='close' style={{ marginRight: '20px' }} onClick={() => this.props.modalSkip()}>{this.getMessage('modals.welcome.buttons.preview')}</button> : null}
|
||||
{(this.state.currentTab !== 0) ? <button className='close' style={{ marginRight: '20px' }} onClick={() => this.changeTab(true)}>{this.getMessage('modals.welcome.buttons.previous')}</button> : null}
|
||||
<button className='close' onClick={() => this.changeTab()}>{this.state.buttonText}</button>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class Favourite extends PureComponent {
|
||||
}));
|
||||
break;
|
||||
default:
|
||||
const url = document.getElementById('backgroundImage').style.backgroundImage.replace('url("', '').replace('")', '');
|
||||
const url = document.getElementById('backgroundImage').style.backgroundImage.replace('url("', '').replace('")', '').replace(variables.constants.DDG_IMAGE_PROXY, '');
|
||||
|
||||
if (!url) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user