Skip to content

Commit d3ea073

Browse files
authored
Merge pull request #38 from VirtualCable/gui-user-improve
Improves UI consistency and dark mode loading experience
2 parents 835a3e6 + a47dd5e commit d3ea073

8 files changed

Lines changed: 63 additions & 27 deletions

File tree

src/app/gui/components/filter/filter.component.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
padding: 0 16px !important;
1414

1515
&::before {
16-
display: none !important; /* Quitar línea base Material */
16+
display: none !important; /* Remove Material baseline */
1717
}
1818
}
1919

@@ -30,12 +30,17 @@
3030
padding-bottom: 12px !important;
3131
min-height: auto !important;
3232
}
33-
33+
34+
/* Remove the empty subscript wrapper (hint/error) that leaves a gap below the filter */
35+
.mat-mdc-form-field-subscript-wrapper {
36+
display: none !important;
37+
}
38+
3439
input {
3540
color: var(--text-primary) !important;
3641
}
3742

38-
/* Ocultar el label al flotar/foco para evitar solapamientos */
43+
/* Hide the label on float/focus to avoid overlap */
3944
.mdc-floating-label--float-above {
4045
opacity: 0 !important;
4146
transition: opacity 0.2s ease !important;
@@ -54,6 +59,6 @@
5459
::ng-deep .dark-theme .nav-input-field {
5560
&.mat-focused .mdc-floating-label,
5661
&.mat-form-field-should-float .mdc-floating-label {
57-
color: rgba(255, 255, 255, 0.9) !important; /* Blanco claro en dark mode */
62+
color: rgba(255, 255, 255, 0.9) !important; /* Light white in dark mode */
5863
}
5964
}

src/app/gui/components/staff-info/staff-info.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ <h1><uds-translate>Information</uds-translate></h1>
4949
}&nbsp;
5050
</ol>
5151
</mat-expansion-panel>
52-
</mat-accordion>
5352
<mat-expansion-panel>
5453
<mat-expansion-panel-header class="staff-panel">
5554
<mat-panel-title>
@@ -65,5 +64,6 @@ <h1><uds-translate>Information</uds-translate></h1>
6564
}&nbsp;
6665
</ol>
6766
</mat-expansion-panel>
68-
</div>
69-
}
67+
</mat-accordion>
68+
</div>
69+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
a {
2+
color: var(--text-primary);
3+
opacity: 0.6;
4+
text-decoration: none;
5+
font-size: 0.85rem;
6+
transition: opacity 0.2s ease;
7+
8+
&:hover {
9+
opacity: 1;
10+
text-decoration: underline;
11+
}
12+
}

src/app/pages/login/login.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.login-brand {
1313
margin-bottom: 1.5rem;
1414
img {
15-
max-width: 160px;
15+
max-width: 130px;
1616
filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
1717
}
1818
}

src/app/pages/services/services.component.css

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.services-container {
22
position: relative;
3-
padding-top: 110px; /* Espacio para el navbar flotante en desktop */
3+
padding-top: 30px; /* .content already adds margin-top 64px; 64+30 clears navbar (79) + ~15 margin */
44
padding-left: 2%;
55
padding-right: 2%;
66
}
77

88
@media only screen and (max-width: 744px) {
99
.services-container {
10-
padding-top: 85px; /* Espacio para el navbar flotante en móvil */
10+
padding-top: 25px; /* .content adds margin-top 64px; mobile navbar reaches 74px */
1111
padding-left: 10px;
1212
padding-right: 10px;
1313
}
@@ -19,31 +19,35 @@
1919
z-index: 1;
2020
}
2121

