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

View file

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