From afe96e1c4af260f1efad459534003f6935c35bf1 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Mon, 28 Apr 2025 10:53:07 -0700 Subject: [PATCH] Thing details: Add dialog view for properties with overflow key/values (#3162) This adds an icon to properties who have values longer then can be displayed on the thing details page. Clicking this icon brings up the key and value of the property in a dialog box. This icon only shows if the value overflows. --------- Signed-off-by: Dan Cunningham --- .../pages/settings/things/thing-details.vue | 117 +++++++++++++++++- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue index 78428cc10..86af68950 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/things/thing-details.vue @@ -72,7 +72,15 @@ + @click="showFullPropertyIfTruncated(key, value)"> +
+ {{ key }} +
+
+ {{ value }} + +
+
@@ -234,7 +242,7 @@ p.action-description .thing-property .item-after - max-width 75% + max-width 50% span max-width 100% @@ -246,6 +254,35 @@ p.action-description top calc(var(--f7-navbar-height) + var(--f7-tabbar-height)) height calc(100% - 2*var(--f7-navbar-height)) width 100% + + .item-title-content, .item-after-content + display flex + align-items center + overflow hidden + width 100% + + span + overflow hidden + text-overflow ellipsis + white-space nowrap + flex-shrink 1 + min-width 0 + + .truncation-icon + margin-left 4px + flex-shrink 0 + color var(--f7-text-color-secondary) + +.dialog.wide-property-dialog + --f7-dialog-width: 560px + + @media (max-width: 599px) { + --f7-dialog-width: 95vw + } + + @media (min-width: 768px) { + --f7-dialog-width: 700px + }