From 45925bacb6375f860484afcbd3881bc483d1395a Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Tue, 27 Aug 2024 17:11:48 -0700 Subject: [PATCH] Improve the usability of the Settings tab in Dev Center --- src/dev-center/css/style.css | 1 + src/dev-center/js/dev-center.js | 109 ++++++++++++++++++++------------ 2 files changed, 70 insertions(+), 40 deletions(-) diff --git a/src/dev-center/css/style.css b/src/dev-center/css/style.css index 02a9f376..cc32ab3a 100644 --- a/src/dev-center/css/style.css +++ b/src/dev-center/css/style.css @@ -264,6 +264,7 @@ section { label, input[type="text"] { display: block; + user-select: none; } #delete-app { diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index 9be94f51..a603f3d2 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -475,6 +475,7 @@ function generate_edit_app_section(app) {
App has been successfully updated.×
+

Basic Info

@@ -487,45 +488,6 @@ function generate_edit_app_section(app) { -
- - -
- -
- - -
- -
- - -
- -
- - - - -
- -
- - - - -
- -
- - -
- -
- - -
-
Change App Icon
@@ -539,6 +501,47 @@ function generate_edit_app_section(app) {

A comma-separated list of file type specifiers. For example if you include .txt, your apps could be opened when a user clicks on a TXT file.

+

Window Settings

+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
@@ -2084,4 +2087,30 @@ $(document).on('change', '#edit-app-maximize-on-start', function (e) { $('#edit-app-window-width, #edit-app-window-height').prop('disabled', false); $('#edit-app-window-top, #edit-app-window-left').prop('disabled', false); } -}) \ No newline at end of file +}) + +$(document).on('change', '#edit-app-background', function (e) { + if($('#edit-app-background').is(":checked")){ + disable_window_settings() + }else{ + enable_window_settings() + } +}) + +function disable_window_settings(){ + $('#edit-app-maximize-on-start').prop('disabled', true); + $('#edit-app-fullpage-on-landing').prop('disabled', true); + $('#edit-app-window-width, #edit-app-window-height').prop('disabled', true); + $('#edit-app-window-top, #edit-app-window-left').prop('disabled', true); + $('#edit-app-window-resizable').prop('disabled', true); + $('#edit-app-hide-titlebar').prop('disabled', true); +} + +function enable_window_settings(){ + $('#edit-app-maximize-on-start').prop('disabled', false); + $('#edit-app-fullpage-on-landing').prop('disabled', false); + $('#edit-app-window-width, #edit-app-window-height').prop('disabled', false); + $('#edit-app-window-top, #edit-app-window-left').prop('disabled', false); + $('#edit-app-window-resizable').prop('disabled', false); + $('#edit-app-hide-titlebar').prop('disabled', false); +} \ No newline at end of file