From 725a34b7d0a42c56552a08cf27a5e69cd8a63c6c Mon Sep 17 00:00:00 2001 From: Milos Holba Date: Wed, 24 Feb 2021 16:00:05 +0100 Subject: [PATCH] maked separated ColorPicker component --- public/mix-manifest.json | 42 ++--- .../js/components/Others/ColorPicker.vue | 128 +++++++++++++++ .../js/components/Others/EmojiPicker.vue | 28 ++-- .../js/components/Others/SetFolderIcon.vue | 153 +++++------------- 4 files changed, 190 insertions(+), 161 deletions(-) create mode 100644 resources/js/components/Others/ColorPicker.vue diff --git a/public/mix-manifest.json b/public/mix-manifest.json index b7bf42d4..67a6a07c 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -75,34 +75,16 @@ "/chunks/user-storage.js": "/chunks/user-storage.js?id=5cfec8a8f8a8aef24ef2", "/chunks/user-subscription.js": "/chunks/user-subscription.js?id=c001bef2d6d5171cb359", "/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c", - "/js/main.fec7012ae1f34893589d.hot-update.js": "/js/main.fec7012ae1f34893589d.hot-update.js", - "/js/main.2ee91a6dae14a1cadc9b.hot-update.js": "/js/main.2ee91a6dae14a1cadc9b.hot-update.js", - "/js/main.9eae7983f12897789247.hot-update.js": "/js/main.9eae7983f12897789247.hot-update.js", - "/js/main.2d64c86de0df943928b2.hot-update.js": "/js/main.2d64c86de0df943928b2.hot-update.js", - "/js/main.810cff99631b1efd948d.hot-update.js": "/js/main.810cff99631b1efd948d.hot-update.js", - "/js/main.e600f466db5401999c97.hot-update.js": "/js/main.e600f466db5401999c97.hot-update.js", - "/js/main.2366d38febb62b9adb88.hot-update.js": "/js/main.2366d38febb62b9adb88.hot-update.js", - "/js/main.e0881260a9842557986a.hot-update.js": "/js/main.e0881260a9842557986a.hot-update.js", - "/js/main.3d08984a88c66c048927.hot-update.js": "/js/main.3d08984a88c66c048927.hot-update.js", - "/js/main.8e3c4561e7e37ae6a6c1.hot-update.js": "/js/main.8e3c4561e7e37ae6a6c1.hot-update.js", - "/js/main.67f4fde7abcafd6d46c5.hot-update.js": "/js/main.67f4fde7abcafd6d46c5.hot-update.js", - "/js/main.744dab728ca297b5c462.hot-update.js": "/js/main.744dab728ca297b5c462.hot-update.js", - "/js/main.7d48fe14fdbe694bee34.hot-update.js": "/js/main.7d48fe14fdbe694bee34.hot-update.js", - "/js/main.7ec9c64cc2b9c20d5365.hot-update.js": "/js/main.7ec9c64cc2b9c20d5365.hot-update.js", - "/js/main.cce692fa367da3518f20.hot-update.js": "/js/main.cce692fa367da3518f20.hot-update.js", - "/js/main.40ba52ba134116d832b1.hot-update.js": "/js/main.40ba52ba134116d832b1.hot-update.js", - "/js/main.62dfdf2da6591cb17225.hot-update.js": "/js/main.62dfdf2da6591cb17225.hot-update.js", - "/js/main.946ae0aec96e272e7a9a.hot-update.js": "/js/main.946ae0aec96e272e7a9a.hot-update.js", - "/js/main.49bb07b2e7950c7b10d2.hot-update.js": "/js/main.49bb07b2e7950c7b10d2.hot-update.js", - "/js/main.bb3f47712b180dc5faef.hot-update.js": "/js/main.bb3f47712b180dc5faef.hot-update.js", - "/js/main.8d39b3a6f8e4002b8796.hot-update.js": "/js/main.8d39b3a6f8e4002b8796.hot-update.js", - "/js/main.f9998fbbf511469ba9be.hot-update.js": "/js/main.f9998fbbf511469ba9be.hot-update.js", - "/js/main.a6d99609236f7fad62dc.hot-update.js": "/js/main.a6d99609236f7fad62dc.hot-update.js", - "/js/main.b7b1ab3b35c30738be1c.hot-update.js": "/js/main.b7b1ab3b35c30738be1c.hot-update.js", - "/js/main.4454030fcb222eadbbf7.hot-update.js": "/js/main.4454030fcb222eadbbf7.hot-update.js", - "/js/main.98be4f9f79ead6a88087.hot-update.js": "/js/main.98be4f9f79ead6a88087.hot-update.js", - "/js/main.03760e0d6f650b4ab3c2.hot-update.js": "/js/main.03760e0d6f650b4ab3c2.hot-update.js", - "/js/main.259e21addde39ee619b6.hot-update.js": "/js/main.259e21addde39ee619b6.hot-update.js", - "/js/main.e436af8370789152a668.hot-update.js": "/js/main.e436af8370789152a668.hot-update.js", - "/js/main.05eb0aab71d0fb3b6b09.hot-update.js": "/js/main.05eb0aab71d0fb3b6b09.hot-update.js" + "/js/main.f4dc288436914629fafd.hot-update.js": "/js/main.f4dc288436914629fafd.hot-update.js", + "/js/main.bd2090f4ef672caecf2e.hot-update.js": "/js/main.bd2090f4ef672caecf2e.hot-update.js", + "/js/main.008b0db192aeb3c22084.hot-update.js": "/js/main.008b0db192aeb3c22084.hot-update.js", + "/js/main.4a52cce25e297b4d0c6b.hot-update.js": "/js/main.4a52cce25e297b4d0c6b.hot-update.js", + "/js/main.6579cc274c986e1c4d9d.hot-update.js": "/js/main.6579cc274c986e1c4d9d.hot-update.js", + "/js/main.270fa6b54a1d256881a7.hot-update.js": "/js/main.270fa6b54a1d256881a7.hot-update.js", + "/js/main.1119332dbe1f0e94c697.hot-update.js": "/js/main.1119332dbe1f0e94c697.hot-update.js", + "/js/main.81c3b781acb1f687d3e8.hot-update.js": "/js/main.81c3b781acb1f687d3e8.hot-update.js", + "/js/main.fd3f39d3778dbc1a924b.hot-update.js": "/js/main.fd3f39d3778dbc1a924b.hot-update.js", + "/js/main.4304b0309e0e5d90af4c.hot-update.js": "/js/main.4304b0309e0e5d90af4c.hot-update.js", + "/js/main.7455806185c9030a60d6.hot-update.js": "/js/main.7455806185c9030a60d6.hot-update.js", + "/js/main.f80aa16e9ad85008bee4.hot-update.js": "/js/main.f80aa16e9ad85008bee4.hot-update.js" } diff --git a/resources/js/components/Others/ColorPicker.vue b/resources/js/components/Others/ColorPicker.vue new file mode 100644 index 00000000..a1a59743 --- /dev/null +++ b/resources/js/components/Others/ColorPicker.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/resources/js/components/Others/EmojiPicker.vue b/resources/js/components/Others/EmojiPicker.vue index 4f982dee..b17d519d 100644 --- a/resources/js/components/Others/EmojiPicker.vue +++ b/resources/js/components/Others/EmojiPicker.vue @@ -3,10 +3,10 @@ -
+
-
+
@@ -15,7 +15,7 @@
-
+
{{ $t('popup_rename.set_emoji_input_placeholder') }}
@@ -45,10 +45,10 @@
-
+
    -
  • +
