Skip to content

Commit c70ed27

Browse files
committed
[#88049] frontend: src: components: Move action log button to header
Signed-off-by: Anna Roszkiewicz <[email protected]>
1 parent ab79516 commit c70ed27

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

frontend/src/components/TitleBar.vue

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ with a title, subtitle and an optional action button.
1616
<Status :connected="connected" :detailed="true" />
1717
</div>
1818
<div id="titlebar">
19-
<div id="title">{{ title }}</div>
19+
<div v-if="smallButtonName" id="title-container">
20+
<div id="title">{{ title }}</div>
21+
<button id="small-button" @click="buttonCallback">{{ smallButtonName }}</button>
22+
</div>
23+
<div v-else id="title">{{ title }}</div>
2024
<div id="subtitle">{{ subtitle }}</div>
2125
</div>
2226
</div>
@@ -60,7 +64,7 @@ with a title, subtitle and an optional action button.
6064
font-family: 'Mona Sans', sans-serif;
6165
word-break: break-word;
6266
63-
& > #title {
67+
#title {
6468
color: var(--gray-1000);
6569
font-weight: 700;
6670
font-size: 3em;
@@ -70,6 +74,28 @@ with a title, subtitle and an optional action button.
7074
color: var(--gray-900);
7175
font-size: 1.3em;
7276
}
77+
78+
& > #title-container {
79+
display: flex;
80+
flex-direction: row;
81+
align-items: center;
82+
gap: 2em;
83+
84+
#small-button {
85+
border: 1px solid var(--gray-400);
86+
border-radius: 8px;
87+
padding: 0.5em;
88+
color: var(--gray-900);
89+
background-color: var(--background-100);
90+
font-size: 1em;
91+
height: fit-content;
92+
93+
&:hover {
94+
background-color: var(--gray-200);
95+
color: var(--gray-1000);
96+
}
97+
}
98+
}
7399
}
74100
}
75101
@@ -139,6 +165,9 @@ export default defineComponent({
139165
connected: {
140166
type: Boolean,
141167
},
168+
smallButtonName: {
169+
type: String,
170+
},
142171
},
143172
components: {
144173
Status,

frontend/src/components/devices/Device.vue

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Component wraps functionality for displaying and working with a single rdfm devi
1616
:subtitle="device.metadata['rdfm.software.version'] as string"
1717
:device="device.mac_address"
1818
:connected="device.connected"
19+
smallButtonName="Open action log"
20+
:buttonCallback="fetchActionLog"
1921
/>
2022
<TitleBar
2123
v-if="!device"
@@ -46,7 +48,6 @@ Component wraps functionality for displaying and working with a single rdfm devi
4648
>
4749
<path d="M6 16V5L14.5 10.5L6 16Z" fill="#E8EAED" />
4850
</svg>
49-
5051
<svg
5152
class="if-running rotating"
5253
width="30"
@@ -62,24 +63,6 @@ Component wraps functionality for displaying and working with a single rdfm devi
6263
</svg>
6364
</div>
6465
</button>
65-
<button v-on:click="() => fetchActionLog()" class="action">
66-
<div class="name">Show action log for device</div>
67-
<div class="description three-lines">
68-
Fetch a list of tasks assigned to the device
69-
</div>
70-
<div class="run">
71-
<svg
72-
class="if-not-running"
73-
width="30"
74-
height="31"
75-
viewBox="0 0 20 21"
76-
fill="none"
77-
xmlns="http://www.w3.org/2000/svg"
78-
>
79-
<path d="M6 16V5L14.5 10.5L6 16Z" fill="#E8EAED" />
80-
</svg>
81-
</div>
82-
</button>
8366
</div>
8467

8568
<Transition>

0 commit comments

Comments
 (0)