Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(StatusPanel): change tab text to icons #2054

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading