This commit is contained in:
Tim Olson
2023-12-20 00:55:53 -04:00
parent 8007f63469
commit 9bb3a76b65
6 changed files with 93 additions and 79 deletions

View File

@@ -2,7 +2,6 @@
import { defineStore } from 'pinia'
import {knownTokens} from "@/knownTokens.js";
import {computed, ref} from "vue";
import {timestamp} from "@/misc.js";
// USING THE STORE:
@@ -28,6 +27,9 @@ import {timestamp} from "@/misc.js";
// const stuff = [ {}, [], true ]
// if( s.obj.value in stuff || s.obj.value === {} ) ... // use .value to access the raw object instead of its reference
function timestamp() {
return Math.round(new Date().getTime() / 1000)
}
export const useStore = defineStore('app', ()=> {
const time = ref(timestamp())
@@ -179,7 +181,7 @@ export const useOrderStore = defineStore('order', ()=> {
})
export const usePrefStore = defineStore('order', ()=> {
export const usePrefStore = defineStore('prefs', ()=> {
// user preferences
const inverted = ref({})