From d729701bd47cb71863b00567c7f21b5a20fc0f32 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Mon, 23 Sep 2024 11:55:07 +0200 Subject: [PATCH] chore: fix typos (#3490) --- CHANGELOG.md | 2 +- cmd/root.go | 4 ++-- cmd/utils.go | 2 +- files/mime.go | 2 +- fileutils/file.go | 2 +- frontend/src/stores/upload.ts | 4 ++-- frontend/src/views/settings/Global.vue | 6 +++--- http/utils.go | 2 +- version/version.go | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d173411e42..806f17e57d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,7 +99,7 @@ All notable changes to this project will be documented in this file. See [standa * close editor when click escape key ([#2947](https://github.com/filebrowser/filebrowser/issues/2947)) ([70c8261](https://github.com/filebrowser/filebrowser/commit/70c826133b8578b8712e6db8f762a15a076cd9a9)) * enable preview in shared folder ([#3055](https://github.com/filebrowser/filebrowser/issues/3055)) ([4c233c3](https://github.com/filebrowser/filebrowser/commit/4c233c3db39ea5a00d6e602ec0ecbddecb590877)) * focus editor when opened ([#2946](https://github.com/filebrowser/filebrowser/issues/2946)) ([b19710e](https://github.com/filebrowser/filebrowser/commit/b19710efca6daa7af56dc211d0051d500d2eea22)) -* freezing the list in the backgroud while previewing a file ([#3004](https://github.com/filebrowser/filebrowser/issues/3004)) ([e167c3e](https://github.com/filebrowser/filebrowser/commit/e167c3e1efed8b16be45d994a8d443fda1d8cf49)) +* freezing the list in the background while previewing a file ([#3004](https://github.com/filebrowser/filebrowser/issues/3004)) ([e167c3e](https://github.com/filebrowser/filebrowser/commit/e167c3e1efed8b16be45d994a8d443fda1d8cf49)) * prompt to confirm discard editor changes ([#2948](https://github.com/filebrowser/filebrowser/issues/2948)) ([fb1a09c](https://github.com/filebrowser/filebrowser/commit/fb1a09c7c172b913c12b30975ca545e505df0c05)) * select multiple files with ctrl even with singleClick option ([#2953](https://github.com/filebrowser/filebrowser/issues/2953)) ([d49c3df](https://github.com/filebrowser/filebrowser/commit/d49c3dfacfc0ff07e620b3ad2700e64927b06235)) diff --git a/cmd/root.go b/cmd/root.go index 27c0a8dbd3..59329c5cfe 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -76,7 +76,7 @@ var rootCmd = &cobra.Command{ Use: "filebrowser", Short: "A stylish web-based file browser", Long: `File Browser CLI lets you create the database to use with File Browser, -manage your users and all the configurations without acessing the +manage your users and all the configurations without accessing the web interface. If you've never run File Browser, you'll need to have a database for @@ -108,7 +108,7 @@ name in caps. So to set "database" via an env variable, you should set FB_DATABASE. Also, if the database path doesn't exist, File Browser will enter into -the quick setup mode and a new database will be bootstraped and a new +the quick setup mode and a new database will be bootstrapped and a new user created with the credentials from options "username" and "password".`, Run: python(func(cmd *cobra.Command, _ []string, d pythonData) { log.Println(cfgFile) diff --git a/cmd/utils.go b/cmd/utils.go index d4ccbacc8f..78f48d1307 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -188,7 +188,7 @@ func cleanUpMapValue(v interface{}) interface{} { } // convertCmdStrToCmdArray checks if cmd string is blank (whitespace included) -// then returns empty string array, else returns the splitted word array of cmd. +// then returns empty string array, else returns the split word array of cmd. // This is to ensure the result will never be []string{""} func convertCmdStrToCmdArray(cmd string) []string { var cmdArray []string diff --git a/files/mime.go b/files/mime.go index 1e6d9bef70..33fd93bd49 100644 --- a/files/mime.go +++ b/files/mime.go @@ -28,7 +28,7 @@ const ( ContentTextHeaderValue = "text/plain" // ContentXMLHeaderValue header value for XML data. ContentXMLHeaderValue = "text/xml" - // ContentXMLUnreadableHeaderValue obselete header value for XML. + // ContentXMLUnreadableHeaderValue obsolete header value for XML. ContentXMLUnreadableHeaderValue = "application/xml" // ContentMarkdownHeaderValue custom key/content type, the real is the text/html. ContentMarkdownHeaderValue = "text/markdown" diff --git a/fileutils/file.go b/fileutils/file.go index fdf1122547..a12f272017 100644 --- a/fileutils/file.go +++ b/fileutils/file.go @@ -98,7 +98,7 @@ func CommonPrefix(sep byte, paths ...string) string { // (e.g. /home/user1, /home/user1/foo, /home/user1/bar). // path.Clean will have cleaned off trailing / separators with // the exception of the root directory, "/" (in which case we - // make it "//", but this will get fixed up to "/" bellow). + // make it "//", but this will get fixed up to "/" below). c = append(c, sep) // Ignore the first path since it's already in c diff --git a/frontend/src/stores/upload.ts b/frontend/src/stores/upload.ts index 6fef19a035..de712ee2c5 100644 --- a/frontend/src/stores/upload.ts +++ b/frontend/src/stores/upload.ts @@ -170,12 +170,12 @@ export const useUploadStore = defineStore("upload", { async processUploads() { const uploadsCount = Object.keys(this.uploads).length; - const isBellowLimit = uploadsCount < UPLOADS_LIMIT; + const isBelowLimit = uploadsCount < UPLOADS_LIMIT; const isQueueEmpty = this.queue.length == 0; const isUploadsEmpty = uploadsCount == 0; const isFinished = isQueueEmpty && isUploadsEmpty; - const canProcess = isBellowLimit && !isQueueEmpty; + const canProcess = isBelowLimit && !isQueueEmpty; if (isFinished) { const fileStore = useFileStore(); diff --git a/frontend/src/views/settings/Global.vue b/frontend/src/views/settings/Global.vue index 26db84eb85..0b055ee20f 100644 --- a/frontend/src/views/settings/Global.vue +++ b/frontend/src/views/settings/Global.vue @@ -282,11 +282,11 @@ const formattedChunkSize = computed({ // Define funcs const capitalize = (name: string, where: string | RegExp = "_") => { if (where === "caps") where = /(?=[A-Z])/; - let splitted = name.split(where); + let split = name.split(where); name = ""; - for (let i = 0; i < splitted.length; i++) { - name += splitted[i].charAt(0).toUpperCase() + splitted[i].slice(1) + " "; + for (let i = 0; i < split.length; i++) { + name += split[i].charAt(0).toUpperCase() + split[i].slice(1) + " "; } return name.slice(0, -1); diff --git a/http/utils.go b/http/utils.go index 7ef5f19e78..a1611ce5f8 100644 --- a/http/utils.go +++ b/http/utils.go @@ -47,7 +47,7 @@ func errToStatus(err error) int { } } -// This is an addaptation if http.StripPrefix in which we don't +// This is an adaptation if http.StripPrefix in which we don't // return 404 if the page doesn't have the needed prefix. func stripPrefix(prefix string, h http.Handler) http.Handler { if prefix == "" || prefix == "/" { diff --git a/version/version.go b/version/version.go index 0564cd57d9..65b42dfad7 100644 --- a/version/version.go +++ b/version/version.go @@ -3,6 +3,6 @@ package version var ( // Version is the current File Browser version. Version = "(untracked)" - // CommitSHA is the commmit sha. + // CommitSHA is the commit sha. CommitSHA = "(unknown)" )