Skip to content

Commit 837a1bb

Browse files
authored
Merge pull request #707 from Adamant-im/feat/svg-mdi
Feat/svg mdi
2 parents 82373a1 + 99c3960 commit 837a1bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+384
-126
lines changed

package-lock.json

Lines changed: 5 additions & 4 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
@@ -42,7 +42,7 @@
4242
"@klayr/cryptography": "^4.1.1",
4343
"@klayr/transactions": "^6.1.1",
4444
"@klayr/validator": "^0.9.1",
45-
"@mdi/font": "^7.4.47",
45+
"@mdi/js": "^7.4.47",
4646
"@stablelib/utf8": "^2.0.0",
4747
"@tanstack/vue-query": "^5.52.2",
4848
"@vueuse/core": "^11.1.0",

src/assets/styles/app.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@import './settings/_colors.scss';
22

3-
@import '@mdi/font/css/materialdesignicons.css';
4-
53
@import './generic/_variables.scss';
64
@import './generic/_vuetify.scss';
75
@import './generic/_layout.scss';

src/components/AChat/AChatAttachment/AChatFile.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div :class="classes.error">
77
<v-tooltip location="bottom">
88
<template #activator="{ props }">
9-
<v-icon v-bind="props" :class="classes.errorIcon" icon="mdi-image-off" />
9+
<v-icon v-bind="props" :class="classes.errorIcon" :icon="mdiImageOff" />
1010
</template>
1111

