chore: lint

This commit is contained in:
axolotle 2024-08-22 00:56:46 +02:00
parent ee6f93505f
commit 4004e680a4
10 changed files with 34 additions and 31 deletions

View file

@ -11,7 +11,7 @@ const { locked } = useRequests()
const { spinner, dark } = useSettings() const { spinner, dark } = useSettings()
const ready = ref(false) const ready = ref(false)
onAppCreated().then(() => ready.value = true) onAppCreated().then(() => (ready.value = true))
onMounted(() => { onMounted(() => {
const copypastaCode = ['ArrowDown', 'ArrowDown', 'ArrowUp', 'ArrowUp'] const copypastaCode = ['ArrowDown', 'ArrowDown', 'ArrowUp', 'ArrowUp']
@ -87,7 +87,12 @@ onMounted(() => {
<BNavbarNav class="ms-auto"> <BNavbarNav class="ms-auto">
<li class="nav-item"> <li class="nav-item">
<BButton :href="ssoLink" variant="primary" size="sm" class="d-block"> <BButton
:href="ssoLink"
variant="primary"
size="sm"
class="d-block"
>
{{ $t('user_interface_link') }} <YIcon iname="user" /> {{ $t('user_interface_link') }} <YIcon iname="user" />
</BButton> </BButton>
</li> </li>

View file

@ -39,7 +39,10 @@ const visible = ref(!props.collapsed)
</script> </script>
<template> <template>
<BCard :no-body="collapsible ? true : noBody" :class="{ 'border-0': asTab, 'collapsible': collapsible }"> <BCard
:no-body="collapsible ? true : noBody"
:class="{ 'border-0': asTab, collapsible: collapsible }"
>
<template v-if="!asTab" #header> <template v-if="!asTab" #header>
<div class="w-100 d-flex align-items-center flex-wrap custom-header"> <div class="w-100 d-flex align-items-center flex-wrap custom-header">
<slot name="header"> <slot name="header">

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults( withDefaults(
defineProps<{ defineProps<{
label: string label: string
sublabel?: string sublabel?: string
@ -7,6 +7,7 @@ const props = withDefaults(
}>(), }>(),
{ {
sublabel: undefined, sublabel: undefined,
description: undefined,
}, },
) )

View file

@ -4,7 +4,7 @@ withDefaults(defineProps<{ button: boolean; search: boolean }>(), {
search: false, search: false,
}) })
const slots = defineSlots<{ defineSlots<{
default: any default: any
}>() }>()
</script> </script>

View file

@ -127,10 +127,7 @@ export function useUsersAndGroups(username?: MaybeRefOrGetter<string>) {
} }
} }
export function useDomains( export function useDomains(domain_?: MaybeRefOrGetter<string>) {
domain_?: MaybeRefOrGetter<string>,
installed: boolean = true,
) {
const { mainDomain, domains: domains_, domainDetails } = useData() const { mainDomain, domains: domains_, domainDetails } = useData()
const domains = computed(() => { const domains = computed(() => {

View file

@ -21,7 +21,7 @@ type BreadcrumbRoutes = {
args: RouteMeta['args'] args: RouteMeta['args']
} }
function formatRoute({ name, params, args }: BreadcrumbRoutes) { function formatRoute({ params, args }: BreadcrumbRoutes) {
const { trad, param } = args const { trad, param } = args
// if a traduction key string has been given and we also need to pass // if a traduction key string has been given and we also need to pass
// the route param as a variable. // the route param as a variable.
@ -47,7 +47,6 @@ export const useInfos = createGlobalState(() => {
const breadcrumb = computed(() => { const breadcrumb = computed(() => {
return breadcrumbRoutes.value.map((to) => { return breadcrumbRoutes.value.map((to) => {
console.log(to)
return { to: { name: to.name }, text: formatRoute(to) } return { to: { name: to.name }, text: formatRoute(to) }
}) })
}) })

View file

@ -53,7 +53,7 @@ type BaseWritableItemProps = {
disabled?: boolean disabled?: boolean
} }
export type BaseItemComputedProps<MV extends any = any> = { export type BaseItemComputedProps = {
ariaDescribedby?: string | string[] ariaDescribedby?: string | string[]
state?: StateValidation state?: StateValidation
validation?: BaseValidation validation?: BaseValidation
@ -296,10 +296,10 @@ export type FormFieldProps<
BaseFormFieldComputedProps BaseFormFieldComputedProps
// BaseFormFieldComputedProps<MV> // BaseFormFieldComputedProps<MV>
export type FormFieldReadonlyProps< export type FormFieldReadonlyProps<C extends AnyWritableComponents> = Omit<
C extends AnyWritableComponents, FormFieldReadonly<C>,
MV extends any, 'hr' | 'visible' | 'readonly' | 'rules'
> = Omit<FormFieldReadonly<C>, 'hr' | 'visible' | 'readonly' | 'rules'> >
export type FormFieldDict<T extends Obj = Obj> = { export type FormFieldDict<T extends Obj = Obj> = {
[k in keyof T | string]: k extends keyof T [k in keyof T | string]: k extends keyof T

View file

@ -191,7 +191,7 @@ function downloadBackup() {
> >
<div class="me-2"> <div class="me-2">
<h5> <h5>
<span class="fw-bold">{{ item.name }}</span> <span class="fw-bold">{{ item.name }}</span>
<small class="ms-1 text-secondary"> <small class="ms-1 text-secondary">
{{ appName }} ({{ humanSize(item.size) }}) {{ appName }} ({{ humanSize(item.size) }})
</small> </small>

View file

@ -40,7 +40,7 @@ const { user } = useUsersAndGroups(() => props.name)
// mailbox-quota could be 'No quota' or 'Pas de quota'... // mailbox-quota could be 'No quota' or 'Pas de quota'...
const mailboxQuota = const mailboxQuota =
parseInt(user.value['mailbox-quota'].limit) > 0 parseInt(user.value['mailbox-quota'].limit) > 0
? sizeToM(user.value['mailbox-quota'].limit) ?? 0 ? (sizeToM(user.value['mailbox-quota'].limit) ?? 0)
: 0 : 0
type Form = typeof form.value type Form = typeof form.value

View file

@ -1,14 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"skipLibCheck": true, "skipLibCheck": true,
"module": "ESNext", "module": "ESNext",
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"strict": true, "strict": true,
"types": [ "types": ["node"]
"node" },
] "include": ["vite.config.ts"]
}, }
"include": ["vite.config.ts"]
}