Skip to content

Commit 0e4be5d

Browse files
committed
Fix and simplify some content widgets' UI code
1 parent 52c1005 commit 0e4be5d

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

Tekst-Web/src/components/browse/ContentContainerHeaderWidget.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Component } from 'vue';
55
defineProps<{
66
iconComponent: Component;
77
title: string;
8-
disabled?: boolean;
98
full?: boolean;
109
toggled?: boolean;
1110
highlight?: boolean;
@@ -22,20 +21,13 @@ defineProps<{
2221
:color="highlight && !toggled ? 'var(--error-color)' : undefined"
2322
:focusable="false"
2423
:title="!full ? title : undefined"
25-
:disabled="disabled"
26-
:class="{ 'block-left-align': full }"
24+
:style="{ 'justify-content': full ? 'flex-start': undefined }"
2725
>
2826
<template #icon>
2927
<n-icon :component="iconComponent" />
3028
</template>
31-
<template v-if="full" #default>
29+
<span v-if="full">
3230
{{ title }}
33-
</template>
31+
</span>
3432
</n-button>
3533
</template>
36-
37-
<style scoped>
38-
.block-left-align {
39-
justify-content: flex-start;
40-
}
41-
</style>

Tekst-Web/src/components/resource/JumpToContentWidget.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ async function handleClick() {
5050
<content-container-header-widget
5151
v-if="
5252
resource.level === browse.level &&
53-
resource.config.general.searchableAdv &&
54-
resource.config.general.searchableQuick
53+
(resource.config.general.searchableAdv || resource.config.general.searchableQuick)
5554
"
5655
:full="full"
5756
:title="

0 commit comments

Comments
 (0)