Skip to content

Commit 32d00bd

Browse files
authored
Zebra pattern in PluginList and Scrollable Dialog in Script Runner (#3157)
* CSS Updates for Plugin List and Script Runner Dialogs * Move buttons to outside of scrollable area * Eslinntttt
1 parent 93ee963 commit 32d00bd

File tree

5 files changed

+57
-31
lines changed

5 files changed

+57
-31
lines changed

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/FileOpenSaveDialog.vue

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
@keydown.enter="disableButtons ? null : success()"
2424
@keydown.esc="disableButtons ? null : (show = false)"
2525
>
26-
<v-card>
27-
<form @submit.prevent="success">
26+
<v-card class="file-open-save-card d-flex flex-column">
27+
<form class="d-flex flex-column" @submit.prevent="success">
2828
<v-toolbar height="24">
2929
<v-spacer />
3030
<span> {{ title }} </span>
@@ -36,7 +36,7 @@
3636
absolute
3737
/>
3838
</v-toolbar>
39-
<v-card-text>
39+
<v-card-text class="overflow-y-auto">
4040
<div class="pa-3">
4141
<v-row>{{ helpText }} </v-row>
4242
<v-row dense class="mt-5">
@@ -75,37 +75,37 @@
7575
<v-row dense>
7676
<div
7777
v-show="error"
78-
class="my-2 text-red"
78+
class="my-2 text-red overflow-y-auto error-container"
7979
style="white-space: pre-line"
8080
>
8181
{{ error }}
8282
</div>
8383
</v-row>
84-
<v-row class="mt-2">
85-
<v-spacer />
86-
<v-btn
87-
variant="outlined"
88-
class="mx-2"
89-
data-test="file-open-save-cancel-btn"
90-
:disabled="disableButtons"
91-
@click="show = false"
92-
>
93-
Cancel
94-
</v-btn>
95-
<v-btn
96-
ref="submitBtn"
97-
type="submit"
98-
color="primary"
99-
class="mx-2"
100-
data-test="file-open-save-submit-btn"
101-
:disabled="disableButtons || !!error"
102-
@click.prevent="success"
103-
>
104-
{{ submit }}
105-
</v-btn>
106-
</v-row>
10784
</div>
10885
</v-card-text>
86+
<v-card-actions>
87+
<v-spacer />
88+
<v-btn
89+
variant="outlined"
90+
class="mx-2"
91+
data-test="file-open-save-cancel-btn"
92+
:disabled="disableButtons"
93+
@click="show = false"
94+
>
95+
Cancel
96+
</v-btn>
97+
<v-btn
98+
ref="submitBtn"
99+
type="submit"
100+
color="primary"
101+
class="mx-2"
102+
data-test="file-open-save-submit-btn"
103+
:disabled="disableButtons || !!error"
104+
@click.prevent="success"
105+
>
106+
{{ submit }}
107+
</v-btn>
108+
</v-card-actions>
109109
</form>
110110
</v-card>
111111
</v-dialog>
@@ -454,11 +454,20 @@ export default {
454454
</script>
455455

456456
<style>
457+
.file-open-save-card {
458+
max-height: 90vh;
459+
}
460+
.file-open-save-card form {
461+
min-height: 0;
462+
}
457463
.tree-container {
458464
background-color: var(--color-background-base-default);
459465
padding: 10px;
460466
margin-top: 5px;
461467
max-height: 60vh;
462468
font-size: large;
463469
}
470+
.error-container {
471+
max-height: 10vh;
472+
}
464473
</style>

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/MicroservicesTab.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@
7171
<v-list-item-title>{{ microservice.name }}</v-list-item-title>
7272
<v-list-item-subtitle v-if="microservice_status[microservice.name]">
7373
Updated:
74-
{{ formatNanoseconds(microservice_status[microservice.name].updated_at, timeZone) }},
75-
Enabled: {{ isEnabled(microservice.name) ? 'True' : 'False' }},
74+
{{
75+
formatNanoseconds(
76+
microservice_status[microservice.name].updated_at,
77+
timeZone,
78+
)
79+
}}, Enabled: {{ isEnabled(microservice.name) ? 'True' : 'False' }},
7680
Count:
7781
{{ microservice_status[microservice.name].count }}
7882
</v-list-item-subtitle>

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PackagesTab.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@
5454
/>
5555
</v-list-item-title>
5656
<v-list-item-subtitle>
57-
<span v-text="' Updated At: ' + formatNanoseconds(process.updated_at, timeZone)" />
57+
<span
58+
v-text="
59+
' Updated At: ' +
60+
formatNanoseconds(process.updated_at, timeZone)
61+
"
62+
/>
5863
</v-list-item-subtitle>
5964

6065
<template v-if="process.state !== 'Running'" #append>

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/PluginsTab.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@
8080
/>
8181
</v-list-item-title>
8282
<v-list-item-subtitle>
83-
<span v-text="' Updated At: ' + formatNanoseconds(process.updated_at, timeZone)" />
83+
<span
84+
v-text="
85+
' Updated At: ' +
86+
formatNanoseconds(process.updated_at, timeZone)
87+
"
88+
/>
8489
</v-list-item-subtitle>
8590

8691
<template #append>

openc3-cosmos-init/plugins/packages/openc3-vue-common/src/tools/admin/tabs/plugins/PluginList.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,7 @@ export default {
139139
background-color: var(--color-background-surface-default) !important;
140140
overflow-x: hidden;
141141
}
142+
.list :deep(tr:nth-child(even)) {
143+
background-color: rgba(var(--v-theme-on-surface), 0.05);
144+
}
142145
</style>

0 commit comments

Comments
 (0)