From a8244d4fa652e6a196668c148d24614343e92b49 Mon Sep 17 00:00:00 2001 From: Bryon Lewis Date: Tue, 25 Aug 2026 08:16:09 -0400 Subject: [PATCH 1/5] add custom UI button ordering --- .../components/CustomUI/CustomUIBase.vue | 12 +++ .../UISettings/UIContextBar.vue | 100 +++++++++++++++++- client/src/ConfigurationManager.ts | 2 + server/dive_utils/models.py | 2 + 4 files changed, 112 insertions(+), 4 deletions(-) diff --git a/client/dive-common/components/CustomUI/CustomUIBase.vue b/client/dive-common/components/CustomUI/CustomUIBase.vue index 1bc34c9e..2f72bcfd 100644 --- a/client/dive-common/components/CustomUI/CustomUIBase.vue +++ b/client/dive-common/components/CustomUI/CustomUIBase.vue @@ -440,6 +440,18 @@ export default defineComponent({ } } }); + const order = configMan.configuration.value?.customUI?.attributeButtonOrder || []; + if (order.length) { + attributeButtonList.sort((a, b) => { + const keyA = `${a.type}_${a.attrName}`; + const keyB = `${b.type}_${b.attrName}`; + const idxA = order.indexOf(keyA); + const idxB = order.indexOf(keyB); + const sortA = idxA === -1 ? Number.MAX_SAFE_INTEGER : idxA; + const sortB = idxB === -1 ? Number.MAX_SAFE_INTEGER : idxB; + return sortA - sortB; + }); + } return attributeButtonList; }); diff --git a/client/dive-common/components/configurationEditors/UISettings/UIContextBar.vue b/client/dive-common/components/configurationEditors/UISettings/UIContextBar.vue index f1855c0f..07002cae 100644 --- a/client/dive-common/components/configurationEditors/UISettings/UIContextBar.vue +++ b/client/dive-common/components/configurationEditors/UISettings/UIContextBar.vue @@ -1,15 +1,23 @@ -awaitingKeyPress +