Skip to content

Commit f31b9df

Browse files
committed
refactor: switch Dashboard to BEM
1 parent 8974e86 commit f31b9df

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed
Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
/* Apply box-sizing border-box to all elements */
2-
* {
3-
box-sizing: border-box;
4-
}
5-
61
.dashboard {
2+
box-sizing: border-box;
73
width: 100%;
84
height: 100%;
9-
105
padding: 4px;
11-
126
display: flex;
137
flex-direction: column;
148
align-items: stretch;
15-
169
font-family: Arial, sans-serif;
17-
1810
background: transparent;
19-
2011
border: 0px solid transparent;
2112

2213
&__top-section {
2314
margin: 10px;
24-
2515
display: flex;
2616
flex-direction: row;
2717
align-items: center;
@@ -37,7 +27,6 @@
3727
&__bottom-section {
3828
margin: 10px;
3929
margin-top: 5px;
40-
4130
height: 100%;
4231
display: flex;
4332
flex-direction: column;
@@ -52,9 +41,9 @@
5241
align-items: center;
5342
height: 100%;
5443
width: 100%;
55-
5644
margin-bottom: 18px;
57-
h1 {
45+
46+
&__title {
5847
color: #ffffff;
5948
font-size: 2.5rem;
6049
text-align: center;
@@ -63,17 +52,10 @@
6352
}
6453
}
6554

66-
@keyframes fadeIn {
67-
from { opacity: 0; transform: translateY(10px); }
68-
to { opacity: 0.9; transform: translateY(0); }
69-
}
70-
7155
.state-indicator {
7256
width: 100%;
7357
height: 100%;
74-
7558
padding: 10px;
76-
7759
border-radius: 7px;
7860
}
7961

@@ -85,4 +67,9 @@
8567
.action-button {
8668
border-radius: 7px;
8769
}
70+
71+
@keyframes fadeIn {
72+
from { opacity: 0; transform: translateY(10px); }
73+
to { opacity: 0.9; transform: translateY(0); }
74+
}
8875
}

src/frontend/src/pad/containers/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export const Dashboard: React.FC<DashboardProps> = ({
139139
/>
140140
) : (
141141
<div className="dashboard__welcome-message">
142-
<h1>
142+
<h1 className="dashboard__welcome-message__title">
143143
{workspaceState?.status === 'starting' ? 'Your workspace is starting...' :
144144
workspaceState?.status === 'stopping' ? 'Your workspace is stopping...' :
145145
workspaceState?.status === 'stopped' ? 'Your workspace is stopped, start it again to continue' :

0 commit comments

Comments
 (0)