1212
<span>{{ t('chats.file_loading_error') }}</span>
@@ -66,6 +66,8 @@ import { LocalFile, isLocalFile, formatBytes } from '@/lib/files'
6666
import { FileAsset } from '@/lib/adamant-api/asset'
6767
import IconFile from '@/components/icons/common/IconFile.vue'
6868
import { AChatFileLoader } from './AChatFileLoader.tsx'
69+
import { mdiImageOff } from '@mdi/js'
70+
6971
7072
const className = 'a-chat-file'
7173
const classes = {
@@ -127,6 +129,7 @@ export default defineComponent({
127129
fileName,
128130
fileExtension,
129131
fileSize,
132+
mdiImageOff,
130133
formatBytes,
131134
iconSize
132135
}

src/components/AChat/AChatAttachment/AChatImage.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div :class="classes.error">
66
<v-tooltip location="bottom">
77
<template #activator="{ props }">
8-
<v-icon v-bind="props" :class="classes.errorIcon" icon="mdi-image-off" />
8+
<v-icon v-bind="props" :class="classes.errorIcon" :icon="mdiImageOff" />
99
</template>
1010

1111
<span>{{ t('chats.image_loading_error') }}</span>
@@ -47,6 +47,8 @@ import { AChatFileLoader } from './AChatFileLoader.tsx'
4747
import { NormalizedChatMessageTransaction } from '@/lib/chat/helpers'
4848
import { LocalFile } from '@/lib/files'
4949
import { FileAsset } from '@/lib/adamant-api/asset'
50+
import { mdiImageOff } from '@mdi/js'
51+
5052
5153
const className = 'a-chat-image'
5254
const classes = {
@@ -80,7 +82,8 @@ export default defineComponent({
8082
8183
return {
8284
t,
83-
classes
85+
classes,
86+
mdiImageOff
8487
}
8588
}
8689
})

src/components/AChat/AChatAttachment/AChatImageModal.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<v-dialog v-model="show" fullscreen :class="classes.root" @keydown="handleKeydown">
33
<v-card :class="classes.container">
44
<v-toolbar color="transparent">
5-
<v-btn icon="mdi-close" @click="closeModal" />
5+
<v-btn :icon="mdiClose" @click="closeModal" />
66

77
<div :class="classes.imageCounter">{{ slide + 1 }} of {{ files.length }}</div>
88

99
<v-btn
10-
icon="mdi-arrow-collapse-down"
10+
:icon="mdiArrowCollapseDown"
1111
:class="classes.saveButton"
1212
@click="downloadFile"
1313
:loading="downloading"
@@ -40,12 +40,12 @@
4040

4141
<template #prev>
4242
<v-btn icon variant="plain" @click="prevSlide">
43-
<v-icon icon="mdi-chevron-left" size="x-large" />
43+
<v-icon :icon="mdiChevronLeft" size="x-large" />
4444
</v-btn>
4545
</template>
4646
<template #next>
4747
<v-btn icon variant="plain" @click="nextSlide">
48-
<v-icon icon="mdi-chevron-right" size="x-large" />
48+
<v-icon :icon="mdiChevronRight" size="x-large" />
4949
</v-btn>
5050
</template>
5151
</v-carousel>
@@ -63,6 +63,8 @@ import AChatImageModalItem from './AChatImageModalItem.vue'
6363
import AChatModalFile from './AChatModalFile.vue'
6464
import { NormalizedChatMessageTransaction } from '@/lib/chat/helpers'
6565
import { FileAsset } from '@/lib/adamant-api/asset'
66+
import { mdiArrowCollapseDown, mdiChevronLeft, mdiChevronRight, mdiClose } from '@mdi/js'
67+
6668
6769
function delay(ms: number) {
6870
return new Promise((resolve) => setTimeout(resolve, ms))
@@ -218,6 +220,10 @@ export default {
218220
slide,
219221
show,
220222
showArrows,
223+
mdiArrowCollapseDown,
224+
mdiChevronLeft,
225+
mdiChevronRight,
226+
mdiClose,
221227
closeModal,
222228
prevSlide,
223229
nextSlide,

src/components/AChat/AChatForm.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</template>
3535
<template v-if="showSendButton" #append-inner>
3636
<slot name="append" />
37-
<v-icon class="a-chat__send-icon" icon="mdi-send" size="28" />
37+
<v-icon class="a-chat__send-icon" :icon="mdiSend" size="28" />
3838
</template>
3939
</v-textarea>
4040

@@ -46,6 +46,7 @@
4646
import { nextTick } from 'vue'
4747
import ChatEmojis from '@/components/Chat/ChatEmojis.vue'
4848
import { isMobile } from '@/lib/display-mobile'
49+
import { mdiSend } from '@mdi/js'
4950
5051
export default {
5152
components: { ChatEmojis },
@@ -83,6 +84,12 @@ export default {
8384
}
8485
},
8586
emits: ['message', 'esc', 'error'],
87+
setup() {
88+
89+
return {
90+
mdiSend
91+
}
92+
},
8693
data: () => ({
8794
message: '',
8895
emojiPickerOpen: false,

src/components/AChat/AChatMessageActionsDropdown.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class="a-chat__message-actions-icon"
1717
@click="toggleMenu(true)"
1818
>
19-
<v-icon icon="mdi-chevron-down" :size="24" />
19+
<v-icon :icon="mdiChevronDown" :size="24" />
2020
</v-btn>
2121
</template>
2222

@@ -33,6 +33,8 @@
3333
<script lang="ts">
3434
import { defineComponent, PropType } from 'vue'
3535
import { useI18n } from 'vue-i18n'
36+
import { mdiChevronDown } from '@mdi/js'
37+
3638
3739
import { NormalizedChatMessageTransaction } from '@/lib/chat/helpers'
3840
@@ -60,7 +62,7 @@ export default defineComponent({
6062
emit('open:change', state, props.transaction)
6163
}
6264
63-
return { t, classes, toggleMenu, emit }
65+
return { t, classes, mdiChevronDown, toggleMenu }
6466
}
6567
})
6668
</script>

src/components/AChat/AChatMessageActionsList.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<v-list-item-title>{{ t('chats.chat_actions.reply') }}</v-list-item-title>
55

66
<template #append>
7-
<v-icon icon="mdi-reply" />
7+
<v-icon :icon="mdiReply" />
88
</template>
99
</v-list-item>
1010

@@ -14,7 +14,7 @@
1414
<v-list-item-title>{{ t('chats.chat_actions.copy') }}</v-list-item-title>
1515

1616
<template #append>
17-
<v-icon icon="mdi-content-copy" />
17+
<v-icon :icon="mdiContentCopy" />
1818
</template>
1919
</v-list-item>
2020
</v-list>
@@ -23,6 +23,8 @@
2323
<script lang="ts">
2424
import { defineComponent } from 'vue'
2525
import { useI18n } from 'vue-i18n'
26+
import { mdiContentCopy, mdiReply } from '@mdi/js'
27+
2628
2729
const className = 'message-actions-list'
2830
const classes = {
@@ -37,7 +39,9 @@ export default defineComponent({
3739
return {
3840
classes,
3941
t,
40-
emit
42+
emit,
43+
mdiContentCopy,
44+
mdiReply
4145
}
4246
}
4347
})

src/components/AChat/AChatMessageActionsMenu.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<v-list-item-title>{{ t('chats.chat_actions.reply') }}</v-list-item-title>
55

66
<template #append>
7-
<v-icon icon="mdi-reply" />
7+
<v-icon :icon="mdiReply" />
88
</template>
99
</v-list-item>
1010

@@ -14,7 +14,7 @@
1414
<v-list-item-title>{{ t('chats.chat_actions.copy') }}</v-list-item-title>
1515

1616
<template #append>
17-
<v-icon icon="mdi-content-copy" />
17+
<v-icon :icon="mdiContentCopy" />
1818
</template>
1919
</v-list-item>
2020
</v-list>
@@ -23,6 +23,7 @@
2323
<script>
2424
import { defineComponent } from 'vue'
2525
import { useI18n } from 'vue-i18n'
26+
import { mdiContentCopy, mdiReply } from '@mdi/js'
2627
2728
const className = 'message-actions-menu'
2829
const classes = {
@@ -45,7 +46,9 @@ export default defineComponent({
4546
classes,
4647
t,
4748
onClickReply,
48-
onClickCopy
49+
onClickCopy,
50+
mdiContentCopy,
51+
mdiReply
4952
}
5053
}
5154
})

0 commit comments

Comments
 (0)