fix table header translations on refresh

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej committed 2021-04-12 22:38:26 +02:00
1 parent 0f47a452db
commit 69f89ab162
4 files changed
+62 -56

No files matched your search

+22 -20
View File
@@ -248,26 +248,6 @@ import VueLoadImage from 'vue-load-image'
sortDesc: true,
selected: [],
hideHeaderColums: [],
headers: [
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t("History.Filename"), value: 'filename', align: 'left', configable: false, visible: true },
{ text: '', value: 'status', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t("History.Filesize"), value: 'size', align: 'left', configable: true, visible: true },
{ text: this.$t("History.LastModified"), value: 'modified', align: 'left', configable: true, visible: true },
{ text: this.$t("History.StartTime"), value: 'start_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.EndTime"), value: 'end_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.EstimatedTime"), value: 'estimated_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.PrintTime"), value: 'print_duration', align: 'left', configable: true, visible: true },
{ text: this.$t("History.TotalTime"), value: 'total_duration', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FilamentCalc"), value: 'filament_total', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FilamentUsed"), value: 'filament_used', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerExtTemp"), value: 'first_layer_extr_temp', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerBedTemp"), value: 'first_layer_bed_temp', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerHeight"), value: 'first_layer_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.LayerHeight"), value: 'layer_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.ObjectHeight"), value: 'object_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.Slicer"), value: 'slicer', align: 'left', configable: true, visible: true },
],
options: {
},
@@ -293,6 +273,28 @@ import VueLoadImage from 'vue-load-image'
getStatusIcon: "server/history/getPrintStatusChipIcon",
getStatusColor: "server/history/getPrintStatusChipColor",
}),
headers() {
return [
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t("History.Filename"), value: 'filename', align: 'left', configable: false, visible: true },
{ text: '', value: 'status', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t("History.Filesize"), value: 'size', align: 'left', configable: true, visible: true },
{ text: this.$t("History.LastModified"), value: 'modified', align: 'left', configable: true, visible: true },
{ text: this.$t("History.StartTime"), value: 'start_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.EndTime"), value: 'end_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.EstimatedTime"), value: 'estimated_time', align: 'left', configable: true, visible: true },
{ text: this.$t("History.PrintTime"), value: 'print_duration', align: 'left', configable: true, visible: true },
{ text: this.$t("History.TotalTime"), value: 'total_duration', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FilamentCalc"), value: 'filament_total', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FilamentUsed"), value: 'filament_used', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerExtTemp"), value: 'first_layer_extr_temp', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerBedTemp"), value: 'first_layer_bed_temp', align: 'left', configable: true, visible: true },
{ text: this.$t("History.FirstLayerHeight"), value: 'first_layer_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.LayerHeight"), value: 'layer_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.ObjectHeight"), value: 'object_height', align: 'left', configable: true, visible: true },
{ text: this.$t("History.Slicer"), value: 'slicer', align: 'left', configable: true, visible: true },
]
},
configHeaders() {
return this.headers.filter(header => header.configable === true)
},
@@ -264,12 +264,6 @@ export default {
sortBy: 'filename',
sortDesc: false,
selected: [],
headers: [
{ text: '', value: '', },
{ text: this.$t('Settings.ConfigFilesPanel.Name'), value: 'filename', },
{ text: this.$t('Settings.ConfigFilesPanel.Filesize'), value: 'size', align: 'right', },
{ text: this.$t('Settings.ConfigFilesPanel.LastModified'), value: 'modified', align: 'right', },
],
options: {
},
currentPage: 1,
@@ -358,6 +352,14 @@ export default {
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
}),
headers() {
return [
{ text: '', value: '', },
{ text: this.$t('Settings.ConfigFilesPanel.Name'), value: 'filename', },
{ text: this.$t('Settings.ConfigFilesPanel.Filesize'), value: 'size', align: 'right', },
{ text: this.$t('Settings.ConfigFilesPanel.LastModified'), value: 'modified', align: 'right', },
]
},
editorOptions() {
return {
...this.editor.options,