Skip to content
Snippets Groups Projects
Commit e828bdf6 authored by Sebastian Böckelmann's avatar Sebastian Böckelmann
Browse files

UPD: Make Session Store persistent and fix linting

parent 82b0c370
No related branches found
No related tags found
No related merge requests found
Pipeline #406366 passed with warnings
......@@ -32,6 +32,7 @@
"clsx": "^2.1.1",
"lucide-vue-next": "^0.462.0",
"pinia": "^2.2.6",
"pinia-plugin-persistedstate": "^4.2.0",
"radix-vue": "^1.9.10",
"tailwind-merge": "^2.5.5",
"vee-validate": "^4.14.7",
......
This diff is collapsed.
......@@ -3,7 +3,6 @@
<NavSidebar>
<TransactionSidebar>
<main min-h-0 overflow-scroll>
<!-- Todo: Fix styling of card so it aligns with dark/white theme -->
<RouterView />
</main>
</TransactionSidebar>
......
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { createApp } from 'vue'
import App from './App.vue'
......@@ -12,8 +12,9 @@ import '~console/theme-detect'
import '@unocss/reset/tailwind.css'
const app = createApp(App)
app.use(createPinia())
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.mount('#app')
import {defineStore} from 'pinia'
import {computed, ref} from 'vue'
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useSessionStore = defineStore('session', () => {
const token: Ref<object> = ref(null)
const token: Ref<object> | Ref<null> = ref(null)
function login(token_login: object) {
token.value = token_login
}
function login(token_login: object) {
token.value = token_login
}
function logout() {
}
function logout() {
}
return {token, login, logout}
})
return { token, login, logout }
}, { persist: true })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment