Skip to content

Commit 461c322

Browse files
anteriovieirayyx990803
authored andcommitted
Rotate refresh icon (#332)
1 parent fd6c704 commit 461c322

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/devtools/App.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<a class="button refresh"
3535
@click="refresh"
3636
title="Force Refresh">
37-
<i class="material-icons">cached</i>
37+
<i class="material-icons" ref="refresh">refresh</i>
3838
<span class="pane-name">Refresh</span>
3939
</a>
4040
<span class="active-bar"></span>
@@ -78,7 +78,13 @@ export default {
7878
}
7979
},
8080
refresh () {
81+
let refreshIcon = this.$refs.refresh
82+
refreshIcon.style.animation = 'none'
83+
8184
bridge.send('refresh')
85+
bridge.once('flush', () => {
86+
refreshIcon.style.animation = 'rotate 1s'
87+
})
8288
},
8389
updateActiveBar () {
8490
const activeButton = this.$el.querySelector('.button.active')

src/devtools/global.styl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,10 @@ $arrow-color = #444
9595
text-align center
9696
padding 0.5em
9797
margin 0 auto
98+
99+
@keyframes rotate
100+
0%
101+
transform rotate(0deg)
102+
100%
103+
transform rotate(360deg)
104+

0 commit comments

Comments
 (0)