Skip to content

Commit

Permalink
Code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkis committed Jan 24, 2025
1 parent 3ebd7f6 commit 4fe2774
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Tekst-Web/src/components/CollapsableContent.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { $t } from '@/i18n';
import { CompressIcon, ExpandIcon } from '@/icons';
import { useElementSize } from '@vueuse/core';
import { NButton, NIcon } from 'naive-ui';
Expand All @@ -17,8 +16,6 @@ const props = withDefaults(
{
collapsable: true,
heightTreshPx: 150,
collapseText: $t('general.collapseAction'),
expandText: $t('general.expandAction'),
scrollable: true,
showBtnText: true,
}
Expand Down Expand Up @@ -57,7 +54,11 @@ const isCollapsed = computed(() => isCollapsable.value && collapsed.value);
<n-icon :component="isCollapsed ? ExpandIcon : CompressIcon" />
</template>
<template v-if="showBtnText">
{{ isCollapsed ? expandText : collapseText }}
{{
isCollapsed
? expandText || $t('general.expandAction')
: collapseText || $t('general.collapseAction')
}}
</template>
</n-button>
</div>
Expand Down
6 changes: 5 additions & 1 deletion Tekst-Web/src/components/generic/HydratedHtml.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ onMounted(hydrate);
:title="modalId && modalTitles[modalId]"
width="wide"
>
<hydrated-html :html="modalId && modalHtml[modalId]" :style="style" @click-location-ref="showModal = false"/>
<hydrated-html
:html="modalId && modalHtml[modalId]"
:style="style"
@click-location-ref="showModal = false"
/>
</generic-modal>
</template>

Expand Down

0 comments on commit 4fe2774

Please sign in to comment.