From 54710f17fc7a6f05970491cf5e174380f519e90f Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 13 Nov 2018 22:43:09 +0900 Subject: [PATCH] [Client] Some performance optimizations --- .../common/views/components/emoji-picker.vue | 18 +- .../common/views/widgets/server.memory.vue | 2 +- .../desktop/views/components/post-form.vue | 2 +- .../desktop/views/pages/user/user.profile.vue | 2 +- .../views/pages/user/user.timeline.vue | 2 +- .../app/desktop/views/pages/welcome.vue | 2 +- src/client/app/init.ts | 214 ++++++++++++++---- .../views/components/drive.file-detail.vue | 2 +- .../mobile/views/components/drive.file.vue | 2 +- .../mobile/views/components/drive.folder.vue | 4 +- .../app/mobile/views/components/post-form.vue | 2 +- src/client/app/mobile/views/pages/user.vue | 4 +- 12 files changed, 189 insertions(+), 67 deletions(-) diff --git a/src/client/app/common/views/components/emoji-picker.vue b/src/client/app/common/views/components/emoji-picker.vue index 3d1dbd23a..818104716 100644 --- a/src/client/app/common/views/components/emoji-picker.vue +++ b/src/client/app/common/views/components/emoji-picker.vue @@ -37,6 +37,8 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import { lib } from 'emojilib'; +import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice } from '@fortawesome/free-solid-svg-icons'; +import { faHeart, faFlag } from '@fortawesome/free-regular-svg-icons'; export default Vue.extend({ i18n: i18n('common/views/components/emoji-picker.vue'), @@ -48,7 +50,7 @@ export default Vue.extend({ categories: [{ ref: 'customEmojiSection', text: this.$t('custom-emoji'), - icon: ['fas', 'asterisk'], + icon: faAsterisk, isActive: true }, { name: 'people', @@ -60,43 +62,43 @@ export default Vue.extend({ name: 'animals_and_nature', ref: 'animalsAndNatureSection', text: this.$t('animals-and-nature'), - icon: ['fas', 'leaf'], + icon: faLeaf, isActive: false }, { name: 'food_and_drink', ref: 'foodAndDrinkSection', text: this.$t('food-and-drink'), - icon: ['fas', 'utensils'], + icon: faUtensils, isActive: false }, { name: 'activity', ref: 'activitySection', text: this.$t('activity'), - icon: ['fas', 'futbol'], + icon: faFutbol, isActive: false }, { name: 'travel_and_places', ref: 'travelAndPlacesSection', text: this.$t('travel-and-places'), - icon: ['fas', 'city'], + icon: faCity, isActive: false }, { name: 'objects', ref: 'objectsSection', text: this.$t('objects'), - icon: ['fas', 'poo-storm'], + icon: faDice, isActive: false }, { name: 'symbols', ref: 'symbolsSection', text: this.$t('symbols'), - icon: ['far', 'heart'], + icon: faHeart, isActive: false }, { name: 'flags', ref: 'flagsSection', text: this.$t('flags'), - icon: ['far', 'flag'], + icon: faFlag, isActive: false }] } diff --git a/src/client/app/common/views/widgets/server.memory.vue b/src/client/app/common/views/widgets/server.memory.vue index d7ad04b08..c3b2f3a10 100644 --- a/src/client/app/common/views/widgets/server.memory.vue +++ b/src/client/app/common/views/widgets/server.memory.vue @@ -2,7 +2,7 @@
-

Memory

+

Memory

Total: {{ total | bytes(1) }}

Used: {{ used | bytes(1) }}

Free: {{ free | bytes(1) }}

diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 4b8618028..e05fab168 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -41,7 +41,7 @@ - +
diff --git a/src/client/app/mobile/views/components/drive.file.vue b/src/client/app/mobile/views/components/drive.file.vue index 6be3dc342..28baa528c 100644 --- a/src/client/app/mobile/views/components/drive.file.vue +++ b/src/client/app/mobile/views/components/drive.file.vue @@ -15,7 +15,7 @@
diff --git a/src/client/app/mobile/views/components/drive.folder.vue b/src/client/app/mobile/views/components/drive.folder.vue index e7ba05b6a..0959c1e7d 100644 --- a/src/client/app/mobile/views/components/drive.folder.vue +++ b/src/client/app/mobile/views/components/drive.folder.vue @@ -51,8 +51,6 @@ export default Vue.extend({ top 0 bottom 0 right 20px - - > * - height 100% + height 100% diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index ca6c0b41f..df7a5c5a0 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -32,7 +32,7 @@ - +