upd: change formlink handling

This commit is contained in:
Mar0xy 2023-12-03 20:01:05 +01:00
parent 0158b6fc1b
commit 304a91a474
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
2 changed files with 10 additions and 10 deletions

View file

@ -13,14 +13,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ph-arrow-square-out ph-bold ph-lg"></i> <i class="ph-arrow-square-out ph-bold ph-lg"></i>
</span> </span>
</a> </a>
<MkA v-else-if="to" :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
<span :class="$style.icon"><slot name="icon"></slot></span>
<span :class="$style.text"><slot></slot></span>
<span :class="$style.suffix">
<span :class="$style.suffixText"><slot name="suffix"></slot></span>
<i class="ph-caret-right ph-bold ph-lg"></i>
</span>
</MkA>
<a v-else-if="onClick" :class="[$style.main, { [$style.active]: active }]" class="_button" :behavior="behavior" @click="onClick"> <a v-else-if="onClick" :class="[$style.main, { [$style.active]: active }]" class="_button" :behavior="behavior" @click="onClick">
<span :class="$style.icon"><slot name="icon"></slot></span> <span :class="$style.icon"><slot name="icon"></slot></span>
<span :class="$style.text"><slot></slot></span> <span :class="$style.text"><slot></slot></span>
@ -29,6 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ph-caret-right ph-bold ph-lg"></i> <i class="ph-caret-right ph-bold ph-lg"></i>
</span> </span>
</a> </a>
<MkA v-else :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
<span :class="$style.icon"><slot name="icon"></slot></span>
<span :class="$style.text"><slot></slot></span>
<span :class="$style.suffix">
<span :class="$style.suffixText"><slot name="suffix"></slot></span>
<i class="ph-caret-right ph-bold ph-lg"></i>
</span>
</MkA>
</div> </div>
</template> </template>
@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { } from 'vue'; import { } from 'vue';
const props = defineProps<{ const props = defineProps<{
to?: string; to: string;
active?: boolean; active?: boolean;
external?: boolean; external?: boolean;
onClick?: () => void; onClick?: () => void;

View file

@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection> <FormSection>
<div class="_gaps_m"> <div class="_gaps_m">
<FormLink @click="chooseUploadFolder()"> <FormLink to="" @click="chooseUploadFolder()">
{{ i18n.ts.uploadFolder }} {{ i18n.ts.uploadFolder }}
<template #suffix>{{ uploadFolder ? uploadFolder.name : '-' }}</template> <template #suffix>{{ uploadFolder ? uploadFolder.name : '-' }}</template>
<template #suffixIcon><i class="ph-folder ph-bold ph-lg"></i></template> <template #suffixIcon><i class="ph-folder ph-bold ph-lg"></i></template>