fix: Drive folder button not working

Closes #199
This commit is contained in:
Mar0xy 2023-12-03 19:59:01 +01:00
parent 620be4a9e1
commit 0158b6fc1b
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
2 changed files with 13 additions and 2 deletions

View file

@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<i class="ph-arrow-square-out ph-bold ph-lg"></i>
</span>
</a>
<MkA v-else :class="[$style.main, { [$style.active]: active }]" class="_button" :to="to" :behavior="behavior">
<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">
@ -21,6 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<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">
<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>
</div>
</template>
@ -28,9 +36,10 @@ SPDX-License-Identifier: AGPL-3.0-only
import { } from 'vue';
const props = defineProps<{
to: string;
to?: string;
active?: boolean;
external?: boolean;
onClick?: () => void;
behavior?: null | 'window' | 'browser';
inline?: boolean;
}>();