diff --git a/src/components/widgets/filesystem/FileSystem.vue b/src/components/widgets/filesystem/FileSystem.vue index 253d15fc8b3..2549d0f3b22 100644 --- a/src/components/widgets/filesystem/FileSystem.vue +++ b/src/components/widgets/filesystem/FileSystem.vue @@ -393,7 +393,9 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM return false } break - + case 'moonraker_backup_files': + if (file.type === 'file' && file.filename.match(/^.moonraker.conf.bkp$/)) { return false } + break case 'klipper_backup_files': if (file.type === 'file' && file.filename.match(/^printer-\d{8}_\d{6}\.cfg$/)) { return false diff --git a/src/components/widgets/filesystem/FileSystemFilterMenu.vue b/src/components/widgets/filesystem/FileSystemFilterMenu.vue index ab7eda921a5..8ba7403a168 100644 --- a/src/components/widgets/filesystem/FileSystemFilterMenu.vue +++ b/src/components/widgets/filesystem/FileSystemFilterMenu.vue @@ -103,6 +103,10 @@ export default class FileSystemFilterMenu extends Vue { enabled: true, text: this.$tc('app.file_system.filters.label.klipper_backup_files') }, + moonraker_backup_files: { + enabled: true, + text: this.$tc('app.file_system.filters.label.moonraker_backup_files') + }, rolled_log_files: { enabled: true, text: this.$tc('app.file_system.filters.label.rolled_log_files') diff --git a/src/locales/en.yaml b/src/locales/en.yaml index 0a68601ff82..f0216b49074 100644 --- a/src/locales/en.yaml +++ b/src/locales/en.yaml @@ -75,6 +75,7 @@ app: print_start_time_desc: Filters out items you've already printed. hidden_files_folders: Filter hidden files and folders klipper_backup_files: Filter Klipper backup files + moonraker_backup_files: Filter Moonraker backup files rolled_log_files: Filter rolled log files label: dir_name: Directory name diff --git a/src/store/files/getters.ts b/src/store/files/getters.ts index 4f7f85b68f1..2b37bfcf6ef 100644 --- a/src/store/files/getters.ts +++ b/src/store/files/getters.ts @@ -119,7 +119,7 @@ export const getters: GetterTree = { accepts: ['.conf', '.cfg', '.md', '.css', '.jpg', '.jpeg', '.png', '.gif'], canView, canConfigure: false, - filterTypes: ['hidden_files', 'klipper_backup_files'] + filterTypes: ['hidden_files', 'klipper_backup_files', 'moonraker_backup_files'] } case 'config_examples': return { diff --git a/src/store/files/types.ts b/src/store/files/types.ts index 6a493c09d1e..16ceddd1149 100644 --- a/src/store/files/types.ts +++ b/src/store/files/types.ts @@ -108,7 +108,7 @@ export interface FilesUpload extends FileDownload { cancelled: boolean; // in a cancelled state, don't show - nor try to upload. } -export type FileFilterType = 'print_start_time' | 'hidden_files' | 'klipper_backup_files' | 'rolled_log_files' +export type FileFilterType = 'print_start_time' | 'hidden_files' | 'klipper_backup_files' | 'rolled_log_files' | 'moonraker_backup_files' export type FileBrowserEntry = AppFile | AppFileWithMeta | AppDirectory