diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2ba3a271..781aa085 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,12 +4,11 @@ Please explain the changes you made here. If the feature changes current behaviour, explain why your solution is better. --> -:rotating_light: Before submitting your PR, please read [community](https://github.com/filebrowser/community), and indicate which issues (in any of the repos) are either fixed or closed by this PR. See [GitHub Help: Closing issues using keywords](https://help.github.com/articles/closing-issues-via-commit-messages/). +:rotating_light: Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See [GitHub Help: Closing issues using keywords](https://help.github.com/articles/closing-issues-via-commit-messages/). - [ ] DO make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). Don't request your master! - [ ] DO make sure you are making a pull request against the **master branch** (left side). Also you should start *your branch* off *our master*. - [ ] DO make sure that File Browser can be successfully built. See [builds](https://github.com/filebrowser/community/blob/master/builds.md) and [development](https://github.com/filebrowser/community/blob/master/development.md). -- [ ] DO make sure that related issues are opened in other repositories. I.e., the frontend, caddy plugins or the web page need to be updated accordingly. - [ ] AVOID breaking the continuous integration build. **Further comments** diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c620c20..4b1b1540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ 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.27.0](https://github.com/filebrowser/filebrowser/compare/v2.26.0...v2.27.0) (2024-01-02) + + +### Features + +* allow setting theme via cli ([#2881](https://github.com/filebrowser/filebrowser/issues/2881)) ([748af71](https://github.com/filebrowser/filebrowser/commit/748af7172ce96f0b66c394e88839bd57c194ffc7)) +* display image resolutions in file details ([#2830](https://github.com/filebrowser/filebrowser/issues/2830)) ([a09dfa8](https://github.com/filebrowser/filebrowser/commit/a09dfa8d9f190243d811a841de44c4abb4403d87)) +* make user session timeout configurable by flags ([#2845](https://github.com/filebrowser/filebrowser/issues/2845)) ([391a078](https://github.com/filebrowser/filebrowser/commit/391a078cd486e618c95a0c5850326076cbc025b6)) + + +### Bug Fixes + +* delete message when delete file from preview ([3264cea](https://github.com/filebrowser/filebrowser/commit/3264cea8307dca9ab5463dc81f2a10a817eb3d54)) +* fix typo ([#2843](https://github.com/filebrowser/filebrowser/issues/2843)) ([4dbc802](https://github.com/filebrowser/filebrowser/commit/4dbc802972c930f5f42fc27507fac35c28c42afd)) +* set correct port in docker healthcheck ([#2812](https://github.com/filebrowser/filebrowser/issues/2812)) ([d59ad59](https://github.com/filebrowser/filebrowser/commit/d59ad594b8649f57f61453b0dfbc350c57b690a2)) +* typo in build error [#2903](https://github.com/filebrowser/filebrowser/issues/2903) ([#2904](https://github.com/filebrowser/filebrowser/issues/2904)) ([c4e955a](https://github.com/filebrowser/filebrowser/commit/c4e955acf4a1a8f8e8e94f697ffc838515e69a60)) + + +### Build + +* **deps-dev:** bump vite from 4.4.9 to 4.4.12 in /frontend ([#2862](https://github.com/filebrowser/filebrowser/issues/2862)) ([fc2ee37](https://github.com/filebrowser/filebrowser/commit/fc2ee373536584d024f7def62f350bdbb712d927)) +* **deps:** bump golang.org/x/crypto from 0.14.0 to 0.17.0 ([#2890](https://github.com/filebrowser/filebrowser/issues/2890)) ([821fba4](https://github.com/filebrowser/filebrowser/commit/821fba41a25ba99d47641f01b10ac51960157888)) + ## [2.26.0](https://github.com/filebrowser/filebrowser/compare/v2.25.0...v2.26.0) (2023-11-02) diff --git a/cmd/config.go b/cmd/config.go index ed3cc772..5c7efbba 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -31,6 +31,7 @@ func addConfigFlags(flags *pflag.FlagSet) { addServerFlags(flags) addUserFlags(flags) flags.BoolP("signup", "s", false, "allow users to signup") + flags.Bool("create-user-dir", false, "generate user's home directory automatically") flags.String("shell", "", "shell command to which other commands should be appended") flags.String("auth.method", string(auth.MethodJSONAuth), "authentication type") diff --git a/cmd/config_init.go b/cmd/config_init.go index 7d183368..611e6c50 100644 --- a/cmd/config_init.go +++ b/cmd/config_init.go @@ -29,11 +29,12 @@ override the options.`, authMethod, auther := getAuthentication(flags) s := &settings.Settings{ - Key: generateKey(), - Signup: mustGetBool(flags, "signup"), - Shell: convertCmdStrToCmdArray(mustGetString(flags, "shell")), - AuthMethod: authMethod, - Defaults: defaults, + Key: generateKey(), + Signup: mustGetBool(flags, "signup"), + CreateUserDir: mustGetBool(flags, "create-user-dir"), + Shell: convertCmdStrToCmdArray(mustGetString(flags, "shell")), + AuthMethod: authMethod, + Defaults: defaults, Branding: settings.Branding{ Name: mustGetString(flags, "branding.name"), DisableExternal: mustGetBool(flags, "branding.disableExternal"), diff --git a/cmd/config_set.go b/cmd/config_set.go index ba800adb..9dbea9dc 100644 --- a/cmd/config_set.go +++ b/cmd/config_set.go @@ -49,6 +49,8 @@ you want to change. Other options will remain unchanged.`, hasAuth = true case "shell": set.Shell = convertCmdStrToCmdArray(mustGetString(flags, flag.Name)) + case "create-user-dir": + set.CreateUserDir = mustGetBool(flags, flag.Name) case "branding.name": set.Branding.Name = mustGetString(flags, flag.Name) case "branding.color": diff --git a/files/file.go b/files/file.go index f181f185..4d7c8f9f 100644 --- a/files/file.go +++ b/files/file.go @@ -24,7 +24,7 @@ import ( "github.com/filebrowser/filebrowser/v2/rules" ) -const PermFile = 0664 +const PermFile = 0644 const PermDir = 0755 // FileInfo describes a file. diff --git a/fileutils/file.go b/fileutils/file.go index 81aeffeb..fdf11225 100644 --- a/fileutils/file.go +++ b/fileutils/file.go @@ -7,6 +7,8 @@ import ( "path/filepath" "github.com/spf13/afero" + + "github.com/filebrowser/filebrowser/v2/files" ) // MoveFile moves file from src to dst. @@ -40,13 +42,13 @@ func CopyFile(fs afero.Fs, source, dest string) error { // Makes the directory needed to create the dst // file. - err = fs.MkdirAll(filepath.Dir(dest), 0666) //nolint:gomnd + err = fs.MkdirAll(filepath.Dir(dest), files.PermDir) if err != nil { return err } // Create the destination file. - dst, err := fs.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0775) //nolint:gomnd + dst, err := fs.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, files.PermFile) if err != nil { return err } diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d898e595..0b3ec184 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -46,7 +46,7 @@ "postcss": "^8.4.31", "prettier": "^3.0.1", "terser": "^5.19.2", - "vite": "^4.4.12", + "vite": "^4.5.2", "vite-plugin-compression2": "^0.10.3", "vite-plugin-rewrite-all": "^1.0.1" } @@ -5663,9 +5663,9 @@ "dev": true }, "node_modules/vite": { - "version": "4.4.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.12.tgz", - "integrity": "sha512-KtPlUbWfxzGVul8Nut8Gw2Qe8sBzWY+8QVc5SL8iRFnpnrcoCaNlzO40c1R6hPmcdTwIPEDkq0Y9+27a5tVbdQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz", + "integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==", "dev": true, "dependencies": { "esbuild": "^0.18.10", diff --git a/frontend/package.json b/frontend/package.json index 4449a5f5..b0ff7612 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -52,7 +52,7 @@ "postcss": "^8.4.31", "prettier": "^3.0.1", "terser": "^5.19.2", - "vite": "^4.4.12", + "vite": "^4.5.2", "vite-plugin-compression2": "^0.10.3", "vite-plugin-rewrite-all": "^1.0.1" }, diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 71813bcf..944ad9b1 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -38,7 +38,7 @@ import { enableThumbs } from "@/utils/constants"; import { mapMutations, mapGetters, mapState } from "vuex"; import { filesize } from "@/utils"; -import moment from "moment"; +import moment from "moment/min/moment-with-locales"; import { files as api } from "@/api"; import * as upload from "@/utils/upload"; @@ -191,7 +191,7 @@ export default { action(overwrite, rename); }, itemClick: function (event) { - if (this.singleClick && !this.$store.state.multiple) this.open(); + if (!(event.ctrlKey || event.metaKey) && this.singleClick && !this.$store.state.multiple) this.open(); else this.click(event); }, click: function (event) { diff --git a/frontend/src/components/prompts/DiscardEditorChanges.vue b/frontend/src/components/prompts/DiscardEditorChanges.vue new file mode 100644 index 00000000..a870708d --- /dev/null +++ b/frontend/src/components/prompts/DiscardEditorChanges.vue @@ -0,0 +1,45 @@ + + + diff --git a/frontend/src/components/prompts/Info.vue b/frontend/src/components/prompts/Info.vue index 03bbfb58..d82b107e 100644 --- a/frontend/src/components/prompts/Info.vue +++ b/frontend/src/components/prompts/Info.vue @@ -89,7 +89,7 @@