Skip to content

Commit 55ac526

Browse files
committed
Refactor dialog styles: unify dialog class names and enhance confirmation/error dialog styling
1 parent 9fc7997 commit 55ac526

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

common-ui-elements/dark-theme.css

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ body.dark-theme button.danger:hover {
7272
/* ------------------------------------------------------------------------- */
7373
/* Dark Theme Overrides for Dynamic Prompt Dialogs */
7474
/* ------------------------------------------------------------------------- */
75-
body.dark-theme .dialog-confirmation,
76-
body.dark-theme .dialog-error {
75+
body.dark-theme .dialog {
7776
background-color: #333;
7877
/* Dark background for dialogs */
7978
color: #fff;
@@ -87,8 +86,7 @@ body.dark-theme .dialog-error {
8786
/* Rounded corners */
8887
}
8988

90-
body.dark-theme .dialog-confirmation button,
91-
body.dark-theme .dialog-error button {
89+
body.dark-theme .dialog button {
9290
background-color: #444;
9391
/* Dark button background */
9492
color: #fff;
@@ -103,8 +101,7 @@ body.dark-theme .dialog-error button {
103101
}
104102

105103
/* Button hover states for dialogs */
106-
body.dark-theme .dialog-confirmation button:hover,
107-
body.dark-theme .dialog-error button:hover {
104+
body.dark-theme .dialog button:hover {
108105
background-color: #555;
109106
border-color: #777;
110107
}

popup-page-styles/popup-components.css

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -135,79 +135,79 @@ Key areas:
135135
to inherit the base button styles from popup-buttons.css */
136136

137137
/* ------------------------------------------------------------------------- */
138-
/* Confirmation Dialog Styling */
138+
/* Dialog Base Styling */
139139
/* ------------------------------------------------------------------------- */
140-
.dialog-confirmation {
140+
.dialog {
141141
margin-top: 16px;
142142
padding: 16px;
143-
border: 1px solid var(--primary-color);
144143
border-radius: 6px;
145-
background-color: #f0f8ff;
146144
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
145+
border-width: 1px;
146+
border-style: solid;
147147
}
148148

149-
.dialog-confirmation p {
150-
margin: 0 0 16px 0;
151-
color: var(--text-color);
149+
.dialog p {
152150
font-size: 14px;
153151
}
154152

155-
.dialog-confirmation button {
153+
.dialog button {
156154
margin-right: 12px;
157155
padding: 8px 16px;
158156
border: none;
159157
border-radius: 4px;
160-
background-color: var(--primary-color);
161158
color: #ffffff;
162159
cursor: pointer;
163160
transition: background-color var(--transition-duration) ease, transform var(--transition-duration) ease;
164161
}
165162

166-
.dialog-confirmation button:hover {
167-
background-color: #6a4abd;
163+
.dialog button:hover {
168164
transform: scale(1.02);
169165
}
170166

171-
.dialog-confirmation button:active {
167+
.dialog button:active {
172168
transform: scale(0.98);
173169
}
174170

171+
/* ------------------------------------------------------------------------- */
172+
/* Confirmation Dialog Styling */
173+
/* ------------------------------------------------------------------------- */
174+
.dialog-confirmation {
175+
border-color: var(--primary-color);
176+
background-color: #f0f8ff;
177+
}
178+
179+
.dialog-confirmation p {
180+
margin: 0 0 16px 0;
181+
color: var(--text-color);
182+
}
183+
184+
.dialog-confirmation button {
185+
background-color: var(--primary-color);
186+
}
187+
188+
.dialog-confirmation button:hover {
189+
background-color: #6a4abd;
190+
}
191+
175192
/* ------------------------------------------------------------------------- */
176193
/* Error Dialog Styling */
177194
/* ------------------------------------------------------------------------- */
178195
.dialog-error {
179-
margin-top: 16px;
180-
padding: 16px;
181-
border: 1px solid var(--danger-color);
182-
border-radius: 6px;
196+
border-color: var(--danger-color);
183197
background-color: #ffe6e6;
184-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
185198
}
186199

187200
.dialog-error p {
188201
margin: 0;
189202
color: var(--danger-color);
190-
font-size: 14px;
191203
}
192204

193205
.dialog-error button {
194-
margin-right: 12px;
195-
padding: 8px 16px;
196-
border: none;
197-
border-radius: 4px;
198206
background-color: var(--danger-color);
199-
color: #ffffff;
200-
cursor: pointer;
201-
transition: background-color var(--transition-duration) ease, transform var(--transition-duration) ease;
202207
}
203208

204209
.dialog-error button:hover {
205210
background-color: #c9302c;
206-
transform: scale(1.02);
207-
}
208-
209-
.dialog-error button:active {
210-
transform: scale(0.98);
211211
}
212212

213213
/* ------------------------------------------------------------------------- */

popup.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ <h2>Backup &amp; Restore</h2>
281281
/>
282282
</div>
283283
<!-- Confirmation Div -->
284-
<div id="confirmationDiv" class="dialog-confirmation" style="display: none">
284+
<div id="confirmationDiv" class="dialog dialog-confirmation" style="display: none">
285285
<p>
286286
File loaded successfully, but a profile with the same name already
287287
exists in the system. Do you want to overwrite the existing profile?
@@ -290,7 +290,7 @@ <h2>Backup &amp; Restore</h2>
290290
<button id="cancelOverwrite">No</button>
291291
</div>
292292
<!-- Error Message Div -->
293-
<div id="errorDiv" class="dialog-error" style="display: none">
293+
<div id="errorDiv" class="dialog dialog-error" style="display: none">
294294
<p>
295295
Error loading file. Please ensure the file is a valid JSON profile.
296296
</p>

0 commit comments

Comments
 (0)