From e4189648192a8d9d8c11dd7afd4ad09b6766fa5d Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 28 Feb 2018 07:41:57 +0200 Subject: [PATCH 1/6] Close colour picker when clicked outside --- .gitignore | 1 + client/src/ui/components/bd/setting/Colour.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2ebf2163..c902f0de 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ Installers/**/*/packages dist/ user.config.json tests/data +/tests/themes/SimplerFlat diff --git a/client/src/ui/components/bd/setting/Colour.vue b/client/src/ui/components/bd/setting/Colour.vue index 65b2a4bc..115fc649 100644 --- a/client/src/ui/components/bd/setting/Colour.vue +++ b/client/src/ui/components/bd/setting/Colour.vue @@ -9,7 +9,7 @@ */ @@ -26,7 +26,8 @@ data() { return { open: false, - colors: '#FFF' + colors: '#FFF', + topOffset: '35px' } }, components: { @@ -57,6 +58,15 @@ } }, methods: { + show() { + const offset = window.innerHeight - this.$refs.root.getBoundingClientRect().top - 340; + if (offset >= 0) { + this.topOffset = '35px'; + } else { + this.topOffset = 35 + offset > 35 ? '35px' : `${35 + offset}px`; + } + this.open = true; + }, pick(c) { this.change(this.rgbaString); }, From 327fb09973945bb74a058acb6e329e7dcb1dc5d0 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 28 Feb 2018 08:58:50 +0200 Subject: [PATCH 5/6] Remove pointer-events if no changes --- client/src/ui/components/bd/modals/SettingsModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/ui/components/bd/modals/SettingsModal.vue b/client/src/ui/components/bd/modals/SettingsModal.vue index ef78bae4..8fb77862 100644 --- a/client/src/ui/components/bd/modals/SettingsModal.vue +++ b/client/src/ui/components/bd/modals/SettingsModal.vue @@ -12,7 +12,7 @@
-