feat: log staff sign-in and sign-out and force logout at a set time

This commit is contained in:
2026-10-19 13:34:55 +03:30
parent 3863c5e7d1
commit 8590579605
25 changed files with 588 additions and 15 deletions
+6 -1
View File
@@ -157,7 +157,12 @@ export const useAuthStore = defineStore('auth', () => {
persist(data);
}
function logout() {
async function logout() {
try {
if (token.value) await api.post('/auth/logout');
} catch {
/* نشست ممکن است از قبل بسته شده باشد */
}
token.value = null;
user.value = null;
clearAvatarUrl();