mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
cast selectable_body
and multiselectable
to Boolean
This commit is contained in:
parent
892750788b
commit
41e307bd5b
@ -55,7 +55,7 @@ function UIItem(options){
|
|||||||
options.is_shortcut = options.is_shortcut ?? 0;
|
options.is_shortcut = options.is_shortcut ?? 0;
|
||||||
options.is_trash = options.is_trash ?? false;
|
options.is_trash = options.is_trash ?? false;
|
||||||
options.metadata = options.metadata ?? '';
|
options.metadata = options.metadata ?? '';
|
||||||
options.multiselectable = options.multiselectable ?? true;
|
options.multiselectable = (options.multiselectable === undefined || options.multiselectable === true) ? true : false;
|
||||||
options.shortcut_to = options.shortcut_to ?? '';
|
options.shortcut_to = options.shortcut_to ?? '';
|
||||||
options.shortcut_to_path = options.shortcut_to_path ?? '';
|
options.shortcut_to_path = options.shortcut_to_path ?? '';
|
||||||
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);
|
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);
|
||||||
|
@ -99,7 +99,7 @@ async function UIWindow(options) {
|
|||||||
options.show_minimize_button = options.show_minimize_button ?? true;
|
options.show_minimize_button = options.show_minimize_button ?? true;
|
||||||
options.on_close = options.on_close ?? undefined;
|
options.on_close = options.on_close ?? undefined;
|
||||||
options.parent_uuid = options.parent_uuid ?? null;
|
options.parent_uuid = options.parent_uuid ?? null;
|
||||||
options.selectable_body = options.selectable_body ?? true;
|
options.selectable_body = (options.selectable_body === undefined || options.selectable_body === true) ? true : false;
|
||||||
options.show_in_taskbar = options.show_in_taskbar ?? true;
|
options.show_in_taskbar = options.show_in_taskbar ?? true;
|
||||||
options.show_maximize_button = options.show_maximize_button ?? true;
|
options.show_maximize_button = options.show_maximize_button ?? true;
|
||||||
options.single_instance = options.single_instance ?? false;
|
options.single_instance = options.single_instance ?? false;
|
||||||
|
@ -2678,7 +2678,7 @@ window.get_html_element_from_options = async function(options){
|
|||||||
options.is_shortcut = options.is_shortcut ?? 0;
|
options.is_shortcut = options.is_shortcut ?? 0;
|
||||||
options.is_trash = options.is_trash ?? false;
|
options.is_trash = options.is_trash ?? false;
|
||||||
options.metadata = options.metadata ?? '';
|
options.metadata = options.metadata ?? '';
|
||||||
options.multiselectable = options.multiselectable ?? true;
|
options.multiselectable = (!options.multiselectable || options.multiselectable === true) ? true : false;
|
||||||
options.shortcut_to = options.shortcut_to ?? '';
|
options.shortcut_to = options.shortcut_to ?? '';
|
||||||
options.shortcut_to_path = options.shortcut_to_path ?? '';
|
options.shortcut_to_path = options.shortcut_to_path ?? '';
|
||||||
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);
|
options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user