Skip to content

Commit 8219002

Browse files
author
Guillaume Chau
committed
chore: install @vue/ui and migrate icons
1 parent 12fbf26 commit 8219002

File tree

14 files changed

+67
-106
lines changed

14 files changed

+67
-106
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@
5656
"webpack-merge": "^4.1.2"
5757
},
5858
"dependencies": {
59+
"@vue/ui": "^0.4.7",
5960
"circular-json-es6": "^2.0.1",
6061
"lodash.debounce": "^4.0.8",
6162
"lodash.groupby": "^4.6.0",
62-
"material-design-icons": "^3.0.1",
6363
"uglifyjs-webpack-plugin": "^1.1.4",
64-
"v-tooltip": "^2.0.0-rc.25",
6564
"vue": "^2.5.13",
6665
"vue-router": "^3.0.1",
6766
"vuex": "^3.0.1"

src/devtools/App.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
v-tooltip="$t('App.components.tooltip')"
1717
@click="switchTab('components')"
1818
>
19-
<BaseIcon icon="device_hub"/>
19+
<VueIcon icon="device_hub"/>
2020
<span class="pane-name">Components</span>
2121
</a>
2222
<a
@@ -25,7 +25,7 @@
2525
v-tooltip="$t('App.vuex.tooltip')"
2626
@click="switchTab('vuex')"
2727
>
28-
<BaseIcon icon="restore"/>
28+
<VueIcon icon="restore"/>
2929
<span class="pane-name">Vuex</span>
3030
</a>
3131
<a
@@ -34,7 +34,7 @@
3434
v-tooltip="$t('App.events.tooltip')"
3535
@click="switchTab('events')"
3636
>
37-
<BaseIcon icon="grain"/>
37+
<VueIcon icon="grain"/>
3838
<span class="pane-name">Events</span>
3939
<span class="event-count" v-if="newEventCount > 0">{{ newEventCount }}</span>
4040
</a>
@@ -43,7 +43,7 @@
4343
v-tooltip="$t('App.refresh.tooltip')"
4444
@click="refresh"
4545
>
46-
<BaseIcon ref="refresh" icon="refresh"/>
46+
<VueIcon ref="refresh" icon="refresh"/>
4747
<span class="pane-name">Refresh</span>
4848
</a>
4949
<span class="active-bar"></span>
@@ -211,7 +211,7 @@ export default {
211211
.dark &
212212
background-color $dark-background-color
213213
214-
.svg-icon
214+
.vue-ui-icon
215215
width 20px
216216
height @width
217217
margin-right 5px
@@ -221,12 +221,12 @@ export default {
221221
222222
&:hover
223223
color #555
224-
.svg-icon >>> svg
224+
.vue-ui-icon >>> svg
225225
fill @color
226226
227227
&.active
228228
color $active-color
229-
.svg-icon >>> svg
229+
.vue-ui-icon >>> svg
230230
fill @color
231231
232232
&:first-of-type

src/devtools/components/ActionHeader.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
&-bracket
3333
color #ccc
3434
35-
.svg-icon
35+
.vue-ui-icon
3636
width 16px
3737
height @width
3838
margin-right 0
@@ -50,7 +50,7 @@
5050
opacity .8
5151
overflow hidden
5252
53-
.svg-icon >>> svg
53+
.vue-ui-icon >>> svg
5454
transition fill .25s
5555
5656
&:first-of-type
@@ -61,7 +61,7 @@
6161
opacity 1
6262
color $active-color
6363
64-
.svg-icon >>> svg
64+
.vue-ui-icon >>> svg
6565
fill @color
6666
6767
&.disabled

src/devtools/components/DataField.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@
4848
@keydown.enter="submitEdit()"
4949
>
5050
<span class="actions">
51-
<BaseIcon
51+
<VueIcon
5252
v-if="!editValid"
5353
class="icon-button warning"
5454
v-tooltip="editErrorMessage"
5555
icon="warning"
5656
/>
5757
<template v-else>
58-
<BaseIcon
58+
<VueIcon
5959
class="icon-button medium"
6060
icon="cancel"
6161
v-tooltip="$t('DataField.edit.cancel.tooltip')"
6262
@click="cancelEdit()"
6363
/>
64-
<BaseIcon
64+
<VueIcon
6565
class="icon-button"
6666
icon="save"
6767
v-tooltip="$t('DataField.edit.submit.tooltip')"
@@ -79,15 +79,15 @@
7979
v-html="formattedValue"
8080
/>
8181
<span class="actions">
82-
<BaseIcon
82+
<VueIcon
8383
v-if="isValueEditable"
8484
class="edit-value icon-button"
8585
icon="edit"
8686
v-tooltip="'Edit value'"
8787
@click="openEdit()"
8888
/>
8989
<template v-if="quickEdits">
90-
<BaseIcon
90+
<VueIcon
9191
v-for="(info, index) of quickEdits"
9292
:key="index"
9393
class="quick-edit icon-button"
@@ -97,14 +97,14 @@
9797
@click="quickEdit(info, $event)"
9898
/>
9999
</template>
100-
<BaseIcon
100+
<VueIcon
101101
v-if="isSubfieldsEditable && !addingValue"
102102
class="add-value icon-button"
103103
icon="add_circle"
104104
v-tooltip="'Add new value'"
105105
@click="addNewValue()"
106106
/>
107-
<BaseIcon
107+
<VueIcon
108108
v-if="removable"
109109
class="remove-field icon-button"
110110
icon="delete"

src/devtools/global.styl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
font-weight 400
88
src local('Roboto'), local('Roboto-Regular'), url(./assets/Roboto-Regular.woff2) format('woff2')
99

10-
.toggle-recording .svg-icon
10+
.toggle-recording .vue-ui-icon
1111
svg
1212
fill #999 !important
1313
&.enabled
@@ -16,7 +16,7 @@
1616
svg
1717
fill red !important
1818

19-
.svg-icon
19+
.vue-ui-icon
2020
display inline-block
2121
width 22px
2222
height @width
@@ -129,7 +129,7 @@ $arrow-color = #444
129129
color $white
130130
border-radius 3px
131131
padding 5px 10px
132-
.svg-icon
132+
.vue-ui-icon
133133
width 16px
134134
height @width
135135
position relative
@@ -302,7 +302,7 @@ $arrow-color = #444
302302

303303
.green
304304
color $green
305-
.svg-icon svg
305+
.vue-ui-icon svg
306306
fill @color
307307

308308
.grey
@@ -328,7 +328,7 @@ $arrow-color = #444
328328
background $dark-background-color
329329
&,
330330
.tooltip .tooltip-inner &
331-
.svg-icon
331+
.vue-ui-icon
332332
top 4px
333333
margin-right 4px
334334
svg

src/devtools/plugins.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
import Vue from 'vue'
2+
import VueUi, { generateHtmlIcon } from '@vue/ui'
23
import { keys } from './env'
3-
import VTooltip from 'v-tooltip'
44
import VI18n from './plugins/i18n'
55
import GlobalRefs from './plugins/global-refs'
6-
import Icons, { generateHtmlIcon } from './plugins/icons'
76

8-
Vue.use(VTooltip, {
9-
defaultDelay: {
10-
show: 600,
11-
hide: 0
12-
},
13-
defaultOffset: 2,
14-
defaultBoundariesElement: document.body,
15-
popover: {
16-
defaultHandleResize: false
17-
}
18-
})
7+
Vue.use(VueUi)
198

209
const currentLocale = 'en'
2110
const locales = require.context('./locales')
@@ -45,5 +34,3 @@ Vue.use(GlobalRefs, {
4534
rightScroll: () => document.querySelector('.right .scroll')
4635
}
4736
})
48-
49-
Vue.use(Icons)

src/devtools/plugins/icons.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/devtools/views/components/ComponentInspector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<span class="title-bracket">&gt;</span>
88
</span>
99
<div class="search">
10-
<BaseIcon icon="search"/>
10+
<VueIcon icon="search"/>
1111
<input placeholder="Filter inspected data" v-model.trim="filter">
1212
</div>
1313
<a
@@ -16,7 +16,7 @@
1616
v-tooltip="'Inspect DOM'"
1717
@click="inspectDOM"
1818
>
19-
<BaseIcon icon="code"/>
19+
<VueIcon icon="code"/>
2020
<span>Inspect DOM</span>
2121
</a>
2222
<a
@@ -25,7 +25,7 @@
2525
v-tooltip="target.file && $t('ComponentInspector.openInEditor.tooltip', { file: target.file })"
2626
@click="openInEditor"
2727
>
28-
<BaseIcon icon="launch"/>
28+
<VueIcon icon="launch"/>
2929
<span>Open in editor</span>
3030
</a>
3131
</action-header>

src/devtools/views/components/ComponentInstance.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
inactive
5050
</span>
5151
<span class="spacer"></span>
52-
<BaseIcon
52+
<VueIcon
5353
class="icon-button"
5454
icon="visibility"
5555
v-tooltip="'Scroll into view'"

src/devtools/views/components/ComponentTree.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class="search"
66
v-tooltip="$t('ComponentTree.filter.tooltip')"
77
>
8-
<BaseIcon icon="search"/>
8+
<VueIcon icon="search"/>
99
<input
1010
ref="filterInstances"
1111
placeholder="Filter components"
@@ -18,15 +18,15 @@
1818
v-tooltip="$t('ComponentTree.select.tooltip')"
1919
@click="setSelecting(!selecting)"
2020
>
21-
<BaseIcon :icon="selecting ? 'gps_fixed' : 'gps_not_fixed'"/>
21+
<VueIcon :icon="selecting ? 'gps_fixed' : 'gps_not_fixed'"/>
2222
<span>Select</span>
2323
</a>
2424
<a class="button classify-names"
2525
:class="{ active: classifyComponents }"
2626
v-tooltip="'Format component names'"
2727
@click="toggleClassifyComponents"
2828
>
29-
<BaseIcon icon="text_fields"/>
29+
<VueIcon icon="text_fields"/>
3030
<span>Format</span>
3131
</a>
3232
</action-header>
@@ -209,6 +209,6 @@ function findByIndex (all, index) {
209209
.select-component
210210
&.active
211211
color $active-color
212-
.svg-icon
212+
.vue-ui-icon
213213
animation pulse 2s infinite linear
214214
</style>

0 commit comments

Comments
 (0)