From 618af5bfa87adac1cf62e0613832c43e348437e8 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 20 Jul 2024 14:45:44 +0200 Subject: [PATCH 1/3] `k-view-button` component --- panel/src/components/View/Buttons/SettingsButton.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/src/components/View/Buttons/SettingsButton.vue b/panel/src/components/View/Buttons/SettingsButton.vue index 60ac623ab2..c34dd84667 100644 --- a/panel/src/components/View/Buttons/SettingsButton.vue +++ b/panel/src/components/View/Buttons/SettingsButton.vue @@ -27,7 +27,7 @@ */ export default { inheritAttrs: false, - emits: ["action"], + emits: ["action", "click"], computed: { dropdown() { return this.model?.link; @@ -42,7 +42,7 @@ export default { return this.$refs.dropdown.toggle(); } - this.$emit("action", "settings"); + this.$emit("click"); } } }; From 0eec5d04d587839e96656636bfb58732dd8b0b06 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 20 Jul 2024 19:22:59 +0200 Subject: [PATCH 2/3] Use `k-view-button` for view buttons --- .../src/components/View/Buttons/AddButton.vue | 4 +- .../View/Buttons/AddLanguagesButton.vue | 4 +- .../View/Buttons/AddUsersButton.vue | 4 +- .../View/Buttons/LanguagesButton.vue | 22 ++++------ .../components/View/Buttons/PreviewButton.vue | 6 +-- .../components/View/Buttons/RemoveButton.vue | 4 +- .../View/Buttons/RemoveLanguageButton.vue | 4 +- .../View/Buttons/SettingsButton.vue | 41 ++++++------------- .../components/View/Buttons/StatusButton.vue | 6 +-- .../components/View/Buttons/ThemeButton.vue | 20 ++++----- 10 files changed, 40 insertions(+), 75 deletions(-) diff --git a/panel/src/components/View/Buttons/AddButton.vue b/panel/src/components/View/Buttons/AddButton.vue index ccdfe028ae..6a7b86351d 100644 --- a/panel/src/components/View/Buttons/AddButton.vue +++ b/panel/src/components/View/Buttons/AddButton.vue @@ -1,11 +1,9 @@ diff --git a/panel/src/components/View/Buttons/AddLanguagesButton.vue b/panel/src/components/View/Buttons/AddLanguagesButton.vue index 55e21147a6..b9ea9eebbb 100644 --- a/panel/src/components/View/Buttons/AddLanguagesButton.vue +++ b/panel/src/components/View/Buttons/AddLanguagesButton.vue @@ -1,9 +1,7 @@ diff --git a/panel/src/components/View/Buttons/AddUsersButton.vue b/panel/src/components/View/Buttons/AddUsersButton.vue index ea104404e0..056f0abf61 100644 --- a/panel/src/components/View/Buttons/AddUsersButton.vue +++ b/panel/src/components/View/Buttons/AddUsersButton.vue @@ -1,11 +1,9 @@ diff --git a/panel/src/components/View/Buttons/StatusButton.vue b/panel/src/components/View/Buttons/StatusButton.vue index 7480a120cb..d919b6974a 100644 --- a/panel/src/components/View/Buttons/StatusButton.vue +++ b/panel/src/components/View/Buttons/StatusButton.vue @@ -1,11 +1,9 @@