File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { ConfigState, TemperaturePreset } from './types'
33import type { RootState } from '../types'
44import type { Heater , Fan } from '../printer/types'
55import type { AppDataTableHeader } from '@/types'
6+ import md5 from 'md5'
67
78export const getters = {
89 getCurrentInstance : ( state ) => {
@@ -104,5 +105,14 @@ export const getters = {
104105 ...header ,
105106 ...configuredHeaders . find ( p => p . value === header . value )
106107 } ) )
108+ } ,
109+
110+ getTokenKeys : ( state ) => {
111+ const url = state . apiUrl
112+ const hash = ( url ) ? md5 ( url ) : ''
113+ return {
114+ 'user-token' : `user-token-${ hash } ` ,
115+ 'refresh-token' : `refresh-token-${ hash } `
116+ }
107117 }
108118} satisfies GetterTree < ConfigState , RootState >
You can’t perform that action at this time.
0 commit comments