22-
/* Integración del filtro como capa */
23-
.filter-top {
22+
/* Filter overlays the tab bar, right-aligned on the same row as the tabs */
23+
.filter-top,
24+
.filter-bottom {
2425
position: absolute;
25-
top: 110px; /* Alineado con el inicio del contenido */
26+
top: 44px; /* On the tab bar: padding-top 30 + tabs margin-top 1rem */
2627
right: 2%;
2728
z-index: 10;
28-
pointer-events: none; /* Deja pasar clicks si es necesario */
29+
pointer-events: none; /* Let clicks pass through to the rest */
30+
}
31+
32+
/* Push cards down: gap between filter/tabs and services */
33+
.tab-content {
34+
padding-top: 1rem;
2935
}
3036

31-
.filter-top ::ng-deep uds-filter {
32-
pointer-events: auto; /* El filtro sí recibe clicks */
37+
.filter-top ::ng-deep uds-filter,
38+
.filter-bottom ::ng-deep uds-filter {
39+
pointer-events: auto; /* Filter itself receives clicks */
3340
}
3441

3542
@media only screen and (max-width: 744px) {
36-
.filter-top {
43+
.filter-top,
44+
.filter-bottom {
3745
position: relative;
3846
top: 0;
3947
right: 0;
4048
margin-bottom: 1rem;
4149
pointer-events: auto;
50+
display: flex;
51+
justify-content: flex-end;
4252
}
4353
}
44-
45-
.filter-bottom {
46-
margin-top: 1.5rem;
47-
display: flex;
48-
justify-content: flex-end;
49-
}

src/app/pages/services/services.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class ServicesComponent implements OnInit {
122122
groupedMap.get(element.group.id)!.services.push(element);
123123
});
124124

125-
// Convert map to array, sort by group priority and id, y filtrar grupos vacíos
125+
// Convert map to array, sort by group priority and id, and filter out empty groups
126126
this.group = Array.from(groupedMap.values())
127127
.filter(g => g.services.length > 0)
128128
.sort((a, b) => {

src/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
height: 100%;
1313
}
1414

15+
/* Dark loading background: avoids the white flash when navigating in dark mode */
16+
html.dark-theme,
17+
html.dark-theme body {
18+
background-color: #0f111a;
19+
}
20+
1521
.app-loading {
1622
position: relative;
1723
display: flex;
@@ -74,6 +80,13 @@
7480

7581
<!-- just in case translations cannot be loaded, provide a fallback -->
7682
<script type="text/javascript">
83+
// Apply the stored theme before first paint to avoid the white flash
84+
try {
85+
if (localStorage.getItem('blackTheme') === 'true') {
86+
document.documentElement.classList.add('dark-theme');
87+
}
88+
} catch (e) { /* localStorage unavailable */ }
89+
7790
var django = {
7891
gettext: function (s) {
7992
return s;

src/styles.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $font-size: 14px;
5252
--text-secondary: #5f6368;
5353
--glass-bg: rgba(255, 255, 255, 0.35);
5454
--glass-hover-bg: rgba(255, 255, 255, 0.55);
55-
--glass-border: rgba(255, 255, 255, 0.35);
55+
--glass-border: rgba(0, 0, 0, 0.14);
5656
--glass-shadow: rgba(0, 0, 0, 0.16);
5757
--warning-color: #d32f2f;
5858
--bg-button: linear-gradient(135deg, #1976d2, #1565c0);
@@ -106,10 +106,12 @@ i.material-icons {
106106
html,
107107
body {
108108
background-color: var(--bg-surface);
109-
background-image:
109+
background-image:
110110
radial-gradient(at 0% 0%, rgba(67, 56, 202, 0.25) 0px, transparent 50%),
111111
radial-gradient(at 100% 100%, rgba(88, 28, 135, 0.2) 0px, transparent 50%),
112112
radial-gradient(at 50% 50%, var(--bg-accent) 0px, var(--bg-surface) 100%);
113+
background-attachment: fixed; /* Pinned to viewport: no seam when scrolling */
114+
background-repeat: no-repeat;
113115
}
114116

115117
.menu .mat-mdc-icon-button {
@@ -143,7 +145,7 @@ i.material-icons {
143145
.mat-mdc-tab-header {
144146
background: var(--bg-surface);
145147
border-radius: 12px 12px 0 0;
146-
margin-bottom: 20px;
148+
padding-bottom: 1rem;
147149
}
148150

149151
.mat-mdc-tab-body-wrapper {

0 commit comments

Comments
 (0)