@@ -59,7 +59,7 @@
    -
  • +
@@ -93,9 +93,6 @@ export default { }, computed: { ...mapGetters([ 'emojis' ]), - allEmoji() { - return groupBy(this.emojis.emojisList, 'group') - } }, data () { return { @@ -109,6 +106,9 @@ export default { } }, methods: { + allEmoji() { + return groupBy(this.emojis.emojisList, 'group') + }, checkGroupInView: _.debounce( function() { this.emojis.emojisGroups.forEach(group => { @@ -149,7 +149,7 @@ export default { this.filteredEmojisLoaded = true }, 800), - openMenu() { + openList() { this.loadedList = false @@ -173,12 +173,12 @@ export default { this.groupInView = 'Smileys & Emotion' }, - setIcon(value) { + setEmoji(value) { // Set emoji - this.selectedEmoji = value.emoji + this.selectedEmoji = value - events.$emit('setFolderIcon', { 'value': value }) + this.$emit('input', value) this.selectOpen = false }, @@ -186,7 +186,7 @@ export default { this.selectedEmoji = undefined - events.$emit('setFolderIcon', { 'value': 'default' }) + this.$emit('input', 'default') } }, mounted() { diff --git a/resources/js/components/Others/SetFolderIcon.vue b/resources/js/components/Others/SetFolderIcon.vue index bdba564e..110673fe 100644 --- a/resources/js/components/Others/SetFolderIcon.vue +++ b/resources/js/components/Others/SetFolderIcon.vue @@ -3,27 +3,19 @@ - + -
- -
    -
  • - - -
  • -
-
+
@@ -112,67 +91,7 @@ export default { @import "@assets/vue-file-manager/_inapp-forms.scss"; @import '@assets/vue-file-manager/_forms'; -.color-pick-wrapper { - .color-wrapper { - margin-bottom: 20px; - display: grid; - grid-template-columns: repeat(auto-fill, 32px); - justify-content: space-between; - gap: 7px; - - .single-color { - height: 31px; - list-style: none; - border-radius: 8px; - cursor: pointer; - position: relative; - overflow: hidden; - display: flex; - align-items: center; - justify-content: center; - - .color-icon { - z-index: 2; - - polyline { - stroke: white; - } - } - - .color-box { - width: 100%; - height: 100%; - position: absolute; - display: block; - } - } - } -} - -.main-label { - @include font-size(14); - font-weight: 700; - margin-bottom: 8px; - display: block; -} - .set-folder-icon { position: relative; } - -@media (prefers-color-scheme: dark) { - .color-pick-wrapper { - .color-wrapper { - .single-color { - &.active-color { - border: 2px solid; - } - - &:hover { - border: 2px solid $dark_mode_text_primary; - } - } - } - } -}