mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 23:06:14 -04:00
Merge fdb2bffae2
into 07eea0f484
This commit is contained in:
commit
b41e35effd
1 changed files with 6 additions and 1 deletions
|
@ -7,13 +7,18 @@ import TokenDisplay from './token-display.vue';
|
||||||
import { useStyleStore } from '@/stores/style.store';
|
import { useStyleStore } from '@/stores/style.store';
|
||||||
import InputCopyable from '@/components/InputCopyable.vue';
|
import InputCopyable from '@/components/InputCopyable.vue';
|
||||||
import { computedRefreshable } from '@/composable/computedRefreshable';
|
import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||||
|
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||||
|
|
||||||
const now = useTimestamp();
|
const now = useTimestamp();
|
||||||
const interval = computed(() => (now.value / 1000) % 30);
|
const interval = computed(() => (now.value / 1000) % 30);
|
||||||
const theme = useThemeVars();
|
const theme = useThemeVars();
|
||||||
const styleStore = useStyleStore();
|
const styleStore = useStyleStore();
|
||||||
|
|
||||||
const secret = ref(generateSecret());
|
const secret = useQueryParamOrStorage({
|
||||||
|
name: 'secret',
|
||||||
|
storageName: 'otp-gen:secret',
|
||||||
|
defaultValue: generateSecret(),
|
||||||
|
});
|
||||||
|
|
||||||
function refreshSecret() {
|
function refreshSecret() {
|
||||||
secret.value = generateSecret();
|
secret.value = generateSecret();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue