mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
chore: lint
This commit is contained in:
parent
ee6f93505f
commit
4004e680a4
10 changed files with 34 additions and 31 deletions
|
@ -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>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ withDefaults(defineProps<{ button: boolean; search: boolean }>(), {
|
||||||
search: false,
|
search: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const slots = defineSlots<{
|
defineSlots<{
|
||||||
default: any
|
default: any
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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(() => {
|
||||||
|
|
|
@ -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) }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"]
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue