From 27e3e6f1b3ee7fca72502eb4af786e2170e05d41 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 2 Mar 2026 10:48:36 +0100 Subject: [PATCH] client: add noWarning option --- CHANGELOG.md | 3 +++ resources/docs/docs/client-options.md | 1 + src/client/editor/index.mjs | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb76c47..15b24d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - editor - preserve code editor undo history between consecutive edits of a same widget's property - preserve fullscreen code editor focus when saving / submitting + +- client + - add `noWarning` client option ## 1.30.1 diff --git a/resources/docs/docs/client-options.md b/resources/docs/docs/client-options.md index d653890f..0a6e4a7b 100644 --- a/resources/docs/docs/client-options.md +++ b/resources/docs/docs/client-options.md @@ -19,6 +19,7 @@ Client options can be set either with the server's `--client-options` option, or | virtualKeyboard | 1 / 0 | 0 | (desktop only) set to 1 to enable the virtual keyboard by default | | notifications | 1 / 0 | 1 | set to 0 to hide notifications by default | | title | string | '' | replace window title | +| noWarning | 1 / 0 | 0 | set to 0 to disable unsaved session warnings | Example: diff --git a/src/client/editor/index.mjs b/src/client/editor/index.mjs index 399553b4..04466646 100644 --- a/src/client/editor/index.mjs +++ b/src/client/editor/index.mjs @@ -1024,7 +1024,9 @@ class Editor { pushHistory(indexes) { - this.unsavedSession = true + if (!ENV.noWarning) { + this.unsavedSession = true + } if (this.historyState > -1) { this.history.splice(0, this.historyState + 1)