From a13d60f7c9c4ba437761f349d005856448bfd1e9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 26 Jun 2024 07:45:12 +0100 Subject: [PATCH] Don't show hidden settings in the settings bar --- packages/client/manifest.json | 26 ++++++++++--------- .../src/components/preview/SettingsBar.svelte | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 00b503626f..7a9d1a5695 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -23,17 +23,21 @@ { "type": "bigint", "message": "stringAsNumber" }, { "type": "options", "message": "stringAsNumber" }, { "type": "formula", "message": "stringAsNumber" }, - { "type": "datetime", "message": "dateAsNumber"} + { "type": "datetime", "message": "dateAsNumber" } ], - "unsupported": [ - { "type": "json", "message": "jsonPrimitivesOnly" } - ] + "unsupported": [{ "type": "json", "message": "jsonPrimitivesOnly" }] }, "stringLike": { - "supported": ["string", "number", "bigint", "options", "longform", "boolean", "datetime"], - "unsupported": [ - { "type": "json", "message": "jsonPrimitivesOnly" } - ] + "supported": [ + "string", + "number", + "bigint", + "options", + "longform", + "boolean", + "datetime" + ], + "unsupported": [{ "type": "json", "message": "jsonPrimitivesOnly" }] }, "datetimeLike": { "supported": ["datetime"], @@ -43,11 +47,9 @@ { "type": "options", "message": "stringAsDate" }, { "type": "formula", "message": "stringAsDate" }, { "type": "bigint", "message": "stringAsDate" }, - { "type": "number", "message": "numberAsDate"} + { "type": "number", "message": "numberAsDate" } ], - "unsupported": [ - { "type": "json", "message": "jsonPrimitivesOnly" } - ] + "unsupported": [{ "type": "json", "message": "jsonPrimitivesOnly" }] } }, "layout": { diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index b69b8ce050..c5109c6bca 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -41,7 +41,7 @@ allSettings.push(setting) } }) - return allSettings.filter(setting => setting.showInBar) + return allSettings.filter(setting => setting.showInBar && !setting.hidden) } const updatePosition = () => {