Skip to content

Commit 62e75cd

Browse files
committed
[#88951] frontend: src: components: Adjust title bar
Signed-off-by: Anna Roszkiewicz <[email protected]>
1 parent 0ad1d5c commit 62e75cd

File tree

1 file changed

+53
-46
lines changed

1 file changed

+53
-46
lines changed

frontend/src/components/TitleBar.vue

Lines changed: 53 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ with a title, subtitle and an optional action button.
1111

1212
<template>
1313
<div id="wrapper">
14-
<div id="title-section">
15-
<div v-if="device" id="status">
16-
<Status :connected="connected" :detailed="true" />
17-
</div>
14+
<div v-if="device" id="status">
15+
<Status :connected="connected" :detailed="true" />
16+
</div>
17+
<div id="content-wrapper">
1818
<div id="titlebar">
1919
<div v-if="smallButtonName" id="title-container">
2020
<div id="title">{{ title }}</div>
@@ -23,18 +23,21 @@ with a title, subtitle and an optional action button.
2323
<div v-else id="title">{{ title }}</div>
2424
<div id="subtitle">{{ subtitle }}</div>
2525
</div>
26-
</div>
27-
<div v-if="displayButton" id="actionbar">
28-
<button id="action-button" @click="buttonCallback">{{ actionButtonName }}</button>
29-
</div>
30-
<div id="update" v-if="device && deviceUpdates.has(device) && deviceVersions.has(device)">
31-
<UpdateProgress
32-
:progress="deviceUpdates.get(device)!"
33-
:version="deviceVersions.get(device)!"
34-
/>
35-
</div>
36-
<div id="no-update" v-else-if="device">
37-
<p>No updates available</p>
26+
<div v-if="displayButton" id="actionbar">
27+
<button id="action-button" @click="buttonCallback">{{ actionButtonName }}</button>
28+
</div>
29+
<div
30+
id="update"
31+
v-if="device && deviceUpdates.has(device) && deviceVersions.has(device)"
32+
>
33+
<UpdateProgress
34+
:progress="deviceUpdates.get(device)!"
35+
:version="deviceVersions.get(device)!"
36+
/>
37+
</div>
38+
<div id="no-update" v-else-if="device">
39+
<p>No updates available</p>
40+
</div>
3841
</div>
3942
</div>
4043
</template>
@@ -44,19 +47,21 @@ with a title, subtitle and an optional action button.
4447
border: 1px solid var(--gray-400);
4548
display: flex;
4649
flex-direction: row;
47-
justify-content: space-between;
50+
justify-content: start;
4851
padding: 2em;
4952
50-
& > #title-section {
53+
& > #status {
54+
align-content: top;
55+
padding-top: 1.5em;
56+
padding-right: 1.5em;
57+
}
58+
59+
& > #content-wrapper {
5160
display: flex;
5261
flex-direction: row;
53-
justify-content: start;
54-
55-
& > #status {
56-
align-content: top;
57-
padding-top: 1.5em;
58-
padding-right: 1.5em;
59-
}
62+
justify-content: space-between;
63+
flex-wrap: wrap;
64+
width: 100%;
6065
6166
& > #titlebar {
6267
display: flex;
@@ -89,6 +94,8 @@ with a title, subtitle and an optional action button.
8994
background-color: var(--background-100);
9095
font-size: 1em;
9196
height: fit-content;
97+
text-wrap: nowrap;
98+
word-break: none;
9299
93100
&:hover {
94101
background-color: var(--gray-200);
@@ -97,36 +104,36 @@ with a title, subtitle and an optional action button.
97104
}
98105
}
99106
}
100-
}
101107
102-
& > #actionbar {
103-
display: flex;
104-
align-items: center;
105-
106-
& > #action-button {
107-
color: var(--accent-900);
108-
background-color: var(--accent-100);
109-
border: 2px solid var(--accent-400);
110-
border-radius: 5px;
111-
font-size: 1em;
112-
padding: 0.75em;
113-
cursor: pointer;
114-
115-
&:hover {
116-
background-color: var(--accent-200);
108+
& > #actionbar {
109+
display: flex;
110+
align-items: center;
111+
112+
& > #action-button {
113+
color: var(--accent-900);
114+
background-color: var(--accent-100);
115+
border: 2px solid var(--accent-400);
116+
border-radius: 5px;
117+
font-size: 1em;
118+
padding: 0.75em;
119+
cursor: pointer;
120+
121+
&:hover {
122+
background-color: var(--accent-200);
123+
}
117124
}
118125
}
119-
}
120126
121-
& > #no-update {
122-
& > p {
123-
color: var(--gray-900);
127+
& > #no-update {
128+
& > p {
129+
color: var(--gray-900);
130+
}
124131
}
125132
}
126133
}
127134
128135
@media screen and (max-width: 500px) {
129-
#wrapper {
136+
#content-wrapper {
130137
flex-direction: column;
131138
132139
& > #actionbar {

0 commit comments

Comments
 (0)