Added solo toner bar

This commit is contained in:
Douglas Barone 2023-07-14 10:51:53 -04:00
parent 471914fa23
commit 7d6f42296a
2 changed files with 8 additions and 2 deletions

View File

@ -64,6 +64,7 @@
:level="printer.status[0].tonerBlackLevel" :level="printer.status[0].tonerBlackLevel"
:model="printer.blackTonerModel" :model="printer.blackTonerModel"
color="black" color="black"
:solo="!printer.status[0].tonerCyanLevel"
/> />
<toner-level-bar <toner-level-bar
v-if="printer.status[0].tonerCyanLevel" v-if="printer.status[0].tonerCyanLevel"

View File

@ -4,7 +4,7 @@
<div class="flex-grow-1 align-self-center"> <div class="flex-grow-1 align-self-center">
<v-progress-linear <v-progress-linear
:title="`${level}%`" :title="`${level}%`"
:height="8" :height="solo ? 30 : 12"
:color="bgColor" :color="bgColor"
:model-value="level" :model-value="level"
/> />
@ -23,7 +23,11 @@
</div> </div>
<code <code
class="text-grey-darken-1" class="text-grey-darken-1"
style="font-size: 14px; top: -12px; position: relative" :style="{
fontSize: '14px',
top: solo ? 0 : '-8px',
position: 'relative'
}"
> >
{{ model }} {{ model }}
</code> </code>
@ -37,6 +41,7 @@ const props = defineProps<{
level: number level: number
color: 'black' | 'cyan' | 'magenta' | 'yellow' color: 'black' | 'cyan' | 'magenta' | 'yellow'
model: string model: string
solo?: boolean
}>() }>()
const bgColor = computed(() => { const bgColor = computed(() => {