Skip to content

Commit 6319421

Browse files
authored
Merge pull request #2908 from chmelevskij/chore/move-styles-into-components
refactor: move styles closer to the components
2 parents e249205 + a85cdfd commit 6319421

File tree

5 files changed

+62
-60
lines changed

5 files changed

+62
-60
lines changed

src/components/quad-status/BatteryLegend.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,19 @@ export default {
3232
},
3333
};
3434
</script>
35+
36+
<style>
37+
.battery-legend {
38+
display: inline;
39+
position: relative;
40+
top: -2px;
41+
margin-top: 0;
42+
left: 0;
43+
right: 0;
44+
width: 40px;
45+
text-align: left;
46+
color: silver;
47+
margin-left: -8px;
48+
padding-right: 4px;
49+
}
50+
</style>

src/components/status-bar/StatusBar.vue

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,48 @@ export default {
6969
7070
configuratorVersion: {
7171
type: String,
72-
default: '',
72+
default: "",
7373
},
7474
firmwareVersion: {
7575
type: String,
76-
default: '',
76+
default: "",
7777
},
7878
firmwareId: {
7979
type: String,
80-
default: '',
80+
default: "",
8181
},
8282
hardwareId: {
8383
type: String,
84-
default: '',
84+
default: "",
8585
},
8686
},
8787
};
8888
</script>
89+
90+
<style>
91+
/** Status bar **/
92+
#status-bar {
93+
position: fixed;
94+
display: flex;
95+
bottom: 0;
96+
width: calc(100% - 20px);
97+
height: 20px;
98+
line-height: 20px;
99+
padding: 0 10px 0 10px;
100+
border-top: 1px solid #7d7d79;
101+
background-color: #bfbeb5;
102+
}
103+
104+
#status-bar > * ~ * {
105+
padding-left: 10px;
106+
margin-left: 10px;
107+
border-left: 1px solid #7d7d79;
108+
}
109+
110+
/** Status bar (phones) **/
111+
@media all and (max-width: 575px) {
112+
#status-bar {
113+
display: none;
114+
}
115+
}
116+
</style>

src/components/status-bar/StatusBarVersion.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,29 @@ export default {
1616
props: {
1717
configuratorVersion: {
1818
type: String,
19-
default: '',
19+
default: "",
2020
},
2121
firmwareVersion: {
2222
type: String,
23-
default: '',
23+
default: "",
2424
},
2525
firmwareId: {
2626
type: String,
27-
default: '',
27+
default: "",
2828
},
2929
hardwareId: {
3030
type: String,
31-
default: '',
31+
default: "",
3232
},
3333
},
3434
};
3535
</script>
36+
37+
<style>
38+
.version {
39+
margin: 0;
40+
padding: 0;
41+
border: 0;
42+
margin-left: auto;
43+
}
44+
</style>

src/css/dark-theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ body {
4646
background-color: #393b3a;
4747
}
4848

49+
/* NOTE: need to think on how to load the dark theme with vue */
4950
#status-bar {
5051
background-color: #414443;
5152
}

src/css/main.css

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -656,21 +656,6 @@ input[type="number"]::-webkit-inner-spin-button {
656656
width: 31px;
657657
}
658658

659-
660-
.battery-legend {
661-
display: inline;
662-
position: relative;
663-
top: -2px;
664-
margin-top: 0;
665-
left: 0;
666-
right: 0;
667-
width: 40px;
668-
text-align: left;
669-
color: silver;
670-
margin-left: -8px;
671-
padding-right: 4px
672-
}
673-
674659
.quad-status-contents progress::-webkit-progress-bar {
675660
height: 12px;
676661
background-color: #eee;
@@ -1457,43 +1442,6 @@ li.active .ic_mission {
14571442
}
14581443
}
14591444

1460-
1461-
1462-
/** Status bar **/
1463-
#status-bar {
1464-
position: fixed;
1465-
display: flex;
1466-
bottom: 0;
1467-
width: calc(100% - 20px);
1468-
height: 20px;
1469-
line-height: 20px;
1470-
padding: 0 10px 0 10px;
1471-
border-top: 1px solid #7d7d79;
1472-
background-color: #bfbeb5;
1473-
}
1474-
1475-
#status-bar > * ~ * {
1476-
padding-left: 10px;
1477-
margin-left: 10px;
1478-
border-left: 1px solid #7d7d79;
1479-
}
1480-
1481-
#status-bar .version {
1482-
margin: 0;
1483-
padding: 0;
1484-
border: 0;
1485-
margin-left: auto;
1486-
}
1487-
1488-
/** Status bar (phones) **/
1489-
@media all and (max-width: 575px) {
1490-
#status-bar {
1491-
display: none;
1492-
}
1493-
}
1494-
1495-
1496-
14971445
#cache {
14981446
display: none;
14991447
}

0 commit comments

Comments
 (0)