Skip to content

Commit

Permalink
Merge pull request #1198 from fdm-monster/fix/fmm-3125-fileclean-sett…
Browse files Browse the repository at this point in the history
…ings

Fix/fmm 3125 fileclean settings
  • Loading branch information
davidzwa authored Apr 18, 2024
2 parents 0e08508 + 7b5757d commit 3b24a30
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
7 changes: 7 additions & 0 deletions RELEASE_NOTES.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Client develop

# Client 18/04/2024 1.5.11

Fixes:

- Settings: pre-upload file cleaning settings could not be saved and no message was shown. Now both those things are fixed.


# Client 16/04/2024 1.5.10

Features:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fdm-monster/client",
"version": "1.5.10",
"version": "1.5.11",
"author": "David Zwart",
"license": "AGPL-3.0-or-later",
"repository": {
Expand Down
5 changes: 1 addition & 4 deletions src/backend/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ServerApi } from "@/backend/server.api";
import { BaseService } from "@/backend/base.service";
import {
FrontendSettings,
FileCleanSubSetting,
SettingsDto,
TimeoutSettings,
SettingsSensitiveDto,
Expand Down Expand Up @@ -69,8 +68,6 @@ export class SettingsService extends BaseService {
static async setFileCleanSettings(subSettings: FileCleanSettings) {
const path = `${ServerApi.fileCleanSettingsRoute}`;

return (await this.putApi(path, {
fileClean: subSettings,
} as FileCleanSubSetting)) as SettingsDto;
return (await this.putApi(path, subSettings)) as SettingsDto;
}
}
4 changes: 4 additions & 0 deletions src/components/Settings/OctoPrintSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export default defineComponent({
async setFileCleanSettings() {
const serverSettings = await SettingsService.setFileCleanSettings(this.fileHandlingSettings);
this.fileHandlingSettings = serverSettings.printerFileClean;
this.snackbar.openInfoMessage({
title: `Successfully saved file cleanup settings`,
});
},
async purgeFiles() {
await PrinterFileService.purgeFiles();
Expand Down
4 changes: 0 additions & 4 deletions src/models/settings/settings.model.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { ServerSettingsDto } from "./server-settings.dto";
import { FileCleanSettings } from "./printer-file-clean-settings.model";

export type FileCleanSubSetting = {
fileClean: FileCleanSettings;
};

export interface FrontendSettings {
largeTiles: boolean;
gridCols: number;
Expand Down

0 comments on commit 3b24a30

Please sign in to comment.