Skip to content

Commit

Permalink
style: improved column and labels presentation
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Feb 24, 2025
1 parent a58e8e6 commit 6d2950d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/components/widgets/filesystem/FileSystemBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@
</template>

<template #[`item.filament_name`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.filament_type`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.filament_total`]="{ value }">
Expand Down Expand Up @@ -157,11 +157,11 @@
</template>

<template #[`item.slicer`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.slicer_version`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.estimated_time`]="{ value }">
Expand Down
10 changes: 5 additions & 5 deletions src/components/widgets/history/JobHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</template>

<template #[`item.user`]="{ value }">
{{ value }}
{{ value || '--' }}
</template>

<template #[`item.metadata.object_height`]="{ value }">
Expand Down Expand Up @@ -138,11 +138,11 @@
</template>

<template #[`item.metadata.filament_name`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.metadata.filament_type`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.metadata.filament_total`]="{ value }">
Expand Down Expand Up @@ -170,11 +170,11 @@
</template>

<template #[`item.metadata.slicer`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.metadata.slicer_version`]="{ value }">
{{ value ?? '--' }}
{{ value || '--' }}
</template>

<template #[`item.metadata.estimated_time`]="{ value }">
Expand Down
33 changes: 14 additions & 19 deletions src/components/widgets/history/JobHistoryItemStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ icon }}
</v-icon>
</template>
<span>{{ job.status }}</span>
<span>{{ $filters.prettyCase(job.status) }}</span>
</v-tooltip>
</template>

Expand All @@ -28,19 +28,21 @@ export default class JobHistoryItemStatus extends Mixins(FilesMixin) {
readonly job!: HistoryItem
get icon () {
const iconMap: Record<string, string> = {
completed: '$checkedCircle',
printing: '$inProgress',
in_progress: '$inProgress',
standby: '$inProgress',
cancelled: '$cancelled',
interrupted: '$cancelled'
}
switch (this.job.status) {
case 'completed':
return '$checkedCircle'
case 'printing':
case 'in_progress':
return '$inProgress'
const icon = iconMap[this.job.status]
case 'cancelled':
case 'interrupted':
return '$cancelled'
// Default to the warning symbol
return icon || '$warning'
default:
return '$warning'
}
}
get state (): JobHistoryItemState {
Expand All @@ -66,12 +68,5 @@ export default class JobHistoryItemStatus extends Mixins(FilesMixin) {
return 'success'
}
}
get inError () {
return (
this.job.status !== 'completed' &&
this.job.status !== 'in_progress'
)
}
}
</script>

0 comments on commit 6d2950d

Please sign in to comment.