File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/tools/otp-code-generator-and-validator Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,18 @@ import TokenDisplay from './token-display.vue';
7
7
import { useStyleStore } from ' @/stores/style.store' ;
8
8
import InputCopyable from ' @/components/InputCopyable.vue' ;
9
9
import { computedRefreshable } from ' @/composable/computedRefreshable' ;
10
+ import { useQueryParamOrStorage } from ' @/composable/queryParams' ;
10
11
11
12
const now = useTimestamp ();
12
13
const interval = computed (() => (now .value / 1000 ) % 30 );
13
14
const theme = useThemeVars ();
14
15
const styleStore = useStyleStore ();
15
16
16
- const secret = ref (generateSecret ());
17
+ const secret = useQueryParamOrStorage ({
18
+ name: ' secret' ,
19
+ storageName: ' otp-gen:secret' ,
20
+ defaultValue: generateSecret (),
21
+ });
17
22
18
23
function refreshSecret() {
19
24
secret .value = generateSecret ();
You can’t perform that action at this time.
0 commit comments