From d2d986619110666a7490d11c2404102bb82ce9a2 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 5 Oct 2019 02:13:58 +0300 Subject: [PATCH 01/25] Rename EmojiPacks module and view --- src/api/{emoji_packs.js => emojiPacks.js} | 0 src/store/index.js | 4 ++-- src/store/modules/{emoji_packs.js => emojiPacks.js} | 2 +- .../{emoji-packs => emojiPacks}/components/EmojiPack.vue | 0 .../components/NewEmojiUploader.vue | 0 .../components/PropertyEditingRow.vue | 0 .../components/SingleEmojiEditor.vue | 4 ++-- src/views/{emoji-packs => emojiPacks}/index.vue | 4 ++-- 8 files changed, 7 insertions(+), 7 deletions(-) rename src/api/{emoji_packs.js => emojiPacks.js} (100%) rename src/store/modules/{emoji_packs.js => emojiPacks.js} (98%) rename src/views/{emoji-packs => emojiPacks}/components/EmojiPack.vue (100%) rename src/views/{emoji-packs => emojiPacks}/components/NewEmojiUploader.vue (100%) rename src/views/{emoji-packs => emojiPacks}/components/PropertyEditingRow.vue (100%) rename src/views/{emoji-packs => emojiPacks}/components/SingleEmojiEditor.vue (97%) rename src/views/{emoji-packs => emojiPacks}/index.vue (95%) diff --git a/src/api/emoji_packs.js b/src/api/emojiPacks.js similarity index 100% rename from src/api/emoji_packs.js rename to src/api/emojiPacks.js diff --git a/src/store/index.js b/src/store/index.js index 985074a0..668b4d44 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -12,7 +12,7 @@ import user from './modules/user' import userProfile from './modules/userProfile' import users from './modules/users' import getters from './getters' -import emoji_packs from './modules/emoji_packs.js' +import emojiPacks from './modules/emojiPacks.js' Vue.use(Vuex) @@ -29,7 +29,7 @@ const store = new Vuex.Store({ user, userProfile, users, - emoji_packs + emojiPacks }, getters }) diff --git a/src/store/modules/emoji_packs.js b/src/store/modules/emojiPacks.js similarity index 98% rename from src/store/modules/emoji_packs.js rename to src/store/modules/emojiPacks.js index 1cee0060..6a14e406 100644 --- a/src/store/modules/emoji_packs.js +++ b/src/store/modules/emojiPacks.js @@ -7,7 +7,7 @@ import { deletePack, savePackMetadata, importFromFS, - updatePackFile } from '@/api/emoji_packs' + updatePackFile } from '@/api/emojiPacks' import { Message } from 'element-ui' diff --git a/src/views/emoji-packs/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue similarity index 100% rename from src/views/emoji-packs/components/EmojiPack.vue rename to src/views/emojiPacks/components/EmojiPack.vue diff --git a/src/views/emoji-packs/components/NewEmojiUploader.vue b/src/views/emojiPacks/components/NewEmojiUploader.vue similarity index 100% rename from src/views/emoji-packs/components/NewEmojiUploader.vue rename to src/views/emojiPacks/components/NewEmojiUploader.vue diff --git a/src/views/emoji-packs/components/PropertyEditingRow.vue b/src/views/emojiPacks/components/PropertyEditingRow.vue similarity index 100% rename from src/views/emoji-packs/components/PropertyEditingRow.vue rename to src/views/emojiPacks/components/PropertyEditingRow.vue diff --git a/src/views/emoji-packs/components/SingleEmojiEditor.vue b/src/views/emojiPacks/components/SingleEmojiEditor.vue similarity index 97% rename from src/views/emoji-packs/components/SingleEmojiEditor.vue rename to src/views/emojiPacks/components/SingleEmojiEditor.vue index e5d7b01b..17eddb73 100644 --- a/src/views/emoji-packs/components/SingleEmojiEditor.vue +++ b/src/views/emojiPacks/components/SingleEmojiEditor.vue @@ -21,7 +21,7 @@

Select the local pack to copy to

