From 8ffdd9fe4978afc4bef28febd4d9f15a9d1640a2 Mon Sep 17 00:00:00 2001 From: Standarduser Date: Thu, 2 Jan 2025 13:56:40 +0100 Subject: [PATCH] added textonly to switch and viw --- README.md | 4 ++++ widgets/vis-homekittiles.html | 4 ++-- widgets/vis-homekittiles/css/style.css | 20 +++++++++++++++++++ .../vis-homekittiles/js/vis-homekittiles.js | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b9790a..7efe156 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,10 @@ The widgets are designed for VIS 1.x. Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** + +* Added new style "text only" to switch and view-in-widget tiles + ### 0.3.2 (2024-12-03) * Added option to show icons colored on tiles and radio diff --git a/widgets/vis-homekittiles.html b/widgets/vis-homekittiles.html index 6d04335..85ff3de 100644 --- a/widgets/vis-homekittiles.html +++ b/widgets/vis-homekittiles.html @@ -379,7 +379,7 @@ ' - data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSwitchBool;oid/id;icon/image;iconRound/checkbox;iconColored/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly;" + data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSwitchBool;oid/id;icon/image;iconRound/checkbox;iconColored/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly;" data-vis-attrs0="group.labelGroup1;label[Switch];label2pre;label2oid/id;label2unit;label2post;label2decimals[1];label2factor[1];label2comma[true]/checkbox;label2tdp/checkbox;" data-vis-attrs1="group.labelGroup2;label3pre;label3oid/id;label3unit;label3post;label3decimals[1];label3factor[1];label3comma[true]/checkbox;label3tdp/checkbox;label4pre;label4oid/id;label4unit;label4post;label4decimals[1];label4factor[1];label4comma[true]/checkbox;label4tdp/checkbox;label5pre;label5oid/id;label5unit;label5post;label5decimals[1];label5factor[1];label5comma[true]/checkbox;label5tdp/checkbox;" data-vis-attrs2="group.increment;oidIncrement/id;incrementPlusShow/checkbox;incrementMinusShow/checkbox;incrementPlusValue[1];incrementMinusValue[-1];incrementValueMax[100];incrementValueMin[0];incrementShowOnlyIfTrue/checkbox;" @@ -452,7 +452,7 @@ ' - data-vis-attrs="description/custom,vis-homekittiles.infoText,hktViewInWidgetDialog;oidActive/id;icon/image;iconRound/checkbox;iconColored/checkbox;showLikeActive/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly;" + data-vis-attrs="description/custom,vis-homekittiles.infoText,hktViewInWidgetDialog;oidActive/id;icon/image;iconRound/checkbox;iconColored/checkbox;showLikeActive/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly;" data-vis-attrs0="group.labelGroup1;label[Dialog];label2pre;label2oid/id;label2unit;label2post;label2decimals[1];label2factor[1];label2comma[true]/checkbox;label2tdp/checkbox;" data-vis-attrs1="group.labelGroup2;label3pre;label3oid/id;label3unit;label3post;label3decimals[1];label3factor[1];label3comma[true]/checkbox;label3tdp/checkbox;label4pre;label4oid/id;label4unit;label4post;label4decimals[1];label4factor[1];label4comma[true]/checkbox;label4tdp/checkbox;label5pre;label5oid/id;label5unit;label5post;label5decimals[1];label5factor[1];label5comma[true]/checkbox;label5tdp/checkbox;" data-vis-attrs2="group.increment;oidIncrement/id;incrementPlusShow/checkbox;incrementMinusShow/checkbox;incrementPlusValue[1];incrementMinusValue[-1];incrementValueMax[100];incrementValueMin[0];incrementShowOnlyIfTrue/checkbox;" diff --git a/widgets/vis-homekittiles/css/style.css b/widgets/vis-homekittiles/css/style.css index e60e48e..8476695 100644 --- a/widgets/vis-homekittiles/css/style.css +++ b/widgets/vis-homekittiles/css/style.css @@ -506,6 +506,26 @@ display: none } /*#endregion*/ +/*---------------------------------------------------------------*/ +/*#region Basic design for text-only */ +.homekitTiles.tile.textonly .labelGroup1 { + left: unset; + bottom: unset; + top: 50%; + transform: translateY(-50%); + width: 100%; + text-align: center; +} +.homekitTiles.tile.textonly .labelGroup2 { + display: none; +} +.homekitTiles.tile.textonly .tileIcon { + display: none; +} +.homekitTiles.tile.textonly .increment { + display: none +} +/*#endregion*/ /*----------------------------------------------------------------*/ /*#region Date-Picker */ diff --git a/widgets/vis-homekittiles/js/vis-homekittiles.js b/widgets/vis-homekittiles/js/vis-homekittiles.js index 70c6b7e..3ce57de 100644 --- a/widgets/vis-homekittiles/js/vis-homekittiles.js +++ b/widgets/vis-homekittiles/js/vis-homekittiles.js @@ -195,6 +195,7 @@ $.extend( "tile big": { "en": "Tile (big)", "de": "Kachel (groß)" }, "tile iconOnly": { "en": "Only icon", "de": "nur Icon" }, "tile small": { "en": "Tile (small)", "de": "Kachel (klein)" }, + "tile textonly": { "en": "Only Text", "de": "nur Text" }, "unit": { "en": "Unit", "de": "Einheit" }, "value_": { "en": "Value ", "de": "Wert " }, "valueButton_": { "en": "Value button ", "de": "Wert Schaltfläche " },