Skip to content

Commit 9aec563

Browse files
committed
feat(ui): status color bullet on tasks with image icon
1 parent 1fcd2d0 commit 9aec563

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

packages/@vue/cli-ui/src/components/ItemLogo.vue

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
icon="done"
1515
/>
1616
<img
17-
v-else-if="!isMaterialIcon && !error"
17+
v-else-if="displayImage"
1818
class="image"
1919
:src="image"
2020
:key="image"
@@ -26,6 +26,11 @@
2626
:icon="error || !image ? fallbackIcon : image"
2727
/>
2828
</div>
29+
30+
<div
31+
v-if="displayImage && colorBullet"
32+
class="color-bullet"
33+
/>
2934
</div>
3035
</template>
3136

@@ -45,6 +50,11 @@ export default {
4550
selected: {
4651
type: Boolean,
4752
default: false
53+
},
54+
55+
colorBullet: {
56+
type: Boolean,
57+
default: false
4858
}
4959
},
5060
@@ -58,6 +68,10 @@ export default {
5868
computed: {
5969
isMaterialIcon () {
6070
return /^[a-z0-9_]+$/.test(this.image)
71+
},
72+
73+
displayImage () {
74+
return !this.isMaterialIcon && !this.error
6175
}
6276
},
6377
@@ -80,6 +94,7 @@ export default {
8094
8195
.item-logo
8296
margin-right $padding-item
97+
position relative
8398
.wrapper
8499
h-box()
85100
box-center()
@@ -98,6 +113,19 @@ export default {
98113
>>> svg
99114
fill rgba($color-text-light, .3)
100115
116+
.color-bullet
117+
position absolute
118+
width 8px
119+
height @width
120+
border-radius 50%
121+
right -1px
122+
bottom @right
123+
background white
124+
border solid 2px $vue-ui-color-light-neutral
125+
visibility hidden
126+
.vue-ui-dark-mode &
127+
border-color $vue-ui-color-dark
128+
101129
&.vuejs
102130
.wrapper
103131
background lighten($vue-ui-color-primary, 70%)
@@ -128,14 +156,23 @@ export default {
128156
.vue-ui-icon
129157
>>> svg
130158
fill $vue-ui-color-danger
159+
.color-bullet
160+
visibility visible
161+
background $vue-ui-color-danger
131162
&.warning
132163
.vue-ui-icon
133164
>>> svg
134165
fill $vue-ui-color-warning
166+
.color-bullet
167+
visibility visible
168+
background $vue-ui-color-warning
135169
&.info
136170
.vue-ui-icon
137171
>>> svg
138172
fill $vue-ui-color-info
173+
.color-bullet
174+
visibility visible
175+
background $vue-ui-color-info
139176
&.success
140177
.vue-ui-icon
141178
>>> svg

packages/@vue/cli-ui/src/components/TaskItem.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
:image="logo ? logo : iconData.icon"
1515
:class="iconData.class"
1616
v-tooltip="status"
17+
color-bullet
1718
/>
1819

1920
<ListItemInfo

0 commit comments

Comments
 (0)