mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2026-01-03 19:44:55 +01:00
chore: cleanup (#27)
* implement password score UI and functions * update strings tests to use `test`instead of `it` * update typing * refactor login/register UI+Logic * fix width on switches to properly display * fetch and store self in store * (WIP) unify card styles * update labels page * bump nuxt * use form area * use text area for description * unify confirm API * unify UI around pages * change header background height
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { UserApi } from "~~/lib/api/user";
|
||||
import { UserOut } from "~~/lib/api/types/data-contracts";
|
||||
|
||||
export const useAuthStore = defineStore("auth", {
|
||||
state: () => ({
|
||||
token: useLocalStorage("pinia/auth/token", ""),
|
||||
expires: useLocalStorage("pinia/auth/expires", ""),
|
||||
self: null as UserOut | null,
|
||||
}),
|
||||
getters: {
|
||||
isTokenExpired: state => {
|
||||
@@ -30,6 +32,7 @@ export const useAuthStore = defineStore("auth", {
|
||||
|
||||
this.token = "";
|
||||
this.expires = "";
|
||||
this.self = null;
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user