Skip to content

Commit 050bea1

Browse files
committed
feat(mdi-icon): Migrate icons to use @mdi/font
1 parent 9e56dfd commit 050bea1

13 files changed

Lines changed: 53 additions & 31 deletions

File tree

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
},
4848
"author": "Kitware",
4949
"dependencies": {
50+
"@mdi/font": "3.6.95",
5051
"babel-plugin-syntax-dynamic-import": "6.18.0",
5152
"handlebars": "4.0.11",
5253
"handlebars-loader": "1.7.0",
5354
"jszip": "3.1.5",
5455
"kw-web-suite": "8.0.0",
55-
"material-design-icons-iconfont": "3.0.3",
5656
"mousetrap": "1.6.2",
5757
"open": "0.0.5",
5858
"serve-handler": "3.6.1",

src/app.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Vuetify from 'vuetify';
66
/* eslint-disable-next-line import/extensions */
77
import 'typeface-roboto';
88
import 'vuetify/dist/vuetify.min.css';
9-
import 'material-design-icons-iconfont/dist/material-design-icons.css';
9+
import '@mdi/font/css/materialdesignicons.css';
1010

1111
// global symbol expose/export
1212
import 'simput/src/expose';
@@ -21,7 +21,25 @@ import registerDefaultProperties from 'simput/src/components/properties/register
2121
import HookManager from 'simput/src/core/HookManager';
2222
import ReaderFactory from 'simput/src/io/ReaderFactory';
2323

24-
Vue.use(Vuetify);
24+
Vue.use(Vuetify, {
25+
icons: {
26+
simput: {
27+
add: 'mdi-plus',
28+
warning: 'mdi-alert-outline',
29+
contentCopy: 'mdi-content-copy',
30+
delete: 'mdi-delete-outline',
31+
folder_open: 'mdi-folder-outline',
32+
close: 'mdi-close',
33+
error: 'mdi-bug',
34+
folder: 'mdi-folder',
35+
download: 'mdi-cloud-download',
36+
publish: 'mdi-publish',
37+
ok: 'mdi-check-circle-outline',
38+
check: 'mdi-check',
39+
},
40+
},
41+
iconfont: 'mdi',
42+
});
2543

2644
export const { applyHook, registerHook } = HookManager;
2745

src/components/core/AboutBox/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
icon
88
v-on:click="$emit('close')"
99
>
10-
<v-icon>close</v-icon>
10+
<v-icon>{{ $vuetify.icons.simput.close }}</v-icon>
1111
</v-btn>
1212
</v-card-title>
1313
<hr>

src/components/core/App/template.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
color="error"
5050
v-on:click="errorDialog = true"
5151
>
52-
<v-icon>error</v-icon>
52+
<v-icon>{{ $vuetify.icons.simput.error }}</v-icon>
5353
<span>{{ errors.length }}</span>
5454
<span v-show="!smallScreen">error(s)</span>
5555
</v-btn>
@@ -58,7 +58,7 @@
5858
flat
5959
v-on:click="promptUserFiles"
6060
>
61-
<v-icon>folder</v-icon>
61+
<v-icon>{{ $vuetify.icons.simput.folder }}</v-icon>
6262
<span v-show="!smallScreen">Open</span>
6363
</v-btn>
6464
<v-btn
@@ -67,7 +67,7 @@
6767
flat
6868
v-on:click="save"
6969
>
70-
<v-icon>cloud_download</v-icon>
70+
<v-icon>{{ $vuetify.icons.simput.download }}</v-icon>
7171
<span v-show="!smallScreen">Save</span>
7272
</v-btn>
7373
<v-btn
@@ -110,7 +110,7 @@
110110
class="display-4"
111111
:class="$style.noTransition"
112112
>
113-
publish
113+
{{ $vuetify.icons.simput.publish }}
114114
</v-icon>
115115
</div>
116116
</div>

src/components/core/FileLoader/template.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
v-show="file.isRaw"
3737
:class="$style.icon"
3838
>
39-
error
39+
{{ $vuetify.icons.simput.error }}
4040
</v-icon>
4141
</div>
4242
<template v-if="file.isRaw">
@@ -63,8 +63,8 @@
6363
>
6464
<div slot="header" class="body-2">
6565
{{ file.name }}
66-
<v-icon v-show="!!file.error" color="red">error</v-icon>
67-
<v-icon v-show="!file.error" color="green">check_circle</v-icon>
66+
<v-icon v-show="!!file.error" color="red">{{ $vuetify.icons.simput.error }}</v-icon>
67+
<v-icon v-show="!file.error" color="green">{{ $vuetify.icons.simput.ok }}</v-icon>
6868
</div>
6969
<v-card v-if="file.error">
7070
<v-card-text>

src/components/core/Landing/style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@
9393
padding-top: 50px;
9494
}
9595

96-
.iconContainer :global(.material-icons) {
96+
.iconContainer :global(.v-icon) {
9797
font-size: 200px;
9898
color: #333;
99+
position: relative;
100+
top: -25px;
99101
}

src/components/core/Landing/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
>
4646
<span v-if="dragHover" :class="$style.buttonText">drop your file</span>
4747
<span v-else :class="$style.buttonText">open an existing model</span>
48-
<v-icon>folder_open</v-icon>
48+
<v-icon>{{ $vuetify.icons.simput.folder_open }}</v-icon>
4949
</v-btn>
5050
<div :class="$style.noSelect">
5151
or drop one anywhere in this box to begin.

src/components/core/WorkflowMenu/template.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
:class="$style.listButton"
4040
v-on:click.stop="dataModel.addView(node.id)"
4141
>
42-
<v-icon small>add</v-icon>
42+
<v-icon small>{{ $vuetify.icons.simput.add }}</v-icon>
4343
</v-btn>
4444
</v-list-tile-title>
4545
</v-list-tile-content>
@@ -68,7 +68,7 @@
6868
small
6969
:title="child.invalid"
7070
>
71-
warning
71+
{{ $vuetify.icons.simput.warning }}
7272
</v-icon>
7373
<v-btn
7474
v-if="child.clonable"
@@ -79,7 +79,7 @@
7979
:class="$style.listButton"
8080
v-on:click.stop="dataModel.cloneView(child.id, child.index)"
8181
>
82-
<v-icon small>content_copy</v-icon>
82+
<v-icon small>{{ $vuetify.icons.simput.contentCopy }}</v-icon>
8383
</v-btn>
8484
<v-btn
8585
v-if="!child.noDelete"
@@ -89,7 +89,7 @@
8989
:class="$style.listButton"
9090
v-on:click.stop="dataModel.deleteView(child.id, child.index)"
9191
>
92-
<v-icon small>delete</v-icon>
92+
<v-icon small>{{ $vuetify.icons.simput.delete }}</v-icon>
9393
</v-btn>
9494
</v-list-tile-title>
9595
</v-list-tile-content>

src/components/properties/CellProperty/template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
small
2020
@click="addValue"
2121
>
22-
<v-icon small>add</v-icon>
22+
<v-icon small>{{ $vuetify.icons.simput.add }}</v-icon>
2323
</v-btn>
2424
</v-flex>
2525
</v-layout>
@@ -48,7 +48,7 @@
4848
small
4949
@click="onChange(null, i-1)"
5050
>
51-
<v-icon small>delete</v-icon>
51+
<v-icon small>{{ $vuetify.icons.simput.delete }}</v-icon>
5252
</v-btn>
5353
</v-flex>
5454
</template>

0 commit comments

Comments
 (0)