mirror of
https://gitlab.com/RemixDev/deemix-webui.git
synced 2024-12-28 02:16:11 +00:00
build: v1.5.1; feat: added basic confirmation prompt when resetting settings to default (closes #16); feat: added toast when resetting settings to default
This commit is contained in:
parent
04554b60d7
commit
919498f31c
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "deemix-webui",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"scripts": {
|
||||
"clean": "rimraf public/js/bundle.js public/js/bundle.temp.js public/js/bundle.js.map",
|
||||
"clean-temp": "rimraf public/js/bundle.temp.js",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -46,13 +46,14 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<RouterLink :to="{ name: 'ARL' }">
|
||||
<RouterLink :to="{ name: 'ARL' }" class="block">
|
||||
{{ $t('settings.login.arl.question') }}
|
||||
</RouterLink>
|
||||
|
||||
<a v-if="clientMode" href="#" @click="appLogin">
|
||||
<a v-if="clientMode" href="#" class="block" @click="appLogin">
|
||||
{{ $t('settings.login.login') }}
|
||||
</a>
|
||||
|
||||
<button class="btn btn-primary" @click="login" style="width: 100%">
|
||||
{{ $t('settings.login.arl.update') }}
|
||||
</button>
|
||||
|
@ -651,7 +652,7 @@
|
|||
</BaseAccordion>
|
||||
|
||||
<footer class="bg-background-main">
|
||||
<button class="mr-2 btn btn-primary" @click="resetSettings">{{ $t('settings.reset') }}</button>
|
||||
<button class="mr-2 btn btn-primary" @click="resetToDefault">{{ $t('settings.reset') }}</button>
|
||||
<button class="btn btn-primary" @click="saveSettings">{{ $t('settings.save') }}</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -967,8 +968,13 @@ export default {
|
|||
|
||||
toast(this.$t('settings.toasts.update'), 'settings')
|
||||
},
|
||||
resetSettings() {
|
||||
resetToDefault() {
|
||||
const wantsToReset = confirm(this.$t('settings.resetMessage'))
|
||||
|
||||
if (!wantsToReset) return
|
||||
|
||||
this.settings = JSON.parse(JSON.stringify(this.defaultSettings))
|
||||
toast(this.$t('settings.toasts.reset'), 'settings')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -376,10 +376,12 @@ const en = {
|
|||
question: 'How do I enable Spotify Features?'
|
||||
},
|
||||
reset: 'Reset to Default',
|
||||
resetMessage: 'Are you sure you want to go back to default settings?',
|
||||
save: 'Save',
|
||||
toasts: {
|
||||
init: 'Settings loaded!',
|
||||
update: 'Settings updated!',
|
||||
reset: 'Settings reset to default!',
|
||||
ARLcopied: 'ARL copied to clipboard'
|
||||
}
|
||||
},
|
||||
|
|
|
@ -379,10 +379,12 @@ const it = {
|
|||
question: 'Come attivo le Spotify Features?'
|
||||
},
|
||||
reset: 'Reimposta Default',
|
||||
resetMessage: 'Sei sicuro di voler tornare alle impostazioni di default?',
|
||||
save: 'Salva',
|
||||
toasts: {
|
||||
init: 'Impostazioni caricate!',
|
||||
update: 'Impostazioni aggiornate!',
|
||||
reset: 'Impostazioni di default ripristinate!',
|
||||
ARLcopied: 'ARL copiato negli appunti'
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue