Skip to content

Commit 9a0d0a5

Browse files
committed
chore: wip refresh button
1 parent b4f2967 commit 9a0d0a5

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

src/background.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,12 @@ async function detectVue (tabId, url) {
7979
path: 'icons/icon-128.png'
8080
})
8181
}
82+
} else if (hasVue) {
83+
await analyze(tabId, url)
8284
} else {
83-
if (hasVue) {
84-
await analyze(tabId, url)
85-
} else {
86-
store.commit('SET_SHOWCASE', 'noVue')
87-
}
85+
store.commit('SET_SHOWCASE', 'noVue')
8886
}
89-
} catch (e) {
90-
}
87+
} catch (e) {}
9188

9289
store.commit('SET_ISLOADING', false)
9390
}

src/images/refresh.svg

Lines changed: 1 addition & 0 deletions
Loading

src/popup/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="extension bg-white">
2+
<div class="relative extension bg-white">
33
<div class="px-4 pt-4">
44
<div class="flex items-center justify-between mb-8">
55
<a href="http://vuetelemetry.com/" target="_blank">
@@ -108,6 +108,7 @@
108108
</a>
109109
</div>
110110
</div>
111+
<RefreshIcon @click="refresh" class="cursor-pointer absolute bottom-0 right-0 mb-4 mr-4 w-4 h-4 text-grey-500 hover:text-grey-800" />
111112
</div>
112113
<div v-else-if="state === 'error'">An error occurred</div>
113114
<div v-else-if="state === 'noVue'">Vue is not used on this website</div>
@@ -127,6 +128,7 @@ import GithubIcon from '../images/github.svg?inline'
127128
import InfoIcon from '../images/info.svg?inline'
128129
import PluginsIcon from '../images/plugins.svg?inline'
129130
import ModulesIcon from '../images/modules.svg?inline'
131+
import RefreshIcon from '../images/refresh.svg?inline'
130132
131133
import ListBlock from '../components/ListBlock.vue'
132134
@@ -139,6 +141,7 @@ export default {
139141
InfoIcon,
140142
PluginsIcon,
141143
ModulesIcon,
144+
RefreshIcon,
142145
ListBlock
143146
},
144147
computed: {
@@ -160,6 +163,10 @@ export default {
160163
methods: {
161164
getURL (path) {
162165
return `https://icons.vuetelemetry.com${path}`
166+
},
167+
refresh() {
168+
// TODO: set loading state and call analyze again
169+
console.log('refresh')
163170
}
164171
}
165172
}

0 commit comments

Comments
 (0)