Skip to content

Commit 75455de

Browse files
Merge pull request #967 from rocket-admin/dark-theme
apply dark theme
2 parents 12c4242 + ebc2e5e commit 75455de

33 files changed

+386
-80
lines changed

frontend/src/app/app.component.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
.main-menu-container {
22
display: flex;
33
flex-direction: column;
4-
background: #fff;
54
height: 100vh;
65
}
76

7+
@media (prefers-color-scheme: light) {
8+
.main-menu-container {
9+
--mat-sidenav-content-background-color: #fff;
10+
}
11+
}
12+
813
.main-menu-sidenav {
914
width: 60vw;
1015
}
@@ -84,6 +89,8 @@
8489
}
8590

8691
.nav-bar__upgrade-button {
92+
--mdc-filled-button-label-text-color: #424242;
93+
--mdc-filled-button-container-color: #fff;
8794
--mdc-filled-button-container-height: 28px;
8895

8996
margin-right: -8px;
@@ -275,4 +282,10 @@
275282
.user-email {
276283
color: rgba(0, 0, 0, 0.54);
277284
font-size: 12px;
285+
}
286+
287+
@media (prefers-color-scheme: dark) {
288+
.user-email {
289+
color: rgba(255, 255, 255, 0.7);
290+
}
278291
}

frontend/src/app/components/connect-db/connect-db.component.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,22 @@
5757
.warningMessage {
5858
display: flex;
5959
align-items: center;
60-
/* border: 2px solid rgba(0, 0, 0, 0.87); */
61-
/* border-radius: 6px; */
62-
background: #F5F5F5;
6360
margin-bottom: 8px;
6461
padding: 16px 12px;
6562
}
6663

64+
@media (prefers-color-scheme: dark) {
65+
.warningMessage {
66+
background: #424242;
67+
}
68+
}
69+
70+
@media (prefers-color-scheme: light) {
71+
.warningMessage {
72+
background: #F5F5F5;
73+
}
74+
}
75+
6776
.warningMessage__icon {
6877
flex-shrink: 0;
6978
margin-right: 12px;

frontend/src/app/components/connection-settings/connection-settings.component.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
}
88

99
.mat-h1 {
10-
margin-top: 2em;
11-
margin-bottom: 1.5em;
10+
margin-top: 2em !important;
11+
margin-bottom: 1.5em !important;
1212
}
1313

1414
.settings-form {
@@ -146,13 +146,25 @@
146146
display: flex;
147147
align-items: center;
148148
justify-content: space-between;
149-
background-color: #fff;
150-
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
149+
background-color: var(--mat-sidenav-content-background-color);
150+
box-shadow: var(--shadow);
151151
height: 64px;
152152
padding: 0 max(calc(50vw - 325px), 10%);
153153
width: 100vw;
154154
}
155155

156+
@media (prefers-color-scheme: dark) {
157+
.actions {
158+
--shadow: 0 3px 1px -2px rgba(0,0,0,.5),0 2px 2px 0 rgba(0,0,0,.64),0 1px 5px 0 rgba(0,0,0,0.85);
159+
}
160+
}
161+
162+
@media (prefers-color-scheme: light) {
163+
.actions {
164+
--shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
165+
}
166+
}
167+
156168
.settings-form__back-button {
157169
margin-right: auto;
158170
}

frontend/src/app/components/connection-settings/zapier/zapier.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<zapier-workflow
33
[signUpEmail]="currentUser.email"
44
[clientId]='"4MFV3OrjI8e8JkZPySqbFVbKtZUz0sV0H3XJnb6w"'
5-
[theme]='"light"'
5+
[theme]='"auto"'
66
[introCopyDisplay]='"show"'
77
[guessZapDisplay]='"show"'
88
[zapCreateFromScratchDisplay]='"hide"'

frontend/src/app/components/connections-list/connections-list.component.css

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
}
3333

34-
.pageTitle {
34+
.pageTitleHeader .pageTitle {
3535
font-weight: 600;
3636
margin-bottom: 0;
3737
}
@@ -181,7 +181,7 @@
181181
object-fit: contain;
182182
}
183183

184-
.connectionLogoPreview__name {
184+
.connectionLogoPreview .connectionLogoPreview__name {
185185
margin-bottom: 0;
186186
font-size: 20px;
187187
}
@@ -192,7 +192,7 @@
192192
align-items: center;
193193
}
194194

195-
.connectionInfo__connectionTitle {
195+
.connectionInfo .connectionInfo__connectionTitle {
196196
margin-bottom: 0;
197197
overflow: hidden;
198198
text-overflow: ellipsis;
@@ -224,7 +224,7 @@
224224
display: flex;
225225
align-items: center;
226226
justify-content: space-between;
227-
background: #fff;
227+
background: var(--mat-sidenav-content-background-color);
228228
border-radius: 4px;
229229
box-shadow:
230230
0px 1px 3px 0px rgba(0, 0, 0, 0.2),
@@ -244,6 +244,24 @@
244244
}
245245
}
246246

