add reset prefs button

This commit is contained in:
Bnyro 2022-08-11 19:41:07 +02:00
parent 58ca23aec9
commit 69bfd093b3
2 changed files with 9 additions and 1 deletions

View File

@ -316,6 +316,7 @@
<br />
<p v-text="`${$t('information.preferences_note')}`" />
<br />
<button class="btn" v-text="`${$t('actions.reset_preferences')}`" @click="resetPreferences()" />
</template>
<script>
@ -573,6 +574,12 @@ export default {
// redirect to trending page
window.location = "/";
},
resetPreferences() {
// clear the local storage
localStorage.clear();
// redirect to the home page
window.location = "/";
},
async invalidateSession() {
this.fetchJson(this.authApiUrl() + "/logout", null, {
method: "POST",

View File

@ -92,7 +92,8 @@
"instance_auth_selection": "Autentication Instance Selection",
"clone_playlist": "Clone Playlist",
"clone_playlist_success": "Successfully cloned!",
"download_as_txt": "Download as .txt"
"download_as_txt": "Download as .txt",
"reset_preferences": "Reset preferences"
},
"comment": {
"pinned_by": "Pinned by",