aboutsummaryrefslogtreecommitdiff
path: root/src/tools/otp-code-generator-and-validator/token-display.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-05-28 23:13:24 +0200
committerGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-05-28 23:29:14 +0200
commit33c9b6643f58a6930043f460d5bfdca4bc1f7222 (patch)
treef313935e30f7b90ea16e564e7171e2e72319ce29 /src/tools/otp-code-generator-and-validator/token-display.vue
parent4d2b037dbe4e78aa90a4a6d9c7315dcf0a51fed9 (diff)
downloadit-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.tar.gz
it-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.tar.zst
it-tools-33c9b6643f58a6930043f460d5bfdca4bc1f7222.zip
chore(lint): switched to a better lint config
Diffstat (limited to 'src/tools/otp-code-generator-and-validator/token-display.vue')
-rw-r--r--src/tools/otp-code-generator-and-validator/token-display.vue44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/tools/otp-code-generator-and-validator/token-display.vue b/src/tools/otp-code-generator-and-validator/token-display.vue
index 532cbe7..34ceb0b 100644
--- a/src/tools/otp-code-generator-and-validator/token-display.vue
+++ b/src/tools/otp-code-generator-and-validator/token-display.vue
@@ -1,9 +1,27 @@
+<script setup lang="ts">
+import { useClipboard } from '@vueuse/core';
+import { toRefs } from 'vue';
+
+const props = defineProps<{ tokens: { previous: string; current: string; next: string } }>();
+const { copy: copyPrevious, copied: previousCopied } = useClipboard();
+const { copy: copyCurrent, copied: currentCopied } = useClipboard();
+const { copy: copyNext, copied: nextCopied } = useClipboard();
+
+const { tokens } = toRefs(props);
+</script>
+
<template>
<div>
<div class="labels" w-full flex items-center>
- <div flex-1 text-left>Previous</div>
- <div flex-1 text-center>Current OTP</div>
- <div flex-1 text-right>Next</div>
+ <div flex-1 text-left>
+ Previous
+ </div>
+ <div flex-1 text-center>
+ Current OTP
+ </div>
+ <div flex-1 text-right>
+ Next
+ </div>
</div>
<n-input-group>
<n-tooltip trigger="hover" placement="bottom">
@@ -29,9 +47,11 @@
</n-tooltip>
<n-tooltip trigger="hover" placement="bottom">
<template #trigger>
- <c-button important:h-12 data-test-id="next-otp" @click.prevent="copyNext(tokens.next)">{{
- tokens.next
- }}</c-button>
+ <c-button important:h-12 data-test-id="next-otp" @click.prevent="copyNext(tokens.next)">
+ {{
+ tokens.next
+ }}
+ </c-button>
</template>
<div>{{ nextCopied ? 'Copied !' : 'Copy next OTP' }}</div>
</n-tooltip>
@@ -39,18 +59,6 @@
</div>
</template>
-<script setup lang="ts">
-import { useClipboard } from '@vueuse/core';
-import { toRefs } from 'vue';
-
-const { copy: copyPrevious, copied: previousCopied } = useClipboard();
-const { copy: copyCurrent, copied: currentCopied } = useClipboard();
-const { copy: copyNext, copied: nextCopied } = useClipboard();
-
-const props = defineProps<{ tokens: { previous: string; current: string; next: string } }>();
-const { tokens } = toRefs(props);
-</script>
-
<style scoped lang="less">
.current-otp {
font-size: 22px;