Skip to content

Commit

Permalink
small PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ltkum committed Nov 15, 2024
1 parent 6a49d74 commit da17ae9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/utils/components/ErrorWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const store = useStore()
const showBody = ref(true)
const hasDevSiteWarning = computed(() => store.getters.hasDevSiteWarning)
const errorCount = computed(() =>
store.state.ui.errors.size > 1 ? `(${store.state.ui.errors.size})` : ''
)
const errorCount = computed(() => store.state.ui.errors.size)
const i18n = useI18n()
Expand All @@ -45,7 +43,7 @@ const emit = defineEmits(['close'])
data-cy="window-header"
>
<span v-if="title" class="me-auto text-truncate"
>{{ i18n.t(title) }}{{ errorCount }}</span
>{{ i18n.t(title) }}<span v-if="errorCount > 1"> ({{ errorCount }})</span></span
>
<span v-else class="me-auto" />
<button
Expand Down
7 changes: 3 additions & 4 deletions src/utils/components/WarningWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const store = useStore()
const showBody = ref(true)
const hasDevSiteWarning = computed(() => store.getters.hasDevSiteWarning)
const warningCount = computed(() =>
store.state.ui.warnings.size > 1 ? `(${store.state.ui.warnings.size})` : ''
)
const warningCount = computed(() => store.state.ui.warnings.size)
const i18n = useI18n()
Expand All @@ -45,8 +43,9 @@ const emit = defineEmits(['close'])
data-cy="window-header"
>
<span v-if="title" class="me-auto text-truncate"
>{{ i18n.t(title) }}{{ warningCount }}</span
>{{ i18n.t(title) }}<span v-if="warningCount > 1"> ({{ warningCount }})</span></span
>

<span v-else class="me-auto" />
<button class="btn btn-sm btn-light me-2" @click.stop="showBody = !showBody">
<FontAwesomeIcon :icon="`caret-${showBody ? 'down' : 'right'}`" />
Expand Down

0 comments on commit da17ae9

Please sign in to comment.