@@ -64,7 +64,7 @@ + + From 932d20cfc6510fac049a4833e0e0f33096ebdf92 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sun, 6 Oct 2019 02:17:50 +0300 Subject: [PATCH 04/25] Add form for entering or changing emoji pack metadata --- src/lang/en.js | 9 +- src/views/emojiPacks/components/EmojiPack.vue | 137 ++++++------------ .../components/PropertyEditingRow.vue | 27 ---- src/views/emojiPacks/index.vue | 18 +-- 4 files changed, 58 insertions(+), 133 deletions(-) delete mode 100644 src/views/emojiPacks/components/PropertyEditingRow.vue diff --git a/src/lang/en.js b/src/lang/en.js index c7903c68..a84a4ec3 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -323,7 +323,14 @@ export default { packs: 'Packs', remotePacks: 'Remote packs', remoteInstanceAddress: 'Remote instance address', - refreshRemote: 'Refresh remote packs' + refreshRemote: 'Refresh remote packs', + sharePack: 'Share pack', + homepage: 'Homepage', + description: 'Description', + license: 'License', + fallbackSrc: 'Fallback source', + fallbackSrcSha: 'Fallback source SHA', + savePackMetadata: 'Save pack metadata' }, invites: { inviteTokens: 'Invite tokens', diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index d29ea9b2..71708ee3 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -1,111 +1,56 @@ diff --git a/src/views/emojiPacks/index.vue b/src/views/emojiPacks/index.vue index c798f8b5..41854e70 100644 --- a/src/views/emojiPacks/index.vue +++ b/src/views/emojiPacks/index.vue @@ -24,11 +24,10 @@ - -
+ + - -
+
@@ -44,11 +43,10 @@
- -
+ + - -
+
@@ -62,7 +60,9 @@ export default { data() { return { remoteInstanceAddress: '', - newPackName: '' + newPackName: '', + activeLocalPack: '', + activeRemotePack: '' } }, computed: { From 9bc103042b4c515ce0b73dfba0f68b70b35c2ae0 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Mon, 7 Oct 2019 03:09:53 +0300 Subject: [PATCH 05/25] Add form for uploading new emoji --- src/lang/en.js | 11 +- src/views/emojiPacks/components/EmojiPack.vue | 12 +- .../components/NewEmojiUploader.vue | 129 +++++++++--------- src/views/emojiPacks/index.vue | 4 +- 4 files changed, 85 insertions(+), 71 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index a84a4ec3..1250f0df 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -330,7 +330,16 @@ export default { license: 'License', fallbackSrc: 'Fallback source', fallbackSrcSha: 'Fallback source SHA', - savePackMetadata: 'Save pack metadata' + savePackMetadata: 'Save pack metadata', + addNewEmoji: 'Add new emoji to the pack', + shortcode: 'Shortcode', + uploadFile: 'Upload a file', + customFilename: 'Custom filename', + optional: 'optional', + customFilenameDesc: 'Custom file name (optional)', + url: 'URL', + required: 'required', + clickToUpload: 'Click to upload' }, invites: { inviteTokens: 'Invite tokens', diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index 71708ee3..5003a61c 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -1,6 +1,6 @@ @@ -38,6 +43,9 @@ } .el-collapse-item__header { height: 36px; + font-size: 14px; + font-weight: 700; + color: #606266; } .emoji-pack-card { margin-top: 5px; @@ -72,7 +80,7 @@ export default { data() { return { - shownPackEmoji: [], + showPackContent: [], downloadSharedAs: '' } }, diff --git a/src/views/emojiPacks/components/NewEmojiUploader.vue b/src/views/emojiPacks/components/NewEmojiUploader.vue index d62011de..0770e332 100644 --- a/src/views/emojiPacks/components/NewEmojiUploader.vue +++ b/src/views/emojiPacks/components/NewEmojiUploader.vue @@ -1,49 +1,53 @@ + + From d74bdecc32d622e45a1436dd0fe019da6d25625f Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 9 Oct 2019 18:24:27 +0300 Subject: [PATCH 07/25] Add ability to delete pack, download an archive and download a pack --- src/lang/en.js | 11 ++- src/views/emojiPacks/components/EmojiPack.vue | 77 ++++++++++++++----- 2 files changed, 67 insertions(+), 21 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index e501cfe3..46b4b641 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -352,7 +352,16 @@ export default { leaveEmptyShortcode: 'leave empty to use the same shortcode', leaveEmptyFilename: 'leave empty to use the same filename', copy: 'Copy', - copyToLocalPack: 'Copy to local pack' + copyToLocalPack: 'Copy to local pack', + thisWillDownload: 'This will download the', + downloadToCurrentInstance: 'pack to the current instance under the name', + canBeChanged: 'can be changed below', + willBeUsable: 'It will then be usable and shareable from the current instance', + downloadPack: 'Download pack', + deletePack: 'Delete pack', + downloadSharedPack: 'Download shared pack to current instance', + downloadAsOptional: 'Download as (optional)', + downloadPackArchive: 'Download pack archive' }, invites: { inviteTokens: 'Invite tokens', diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index 9094e12f..3f819de8 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -25,15 +25,26 @@ :label="$t('settings.fallbackSrcSha')"> {{ pack.pack["fallback-src-sha256"] }} - - {{ $t('settings.savePackMetadata') }} + + {{ $t('settings.savePackMetadata') }} + {{ $t('settings.deletePack') }} + + + + {{ $t('settings.downloadPackArchive') }} + - - + + - + + +

+ {{ $t('settings.thisWillDownload') }} "{{ name }}" {{ $t('settings.downloadToCurrentInstance') }} + "{{ downloadSharedAs.trim() === '' ? name : downloadSharedAs }}" ({{ $t('settings.canBeChanged') }}). + {{ $t('settings.willBeUsable') }}. +

+
+ + + {{ $t('settings.downloadSharedPack') }} + +
+
- - + + From 117c3ca644de05f936c09e1b288ec3f597e02449 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 10 Oct 2019 04:01:31 +0300 Subject: [PATCH 08/25] Add background for collapse headers --- src/views/emojiPacks/components/EmojiPack.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/emojiPacks/components/EmojiPack.vue b/src/views/emojiPacks/components/EmojiPack.vue index 3f819de8..a04ea5d1 100644 --- a/src/views/emojiPacks/components/EmojiPack.vue +++ b/src/views/emojiPacks/components/EmojiPack.vue @@ -1,5 +1,5 @@