Skip to content

Commit

Permalink
feat(StatusPanel): change tab text to icons (#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Nov 24, 2024
1 parent f82ec21 commit 2038258
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
34 changes: 24 additions & 10 deletions src/components/panels/StatusPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@
<v-divider class="mt-0 mb-0" />
</template>
<v-tabs v-model="activeTab" fixed-tabs>
<v-tab v-if="current_filename" href="#status">{{ $t('Panels.StatusPanel.Status') }}</v-tab>
<v-tab v-if="displayFilesTab" href="#files">{{ $t('Panels.StatusPanel.Files') }}</v-tab>
<v-tab v-if="current_filename" href="#status">
<v-icon>{{ mdiSpeedometer }}</v-icon>
</v-tab>
<v-tab v-if="displayFilesTab" href="#files">
<v-icon>{{ mdiFileDocumentMultipleOutline }}</v-icon>
</v-tab>
<v-tab href="#jobqueue">
<v-badge :color="jobQueueBadgeColor" :content="jobsCount.toString()" :inline="true">
{{ $t('Panels.StatusPanel.Jobqueue') }}
<v-icon color="disabled">{{ mdiTrayFull }}</v-icon>
</v-badge>
</v-tab>
</v-tabs>
Expand Down Expand Up @@ -133,16 +137,19 @@ import Panel from '@/components/ui/Panel.vue'
import {
mdiAlertOutline,
mdiBroom,
mdiCloseCircle,
mdiDotsVertical,
mdiFileDocumentMultipleOutline,
mdiInformation,
mdiLayersPlus,
mdiMessageProcessingOutline,
mdiPause,
mdiPlay,
mdiPrinter,
mdiSelectionRemove,
mdiSpeedometer,
mdiStop,
mdiMessageProcessingOutline,
mdiCloseCircle,
mdiLayersPlus,
mdiDotsVertical,
mdiTrayFull,
} from '@mdi/js'
import { PrinterStateMacro } from '@/store/printer/types'
import CancelJobDialog from '@/components/dialogs/CancelJobDialog.vue'
Expand All @@ -162,11 +169,14 @@ import CancelJobDialog from '@/components/dialogs/CancelJobDialog.vue'
},
})
export default class StatusPanel extends Mixins(BaseMixin) {
mdiInformation = mdiInformation
mdiMessageProcessingOutline = mdiMessageProcessingOutline
mdiAlertOutline = mdiAlertOutline
mdiCloseCircle = mdiCloseCircle
mdiDotsVertical = mdiDotsVertical
mdiAlertOutline = mdiAlertOutline
mdiFileDocumentMultipleOutline = mdiFileDocumentMultipleOutline
mdiInformation = mdiInformation
mdiMessageProcessingOutline = mdiMessageProcessingOutline
mdiSpeedometer = mdiSpeedometer
mdiTrayFull = mdiTrayFull
declare $refs: {
bigThumbnail: any
Expand Down Expand Up @@ -435,4 +445,8 @@ export default class StatusPanel extends Mixins(BaseMixin) {
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
}
.theme--dark.v-tabs > .v-tabs-bar .v-tab:not(.v-tab--active) > .v-badge > .v-icon {
color: rgba(255, 255, 255, 0.6);
}
</style>
3 changes: 0 additions & 3 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -741,10 +741,8 @@
},
"Filament": "Filament",
"File": "Datei",
"Files": "Dateien",
"Flow": "Fluss",
"Headline": "Status",
"Jobqueue": "Warteschlange",
"JobqueueMoreFiles": "keine weiteren Aufträge | einen weiteren Auftrag | {count} weitere Aufträge",
"Layer": "Schicht",
"Max": "max",
Expand All @@ -769,7 +767,6 @@
"ResumePrint": "Druck fortführen",
"Slicer": "Slicer",
"Speed": "Geschwindigkeit",
"Status": "Status",
"Total": "Gesamt",
"Unknown": "Unbekannt"
},
Expand Down
3 changes: 0 additions & 3 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,8 @@
},
"Filament": "Filament",
"File": "File",
"Files": "Files",
"Flow": "Flow",
"Headline": "Status",
"Jobqueue": "Job Queue",
"JobqueueMoreFiles": "no more jobs | one more job | {count} more jobs",
"Layer": "Layer",
"Max": "max",
Expand All @@ -776,7 +774,6 @@
"ResumePrint": "Resume print",
"Slicer": "Slicer",
"Speed": "Speed",
"Status": "Status",
"Total": "Total",
"Unknown": "Unknown"
},
Expand Down

0 comments on commit 2038258

Please sign in to comment.