Skip to content

Commit f6ac589

Browse files
committed
feat: continue improving dark mode styling
1 parent 21f06d3 commit f6ac589

File tree

10 files changed

+186
-102
lines changed

10 files changed

+186
-102
lines changed

src/frontend/src/components/AssignPluginsDropdown.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class="q-mt-sm"
2828
>
2929
<div
30-
class="row items-center no-wrap bg-white q-pa-none shadow-1"
30+
class="row items-center no-wrap q-pa-none shadow-1"
3131
style="
3232
border-radius: 4px;
3333
border: 1px solid #eeeeee;
@@ -37,13 +37,13 @@
3737
>
3838
<q-chip
3939
removable
40-
:color="pluginStyle.color"
40+
:color="$q.dark.isActive ? pluginStyle.darkColor : pluginStyle.color"
4141
:icon="pluginStyle.icon"
42-
text-color="white"
4342
size="sm"
4443
outline
4544
square
4645
class="text-weight-bold q-py-sm q-ma-none no-border"
46+
:class="$q.dark.isActive ? 'bg-grey-10' : 'bg-grey-1'"
4747
@remove="
4848
selectedPlugins.splice(i, 1);
4949
removePlugin(plugin);
@@ -107,7 +107,9 @@ const pluginIDsToUpdate = defineModel("pluginIDsToUpdate");
107107
const pluginIDsToRemove = defineModel("pluginIDsToRemove");
108108
const originalSelectedPluginIds = ref([]);
109109
const pluginOptions = ref([]);
110+
import { useQuasar } from "quasar";
110111
112+
const $q = useQuasar();
111113
watch(
112114
selectedPlugins,
113115
(newVal) => {

src/frontend/src/components/KeyValueTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<td
1010
class="text-weight-bold"
1111
:class="
12-
$q.dark.isActive ? 'bg-grey-9 text-grey-4' : 'bg-grey-2 text-grey-9'
12+
$q.dark.isActive ? 'bg-blue-grey-10 text-grey-4' : 'bg-grey-2 text-grey-9'
1313
"
1414
:style="{ minWidth: firstColumnMinWidth, width: firstColumnMinWidth }"
1515
>

src/frontend/src/components/ResourcePicker.vue

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
:tabindex="scope.tabindex"
2020
:square="chipSquare"
2121
:style="getChipStyles"
22-
:text-color="chipOutline ? 'black' : 'white'"
22+
:class="getChipClasses"
2323
>
2424
<q-icon
2525
:name="styles.icon"
@@ -28,9 +28,9 @@
2828
class="q-mr-sm"
2929
/>
3030

31-
<span class="q-mr-sm" style="letter-spacing: 0.8px">{{
32-
scope.opt[optionLabel]
33-
}}</span>
31+
<span class="q-mr-xs ellipsis" style="letter-spacing: 0.5px">
32+
{{ scope.opt[optionLabel] }}
33+
</span>
3434
</q-chip>
3535
</template>
3636

@@ -42,7 +42,7 @@
4242
<q-item-section>
4343
<q-item-label>{{ scope.opt[optionLabel] }}</q-item-label>
4444
<q-item-label caption v-if="scope.opt.description">
45-
{{ truncate(scope.opt.description) }}
45+
{{ truncate(scope.opt.description) }}
4646
</q-item-label>
4747
</q-item-section>
4848
</q-item>
@@ -64,7 +64,6 @@ const props = defineProps({
6464
type: { type: String, required: true },
6565
label: String,
6666
optionLabel: { type: String, default: "name" },
67-
6867
chipOutline: { type: Boolean, default: false },
6968
chipSquare: { type: Boolean, default: false },
7069
color: { type: String, default: null },
@@ -81,23 +80,49 @@ const computedColor = computed(() => {
8180
return getConceptColorHex(props.type, isDark);
8281
});
8382
84-
// Dynamic Styles for the Chip container
83+
const computedColorOpposite = computed(() => {
84+
if (props.color) return props.color;
85+
const isLight = $q.dark.isActive;
86+
return getConceptColorHex(props.type, isLight);
87+
});
88+
89+
// Manage purely dynamic styles (borders, custom background colors)
8590
const getChipStyles = computed(() => {
8691
if (props.chipOutline) {
8792
return {
88-
border: `2px solid ${computedColor.value}`,
89-
backgroundColor: "transparent",
90-
};
91-
} else {
92-
return {
93-
backgroundColor: computedColor.value,
94-
border: "none",
93+
border: `1px solid ${computedColor.value}`
9594
};
95+
} else {
96+
if ($q.dark.isActive){
97+
return {
98+
backgroundColor: computedColor.value,
99+
color: 'black',
100+
border: "none"
101+
};
102+
}
103+
else {
104+
return {
105+
backgroundColor: computedColorOpposite.value,
106+
color: 'white',
107+
border: "none"
108+
};
109+
}
110+
}
111+
});
112+
113+
// Manage Quasar utility classes (theme-aware backgrounds and text)
114+
const getChipClasses = computed(() => {
115+
if (props.chipOutline) {
116+
// Provides a subtle background and guarantees high-contrast text + remove icon
117+
return $q.dark.isActive
118+
? 'bg-grey-10 text-grey-3'
119+
: 'bg-grey-2 text-grey-9';
96120
}
121+
return ''; // Solid mode classes aren't needed; it relies on getChipStyles
97122
});
98123
99124
function truncate(str) {
100125
if (!str) return "";
101126
return str.length > 50 ? str.slice(0, 50) + "..." : str;
102127
}
103-
</script>
128+
</script>

src/frontend/src/components/table/TableComponent.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@
218218
<div class="row items-center q-gutter-x-md">
219219
<div
220220
v-if="props.title"
221-
class="text-h6 q-mb-lg q-mt-md q-mx-lg text-grey-8"
222-
:class="$q.dark.isActive ? 'text-grey-4' : 'text-grey-8'"
221+
class="text-h6 q-mb-lg q-mt-md q-mx-lg"
222+
:class="$q.dark.isActive ? 'text-grey-6' : 'text-grey-7'"
223223
>
224224
{{ props.title }}
225225
</div>

src/frontend/src/components/table/cells/TagList.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<q-chip
99
v-for="(tag, i) in visibleTags"
1010
:key="i"
11-
:color="$q.dark.isActive ? 'grey-8' : 'blue-grey-7'"
12-
:text-color="$q.dark.isActive ? 'grey-3' : 'blue-grey-10'"
11+
:color="$q.dark.isActive ? 'grey-5' : 'blue-grey-7'"
1312
dense
1413
outline
1514
square
@@ -35,12 +34,12 @@
3534

3635
<q-chip
3736
v-if="hiddenCount > 0"
38-
:color="$q.dark.isActive ? 'grey-9' : 'blue-grey-1'"
39-
:text-color="$q.dark.isActive ? 'grey-3' : 'blue-grey-10'"
37+
:color="$q.dark.isActive ? 'grey-9' : 'grey-2'"
38+
:text-color="$q.dark.isActive ? 'grey-3' : 'blue-grey-9'"
4039
dense
4140
clickable
4241
square
43-
class="q-my-none text-weight-bold"
42+
class="q-my-none text-weight-bold q-px-sm"
4443
style="font-size: 10px; height: 20px"
4544
>
4645
+{{ hiddenCount }} more...
@@ -52,7 +51,8 @@
5251
>
5352
<div class="column q-pa-sm" style="min-width: 200px">
5453
<div
55-
class="text-caption text-weight-bold text-blue-grey-8 q-mb-xs q-px-xs"
54+
class="text-caption text-weight-bold q-mb-xs q-px-xs"
55+
:class="$q.dark.isActive ? 'text-grey-4' : 'text-blue-grey-7'"
5656
>
5757
ADDITIONAL TAGS
5858
</div>
@@ -61,8 +61,7 @@
6161
<q-chip
6262
v-for="(tag, i) in hiddenTags"
6363
:key="i"
64-
color="blue-grey-7"
65-
text-color="blue-grey-10"
64+
:class="$q.dark.isActive ? 'text-grey-5' : 'text-blue-grey-7'"
6665
dense
6766
outline
6867
square
@@ -88,10 +87,10 @@
8887
</q-chip>
8988
</div>
9089

91-
<div class="q-pl-sm">
90+
<div class="q-pl-sm column">
9291
<q-btn
9392
round
94-
size="xs"
93+
size="sm"
9594
icon="add"
9695
color="grey-4"
9796
text-color="blue-grey-9"
@@ -107,6 +106,7 @@
107106
<script setup>
108107
import { computed } from "vue";
109108
import { useQuasar } from "quasar";
109+
import { LineCounter } from "yaml";
110110
111111
const $q = useQuasar();
112112

src/frontend/src/constants/tableStyles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const CONCEPT_STYLES = {
4747
artifact: {
4848
icon: 'sim_card_download',
4949
color: 'brown-6',
50-
darkColor: 'brown-4',
50+
darkColor: 'brown-3',
5151
basePath: 'artifacts'
5252
},
5353
task: {

src/frontend/src/dialogs/ArtifactParamDialog.vue

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<q-dialog v-model="showDialog" :persistent="true">
33
<q-card>
44
<q-card-section class="bg-primary text-white text-h6">
5-
<div class="text-h6">Create Artifact Parameter</div>
5+
<div class="text-h6">{{ editParam ? 'Edit' : 'Create' }} Artifact Parameter</div>
66
</q-card-section>
77
<q-card-section>
88
<q-form ref="artifactParamForm" greedy @submit.prevent="addArtifactParam" id="artifactForm">
@@ -102,6 +102,13 @@ const showDialog = defineModel()
102102
103103
const emit = defineEmits(['submit'])
104104
105+
const props = defineProps({
106+
editParam: {
107+
type: Object,
108+
default: null
109+
}
110+
})
111+
105112
const outputParams = ref([])
106113
const outputParam = ref({
107114
name: '',
@@ -120,20 +127,22 @@ function requiredRule(val) {
120127
}
121128
122129
watch(showDialog, (newVal) => {
123-
getPluginParameterTypes()
124-
if(!newVal) {
125-
artifactParam.value = {
126-
name: '',
127-
outputParams: []
128-
}
129-
outputParam.value = {
130-
name: '',
131-
parameterType: ''
130+
if (newVal) {
131+
getPluginParameterTypes()
132+
133+
if (props.editParam) {
134+
artifactParam.value.name = props.editParam.name
135+
// Deep copy to prevent modifying the parent state directly before confirming
136+
outputParams.value = JSON.parse(JSON.stringify(props.editParam.outputParams))
137+
} else {
138+
artifactParam.value = { name: '', outputParams: [] }
139+
outputParams.value = []
132140
}
141+
outputParam.value = { name: '', parameterType: '' }
142+
} else {
133143
resetForm()
134144
}
135145
})
136-
137146
async function getPluginParameterTypes() {
138147
try {
139148
const res = await api.getData('pluginParameterTypes', { rowsPerPage: 0 })
@@ -173,8 +182,8 @@ function addArtifactParam() {
173182
}
174183
175184
function resetForm() {
176-
artifactParam.value ={}
177-
artifactParamForm.value.reset()
185+
artifactParam.value = {}
186+
artifactParamForm.value?.reset()
178187
outputParam.value = {}
179188
outputParams.value = []
180189
outputParamForm.value?.reset()

0 commit comments

Comments
 (0)