247+
/* @media (prefers-color-scheme: light) {
248+
.testConnectionLink {
249+
box-shadow:
250+
0px 1px 3px 0px rgba(0, 0, 0, 0.2),
251+
0px 2px 2px 0px rgba(0, 0, 0, 0.12),
252+
0px 0px 2px 0px rgba(0, 0, 0, 0.14);
253+
}
254+
}
255+
256+
@media (prefers-color-scheme: dark) {
257+
.testConnectionLink {
258+
box-shadow:
259+
0px 1px 3px 0px rgba(255, 255, 255, 0.1),
260+
0px 2px 2px 0px rgba(255, 255, 255, 0.08),
261+
0px 0px 2px 0px rgba(255, 255, 255, 0.12);
262+
}
263+
} */
264+
247265
.testConnectionLink:hover {
248266
box-shadow:
249267
0px 1px 5px 0px rgba(0, 0, 0, 0.2),
@@ -260,13 +278,27 @@
260278
display: flex;
261279
align-items: center;
262280
justify-content: center;
263-
background-image: radial-gradient(#fff 1em, #E8F1EA 1em);
281+
background-image: radial-gradient(var(--mat-sidenav-content-background-color) 1em, var(--icon-box-color) 1em);
264282
border-radius: 4px;
265283
height: 36px;
266284
margin-right: 12px;
267285
width: 36px;
268286
}
269287

288+
@media (prefers-color-scheme: light) {
289+
.testConnectionLink__iconBox {
290+
--icon-box-color: #E8F1EA;
291+
292+
}
293+
}
294+
295+
@media (prefers-color-scheme: dark) {
296+
.testConnectionLink__iconBox {
297+
--icon-box-color: #292929;
298+
299+
}
300+
}
301+
270302
.testConnectionLink__icon {
271303
flex-shrink: 0;
272304
height: 20px;

frontend/src/app/components/dashboard/dashboard.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
.toggle-button {
55-
background-color: #fff;
55+
background-color: var(--mat-sidenav-content-background-color);
5656
border-radius: 4px 0 0 4px !important;
5757
color: inherit;
5858
line-height: 24px;

frontend/src/app/components/dashboard/db-table-actions/db-table-actions.component.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111

112112
.text_highlighted {
113113
background: var(--color-accentedPalette-100);
114-
margin-bottom: 0;
114+
color: var(--color-accentedPalette-100-contrast);
115+
margin-bottom: 0 !important;
115116
padding: 4px;
116117
}
117118

@@ -237,7 +238,7 @@
237238
}
238239

239240
.event__or {
240-
margin-top: -22px;
241+
margin-top: -22px !important;
241242
}
242243

243244
.event__removeButton {

frontend/src/app/components/dashboard/db-table-ai-panel/db-table-ai-panel.component.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
left: calc(100% - clamp(200px, 22vw, 400px));
2727
display: flex;
2828
flex-direction: column;
29-
background-color: #fff;
29+
background-color: var(--mat-sidenav-content-background-color);
3030
border-left: solid 1px rgba(0, 0, 0, 0.12);
3131
padding-top: 44px;
3232
height: 100vh;
@@ -47,7 +47,7 @@
4747
display: flex;
4848
align-items: center;
4949
gap: 8px;
50-
margin-bottom: 0;
50+
margin-bottom: 0 !important;
5151
}
5252

5353
.ai-panel-chat {
@@ -136,7 +136,7 @@
136136
display: flex;
137137
justify-content: space-between;
138138
align-items: center;
139-
background-color: #fff;
139+
background-color: var(--mat-sidenav-content-background-color);
140140
padding-left: 16px;
141141
padding-right: 4px;
142142
width: calc(100% - 4px);

frontend/src/app/components/dashboard/db-table-row-view/db-table-row-view.component.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.row-preview-sidebar_open {
12-
background-color: #fff;
12+
background-color: var(--mat-sidenav-content-background-color);
1313
border-left: solid 1px rgba(0, 0, 0, 0.12);
1414
opacity: 1;
1515
transform: translateX(24px);
@@ -32,7 +32,7 @@
3232
}
3333

3434
.row-preview-sidebar__title {
35-
margin-bottom: 0;
35+
margin-bottom: 0 !important;
3636
}
3737

3838
.row-preview-sidebar__actions {

frontend/src/app/components/dashboard/db-table-settings/db-table-settings.component.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@
9696
}
9797

9898
.order-item {
99-
background: white;
100-
color: rgba(0, 0, 0, 0.87);
99+
background: var(--mat-expansion-container-background-color);
100+
color: var(--mat-expansion-container-text-color);
101101
box-sizing: border-box;
102102
cursor: move;
103103
padding: 20px 12px;
104104
}
105105

106106
.order-item:not(:last-child) {
107-
border-bottom: solid 1px #ccc;
107+
border-bottom: solid 1px var(--mat-table-row-item-outline-color);
108108
}
109109

110110
.cdk-drag-preview {
@@ -156,13 +156,25 @@
156156
display: flex;
157157
align-items: center;
158158
justify-content: space-between;
159-
background-color: #fff;
160-
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
159+
background-color: var(--mat-sidenav-content-background-color);
160+
box-shadow: var(--shadow);
161161
height: 64px;
162162
padding: 0 max(calc(50vw - 325px), 10%);
163163
width: 100vw;
164164
}
165165

166+
@media (prefers-color-scheme: dark) {
167+
.actions {
168+
--shadow: 0 3px 1px -2px rgba(0,0,0,.5),0 2px 2px 0 rgba(0,0,0,.64),0 1px 5px 0 rgba(0,0,0,0.85);
169+
}
170+
}
171+
172+
@media (prefers-color-scheme: light) {
173+
.actions {
174+
--shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
175+
}
176+
}
177+
166178
.settings-form__back-button {
167179
margin-right: auto;
168180
}

0 commit comments

Comments
 (0)