Skip to content

Commit d06ad0e

Browse files
committed
fixup! fix(talk): add dot badge on main menu when update is available
1 parent 3d3da53 commit d06ad0e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/talk/renderer/TitleBar/components/MainMenu.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ window.TALK_DESKTOP.checkForUpdate()
6363
target="_blank"
6464
close-after-click>
6565
<template #icon>
66-
<UiDotBadge inset-block-start="30%" enabled>
66+
<UiDotBadge
67+
inset-block-start="32%"
68+
inset-inline-end="22%"
69+
enabled
70+
no-outline>
6771
<IconCloudDownloadOutline :size="20" />
6872
</UiDotBadge>
6973
</template>

src/talk/renderer/TitleBar/components/UiDotBadge.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const {
99
size = '6px',
1010
insetBlockStart = '20%',
1111
insetInlineEnd = '20%',
12+
noOutline = false,
1213
} = defineProps<{
1314
/**
1415
* Whether to show the dot
@@ -28,12 +29,17 @@ const {
2829
* Default is 20%, but due to different icon's shape the perfect position might vary.
2930
*/
3031
insetInlineEnd?: string
32+
/**
33+
* Whether to remove the transparent outline around the dot icon.
34+
* The outline helps to separate the dot from the icon, but may look bad when the dote does not overlap with the icon at all.
35+
*/
36+
noOutline?: boolean
3137
}>()
3238
</script>
3339

3440
<template>
3541
<span :class="$style.dotBadge">
36-
<span :class="{ [$style.dotBadge__iconWithDotHole]: enabled }">
42+
<span :class="{ [$style.dotBadge__iconWithDotHole]: enabled && !noOutline }">
3743
<slot />
3844
</span>
3945
<sup v-if="enabled" :class="[$style.dotBadge__dot]" />

0 commit comments

Comments
 (0)