From bb4777578aff216c2c7a7c6b7844532d8fb91c15 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Thu, 31 Oct 2024 18:07:26 +0530 Subject: [PATCH] Remove bootstrap from the runtime code and update both yarn.lock files. #8077 --- runtime/package.json | 1 - runtime/src/css/pgadmin-desktop.css | 144 +- runtime/src/html/configure.html | 85 +- runtime/src/html/server_error.html | 39 +- runtime/src/html/view_log.html | 38 +- runtime/src/js/menu.js | 16 +- runtime/src/js/pgadmin.js | 4 +- runtime/yarn.lock | 254 ++-- web/package.json | 1 - web/yarn.lock | 2162 +++++++++++++-------------- 10 files changed, 1307 insertions(+), 1437 deletions(-) diff --git a/runtime/package.json b/runtime/package.json index f091c85aa..4d9fb4c39 100644 --- a/runtime/package.json +++ b/runtime/package.json @@ -17,7 +17,6 @@ }, "dependencies": { "axios": "^1.7.7", - "bootstrap": "^4.5.3", "electron-context-menu": "^4.0.4", "electron-store": "^10.0.0" } diff --git a/runtime/src/css/pgadmin-desktop.css b/runtime/src/css/pgadmin-desktop.css index 3ca224fe6..65a54dac5 100644 --- a/runtime/src/css/pgadmin-desktop.css +++ b/runtime/src/css/pgadmin-desktop.css @@ -1,44 +1,118 @@ -@import "../../node_modules/bootstrap/dist/css/bootstrap.css"; +body { + font-family: system-ui; + height: 100vh; + display: flex; + flex-direction: column; + margin: 0; + font-size: 0.9em; + background-color:var(--background-color); + color: var(--color); + + --color: #222; + --background-color: #fff; + --border-color: #bac1cd; + --primary-color: #326690; +} + +.content { + min-height: 0; + display: flex; + flex-direction: column; + flex-grow: 1; + padding: 8px; +} + +.footer { + display: flex; + align-items: center; + justify-content: space-between; + border-top: 1px solid var(--border-color); + padding: 8px; +} .card { - margin: 0.25rem !important; + margin: 4px 0px; } -#status-text { - font-size: medium; - align-self: center; -} - -#server_log_label { +.card .card-header { + padding: 8px 4px; font-weight: 500; } +.card .card-body { + border: 1px solid var(--border-color); + border-radius: 4px; + padding: 12px; +} + +.form-inline { + display: flex; + padding: 16px 0px; +} + +.form-group { + display: flex; + align-items: center; + gap: 4px; +} + +.form-check-input { + height: 16px; + width: 16px; + accent-color: var(--primary-color); +} +.form-check-input:focus { + outline-color: var(--primary-color); +} + +.form-input { + padding: 4px 6px; + background-color: var(--background-color); + border-style: none; + border: 1px solid var(--border-color); + color: var(--color); + border-radius: 4px; +} +.form-input:disabled { + opacity: 0.7; +} +.form-input:focus { + outline-color: var(--primary-color); +} + +.mt-4 { + margin-top: 16px; +} +.mr-2 { + margin-right: 8px; +} +.mr-3 { + margin-right: 12px; +} + +.btn { + padding: 6px 12px; + border-radius: 4px; + box-shadow: none; + border-style: none; + cursor: pointer; +} + .btn-primary { - color: #fff; - background-color: #326690; - border-color: #326690; - } - .btn-primary:hover { - color: #fff; - background-color: #285274; - border-color: #254b6a; - } - .btn-primary:focus, .btn-primary.focus { - color: #fff; - background-color: #285274; - border-color: #254b6a; - box-shadow: 0 0 0 0 rgba(81, 125, 161, 0.5); - } - .btn-primary.disabled, .btn-primary:disabled { - color: #fff; - background-color: #326690; - border-color: #326690; - } - .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { - color: #fff; - background-color: #254b6a; - border-color: #224461; - } - .btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0 rgba(81, 125, 161, 0.5); + color: #fff; + background-color: var(--primary-color); + border-color: var(--primary-color); +} +.btn-primary:disabled { + opacity: 0.75; + cursor: unset; +} + +/* @media (prefers-color-scheme: dark) { + body { + --color: #d4d4d4; + --background-color: #212121; + --border-color: #4a4a4a; + --primary-color: #234d6e; } +} */ \ No newline at end of file diff --git a/runtime/src/html/configure.html b/runtime/src/html/configure.html index 880c25363..1f7fba662 100644 --- a/runtime/src/html/configure.html +++ b/runtime/src/html/configure.html @@ -6,71 +6,58 @@ pgAdmin 4 Runtime Configuration - -
-
Fixed Port
-
-
- -
-
-
- - -
+
+
+
Fixed Port
+
- - + By default, pgAdmin uses a random port number to ensure it can always run successfully. If you need to use a predictable port number, you can set one here. Note that if the port is already in use, the application will be unable to start. +
+
+
+ + +
+
+ + +
-
-
-
Connection Timeout
-
-
- -
-
+
+
Connection Timeout
+
- - - + Connection Timeout will define how long to wait for the pgAdmin server to start before throwing an error. By default, pgAdmin will wait for 90 seconds. + +
+
+ + + seconds
-
-
-
Open Documentation
-
-
- -
-
-
- +
+
Open Documentation
+
+
+ By checking this option, all documentation links will open in the default browser instead of a new window. + +
+
+
-
+