fix: dark mode color (product & service)

This commit is contained in:
puriphatt 2024-06-26 06:37:33 +00:00
parent 07d72751d8
commit 0ca5f2ef37
3 changed files with 31 additions and 5 deletions

View file

@ -194,13 +194,16 @@ withDefaults(
<q-btn <q-btn
@click.stop=" @click.stop="
() => { () => {
$emit('viewDetail'); $emit('viewCard');
} }
" "
unelevated unelevated
class="q-px-sm" class="q-px-sm"
:label="$t('detail')" :label="$t('detail')"
style="background-color: var(--indigo-0); color: var(--blue-5)" style="
background-color: hsla(var(--blue-5-hsl) / 0.1);
color: var(--blue-5);
"
> >
<q-icon <q-icon
size="xs" size="xs"

View file

@ -134,7 +134,7 @@ withDefaults(
<q-avatar <q-avatar
v-if="isAddProduct" v-if="isAddProduct"
:style="`background-color: var(${data?.type === 'product' ? '--green-10' : '--orange-8'})`" :style="`background-color: var(${data?.type === 'product' ? '--teal-10' : '--orange-5'})`"
size="18px" size="18px"
text-color="white" text-color="white"
> >
@ -193,7 +193,10 @@ withDefaults(
<div <div
class="flex justify-center rounded items-center q-my-md q-py-lg" class="flex justify-center rounded items-center q-my-md q-py-lg"
:style="`background-color: var(${data?.type === 'product' ? '--green-0' : '--orange-0'})`" :class="[
data?.type === 'product' ? 'card__green' : 'card__orange',
$q.dark.isActive ? 'dark' : '',
]"
> >
<q-img <q-img
loading="lazy" loading="lazy"
@ -245,4 +248,20 @@ withDefaults(
.is-add-product { .is-add-product {
border-color: var(--green-10); border-color: var(--green-10);
} }
.card__green {
background-color: hsla(var(--teal-10-hsl) / 0.1);
&.dark {
background-color: hsla(var(--teal-7-hsl) / 0.1);
}
}
.card__orange {
background-color: hsla(var(--orange-5-hsl) / 0.1);
&.dark {
background-color: hsla(var(--orange-8-hsl) / 0.1);
}
}
</style> </style>

View file

@ -1173,7 +1173,11 @@ watch(currentPageType, async () => {
:status="v.status" :status="v.status"
:id="v.id" :id="v.id"
:isDisabled="v.status === 'INACTIVE'" :isDisabled="v.status === 'INACTIVE'"
color="var(--purple-11-hsl)" :color="
$q.dark.isActive
? 'var(--purple-7-hsl)'
: 'var(--violet-11-hsl)'
"
@toggleStatus="toggleStatusType(v.id, v.status)" @toggleStatus="toggleStatusType(v.id, v.status)"
@viewCard=" @viewCard="
() => { () => {