Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions core/src/components/AppMenuIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
</template>

<script setup lang="ts">
import type { INavigationEntry } from '../types/navigation'
import type { INavigationEntry } from '../types/navigation.ts'

import { n } from '@nextcloud/l10n'
import { computed } from 'vue'

import IconDot from 'vue-material-design-icons/Circle.vue'

const props = defineProps<{
app: INavigationEntry
}>()

const ariaHidden = computed(() => String(props.app.unread > 0))
// only hide if there are no unread notifications
const ariaHidden = computed(() => !props.app.unread ? 'true' : undefined)

const ariaLabel = computed(() => {
if (ariaHidden.value === 'true') {
return ''
if (!props.app.unread) {
return undefined
}
return props.app.name
+ (props.app.unread > 0 ? ` (${n('core', '{count} notification', '{count} notifications', props.app.unread, { count: props.app.unread })})` : '')

return `${props.app.name} (${n('core', '{count} notification', '{count} notifications', props.app.unread, { count: props.app.unread })})`
})
</script>

Expand Down
4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

Loading