Fix checkpoint create auto generate (and more)

- Fix empty checkpoint name on mes click to auto generate
- Change /checkpoint-create to not require name and auto generate
- Fix popup input type returning empty string instead of null on empty input field
This commit is contained in:
Wolfsblvt
2024-09-12 23:34:37 +02:00
parent d082c2f14d
commit 73c14711e1
2 changed files with 13 additions and 9 deletions

View File

@ -83,6 +83,9 @@ const showPopupHelper = {
const content = PopupUtils.BuildTextWithHeader(header, text);
const popup = new Popup(content, POPUP_TYPE.INPUT, defaultValue, popupOptions);
const value = await popup.show();
// Return values: If empty string, we explicitly handle that as returning that empty string as "success" provided.
// Otherwise, all non-truthy values (false, null, undefined) are treated as "cancel" and return null.
if (value === '') return '';
return value ? String(value) : null;
},