mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-23 14:07:24 +00:00
log out all devices
This commit is contained in:
parent
58ce63eca4
commit
c1fd36862e
@ -227,6 +227,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<a class="btn w-auto" @click="logout" v-t="'actions.logout'" />
|
<a class="btn w-auto" @click="logout" v-t="'actions.logout'" />
|
||||||
|
<a
|
||||||
|
class="btn w-auto"
|
||||||
|
style="margin-left: 0.5em"
|
||||||
|
@click="invalidateSession"
|
||||||
|
v-t="'actions.invalidate_session'"
|
||||||
|
/>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -480,6 +486,18 @@ export default {
|
|||||||
// redirect to trending page
|
// redirect to trending page
|
||||||
window.location = "/";
|
window.location = "/";
|
||||||
},
|
},
|
||||||
|
async invalidateSession() {
|
||||||
|
this.fetchJson(this.apiUrl() + "/logout", null, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: this.getAuthToken(),
|
||||||
|
},
|
||||||
|
}).then(resp => {
|
||||||
|
if (!resp.error) {
|
||||||
|
this.logout();
|
||||||
|
} else alert(resp.error);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -82,8 +82,9 @@
|
|||||||
"delete_playlist_confirm": "Are you sure you want to delete this playlist?",
|
"delete_playlist_confirm": "Are you sure you want to delete this playlist?",
|
||||||
"please_select_playlist": "Please select a playlist",
|
"please_select_playlist": "Please select a playlist",
|
||||||
"delete_account": "Delete Account",
|
"delete_account": "Delete Account",
|
||||||
"logout": "Logout",
|
"logout": "Log out this device",
|
||||||
"minimize_recommendations_default": "Minimize Recommendations by default"
|
"minimize_recommendations_default": "Minimize Recommendations by default",
|
||||||
|
"invalidate_session": "Log out all devices"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"pinned_by": "Pinned by"
|
"pinned_by": "Pinned by"
|
||||||
|
Loading…
Reference in New Issue
Block a user