feat(ops-web/auth): add remember-me with session/local storage split
Persistent logins land in localStorage, ephemeral ones in sessionStorage, and we recall the last username + remember preference on the login form. Also propagate the indigo brand color through the antd ConfigProvider theme token so the side nav and avatar match the redesigned login.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-config-provider>
|
||||
<a-config-provider :theme="themeConfig">
|
||||
<a-app>
|
||||
<router-view />
|
||||
</a-app>
|
||||
@@ -13,6 +13,15 @@ import { useAuthStore } from "@/stores/auth";
|
||||
|
||||
const auth = useAuthStore();
|
||||
|
||||
const themeConfig = {
|
||||
token: {
|
||||
colorPrimary: "#4f46e5",
|
||||
colorLink: "#4f46e5",
|
||||
colorInfo: "#4f46e5",
|
||||
borderRadius: 6,
|
||||
},
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
if (!auth.initialized) auth.hydrate();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user