From 8abf2758e1e040621fb5812f9db0dc92ecbf9837 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 19 Feb 2020 20:09:11 +0300 Subject: [PATCH 1/9] Fix the address used when listing remote packs --- src/store/modules/emojiPacks.js | 8 +++++--- src/views/emojiPacks/components/SingleEmojiEditor.vue | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/store/modules/emojiPacks.js b/src/store/modules/emojiPacks.js index c118b71f..282a069e 100644 --- a/src/store/modules/emojiPacks.js +++ b/src/store/modules/emojiPacks.js @@ -16,24 +16,25 @@ import Vue from 'vue' const packs = { state: { localPacks: {}, + remoteInstance: '', remotePacks: {} }, mutations: { SET_LOCAL_PACKS: (state, packs) => { state.localPacks = packs }, + SET_REMOTE_INSTANCE: (state, name) => { + state.remoteInstance = name + }, SET_REMOTE_PACKS: (state, packs) => { state.remotePacks = packs }, - UPDATE_LOCAL_PACK_VAL: (state, { name, key, value }) => { Vue.set(state.localPacks[name]['pack'], key, value) }, - UPDATE_LOCAL_PACK_PACK: (state, { name, pack }) => { state.localPacks[name]['pack'] = pack }, - UPDATE_LOCAL_PACK_FILES: (state, { name, files }) => { // Use vue.set in case "files" was null Vue.set( @@ -105,6 +106,7 @@ const packs = { async SetRemoteEmojiPacks({ commit, getters }, { remoteInstance }) { const { data } = await listRemotePacks(getters.authHost, getters.token, remoteInstance) + commit('SET_REMOTE_INSTANCE', remoteInstance) commit('SET_REMOTE_PACKS', data) }, async UpdateAndSavePackFile({ commit, getters }, args) { diff --git a/src/views/emojiPacks/components/SingleEmojiEditor.vue b/src/views/emojiPacks/components/SingleEmojiEditor.vue index 3c28e8c0..2bfb4b8b 100644 --- a/src/views/emojiPacks/components/SingleEmojiEditor.vue +++ b/src/views/emojiPacks/components/SingleEmojiEditor.vue @@ -14,7 +14,7 @@
@@ -95,6 +95,9 @@ export default { }, localPacks() { return this.$store.state.emojiPacks.localPacks + }, + remoteInstance() { + return this.$store.state.emojiPacks.remoteInstance } }, methods: { From 8f183d07b6f99bb78dfc02c72417fda7918bce23 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 19 Feb 2020 20:36:50 +0300 Subject: [PATCH 2/9] Fix styles for listing remote emoji --- .../emojiPacks/components/SingleEmojiEditor.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/views/emojiPacks/components/SingleEmojiEditor.vue b/src/views/emojiPacks/components/SingleEmojiEditor.vue index 2bfb4b8b..acc89b14 100644 --- a/src/views/emojiPacks/components/SingleEmojiEditor.vue +++ b/src/views/emojiPacks/components/SingleEmojiEditor.vue @@ -18,9 +18,9 @@ class="emoji-preview-img"> - +

{{ $t('emoji.selectLocalPack') }}

- + {{ $t('emoji.copy') }} {{ $t('emoji.copyToLocalPack') }}
@@ -175,8 +174,10 @@ export default { .emoji-info { place-self: center; } -.copy-to-local-button { - margin-top: 12px; - float: right; +.copy-pack-container { + place-self: center stretch; +} +.copy-pack-select { + width: 100%; } From 2d0421106af316c09882c10d2ee481330ac8f501 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 19 Feb 2020 22:03:28 +0300 Subject: [PATCH 3/9] Add mobile UI for emoji section --- src/views/emojiPacks/index.vue | 41 +++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/views/emojiPacks/index.vue b/src/views/emojiPacks/index.vue index 19e0702d..40a20284 100644 --- a/src/views/emojiPacks/index.vue +++ b/src/views/emojiPacks/index.vue @@ -2,8 +2,8 @@

{{ $t('emoji.emojiPacks') }}

- {{ $t('emoji.reloadEmoji') }} - + {{ $t('emoji.reloadEmoji') }} + {{ $t('emoji.importPacks') }} @@ -76,7 +76,7 @@ export default { }, labelWidth() { if (this.isMobile) { - return '120px' + return '110px' } else if (this.isTablet) { return '200px' } else { @@ -141,6 +141,7 @@ export default { From c3fedbf8814e0e378fbd91cd74ab6cc79503fef4 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 20 Feb 2020 15:50:59 +0300 Subject: [PATCH 4/9] Fix button styles on emoji tab --- src/lang/en.js | 2 +- src/views/emojiPacks/components/EmojiPack.vue | 71 ++++++++++++++++--- src/views/emojiPacks/index.vue | 21 +++--- 3 files changed, 74 insertions(+), 20 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index 3f9643ca..95bc021e 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -416,7 +416,7 @@ export default { shortcode: 'Shortcode', fallbackSrc: 'Fallback source', fallbackSrcSha: 'Fallback source SHA', - savePackMetadata: 'Save pack metadata', + saveMetadata: 'Save metadata', deletePack: 'Delete pack', downloadPack: 'Download pack', downloadPackArchive: 'Download pack archive', diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index 3a8bf97a..cde9dacd 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -1,6 +1,6 @@