diff --git a/CHANGELOG.md b/CHANGELOG.md index fc661cfd..f81c8cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,65 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.43.0](https://github.com/filebrowser/filebrowser/compare/v2.42.5...v2.43.0) (2025-09-13) + + +### Features + +* "save changes" button to discard changes dialog ([84e8632](https://github.com/filebrowser/filebrowser/commit/84e8632b98e315bfef2da77dd7d1049daec99241)) +* Translate frontend/src/i18n/en.json in es ([571ce6c](https://github.com/filebrowser/filebrowser/commit/571ce6cb0d7c8725d1cc1a3238ea506ddc72b060)) +* Translate frontend/src/i18n/en.json in fr ([6b1fa87](https://github.com/filebrowser/filebrowser/commit/6b1fa87ad38ebbb1a9c5d0e5fc88ba796c148bcf)) +* Updates for project File Browser ([#5427](https://github.com/filebrowser/filebrowser/issues/5427)) ([8950585](https://github.com/filebrowser/filebrowser/commit/89505851414bfcee6b9ff02087eb4cec51c330f6)) + + +### Bug Fixes + +* optimize markdown preview height ([783503a](https://github.com/filebrowser/filebrowser/commit/783503aece7fca9e26f7e849b0e7478aba976acb)) + + +### Reverts + +* build(deps): bump github.com/ulikunitz/xz from 0.5.12 to 0.5.14 ([0769265](https://github.com/filebrowser/filebrowser/commit/07692653ffe0ea5e517e6dc1fd3961172e931843)) + + +### Build + +* **deps-dev:** bump vite from 6.1.6 to 6.3.6 in /frontend ([36c6cc2](https://github.com/filebrowser/filebrowser/commit/36c6cc203e10947439519a0413d5817921a1690d)) +* **deps:** bump github.com/go-viper/mapstructure/v2 in /tools ([280fa56](https://github.com/filebrowser/filebrowser/commit/280fa562a67824887ae6e2530a3b73739d6e1bb4)) +* **deps:** bump github.com/ulikunitz/xz from 0.5.12 to 0.5.14 ([950028a](https://github.com/filebrowser/filebrowser/commit/950028abebe2898bac4ecfd8715c0967246310cb)) + + +### Refactorings + +* to use strings.Lines ([b482a9b](https://github.com/filebrowser/filebrowser/commit/b482a9bf0d292ec6542d2145a4408971e4c985f1)) + +## [2.43.0](https://github.com/filebrowser/filebrowser/compare/v2.42.5...v2.43.0) (2025-09-13) + + +### Features + +* "save changes" button to discard changes dialog ([84e8632](https://github.com/filebrowser/filebrowser/commit/84e8632b98e315bfef2da77dd7d1049daec99241)) +* Translate frontend/src/i18n/en.json in es ([571ce6c](https://github.com/filebrowser/filebrowser/commit/571ce6cb0d7c8725d1cc1a3238ea506ddc72b060)) +* Translate frontend/src/i18n/en.json in fr ([6b1fa87](https://github.com/filebrowser/filebrowser/commit/6b1fa87ad38ebbb1a9c5d0e5fc88ba796c148bcf)) +* Updates for project File Browser ([#5427](https://github.com/filebrowser/filebrowser/issues/5427)) ([8950585](https://github.com/filebrowser/filebrowser/commit/89505851414bfcee6b9ff02087eb4cec51c330f6)) + + +### Bug Fixes + +* optimize markdown preview height ([783503a](https://github.com/filebrowser/filebrowser/commit/783503aece7fca9e26f7e849b0e7478aba976acb)) + + +### Build + +* **deps-dev:** bump vite from 6.1.6 to 6.3.6 in /frontend ([36c6cc2](https://github.com/filebrowser/filebrowser/commit/36c6cc203e10947439519a0413d5817921a1690d)) +* **deps:** bump github.com/go-viper/mapstructure/v2 in /tools ([280fa56](https://github.com/filebrowser/filebrowser/commit/280fa562a67824887ae6e2530a3b73739d6e1bb4)) +* **deps:** bump github.com/ulikunitz/xz from 0.5.12 to 0.5.14 ([950028a](https://github.com/filebrowser/filebrowser/commit/950028abebe2898bac4ecfd8715c0967246310cb)) + + +### Refactorings + +* to use strings.Lines ([b482a9b](https://github.com/filebrowser/filebrowser/commit/b482a9bf0d292ec6542d2145a4408971e4c985f1)) + ### [2.42.5](https://github.com/filebrowser/filebrowser/compare/v2.42.4...v2.42.5) (2025-08-16) diff --git a/auth/hook.go b/auth/hook.go index 849a923d..3cb5b8b9 100644 --- a/auth/hook.go +++ b/auth/hook.go @@ -123,7 +123,7 @@ func (a *HookAuth) GetValues(s string) { s = strings.ReplaceAll(s, "\r\n", "\n") // iterate input lines - for _, val := range strings.Split(s, "\n") { + for val := range strings.Lines(s) { v := strings.SplitN(val, "=", 2) // skips non key and value format diff --git a/frontend/src/components/prompts/DiscardEditorChanges.vue b/frontend/src/components/prompts/DiscardEditorChanges.vue index 4c1e5faa..bd6bc49a 100644 --- a/frontend/src/components/prompts/DiscardEditorChanges.vue +++ b/frontend/src/components/prompts/DiscardEditorChanges.vue @@ -11,17 +11,26 @@ @click="closeHovers" :aria-label="$t('buttons.cancel')" :title="$t('buttons.cancel')" - tabindex="2" + tabindex="3" > {{ $t("buttons.cancel") }} + @@ -40,6 +49,12 @@ export default { }, methods: { ...mapActions(useLayoutStore, ["closeHovers"]), + saveAndClose() { + if (this.currentPrompt?.saveAction) { + this.currentPrompt.saveAction(); + } + this.closeHovers(); + }, }, }; diff --git a/frontend/src/css/mdPreview.css b/frontend/src/css/mdPreview.css index bf2863f6..7d6cab86 100644 --- a/frontend/src/css/mdPreview.css +++ b/frontend/src/css/mdPreview.css @@ -1,6 +1,4 @@ .md_preview { - overflow-y: auto; - max-height: 80vh; padding: 1rem; border: 1px solid #000; font-size: 20px; @@ -9,5 +7,5 @@ #preview-container { overflow: auto; - max-height: 80vh; /* Match the max-height of md_preview for scrolling */ + flex: 1; } diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index fd2d6d69..80ee6aa4 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -42,7 +42,8 @@ "update": "Update", "upload": "Upload", "openFile": "Open file", - "discardChanges": "Discard" + "discardChanges": "Discard", + "saveChanges": "Save changes" }, "download": { "downloadFile": "Download File", diff --git a/frontend/src/i18n/es.json b/frontend/src/i18n/es.json index 8d84d4df..357de1dd 100644 --- a/frontend/src/i18n/es.json +++ b/frontend/src/i18n/es.json @@ -7,7 +7,7 @@ "copy": "Copiar", "copyFile": "Copiar archivo", "copyToClipboard": "Copiar al portapapeles", - "copyDownloadLinkToClipboard": "Copy download link to clipboard", + "copyDownloadLinkToClipboard": "Copiar enlace de descarga al portapapeles", "create": "Crear", "delete": "Borrar", "download": "Descargar", diff --git a/frontend/src/stores/layout.ts b/frontend/src/stores/layout.ts index faf8bca7..372fca06 100644 --- a/frontend/src/stores/layout.ts +++ b/frontend/src/stores/layout.ts @@ -41,6 +41,7 @@ export const useLayoutStore = defineStore("layout", { prompt: value, confirm: null, action: undefined, + saveAction: undefined, props: null, close: null, }); @@ -51,6 +52,7 @@ export const useLayoutStore = defineStore("layout", { prompt: value.prompt, confirm: value?.confirm, action: value?.action, + saveAction: value?.saveAction, props: value?.props, close: value?.close, }); diff --git a/frontend/src/types/layout.d.ts b/frontend/src/types/layout.d.ts index b625cc07..a5c3f160 100644 --- a/frontend/src/types/layout.d.ts +++ b/frontend/src/types/layout.d.ts @@ -2,6 +2,7 @@ interface PopupProps { prompt: string; confirm?: any; action?: PopupAction; + saveAction?: () => void; props?: any; close?: (() => Promise) | null; } diff --git a/frontend/src/views/files/Editor.vue b/frontend/src/views/files/Editor.vue index 3408fb97..13013a9f 100644 --- a/frontend/src/views/files/Editor.vue +++ b/frontend/src/views/files/Editor.vue @@ -1,5 +1,5 @@