refactor(lint): linter auto fix

This commit is contained in:
Corentin Thomasset 2022-04-22 23:31:40 +02:00
parent 8e29a97404
commit 086d31eab5
No known key found for this signature in database
GPG key ID: DBD997E935996158
54 changed files with 1122 additions and 1503 deletions

View file

@ -1,15 +1,8 @@
<template>
<div>
<n-card>
<n-form
label-placement="left"
label-width="140"
>
<n-space
justify="center"
item-style="padding: 0"
:size="0"
>
<n-form label-placement="left" label-width="140">
<n-space justify="center" item-style="padding: 0" :size="0">
<div>
<n-form-item label="Uppercase (ABC...)">
<n-switch v-model:value="withUppercase" />
@ -32,21 +25,13 @@
</n-space>
</n-form>
<n-form-item
:label="`Length (${length})`"
label-placement="left"
>
<n-slider
v-model:value="length"
:step="1"
:min="1"
:max="512"
/>
<n-form-item :label="`Length (${length})`" label-placement="left">
<n-slider v-model:value="length" :step="1" :min="1" :max="512" />
</n-form-item>
<n-input
v-model:value="token"
style="text-align: center;"
style="text-align: center"
type="textarea"
placeholder="The token..."
:autosize="{ minRows: 1 }"
@ -56,22 +41,11 @@
autocapitalize="off"
spellcheck="false"
/>
<br>
<br>
<br />
<br />
<n-space justify="center">
<n-button
secondary
autofocus
@click="copy"
>
Copy
</n-button>
<n-button
secondary
@click="refreshToken"
>
Refresh
</n-button>
<n-button secondary autofocus @click="copy"> Copy </n-button>
<n-button secondary @click="refreshToken"> Refresh </n-button>
</n-space>
</n-card>
</div>
@ -82,27 +56,26 @@ import { useCopy } from '@/composable/copy';
import { ref, watch } from 'vue';
import { createToken } from './token-generator.service';
const token = ref('');
const length = ref(64);
const { copy } = useCopy({ source: token, text: 'Token copied to the clipboard' });
const token = ref('')
const length = ref(64)
const { copy } = useCopy({ source: token, text: 'Token copied to the clipboard' })
const withUppercase = ref(true);
const withLowercase = ref(true);
const withNumbers = ref(true);
const withSymbols = ref(false);
const withUppercase = ref(true)
const withLowercase = ref(true)
const withNumbers = ref(true)
const withSymbols = ref(false)
watch([withUppercase, withLowercase, withNumbers, withSymbols, length], refreshToken)
watch([withUppercase, withLowercase, withNumbers, withSymbols, length], refreshToken);
function refreshToken() {
token.value = createToken({
length: length.value,
withUppercase: withUppercase.value,
withLowercase: withLowercase.value,
withNumbers: withNumbers.value,
withSymbols: withSymbols.value,
})
token.value = createToken({
length: length.value,
withUppercase: withUppercase.value,
withLowercase: withLowercase.value,
withNumbers: withNumbers.value,
withSymbols: withSymbols.value,
});
}
refreshToken()
refreshToken();
</script>