summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-12-03 20:01:05 +0100
committerMar0xy <marie@kaifa.ch>2023-12-03 20:01:05 +0100
commit304a91a4744e7a2c803b61cf6d9f542468e2fcea (patch)
treed0da3f443171d08d637145dce60f40db01e7ddbe
parentfix: Drive folder button not working (diff)
downloadsharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.tar.gz
sharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.tar.bz2
sharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.zip
upd: change formlink handling
-rw-r--r--packages/frontend/src/components/form/link.vue10
-rw-r--r--packages/frontend/src/pages/settings/drive.vue2
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/frontend/src/components/form/link.vue b/packages/frontend/src/components/form/link.vue
index 94ec9a0ba4..88602a007c 100644
--- a/packages/frontend/src/components/form/link.vue
+++ b/packages/frontend/src/components/form/link.vue
@@ -13,22 +13,22 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ph-arrow-square-out ph-bold ph-lg"></i>
</span>
</a>
- <MkA v-else-if="to" :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
+ <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.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>
+ <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>
- </a>
+ </MkA>
</div>
</template>
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { } from 'vue';
const props = defineProps<{
- to?: string;
+ to: string;
active?: boolean;
external?: boolean;
onClick?: () => void;
diff --git a/packages/frontend/src/pages/settings/drive.vue b/packages/frontend/src/pages/settings/drive.vue
index bff7d5350c..5b9bcce944 100644
--- a/packages/frontend/src/pages/settings/drive.vue
+++ b/packages/frontend/src/pages/settings/drive.vue
@@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection>
<div class="_gaps_m">
- <FormLink @click="chooseUploadFolder()">
+ <FormLink to="" @click="chooseUploadFolder()">
{{ i18n.ts.uploadFolder }}
<template #suffix>{{ uploadFolder ? uploadFolder.name : '-' }}</template>
<template #suffixIcon><i class="ph-folder ph-bold ph-lg"></i></template>