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
445b1bdd21
commit
de143bbd78
26 changed files with 72 additions and 67 deletions
4
app/overrides.d.ts
vendored
4
app/overrides.d.ts
vendored
|
@ -15,4 +15,8 @@ declare module 'bootstrap-vue-next' {
|
||||||
interface BaseColorVariant {
|
interface BaseColorVariant {
|
||||||
best: unknown
|
best: unknown
|
||||||
}
|
}
|
||||||
|
interface BaseSize {
|
||||||
|
// `xs` size is available only for BButton
|
||||||
|
xs: unknown
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,12 +91,12 @@ onMounted(() => {
|
||||||
</BButton>
|
</BButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item" v-show="connected">
|
<li v-show="connected" class="nav-item">
|
||||||
<BButton
|
<BButton
|
||||||
@click.prevent="logout"
|
|
||||||
variant="outline-dark"
|
variant="outline-dark"
|
||||||
block
|
block
|
||||||
size="sm"
|
size="sm"
|
||||||
|
@click.prevent="logout"
|
||||||
>
|
>
|
||||||
{{ $t('logout') }} <YIcon iname="sign-out" />
|
{{ $t('logout') }} <YIcon iname="sign-out" />
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BCardGroup } from 'bootstrap-vue-next'
|
import { BCardGroup } from 'bootstrap-vue-next'
|
||||||
import {
|
import {
|
||||||
getCurrentInstance,
|
|
||||||
h,
|
h,
|
||||||
nextTick,
|
nextTick,
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
|
@ -29,7 +28,6 @@ function getTopParent(prev: HTMLElement): HTMLElement {
|
||||||
: getTopParent(prev.parentElement!)
|
: getTopParent(prev.parentElement!)
|
||||||
}
|
}
|
||||||
|
|
||||||
const i = getCurrentInstance()
|
|
||||||
function onScroll() {
|
function onScroll() {
|
||||||
const elem = feedElem.value?.$el
|
const elem = feedElem.value?.$el
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -28,8 +28,8 @@ const fixedMinHeight = ref(props.minHeight)
|
||||||
const rootElem = ref<HTMLDivElement | null>(null)
|
const rootElem = ref<HTMLDivElement | null>(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let unrenderTimer: NodeJS.Timeout
|
let unrenderTimer: number
|
||||||
let renderTimer: NodeJS.Timeout
|
let renderTimer: number
|
||||||
|
|
||||||
observer.value = new IntersectionObserver(
|
observer.value = new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
|
@ -55,7 +55,7 @@ onMounted(() => {
|
||||||
|
|
||||||
if (!props.unrender) {
|
if (!props.unrender) {
|
||||||
// Stop listening to intersections after first appearance if unrendering is not activated
|
// Stop listening to intersections after first appearance if unrendering is not activated
|
||||||
this.observer.disconnect()
|
observer.value!.disconnect()
|
||||||
}
|
}
|
||||||
} else if (props.unrender) {
|
} else if (props.unrender) {
|
||||||
clearTimeout(renderTimer)
|
clearTimeout(renderTimer)
|
||||||
|
|
|
@ -15,12 +15,14 @@ const props = withDefaults(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type NodeSlot = {
|
||||||
|
[K in keyof TreeChildNode as TreeChildNode[K] extends Function
|
||||||
|
? never
|
||||||
|
: K]: TreeChildNode[K]
|
||||||
|
}
|
||||||
|
|
||||||
defineSlots<{
|
defineSlots<{
|
||||||
default: (props: {
|
default: (props: NodeSlot) => any
|
||||||
[K in keyof TreeChildNode as TreeChildNode[K] extends Function
|
|
||||||
? never
|
|
||||||
: K]: TreeChildNode[K]
|
|
||||||
}) => any
|
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
function getClasses(node: AnyTreeNode, i: number) {
|
function getClasses(node: AnyTreeNode, i: number) {
|
||||||
|
@ -42,7 +44,7 @@ function getClasses(node: AnyTreeNode, i: number) {
|
||||||
:class="getClasses(node, i)"
|
:class="getClasses(node, i)"
|
||||||
@click="$router.push(node.data.to)"
|
@click="$router.push(node.data.to)"
|
||||||
>
|
>
|
||||||
<slot name="default" v-bind="node" />
|
<slot name="default" v-bind="node as NodeSlot" />
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
v-if="node.height > 0"
|
v-if="node.height > 0"
|
||||||
|
@ -61,8 +63,8 @@ function getClasses(node: AnyTreeNode, i: number) {
|
||||||
|
|
||||||
<BCollapse
|
<BCollapse
|
||||||
v-if="node.height > 0"
|
v-if="node.height > 0"
|
||||||
v-model="node.data.opened"
|
|
||||||
:id="'collapse-' + node.id"
|
:id="'collapse-' + node.id"
|
||||||
|
v-model="node.data.opened"
|
||||||
>
|
>
|
||||||
<RecursiveListGroup
|
<RecursiveListGroup
|
||||||
:tree="node"
|
:tree="node"
|
||||||
|
|
|
@ -13,8 +13,8 @@ const slots = defineSlots<{
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BButtonToolbar :aria-label="label" id="top-bar">
|
<BButtonToolbar id="top-bar" :aria-label="label">
|
||||||
<div id="top-bar-left" class="top-bar-group" v-if="slots['group-left']">
|
<div v-if="slots['group-left']" id="top-bar-left" class="top-bar-group">
|
||||||
<slot name="group-left" />
|
<slot name="group-left" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ const visible = ref(!props.collapsed)
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
v-if="collapsable"
|
v-if="collapsable"
|
||||||
@click="visible = !visible"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline-secondary"
|
variant="outline-secondary"
|
||||||
class="align-self-center ms-auto"
|
class="align-self-center ms-auto"
|
||||||
|
@ -72,6 +71,7 @@ const visible = ref(!props.collapsed)
|
||||||
collapsed: !visible,
|
collapsed: !visible,
|
||||||
[`ms-${buttonUnbreak}-2`]: buttonUnbreak,
|
[`ms-${buttonUnbreak}-2`]: buttonUnbreak,
|
||||||
}"
|
}"
|
||||||
|
@click="visible = !visible"
|
||||||
>
|
>
|
||||||
<YIcon iname="chevron-right" />
|
<YIcon iname="chevron-right" />
|
||||||
<span class="visually-hidden">{{ $t('words.collapse') }}</span>
|
<span class="visually-hidden">{{ $t('words.collapse') }}</span>
|
||||||
|
@ -88,7 +88,7 @@ const visible = ref(!props.collapsed)
|
||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #footer v-if="slots['buttons']">
|
<template v-if="slots['buttons']" #footer>
|
||||||
<slot name="buttons" />
|
<slot name="buttons" />
|
||||||
</template>
|
</template>
|
||||||
</BCard>
|
</BCard>
|
||||||
|
|
|
@ -103,9 +103,9 @@ const class_ = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.yuno-list-group-item-content {
|
// .yuno-list-group-item-content {
|
||||||
// color: $black;
|
// color: $black;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
&-faded > * {
|
&-faded > * {
|
||||||
|
|
|
@ -37,7 +37,7 @@ const model = defineModel<string | number | null>({
|
||||||
return parseInt(value)
|
return parseInt(value)
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const autocomplete = computed(() => {
|
const autocomplete = computed(() => {
|
||||||
|
|
|
@ -34,8 +34,8 @@ withDefaults(
|
||||||
|
|
||||||
<BCol>
|
<BCol>
|
||||||
<div
|
<div
|
||||||
class="w100 d-flex justify-content-between"
|
|
||||||
v-if="count % 2 === 0"
|
v-if="count % 2 === 0"
|
||||||
|
class="w100 d-flex justify-content-between"
|
||||||
>
|
>
|
||||||
<BSkeleton width="100%" height="38px" />
|
<BSkeleton width="100%" height="38px" />
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ Object.values(globalComponentsModules).forEach(
|
||||||
// defineOptions({
|
// defineOptions({
|
||||||
// name: 'FormField',
|
// name: 'FormField',
|
||||||
// })
|
// })
|
||||||
|
// @ts-expect-error
|
||||||
app.component(component.__name || component.name, component)
|
app.component(component.__name || component.name, component)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -318,8 +318,8 @@ async function uninstall() {
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
v-b-modal.uninstall-modal
|
|
||||||
id="uninstall"
|
id="uninstall"
|
||||||
|
v-b-modal.uninstall-modal
|
||||||
variant="danger"
|
variant="danger"
|
||||||
:class="{ 'ms-auto': !app.url }"
|
:class="{ 'ms-auto': !app.url }"
|
||||||
>
|
>
|
||||||
|
@ -451,7 +451,7 @@ async function uninstall() {
|
||||||
|
|
||||||
<BFormInput v-model="form.url.path" class="flex-grow-3" />
|
<BFormInput v-model="form.url.path" class="flex-grow-3" />
|
||||||
|
|
||||||
<BButton @click="changeUrl" variant="info" v-t="'save'" />
|
<BButton v-t="'save'" variant="info" @click="changeUrl" />
|
||||||
</BInputGroup>
|
</BInputGroup>
|
||||||
|
|
||||||
<div v-else class="alert alert-warning">
|
<div v-else class="alert alert-warning">
|
||||||
|
@ -470,9 +470,9 @@ async function uninstall() {
|
||||||
>
|
>
|
||||||
<template v-if="!app.isDefault.value">
|
<template v-if="!app.isDefault.value">
|
||||||
<BButton
|
<BButton
|
||||||
@click="setAsDefaultDomain(false)"
|
|
||||||
id="main-domain"
|
id="main-domain"
|
||||||
variant="success"
|
variant="success"
|
||||||
|
@click="setAsDefaultDomain(false)"
|
||||||
>
|
>
|
||||||
<YIcon iname="star" /> {{ $t('app_make_default') }}
|
<YIcon iname="star" /> {{ $t('app_make_default') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
@ -480,9 +480,9 @@ async function uninstall() {
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<BButton
|
<BButton
|
||||||
@click="setAsDefaultDomain(true)"
|
|
||||||
id="main-domain"
|
id="main-domain"
|
||||||
variant="warning"
|
variant="warning"
|
||||||
|
@click="setAsDefaultDomain(true)"
|
||||||
>
|
>
|
||||||
<YIcon iname="star" /> {{ $t('app_make_not_default') }}
|
<YIcon iname="star" /> {{ $t('app_make_not_default') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
|
@ -244,8 +244,8 @@ const performInstall = onSubmit(async (onError) => {
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<CheckboxItem
|
<CheckboxItem
|
||||||
v-model="force"
|
|
||||||
id="force-install"
|
id="force-install"
|
||||||
|
v-model="force"
|
||||||
:label="$t('app.install.problems.ignore')"
|
:label="$t('app.install.problems.ignore')"
|
||||||
/>
|
/>
|
||||||
</YAlert>
|
</YAlert>
|
||||||
|
|
|
@ -121,10 +121,10 @@ const CheckboxList = createReusableTemplate<{
|
||||||
<!-- SUBMIT -->
|
<!-- SUBMIT -->
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<BButton
|
<BButton
|
||||||
@click="createBackup"
|
|
||||||
v-t="'backup_action'"
|
v-t="'backup_action'"
|
||||||
variant="success"
|
variant="success"
|
||||||
:disabled="selected.length === 0"
|
:disabled="selected.length === 0"
|
||||||
|
@click="createBackup"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</YCard>
|
</YCard>
|
||||||
|
|
|
@ -105,12 +105,12 @@ function downloadBackup() {
|
||||||
<YCard :title="$t('infos')" icon="info-circle" button-unbreak="sm">
|
<YCard :title="$t('infos')" icon="info-circle" button-unbreak="sm">
|
||||||
<template #header-buttons>
|
<template #header-buttons>
|
||||||
<!-- DOWNLOAD ARCHIVE -->
|
<!-- DOWNLOAD ARCHIVE -->
|
||||||
<BButton @click="downloadBackup" size="sm" variant="success">
|
<BButton size="sm" variant="success" @click="downloadBackup">
|
||||||
<YIcon iname="download" /> {{ $t('download') }}
|
<YIcon iname="download" /> {{ $t('download') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
||||||
<!-- DELETE ARCHIVE -->
|
<!-- DELETE ARCHIVE -->
|
||||||
<BButton @click="deleteBackup" size="sm" variant="danger">
|
<BButton size="sm" variant="danger" @click="deleteBackup">
|
||||||
<YIcon iname="trash-o" /> {{ $t('delete') }}
|
<YIcon iname="trash-o" /> {{ $t('delete') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</template>
|
</template>
|
||||||
|
@ -138,24 +138,24 @@ function downloadBackup() {
|
||||||
>
|
>
|
||||||
<template #header-buttons>
|
<template #header-buttons>
|
||||||
<BButton
|
<BButton
|
||||||
|
v-t="'select_all'"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline-secondary"
|
variant="outline-secondary"
|
||||||
@click="toggleSelected()"
|
@click="toggleSelected()"
|
||||||
v-t="'select_all'"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
|
v-t="'select_none'"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline-secondary"
|
variant="outline-secondary"
|
||||||
@click="toggleSelected(false)"
|
@click="toggleSelected(false)"
|
||||||
v-t="'select_none'"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<BFormCheckboxGroup
|
<BFormCheckboxGroup
|
||||||
v-if="hasBackupData"
|
v-if="hasBackupData"
|
||||||
v-model="selected"
|
|
||||||
id="backup-select"
|
id="backup-select"
|
||||||
|
v-model="selected"
|
||||||
name="backup-select"
|
name="backup-select"
|
||||||
size="lg"
|
size="lg"
|
||||||
aria-describedby="backup-restore-feedback"
|
aria-describedby="backup-restore-feedback"
|
||||||
|
@ -170,7 +170,7 @@ function downloadBackup() {
|
||||||
<div class="me-2">
|
<div class="me-2">
|
||||||
<h5 class="fw-bold">
|
<h5 class="fw-bold">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
<small class="text-secondary" v-if="item.size">
|
<small v-if="item.size" class="text-secondary">
|
||||||
({{ humanSize(item.size) }})
|
({{ humanSize(item.size) }})
|
||||||
</small>
|
</small>
|
||||||
</h5>
|
</h5>
|
||||||
|
@ -216,11 +216,11 @@ function downloadBackup() {
|
||||||
<!-- SUBMIT -->
|
<!-- SUBMIT -->
|
||||||
<template v-if="hasBackupData" #buttons>
|
<template v-if="hasBackupData" #buttons>
|
||||||
<BButton
|
<BButton
|
||||||
@click="restoreBackup"
|
v-t="'restore'"
|
||||||
form="backup-restore"
|
form="backup-restore"
|
||||||
variant="success"
|
variant="success"
|
||||||
v-t="'restore'"
|
|
||||||
:disabled="selected.length === 0"
|
:disabled="selected.length === 0"
|
||||||
|
@click="restoreBackup"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</YCard>
|
</YCard>
|
||||||
|
|
|
@ -95,7 +95,7 @@ function shareLogs() {
|
||||||
<div>
|
<div>
|
||||||
<TopBar>
|
<TopBar>
|
||||||
<template #group-right>
|
<template #group-right>
|
||||||
<BButton @click="shareLogs" variant="success">
|
<BButton variant="success" @click="shareLogs">
|
||||||
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</template>
|
</template>
|
||||||
|
@ -129,18 +129,18 @@ function shareLogs() {
|
||||||
<div class="">
|
<div class="">
|
||||||
<BBadge
|
<BBadge
|
||||||
v-if="report.noIssues"
|
v-if="report.noIssues"
|
||||||
variant="success"
|
|
||||||
v-t="'everything_good'"
|
v-t="'everything_good'"
|
||||||
|
variant="success"
|
||||||
/>
|
/>
|
||||||
<BBadge
|
<BBadge
|
||||||
v-if="report.errors"
|
v-if="report.errors"
|
||||||
variant="danger"
|
|
||||||
v-t="{ path: 'issues', args: { count: report.errors } }"
|
v-t="{ path: 'issues', args: { count: report.errors } }"
|
||||||
|
variant="danger"
|
||||||
/>
|
/>
|
||||||
<BBadge
|
<BBadge
|
||||||
v-if="report.warnings"
|
v-if="report.warnings"
|
||||||
variant="warning"
|
|
||||||
v-t="{ path: 'warnings', args: { count: report.warnings } }"
|
v-t="{ path: 'warnings', args: { count: report.warnings } }"
|
||||||
|
variant="warning"
|
||||||
/>
|
/>
|
||||||
<BBadge
|
<BBadge
|
||||||
v-if="report.ignoreds"
|
v-if="report.ignoreds"
|
||||||
|
@ -194,10 +194,10 @@ function shareLogs() {
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
v-if="item.details"
|
v-if="item.details"
|
||||||
|
v-b-toggle="`collapse-${report.id}-item-${i}`"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline-dark"
|
variant="outline-dark"
|
||||||
class="ms-lg-2 mt-2 mt-lg-0"
|
class="ms-lg-2 mt-2 mt-lg-0"
|
||||||
v-b-toggle="`collapse-${report.id}-item-${i}`"
|
|
||||||
>
|
>
|
||||||
<YIcon iname="level-down" /> {{ $t('details') }}
|
<YIcon iname="level-down" /> {{ $t('details') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
|
@ -143,9 +143,9 @@ async function pushDnsChanges() {
|
||||||
<!-- AUTO CONFIG CHANGES -->
|
<!-- AUTO CONFIG CHANGES -->
|
||||||
<template v-if="dnsChanges">
|
<template v-if="dnsChanges">
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
|
||||||
v-for="{ action, records, icon, variant } in dnsChanges"
|
v-for="{ action, records, icon, variant } in dnsChanges"
|
||||||
:key="icon"
|
:key="icon"
|
||||||
|
class="mb-3"
|
||||||
>
|
>
|
||||||
<h4 class="mt-4 mb-2">
|
<h4 class="mt-4 mb-2">
|
||||||
{{ action }}
|
{{ action }}
|
||||||
|
|
|
@ -224,10 +224,10 @@ async function setAsDefaultDomain() {
|
||||||
<BModal
|
<BModal
|
||||||
id="delete-modal"
|
id="delete-modal"
|
||||||
:title="$t('confirm_delete', { name: props.name })"
|
:title="$t('confirm_delete', { name: props.name })"
|
||||||
@ok="deleteDomain"
|
|
||||||
header-bg-variant="warning"
|
header-bg-variant="warning"
|
||||||
header-class="text-black"
|
header-class="text-black"
|
||||||
:body-class="{ 'd-none': !isMainDynDomain }"
|
:body-class="{ 'd-none': !isMainDynDomain }"
|
||||||
|
@ok="deleteDomain"
|
||||||
>
|
>
|
||||||
<BFormGroup v-if="isMainDynDomain">
|
<BFormGroup v-if="isMainDynDomain">
|
||||||
<BFormCheckbox v-model="unsubscribeDomainFromDyndns">
|
<BFormCheckbox v-model="unsubscribeDomainFromDyndns">
|
||||||
|
|
|
@ -180,9 +180,9 @@ async function deleteGroup(name: string) {
|
||||||
<!-- DELETE GROUP -->
|
<!-- DELETE GROUP -->
|
||||||
<BButton
|
<BButton
|
||||||
v-if="!group.isSpecial"
|
v-if="!group.isSpecial"
|
||||||
@click="deleteGroup(group.name)"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="danger"
|
variant="danger"
|
||||||
|
@click="deleteGroup(group.name)"
|
||||||
>
|
>
|
||||||
<YIcon iname="trash-o" /> {{ $t('delete') }}
|
<YIcon iname="trash-o" /> {{ $t('delete') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
@ -198,7 +198,7 @@ async function deleteGroup(name: string) {
|
||||||
<YIcon iname="info-circle" />
|
<YIcon iname="info-circle" />
|
||||||
{{ $t('group_explain_' + group.name) }}
|
{{ $t('group_explain_' + group.name) }}
|
||||||
</p>
|
</p>
|
||||||
<p class="text-primary-emphasis" v-if="group.name === 'visitors'">
|
<p v-if="group.name === 'visitors'" class="text-primary-emphasis">
|
||||||
<em>{{
|
<em>{{
|
||||||
$t('group_explain_visitors_needed_for_external_client')
|
$t('group_explain_visitors_needed_for_external_client')
|
||||||
}}</em>
|
}}</em>
|
||||||
|
@ -206,9 +206,9 @@ async function deleteGroup(name: string) {
|
||||||
</template>
|
</template>
|
||||||
<template v-if="group.name == 'admins' || !group.isSpecial">
|
<template v-if="group.name == 'admins' || !group.isSpecial">
|
||||||
<TagsSelectizeItem
|
<TagsSelectizeItem
|
||||||
|
:id="group.name + '-users'"
|
||||||
v-model="group.members"
|
v-model="group.members"
|
||||||
:options="userOptions"
|
:options="userOptions"
|
||||||
:id="group.name + '-users'"
|
|
||||||
:label="$t('group_add_member')"
|
:label="$t('group_add_member')"
|
||||||
tag-icon="user"
|
tag-icon="user"
|
||||||
items-name="users"
|
items-name="users"
|
||||||
|
@ -225,9 +225,9 @@ async function deleteGroup(name: string) {
|
||||||
</BCol>
|
</BCol>
|
||||||
<BCol>
|
<BCol>
|
||||||
<TagsSelectizeItem
|
<TagsSelectizeItem
|
||||||
|
:id="group.name + '-perms'"
|
||||||
v-model="group.permissions"
|
v-model="group.permissions"
|
||||||
:options="permissionOptions"
|
:options="permissionOptions"
|
||||||
:id="group.name + '-perms'"
|
|
||||||
:label="$t('group_add_permission')"
|
:label="$t('group_add_permission')"
|
||||||
tag-icon="key-modern"
|
tag-icon="key-modern"
|
||||||
items-name="permissions"
|
items-name="permissions"
|
||||||
|
@ -248,9 +248,9 @@ async function deleteGroup(name: string) {
|
||||||
|
|
||||||
<BCol>
|
<BCol>
|
||||||
<TagsSelectizeItem
|
<TagsSelectizeItem
|
||||||
|
:id="userName + '-perms'"
|
||||||
v-model="userGroups[userName].permissions"
|
v-model="userGroups[userName].permissions"
|
||||||
:options="permissionOptions"
|
:options="permissionOptions"
|
||||||
:id="userName + '-perms'"
|
|
||||||
:label="$t('group_add_permission')"
|
:label="$t('group_add_permission')"
|
||||||
tag-icon="key-modern"
|
tag-icon="key-modern"
|
||||||
items-name="permissions"
|
items-name="permissions"
|
||||||
|
@ -262,10 +262,10 @@ async function deleteGroup(name: string) {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<TagsSelectizeItem
|
<TagsSelectizeItem
|
||||||
|
id="user-groups"
|
||||||
v-model="activeUserGroups"
|
v-model="activeUserGroups"
|
||||||
auto
|
auto
|
||||||
:options="userOptions"
|
:options="userOptions"
|
||||||
id="user-groups"
|
|
||||||
:label="$t('group_add_member')"
|
:label="$t('group_add_member')"
|
||||||
no-tags
|
no-tags
|
||||||
items-name="users"
|
items-name="users"
|
||||||
|
|
|
@ -83,22 +83,22 @@ function shareLogs() {
|
||||||
<template #header-buttons>
|
<template #header-buttons>
|
||||||
<template v-if="infos.status === 'running'">
|
<template v-if="infos.status === 'running'">
|
||||||
<!-- RESTART SERVICE -->
|
<!-- RESTART SERVICE -->
|
||||||
<BButton @click="updateService('restart')" variant="warning">
|
<BButton variant="warning" @click="updateService('restart')">
|
||||||
<YIcon iname="refresh" /> {{ $t('restart') }}
|
<YIcon iname="refresh" /> {{ $t('restart') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
||||||
<!-- STOP SERVICE -->
|
<!-- STOP SERVICE -->
|
||||||
<BButton
|
<BButton
|
||||||
v-if="!isCritical"
|
v-if="!isCritical"
|
||||||
@click="updateService('stop')"
|
|
||||||
variant="danger"
|
variant="danger"
|
||||||
|
@click="updateService('stop')"
|
||||||
>
|
>
|
||||||
<YIcon iname="warning" /> {{ $t('stop') }}
|
<YIcon iname="warning" /> {{ $t('stop') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- START SERVICE -->
|
<!-- START SERVICE -->
|
||||||
<BButton v-else @click="updateService('start')" variant="success">
|
<BButton v-else variant="success" @click="updateService('start')">
|
||||||
<YIcon iname="play" /> {{ $t('start') }}
|
<YIcon iname="play" /> {{ $t('start') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -280,8 +280,8 @@ function onFormPortToggling() {
|
||||||
|
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<BButton
|
<BButton
|
||||||
@click="toggleUpnp"
|
|
||||||
:variant="!upnpEnabled ? 'success' : 'danger'"
|
:variant="!upnpEnabled ? 'success' : 'danger'"
|
||||||
|
@click="toggleUpnp"
|
||||||
>
|
>
|
||||||
{{ $t(!upnpEnabled ? 'enable' : 'disable') }}
|
{{ $t(!upnpEnabled ? 'enable' : 'disable') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
|
@ -113,7 +113,7 @@ function shareLogs() {
|
||||||
<!-- LOGS CARD -->
|
<!-- LOGS CARD -->
|
||||||
<YCard :title="$t('logs')" icon="file-text" no-body>
|
<YCard :title="$t('logs')" icon="file-text" no-body>
|
||||||
<template #header-buttons>
|
<template #header-buttons>
|
||||||
<BButton @click="shareLogs" variant="success">
|
<BButton variant="success" @click="shareLogs">
|
||||||
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</template>
|
</template>
|
||||||
|
@ -127,7 +127,7 @@ function shareLogs() {
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
||||||
<pre class="log unselectable"><code v-html="logs" /></pre>
|
<pre class="log unselectable"><code v-html="logs" /></pre>
|
||||||
<BButton @click="shareLogs" variant="success" class="w-100 rounded-0">
|
<BButton variant="success" class="w-100 rounded-0" @click="shareLogs">
|
||||||
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
<YIcon iname="cloud-upload" /> {{ $t('logs_share_with_yunopaste') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</YCard>
|
</YCard>
|
||||||
|
|
|
@ -63,7 +63,7 @@ async function skipMigration(id: string) {
|
||||||
<div>
|
<div>
|
||||||
<!-- PENDING MIGRATIONS -->
|
<!-- PENDING MIGRATIONS -->
|
||||||
<YCard :title="$t('migrations_pending')" icon="cogs" no-body>
|
<YCard :title="$t('migrations_pending')" icon="cogs" no-body>
|
||||||
<template #header-buttons v-if="pending">
|
<template v-if="pending" #header-buttons>
|
||||||
<BButton size="sm" variant="success" @click="runMigrations">
|
<BButton size="sm" variant="success" @click="runMigrations">
|
||||||
<YIcon iname="play" /> {{ $t('run') }}
|
<YIcon iname="play" /> {{ $t('run') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
@ -109,8 +109,8 @@ async function skipMigration(id: string) {
|
||||||
</BFormCheckbox>
|
</BFormCheckbox>
|
||||||
<BFormInvalidFeedback
|
<BFormInvalidFeedback
|
||||||
v-if="checked[id] === false"
|
v-if="checked[id] === false"
|
||||||
:state="false"
|
|
||||||
:id="'checkbox-feedback-' + number"
|
:id="'checkbox-feedback-' + number"
|
||||||
|
:state="false"
|
||||||
>
|
>
|
||||||
{{ $t('migrations_disclaimer_not_checked') }}
|
{{ $t('migrations_disclaimer_not_checked') }}
|
||||||
</BFormInvalidFeedback>
|
</BFormInvalidFeedback>
|
||||||
|
@ -133,7 +133,7 @@ async function skipMigration(id: string) {
|
||||||
</span>
|
</span>
|
||||||
</BCardBody>
|
</BCardBody>
|
||||||
|
|
||||||
<BListGroup flush v-else-if="done">
|
<BListGroup v-else-if="done" flush>
|
||||||
<BListGroupItem v-for="{ number, description } in done" :key="number">
|
<BListGroupItem v-for="{ number, description } in done" :key="number">
|
||||||
{{ number }}. {{ description }}
|
{{ number }}. {{ description }}
|
||||||
</BListGroupItem>
|
</BListGroupItem>
|
||||||
|
|
|
@ -30,7 +30,7 @@ async function triggerAction(action: 'reboot' | 'shutdown') {
|
||||||
:label="$t('tools_reboot')"
|
:label="$t('tools_reboot')"
|
||||||
label-for="reboot"
|
label-for="reboot"
|
||||||
>
|
>
|
||||||
<BButton @click="triggerAction('reboot')" variant="danger" id="reboot">
|
<BButton id="reboot" variant="danger" @click="triggerAction('reboot')">
|
||||||
<YIcon iname="refresh" /> {{ $t('tools_reboot_btn') }}
|
<YIcon iname="refresh" /> {{ $t('tools_reboot_btn') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
</BFormGroup>
|
</BFormGroup>
|
||||||
|
@ -45,9 +45,9 @@ async function triggerAction(action: 'reboot' | 'shutdown') {
|
||||||
label-for="shutdown"
|
label-for="shutdown"
|
||||||
>
|
>
|
||||||
<BButton
|
<BButton
|
||||||
@click="triggerAction('shutdown')"
|
|
||||||
variant="danger"
|
|
||||||
id="shutdown"
|
id="shutdown"
|
||||||
|
variant="danger"
|
||||||
|
@click="triggerAction('shutdown')"
|
||||||
>
|
>
|
||||||
<YIcon iname="power-off" /> {{ $t('tools_shutdown_btn') }}
|
<YIcon iname="power-off" /> {{ $t('tools_shutdown_btn') }}
|
||||||
</BButton>
|
</BButton>
|
||||||
|
|
|
@ -129,8 +129,8 @@ async function performSystemUpgrade() {
|
||||||
|
|
||||||
<template v-if="system.length" #buttons>
|
<template v-if="system.length" #buttons>
|
||||||
<BButton
|
<BButton
|
||||||
variant="success"
|
|
||||||
v-t="'system_upgrade_all_packages_btn'"
|
v-t="'system_upgrade_all_packages_btn'"
|
||||||
|
variant="success"
|
||||||
@click="performSystemUpgrade()"
|
@click="performSystemUpgrade()"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -153,9 +153,9 @@ async function performSystemUpgrade() {
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<BButton
|
<BButton
|
||||||
|
v-t="'system_upgrade_btn'"
|
||||||
variant="success"
|
variant="success"
|
||||||
size="sm"
|
size="sm"
|
||||||
v-t="'system_upgrade_btn'"
|
|
||||||
@click="confirmAppsUpgrade(id)"
|
@click="confirmAppsUpgrade(id)"
|
||||||
/>
|
/>
|
||||||
</BListGroupItem>
|
</BListGroupItem>
|
||||||
|
@ -169,8 +169,8 @@ async function performSystemUpgrade() {
|
||||||
|
|
||||||
<template v-if="apps.length" #buttons>
|
<template v-if="apps.length" #buttons>
|
||||||
<BButton
|
<BButton
|
||||||
variant="success"
|
|
||||||
v-t="'system_upgrade_all_applications_btn'"
|
v-t="'system_upgrade_all_applications_btn'"
|
||||||
|
variant="success"
|
||||||
@click="confirmAppsUpgrade()"
|
@click="confirmAppsUpgrade()"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -210,9 +210,9 @@ async function performSystemUpgrade() {
|
||||||
<div class="card-collapse-wrapper">
|
<div class="card-collapse-wrapper">
|
||||||
<CardCollapse
|
<CardCollapse
|
||||||
v-for="{ id, name, notif } in preUpgrade.apps"
|
v-for="{ id, name, notif } in preUpgrade.apps"
|
||||||
|
:id="`${id}-notifs`"
|
||||||
:key="`${id}-notifs`"
|
:key="`${id}-notifs`"
|
||||||
:title="name"
|
:title="name"
|
||||||
:id="`${id}-notifs`"
|
|
||||||
visible
|
visible
|
||||||
flush
|
flush
|
||||||
>
|
>
|
||||||
|
|
|
@ -115,9 +115,9 @@ function deleteUser() {
|
||||||
v-if="user"
|
v-if="user"
|
||||||
id="delete-modal"
|
id="delete-modal"
|
||||||
:title="$t('confirm_delete', { name })"
|
:title="$t('confirm_delete', { name })"
|
||||||
@ok="deleteUser"
|
|
||||||
header-bg-variant="warning"
|
header-bg-variant="warning"
|
||||||
header-class="text-black"
|
header-class="text-black"
|
||||||
|
@ok="deleteUser"
|
||||||
>
|
>
|
||||||
<BFormGroup>
|
<BFormGroup>
|
||||||
<BFormCheckbox v-model="purge">
|
<BFormCheckbox v-model="purge">
|
||||||
|
|
Loading…
Reference in a new issue