summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/form
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 /packages/frontend/src/components/form
parentfix: Drive folder button not working (diff)
downloadsharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.tar.gz
sharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.tar.bz2
sharkey-304a91a4744e7a2c803b61cf6d9f542468e2fcea.zip
upd: change formlink handling
Diffstat (limited to 'packages/frontend/src/components/form')
-rw-r--r--packages/frontend/src/components/form/link.vue10
1 files changed, 5 insertions, 5 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;