From eca9086a62da4bdb13ea7e3385068f0dd880f249 Mon Sep 17 00:00:00 2001 From: Graham Steffaniak <42989099+gtsteffaniak@users.noreply.github.com> Date: Fri, 17 Oct 2025 17:53:33 -0500 Subject: [PATCH] Beta/v0.8.9 (#1379) Co-authored-by: Srinivas A <56465971+srini-abhiram@users.noreply.github.com> Co-authored-by: Kevin B. Co-authored-by: Chanwoong Kim --- .gitignore | 3 +- CHANGELOG.md | 45 + README.md | 35 +- _docker/Dockerfile.playwright-noauth | 3 +- _docker/src/general/backend/config.yaml | 32 +- .../src/general/backend/frontend-config.yaml | 12 + .../src/general/backend/server-config.yaml | 15 + _docker/src/noauth/backend/config.yaml | 29 +- _docker/src/oidc/backend/config.yaml | 4 +- _docker/src/proxy/backend/config.yaml | 4 +- backend/adapters/fs/files/file_test.go | 12 +- backend/adapters/fs/files/files.go | 71 +- backend/cmd/user.go | 27 +- backend/common/errors/errors.go | 2 + backend/common/settings/auth.go | 4 +- backend/common/settings/config.go | 238 +++-- backend/common/settings/config_test.go | 60 +- backend/common/settings/generator.go | 8 + backend/common/settings/multiconfig_test.go | 15 +- backend/common/settings/structs.go | 76 +- backend/common/settings/yaml.go | 111 +++ backend/common/utils/file.go | 1 - backend/database/access/helper.go | 8 +- backend/database/share/extended.go | 11 + backend/database/share/share.go | 25 +- backend/database/users/users.go | 16 +- backend/go.mod | 38 +- backend/go.sum | 173 +--- backend/http/api.go | 2 + backend/http/httpRouter.go | 3 + backend/http/middleware.go | 3 +- backend/http/onlyOffice.go | 72 +- backend/http/public.go | 201 +++- backend/http/raw.go | 23 +- backend/http/resource.go | 44 +- backend/http/share.go | 6 + backend/http/static.go | 12 + backend/http/utils.go | 2 + backend/indexing/conditionalRules_test.go | 576 +++++++++++ backend/indexing/indexingFiles.go | 352 ++++--- backend/indexing/indexingFiles_test.go | 2 +- backend/indexing/indexingSchedule.go | 43 +- backend/indexing/indexing_test.go | 17 +- backend/indexing/mutate.go | 5 +- backend/indexing/unix.go | 1 - backend/indexing/windows.go | 1 - backend/preview/doc.go | 1 - backend/preview/docDefault.go | 1 - backend/swagger/docs/docs.go | 341 ++++--- backend/swagger/docs/swagger.json | 341 ++++--- backend/swagger/docs/swagger.yaml | 262 +++-- frontend/public/config.generated.yaml | 40 +- .../fonts/material-icons.woff2} | Bin .../fonts/roboto-bold-latin.woff2} | Bin .../fonts/roboto-medium-latin.woff2} | Bin .../fonts/roboto-normal-latin.woff2} | Bin frontend/public/index.html | 10 +- frontend/scripts/sync-translations.js | 3 +- frontend/src/api/files.js | 20 +- frontend/src/api/public.js | 111 ++- frontend/src/api/utils.js | 8 +- .../fonts/material/symbols-outlined.woff | Bin 339524 -> 0 bytes .../fonts/roboto/bold-cyrillic-ext.woff2 | Bin 17176 -> 0 bytes .../assets/fonts/roboto/bold-cyrillic.woff2 | Bin 11676 -> 0 bytes .../assets/fonts/roboto/bold-greek-ext.woff2 | Bin 3384 -> 0 bytes .../src/assets/fonts/roboto/bold-greek.woff2 | Bin 9488 -> 0 bytes .../assets/fonts/roboto/bold-latin-ext.woff2 | Bin 15140 -> 0 bytes .../assets/fonts/roboto/bold-vietnamese.woff2 | Bin 7200 -> 0 bytes .../fonts/roboto/medium-cyrillic-ext.woff2 | Bin 15292 -> 0 bytes .../assets/fonts/roboto/medium-cyrillic.woff2 | Bin 10060 -> 0 bytes .../fonts/roboto/medium-greek-ext.woff2 | Bin 1412 -> 0 bytes .../assets/fonts/roboto/medium-greek.woff2 | Bin 7176 -> 0 bytes .../fonts/roboto/medium-latin-ext.woff2 | Bin 11912 -> 0 bytes .../fonts/roboto/medium-vietnamese.woff2 | Bin 4780 -> 0 bytes .../fonts/roboto/normal-cyrillic-ext.woff2 | Bin 15832 -> 0 bytes .../assets/fonts/roboto/normal-cyrillic.woff2 | Bin 9996 -> 0 bytes .../fonts/roboto/normal-greek-ext.woff2 | Bin 1432 -> 0 bytes .../assets/fonts/roboto/normal-greek.woff2 | Bin 7208 -> 0 bytes .../fonts/roboto/normal-latin-ext.woff2 | Bin 12008 -> 0 bytes .../fonts/roboto/normal-vietnamese.woff2 | Bin 4896 -> 0 bytes frontend/src/components/ContextMenu.vue | 86 +- frontend/src/components/Search.vue | 15 + .../src/components/files/ExtendedImage.vue | 52 +- frontend/src/components/files/ListingItem.vue | 29 +- .../src/components/files/ShareInfoCard.vue | 2 +- .../src/components/files/nextPrevious.vue | 238 ++++- .../components/prompts/CopyPasteConfirm.vue | 129 +++ frontend/src/components/prompts/Delete.vue | 22 +- frontend/src/components/prompts/FileList.vue | 22 +- frontend/src/components/prompts/Help.vue | 173 +++- frontend/src/components/prompts/MoveCopy.vue | 46 +- frontend/src/components/prompts/NewDir.vue | 4 +- frontend/src/components/prompts/NewFile.vue | 4 +- .../src/components/prompts/PlaybackQueue.vue | 358 +++++++ frontend/src/components/prompts/Prompts.vue | 9 + frontend/src/components/prompts/Rename.vue | 11 +- .../src/components/prompts/SaveBeforeExit.vue | 87 ++ frontend/src/components/prompts/Share.vue | 35 +- frontend/src/components/prompts/Upload.vue | 22 +- frontend/src/components/prompts/UserEdit.vue | 11 +- .../src/components/settings/Permissions.vue | 15 +- frontend/src/components/sidebar/General.vue | 33 +- frontend/src/components/sidebar/Sidebar.vue | 18 + frontend/src/css/fonts.css | 198 ++-- frontend/src/i18n/ar.json | 59 +- frontend/src/i18n/cz.json | 57 +- frontend/src/i18n/de.json | 69 +- frontend/src/i18n/el.json | 53 +- frontend/src/i18n/en.json | 53 +- frontend/src/i18n/es.json | 53 +- frontend/src/i18n/fr.json | 53 +- frontend/src/i18n/he.json | 53 +- frontend/src/i18n/hu.json | 53 +- frontend/src/i18n/is.json | 32 +- frontend/src/i18n/it.json | 53 +- frontend/src/i18n/ja.json | 53 +- frontend/src/i18n/ko.json | 53 +- frontend/src/i18n/nl-be.json | 53 +- frontend/src/i18n/pl.json | 53 +- frontend/src/i18n/pt-br.json | 53 +- frontend/src/i18n/pt.json | 53 +- frontend/src/i18n/ro.json | 53 +- frontend/src/i18n/ru.json | 53 +- frontend/src/i18n/sk.json | 53 +- frontend/src/i18n/sv-se.json | 53 +- frontend/src/i18n/tr.json | 53 +- frontend/src/i18n/ua.json | 53 +- frontend/src/i18n/zh-cn.json | 53 +- frontend/src/i18n/zh-tw.json | 53 +- frontend/src/store/getters.js | 36 +- frontend/src/store/mutations.js | 63 +- frontend/src/store/state.js | 10 + frontend/src/store/types.ts | 1 - frontend/src/utils/auth.js | 6 +- frontend/src/utils/mimetype.js | 2 +- frontend/src/utils/upload.js | 29 +- frontend/src/utils/url.js | 2 +- frontend/src/views/Files.vue | 79 +- frontend/src/views/Login.vue | 8 +- frontend/src/views/bars/Default.vue | 53 +- frontend/src/views/files/DocViewer.vue | 35 +- frontend/src/views/files/Editor.vue | 307 +++++- frontend/src/views/files/ListingView.vue | 113 ++- frontend/src/views/files/MarkdownViewer.vue | 23 +- frontend/src/views/files/OnlyOfficeEditor.vue | 6 +- frontend/src/views/files/Preview.vue | 158 ++- frontend/src/views/files/plyrViewer.vue | 903 +++++++++--------- frontend/src/views/settings/Shares.vue | 2 +- .../excludedButVisible/shouldshow.txt | 0 .../subfolderExclusions/endsWithFolder/item | 0 .../subfolderExclusions/endsWithTest.mp3 | 0 .../subfolderExclusions/exclusionlist.sh | 0 .../folderItem/fileitem.txt | 0 .../subfolderExclusions/folderShouldShow/item | 0 .../subfolderExclusions/shouldshow | 0 .../subfolderExclusions/startsWithFolder/item | 0 .../subfolderExclusions/startsWithTest.txt | 0 frontend/tests/playwright/global-setup.ts | 4 +- frontend/tests/playwright/noauth-setup.ts | 4 +- .../playwright/noauth/file-actions.spec.ts | 13 +- .../noauth/indexing-options.spec.ts | 44 +- .../playwright/noauth/navigation.spec.ts | 4 +- .../playwright/noauth/share.mobile.spec.ts | 2 +- .../tests/playwright/noauth/share.spec.ts | 10 +- .../playwright/sharing/navigation.spec.ts | 2 +- frontend/vite.config.ts | 29 +- makefile | 5 +- 167 files changed, 6229 insertions(+), 2254 deletions(-) create mode 100644 _docker/src/general/backend/frontend-config.yaml create mode 100644 _docker/src/general/backend/server-config.yaml create mode 100644 backend/common/settings/yaml.go create mode 100644 backend/indexing/conditionalRules_test.go rename frontend/{src/assets/fonts/material/icons.woff2 => public/fonts/material-icons.woff2} (100%) rename frontend/{src/assets/fonts/roboto/bold-latin.woff2 => public/fonts/roboto-bold-latin.woff2} (100%) rename frontend/{src/assets/fonts/roboto/medium-latin.woff2 => public/fonts/roboto-medium-latin.woff2} (100%) rename frontend/{src/assets/fonts/roboto/normal-latin.woff2 => public/fonts/roboto-normal-latin.woff2} (100%) delete mode 100644 frontend/src/assets/fonts/material/symbols-outlined.woff delete mode 100755 frontend/src/assets/fonts/roboto/bold-cyrillic-ext.woff2 delete mode 100755 frontend/src/assets/fonts/roboto/bold-cyrillic.woff2 delete mode 100755 frontend/src/assets/fonts/roboto/bold-greek-ext.woff2 delete mode 100755 frontend/src/assets/fonts/roboto/bold-greek.woff2 delete mode 100755 frontend/src/assets/fonts/roboto/bold-latin-ext.woff2 delete mode 100755 frontend/src/assets/fonts/roboto/bold-vietnamese.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-cyrillic-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-cyrillic.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-greek-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-greek.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-latin-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/medium-vietnamese.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-cyrillic-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-cyrillic.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-greek-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-greek.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-latin-ext.woff2 delete mode 100644 frontend/src/assets/fonts/roboto/normal-vietnamese.woff2 create mode 100644 frontend/src/components/prompts/CopyPasteConfirm.vue create mode 100644 frontend/src/components/prompts/PlaybackQueue.vue create mode 100644 frontend/src/components/prompts/SaveBeforeExit.vue create mode 100644 frontend/tests/playwright-files/excludedButVisible/shouldshow.txt create mode 100644 frontend/tests/playwright-files/subfolderExclusions/endsWithFolder/item create mode 100644 frontend/tests/playwright-files/subfolderExclusions/endsWithTest.mp3 create mode 100644 frontend/tests/playwright-files/subfolderExclusions/exclusionlist.sh create mode 100644 frontend/tests/playwright-files/subfolderExclusions/folderItem/fileitem.txt create mode 100644 frontend/tests/playwright-files/subfolderExclusions/folderShouldShow/item create mode 100644 frontend/tests/playwright-files/subfolderExclusions/shouldshow create mode 100644 frontend/tests/playwright-files/subfolderExclusions/startsWithFolder/item create mode 100644 frontend/tests/playwright-files/subfolderExclusions/startsWithTest.txt diff --git a/.gitignore b/.gitignore index eb5ce94172..0089adca34 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,7 @@ frontend/tsconfig.tsbuildinfo /frontend/package-lock.json /backend/vendor /backend/*.cov -/backend/test_config.yaml -/backend/test-*.yaml +/backend/*test_config.yaml /backend/generated.yaml /backend/srv /backend/http/dist diff --git a/CHANGELOG.md b/CHANGELOG.md index b5985458da..0646a4047a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,49 @@ All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version). +## v0.8.9-beta + +> [!CAUTION] +> If you have indexing rules -- such as [maxWatchers](https://github.com/gtsteffaniak/filebrowser/blob/39514169f17ed9586d587dd496257588ded6e532/frontend/public/config.generated.yaml#L30), [neverWatchPaths](https://github.com/gtsteffaniak/filebrowser/blob/39514169f17ed9586d587dd496257588ded6e532/frontend/public/config.generated.yaml#L31C9-L31C24), [exclude](https://github.com/gtsteffaniak/filebrowser/blob/39514169f17ed9586d587dd496257588ded6e532/frontend/public/config.generated.yaml#L32C9-L32C16) rules, [include](https://github.com/gtsteffaniak/filebrowser/blob/39514169f17ed9586d587dd496257588ded6e532/frontend/public/config.generated.yaml#L43) rules, see [the migration guide](https://filebrowserquantum.com/en/docs/user-guides/general-configuration/exclusion-rules/) for help. + + **New Features**: + - Playback Queue for media -- thanks @Kurami32 #1339 + - Ctrl+b Shortcut to toggle sidebar, open settings, search #1172 + - Add a "select all" toggle in the menu #974 + - Save on exit text editor -- thanks @srini-abhiram #1334 #1241 + - Disabled indexing for subfolders but allow browsing #783 + - Added more granular create/upload, delete, and download (includes viewing content) permission #1200 #1199 + - Upload settings can be adjusted directly in the upload prompt + - Added paste confirmation prompt when using copy/paste keyboard shortcuts. + - Updated shares + - `disableDownload` to disable download and (content viewing). + - `allowReplacements` to share permission -- prohibits replacing files on conflict #661 + - normal shares can create/upload files if given permission + + **Notes**: + - Optimized font and icon loading. + - the next/previous buttons will follow media queue order if playback mode has a queue. + - All new exclude rules -- see [full config example](https://github.com/gtsteffaniak/filebrowser/wiki/Full-Config-Example) + - The order of sources will strictly match order in config.yaml. Default landing page is root first source unless otherwise configured in profile settings. + - Uploading changes #1371 + - Chunked uploading can no longer be explicitly disabled, defaults to 5MB chunks + - Automatic chunked/non-chunked uploads based on size. If an item exceeds the chunk size, chunked uploading will occur. If its less than chunk size, no chunked upload. + - To "disable" chunked upload, you an set your chunk size very large -- 0 chunk size will be reset to 5MB. + + **BugFixes**: + - Remember the previous location after closing a preview #1336 + - fixed issue related to multi-config parsing #1267 + - Cannot save text files, missing button #1326 #1367 + - Files are being overwritten and/or content disappears #1312 + - moving between items using next/previous will reset the req and show a responsive loading spinner -- fixing several state related issues. + - access management: child folders accessible stopped showing up #1332 + - Make source inaccessible if directory does not exist rather than exiting on start #1264 + - HTTP Proxy environment gets ignored since version v0.8.6-beta #1324 + - album artwork preview not showing on shares + - fixed OIDC logout causing a loop #995 #1361 + - fixed checksum failure #1372 + - Copy, paste, cut shortcuts don't work and make the UI unusable #1375 + ## v0.8.8-beta **New Features**: @@ -42,6 +85,8 @@ All notable changes to this project will be documented in this file. For commit - console errors during login/logout - fix scoped user share creation issue #1309 - share close button and navigation issues. + - OnlyOffice source not found when opening shared file #1285 + - user scoped onlyoffice error saving files with Onlyoffice #1068 ## v0.8.7-beta diff --git a/README.md b/README.md index 8c6a552c2f..b3be0345d9 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ > [!WARNING] -> There is no stable version -- :construction: planned for 2025. ([Read more](https://github.com/gtsteffaniak/filebrowser/discussions/628)) +> There is no stable version -- :construction: coming very soon! +## Pinned -## Announcements - -[Stable Release & 0.9.0 update](https://github.com/gtsteffaniak/filebrowser/discussions/1293) +:loudspeaker: [Stable Release & 0.9.0 Update](https://github.com/gtsteffaniak/filebrowser/discussions/1293) +:pushpin: [Read The Official Docs](https://filebrowserquantum.com/) (currently english-only) ## About @@ -65,7 +65,6 @@ Notable features that this fork *does not* have (removed): - :construction: jobs are not supported yet. - ❌ shell commands are completely removed and will not be returned. - FileBrowser Quantum differs significantly from the original version. Many of these changes required a significant overhaul. Creating a fork was a necessary process to make the program better. There have been many growing pains, but a stable release is planned and coming soon. ## System Requirements @@ -93,31 +92,9 @@ a pop-up menu.

-## Install and Configuration +## Official Docs -Check out the [Getting Started Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Getting-Started) - -For help configuring your filebrowser see [Configuration Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Configuration-And-Examples) - -## Command Line Usage - -See the [CLI Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/CLI) - -## API Usage - -See the [API Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/API) - -## Office File Support - -See [Office Support Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Office-Support#adding-open-office-integration-for-docker) on how to enable office file editing and office-related features. - -## Migration from the original filebrowser - -See the [Migration Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Migration) - -## Other Questions - -For more, see the [Q&A Wiki](https://github.com/gtsteffaniak/filebrowser/wiki/Q&A) +See the [Official Docs](https://filebrowserquantum.com/). Contributions or welcome and encouraged! See [FilebrowserDocs Github](https://github.com/quantumx-apps/filebrowserDocs). ## Comparison Chart diff --git a/_docker/Dockerfile.playwright-noauth b/_docker/Dockerfile.playwright-noauth index 7e06e7ab6e..87c44d3a9f 100644 --- a/_docker/Dockerfile.playwright-noauth +++ b/_docker/Dockerfile.playwright-noauth @@ -6,6 +6,7 @@ COPY [ "./_docker/src/noauth/", "./" ] WORKDIR /app/frontend COPY [ "./frontend/tests", "./tests" ] +COPY [ "./frontend/tests/playwright-files", "./tests/playwright-files2" ] WORKDIR /app/backend/ COPY [ "./backend/filebrowser", "./"] @@ -13,4 +14,4 @@ RUN mkdir -p ./http/dist COPY [ "./backend/http/embed/", "./http/dist/"] # Run tests -RUN ./filebrowser & sleep 2 && cd ../frontend && npx playwright test +#RUN ./filebrowser & sleep 2 && cd ../frontend && npx playwright test \ No newline at end of file diff --git a/_docker/src/general/backend/config.yaml b/_docker/src/general/backend/config.yaml index b8b1ef2115..dc90d84f60 100644 --- a/_docker/src/general/backend/config.yaml +++ b/_docker/src/general/backend/config.yaml @@ -1,27 +1,9 @@ server: - port: 80 - baseURL: "/" - logging: - - levels: "info|error|debug" - sources: - - path: "../frontend/tests/playwright-files" - name: "playwright + files" - config: - defaultEnabled: true - - path: "." - name: "docker" - config: - disableIndexing: true - defaultEnabled: true + <<: *server-main frontend: - name: "Graham's Filebrowser" - disableDefaultLinks: true - styling: - customThemes: - no-rounded: - description: "No rounded corners" # The description of the theme to display in the UI. - css: "no-rounded.css" # The css file path and filename to use for the theme. - externalLinks: - - text: "A playwright test" - url: "https://playwright.dev/" - title: "Playwright" \ No newline at end of file + <<: *frontend-main + +userDefaults: + permissions: + download: true + create: true \ No newline at end of file diff --git a/_docker/src/general/backend/frontend-config.yaml b/_docker/src/general/backend/frontend-config.yaml new file mode 100644 index 0000000000..accea88553 --- /dev/null +++ b/_docker/src/general/backend/frontend-config.yaml @@ -0,0 +1,12 @@ +frontend-main: &frontend-main + name: "Graham's Filebrowser" + disableDefaultLinks: true + styling: + customThemes: + no-rounded: + description: "No rounded corners" # The description of the theme to display in the UI. + css: "no-rounded.css" # The css file path and filename to use for the theme. + externalLinks: + - text: "A playwright test" + url: "https://playwright.dev/" + title: "Playwright" \ No newline at end of file diff --git a/_docker/src/general/backend/server-config.yaml b/_docker/src/general/backend/server-config.yaml new file mode 100644 index 0000000000..283650f6b1 --- /dev/null +++ b/_docker/src/general/backend/server-config.yaml @@ -0,0 +1,15 @@ +server-main: &server-main + port: 80 + baseURL: "/" + logging: + - levels: "info|error|debug" + sources: + - path: "../frontend/tests/playwright-files" + name: "playwright + files" + config: + defaultEnabled: true + - path: "." + name: "docker" + config: + disableIndexing: true + defaultEnabled: true \ No newline at end of file diff --git a/_docker/src/noauth/backend/config.yaml b/_docker/src/noauth/backend/config.yaml index 36959e9507..66dfceee11 100644 --- a/_docker/src/noauth/backend/config.yaml +++ b/_docker/src/noauth/backend/config.yaml @@ -5,11 +5,27 @@ server: - levels: "info|error|debug" sources: - path: "../frontend/tests/playwright-files" + name: "exclude" config: defaultEnabled: true - exclude: - folderPaths: - - "excluded" + conditionals: + rules: + - folderPath: "excluded" + - folderPath: "excludedButVisible" + viewable: true + - path: "../frontend/tests/playwright-files2" + name: "include" + config: + defaultEnabled: true + conditionals: + rules: + - includeRootItem: "myfolder" + - includeRootItem: "subfolderExclusions" + - filePath: "/subfolderExclusions/exclusionlist.sh" + - folderPath: "/subfolderExclusions/folderItem" + viewable: true + - fileStartsWith: "startsWith" + - folderEndsWith: "Folder" auth: methods: @@ -23,4 +39,9 @@ frontend: title: "Playwright" userDefaults: permissions: - realtime: true \ No newline at end of file + realtime: true + +userDefaults: + permissions: + download: true + create: true \ No newline at end of file diff --git a/_docker/src/oidc/backend/config.yaml b/_docker/src/oidc/backend/config.yaml index 27fe7dacbe..a0d24aa801 100644 --- a/_docker/src/oidc/backend/config.yaml +++ b/_docker/src/oidc/backend/config.yaml @@ -35,4 +35,6 @@ userDefaults: admin: false modify: true share: false - api: false \ No newline at end of file + api: false + download: true + create: true \ No newline at end of file diff --git a/_docker/src/proxy/backend/config.yaml b/_docker/src/proxy/backend/config.yaml index 1e66781872..41924830d4 100644 --- a/_docker/src/proxy/backend/config.yaml +++ b/_docker/src/proxy/backend/config.yaml @@ -35,4 +35,6 @@ userDefaults: admin: false modify: true share: true - api: false \ No newline at end of file + api: false + download: true + create: true \ No newline at end of file diff --git a/backend/adapters/fs/files/file_test.go b/backend/adapters/fs/files/file_test.go index 1db625c454..b4cdb897e0 100644 --- a/backend/adapters/fs/files/file_test.go +++ b/backend/adapters/fs/files/file_test.go @@ -255,12 +255,12 @@ func TestOverrideDirectoryToFile(t *testing.T) { // Get the index and set up mock data idx := indexing.GetIndex("test") - if idx == nil { + if idx == nil { //nolint:staticcheck // t.Fatal terminates execution t.Fatal("Failed to get test index") } // Create mock directory structure - idx.Directories["/"] = &iteminfo.FileInfo{ + idx.Directories["/"] = &iteminfo.FileInfo{ //nolint:staticcheck // t.Fatal terminates execution Path: "/", ItemInfo: iteminfo.ItemInfo{ Name: "/", @@ -273,7 +273,7 @@ func TestOverrideDirectoryToFile(t *testing.T) { // Simulate the directory-to-file override by updating the mock data // Remove the directory from the parent's Folders slice - rootInfo := idx.Directories["/"] + rootInfo := idx.Directories["/"] //nolint:staticcheck // t.Fatal terminates execution for i, folder := range rootInfo.Folders { if folder.Name == "Test Object" { rootInfo.Folders = append(rootInfo.Folders[:i], rootInfo.Folders[i+1:]...) @@ -330,12 +330,12 @@ func TestOverrideFileToDirectory(t *testing.T) { // Get the index and set up mock data idx := indexing.GetIndex("test") - if idx == nil { + if idx == nil { //nolint:staticcheck // t.Fatal terminates execution t.Fatal("Failed to get test index") } // Create mock directory structure with a file - idx.Directories["/"] = &iteminfo.FileInfo{ + idx.Directories["/"] = &iteminfo.FileInfo{ //nolint:staticcheck // t.Fatal terminates execution Path: "/", ItemInfo: iteminfo.ItemInfo{ Name: "/", @@ -348,7 +348,7 @@ func TestOverrideFileToDirectory(t *testing.T) { // Simulate the file-to-directory override by updating the mock data // Remove the file from the parent's Files slice - rootInfo := idx.Directories["/"] + rootInfo := idx.Directories["/"] //nolint:staticcheck // t.Fatal terminates execution for i, file := range rootInfo.Files { if file.Name == "Test Object" { rootInfo.Files = append(rootInfo.Files[:i], rootInfo.Files[i+1:]...) diff --git a/backend/adapters/fs/files/files.go b/backend/adapters/fs/files/files.go index c78653f268..4636202603 100644 --- a/backend/adapters/fs/files/files.go +++ b/backend/adapters/fs/files/files.go @@ -15,7 +15,6 @@ import ( "github.com/dhowden/tag" "github.com/gtsteffaniak/filebrowser/backend/adapters/fs/fileutils" - "github.com/gtsteffaniak/filebrowser/backend/common/errors" "github.com/gtsteffaniak/filebrowser/backend/common/settings" "github.com/gtsteffaniak/filebrowser/backend/common/utils" "github.com/gtsteffaniak/filebrowser/backend/database/access" @@ -43,58 +42,29 @@ func FileInfoFaster(opts utils.FileOptions, access *access.Storage) (*iteminfo.E } opts.IsDir = isDir var info *iteminfo.FileInfo - var exists bool - var useFsInfo bool - // Check if indexing is disabled for this source - if index.Config.DisableIndexing { - useFsInfo = true - } + // Check if path is viewable (allows filesystem access without indexing) + isViewable := index.IsViewable(isDir, opts.Path) - if !useFsInfo && isDir { + // For non-viewable paths, verify they are indexed + // Skip this check if indexing is disabled for the entire source + if !isViewable && !index.Config.DisableIndexing { err = index.RefreshFileInfo(opts) if err != nil { - if err == errors.ErrNotIndexed { - return response, fmt.Errorf("could not refresh file info: %v", err) - } + return response, fmt.Errorf("path not accessible: %v", err) } } - if useFsInfo { - if isDir { - info, err = index.GetFsDirInfo(opts.Path) - if err != nil { - return response, err - } - } else { - var fileInfo os.FileInfo - // Get file info directly from filesystem - fileInfo, err = os.Stat(realPath) - if err != nil { - return response, fmt.Errorf("could not stat file: %v", err) - } - - info = &iteminfo.FileInfo{ - Path: opts.Path, - ItemInfo: iteminfo.ItemInfo{ - Name: fileInfo.Name(), - Size: fileInfo.Size(), - ModTime: fileInfo.ModTime(), - }, - } - info.DetectType(realPath, false) + if isDir { + info, err = index.GetFsDirInfo(opts.Path) + if err != nil { + return response, err } } else { - info, exists = index.GetReducedMetadata(opts.Path, opts.IsDir) - if !exists { - err = index.RefreshFileInfo(opts) - if err != nil { - return response, fmt.Errorf("could not refresh file info: %v", err) - } - info, exists = index.GetReducedMetadata(opts.Path, opts.IsDir) - if !exists { - return response, fmt.Errorf("could not get metadata for path: %v", opts.Path) - } + // For files, get info from parent directory to ensure HasPreview is set correctly + info, err = index.GetFsDirInfo(opts.Path) + if err != nil { + return response, err } } @@ -274,6 +244,11 @@ func RefreshIndex(source string, path string, isDir bool, recursive bool) error path = strings.TrimSuffix(path, "/") } + // Skip indexing for viewable paths (viewable: true means don't index, just allow FS access) + if idx.IsViewable(isDir, path) { + return nil + } + err := idx.RefreshFileInfo(utils.FileOptions{Path: path, IsDir: isDir, Recursive: recursive}) return err } @@ -307,7 +282,7 @@ func validateMoveDestination(src, dst string, isSrcDir bool) error { return nil } -func MoveResource(isSrcDir, isDestDir bool, sourceIndex, destIndex, realsrc, realdst string, s *share.Storage) error { +func MoveResource(isSrcDir bool, sourceIndex, destIndex, realsrc, realdst string, s *share.Storage) error { // Validate the move operation before executing if err := validateMoveDestination(realsrc, realdst, isSrcDir); err != nil { return err @@ -369,7 +344,7 @@ func MoveResource(isSrcDir, isDestDir bool, sourceIndex, destIndex, realsrc, rea return nil } -func CopyResource(isSrcDir, isDestDir bool, sourceIndex, destIndex, realsrc, realdst string) error { +func CopyResource(isSrcDir bool, sourceIndex, destIndex, realsrc, realdst string) error { // Validate the copy operation before executing if err := validateMoveDestination(realsrc, realdst, isSrcDir); err != nil { return err @@ -396,14 +371,12 @@ func CopyResource(isSrcDir, isDestDir bool, sourceIndex, destIndex, realsrc, rea // Refresh destination (parent directory if it's a file) dstRefreshPath := realdst - dstRefreshIsDir := isDestDir if !isSrcDir { // If copying a file (regardless of destination), refresh the parent directory dstRefreshPath = filepath.Dir(realdst) - dstRefreshIsDir = true } - go RefreshIndex(destIndex, dstRefreshPath, dstRefreshIsDir, true) //nolint:errcheck + go RefreshIndex(destIndex, dstRefreshPath, true, true) //nolint:errcheck return nil } diff --git a/backend/cmd/user.go b/backend/cmd/user.go index 1d12b47f09..3e7c74c39e 100644 --- a/backend/cmd/user.go +++ b/backend/cmd/user.go @@ -107,7 +107,11 @@ func updateUserScopes(user *users.User) bool { // func to convert legacy user with perm key to permissions func updatePermissions(user *users.User) bool { - updateUser := false + if user.Version == 1 { + return false + } + updateUser := true + user.Permissions.Download = true // if any keys are true, set the permissions to true if user.Perm.Api { user.Permissions.Api = true @@ -129,6 +133,27 @@ func updatePermissions(user *users.User) bool { user.Perm.Share = false updateUser = true } + if user.Perm.Create { + user.Permissions.Create = true + user.Perm.Create = false + updateUser = true + } + if user.Perm.Create { + user.Permissions.Create = true + user.Perm.Create = false + updateUser = true + } + if user.Perm.Download { + user.Permissions.Download = true + user.Perm.Download = false + updateUser = true + } + if user.Permissions.Modify { + user.Permissions.Create = true + user.Permissions.Delete = true + updateUser = true + } + user.Version = 1 if updateUser { createBackup = append(createBackup, true) } diff --git a/backend/common/errors/errors.go b/backend/common/errors/errors.go index ce08646e1e..151ac99ecd 100644 --- a/backend/common/errors/errors.go +++ b/backend/common/errors/errors.go @@ -23,4 +23,6 @@ var ( ErrUnauthorized = errors.New("user unauthorized") ErrNotIndexed = errors.New("directory or item excluded from indexing") ErrWrongLoginMethod = errors.New("user attempted to login with wrong login method") + ErrDownloadNotAllowed = errors.New("downloads are not allowed for this share") + ErrUploadNotAllowed = errors.New("upload permission not allowed for this share") ) diff --git a/backend/common/settings/auth.go b/backend/common/settings/auth.go index 3f55b841ce..36f04c47b9 100644 --- a/backend/common/settings/auth.go +++ b/backend/common/settings/auth.go @@ -103,7 +103,9 @@ func validateOidcAuth() error { ctx := context.Background() // Create a custom HTTP client with proper User-Agent to avoid being blocked by bot protection - transport := &http.Transport{} + transport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, // Respect HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables + } // If disableVerifyTLS is true, disable TLS verification if oidcCfg.DisableVerifyTLS { diff --git a/backend/common/settings/config.go b/backend/common/settings/config.go index b121babc99..fa2cbafeed 100644 --- a/backend/common/settings/config.go +++ b/backend/common/settings/config.go @@ -1,6 +1,7 @@ package settings import ( + "bytes" "fmt" "log" "os" @@ -155,16 +156,12 @@ func setupVideoPreview() { } } -func getRealPath(path string) string { - realPath, err := filepath.Abs(path) - if err != nil { - logger.Fatalf("could not find configured source path: %v", err) - } +func checkPathExists(realPath string) error { // check path exists - if _, err = os.Stat(realPath); os.IsNotExist(err) { - logger.Fatalf("configured source path does not exist: %v", realPath) + if _, err := os.Stat(realPath); os.IsNotExist(err) { + return fmt.Errorf("source path %v is currently not available", realPath) } - return realPath + return nil } func setupSources(generate bool) { @@ -175,7 +172,14 @@ func setupSources(generate bool) { if source.Config.Disabled { continue } - realPath := getRealPath(source.Path) + realPath, err := filepath.Abs(source.Path) + if err != nil { + logger.Fatalf("error getting real path for source %v: %v", source.Path, err) + } + err = checkPathExists(realPath) + if err != nil { + logger.Warningf("error checking path exists: %v", err) + } name := filepath.Base(realPath) if name == "\\" { name = strings.Split(realPath, ":")[0] @@ -194,6 +198,7 @@ func setupSources(generate bool) { } } modifyExcludeInclude(source) + setConditionals(source) if source.Config.DefaultUserScope == "" { source.Config.DefaultUserScope = "/" } @@ -209,14 +214,12 @@ func setupSources(generate bool) { Config.Server.Sources[0].Config.DefaultEnabled = true } for _, sourcePathOnly := range Config.Server.Sources { - var realPath string + absPath := sourcePathOnly.Path if generate { // When generating, skip path validation and use the already-set path - realPath = sourcePathOnly.Path - } else { - realPath = getRealPath(sourcePathOnly.Path) + absPath = sourcePathOnly.Path } - source, ok := Config.Server.SourceMap[realPath] + source, ok := Config.Server.SourceMap[absPath] if ok && !slices.Contains(allSourceNames, source.Name) { sourceList = append(sourceList, source) if source.Config.DefaultEnabled { @@ -320,67 +323,65 @@ func setupLogging() { } } -func loadConfigWithDefaults(configFile string, isGenerate bool) error { - Config = setDefaults(isGenerate) - // Open and read the YAML file - yamlFile, err := os.Open(configFile) - if err != nil { +func loadConfigWithDefaults(configFile string, generate bool) error { + Config = setDefaults(generate) + + // Check if config file exists + if _, err := os.Stat(configFile); err != nil { if configFile != "" { logger.Errorf("could not open config file '%v', using default settings.", configFile) } Config.Server.Sources = []*Source{ { Path: ".", - Config: SourceConfig{ - DefaultEnabled: true, - }, }, } loadEnvConfig() return nil } - defer yamlFile.Close() - // Get the directory containing the config file for reference resolution - configDir := filepath.Dir(configFile) - if configDir == "" { - configDir = "." + // Try multi-file config first (combine all YAML files in the directory) + combinedYAML, err := combineYAMLFiles(configFile) + if err != nil { + return fmt.Errorf("failed to combine YAML files: %v", err) } - // Create decoder with ReferenceDirs to support multi-config files - // This enables YAML anchors and references to work across multiple files - decoder := yaml.NewDecoder(yamlFile, - yaml.DisallowUnknownField(), - yaml.ReferenceDirs(configDir), - ) + // First pass: Unmarshal into a generic map to resolve all anchors and aliases + // This allows YAML anchors defined in auxiliary files to be properly merged + var rawConfig map[string]interface{} + err = yaml.Unmarshal(combinedYAML, &rawConfig) + if err != nil { + return fmt.Errorf("error parsing YAML data: %v", err) + } + // Filter to only keep valid top-level Settings struct fields + // This removes anchor definitions that are just templates (e.g., "test_server: &test_server") + validFields := map[string]bool{ + "server": true, + "auth": true, + "integrations": true, + "frontend": true, + "userDefaults": true, + } + + filteredConfig := make(map[string]interface{}) + for key, value := range rawConfig { + if validFields[key] { + filteredConfig[key] = value + } + } + + // Marshal the filtered config back to YAML + filteredYAML, err := yaml.Marshal(filteredConfig) + if err != nil { + return fmt.Errorf("error re-marshaling filtered YAML: %v", err) + } + + // Second pass: Decode with strict validation (disallow unknown fields within valid sections) + decoder := yaml.NewDecoder(bytes.NewReader(filteredYAML), yaml.DisallowUnknownField()) err = decoder.Decode(&Config) if err != nil { - // Fallback to old method if multi-config parsing fails - logger.Debugf("Multi-config parsing failed, falling back to single file parsing: %v", err) - - // Reset file position and try old method - if _, seekErr := yamlFile.Seek(0, 0); seekErr != nil { - return fmt.Errorf("failed to read yaml file: %v", seekErr) - } - stat, statErr := yamlFile.Stat() - if statErr != nil { - return statErr - } - yamlData := make([]byte, stat.Size()) - _, readErr := yamlFile.Read(yamlData) - if readErr != nil && configFile != "config.yaml" { - return fmt.Errorf("could not load specified config file: %v", readErr.Error()) - } - if readErr != nil { - logger.Warningf("Could not load config file '%v', using default settings: %v", configFile, readErr) - } - - // Use simple decoder without ReferenceDirs - fallbackErr := yaml.NewDecoder(strings.NewReader(string(yamlData)), yaml.DisallowUnknownField()).Decode(&Config) - if fallbackErr != nil { - return fmt.Errorf("error unmarshaling YAML data: %v", fallbackErr) - } + return fmt.Errorf("error unmarshaling YAML data: %v", err) } loadEnvConfig() @@ -648,11 +649,15 @@ func GetScopeFromSourcePath(scopes []users.SourceScope, sourcePath string) (stri // assumes backend style scopes func GetSources(u *users.User) []string { sources := []string{} - for _, scope := range u.Scopes { - source, ok := Config.Server.SourceMap[scope.Name] - if ok { - sources = append(sources, source.Name) + + // preserves order of sources + for _, source := range Config.Server.Sources { + _, err := GetScopeFromSourcePath(u.Scopes, source.Path) + if err != nil { + logger.Warningf("could not get scope for source %v: %v", source.Path, err) + continue } + sources = append(sources, source.Name) } return sources } @@ -705,27 +710,94 @@ func loadCustomFavicon() { logger.Infof("Successfully validated custom favicon at '%v' (%d bytes, %s)", faviconPath, stat.Size(), ext) } -func modifyExcludeInclude(config *Source) { - normalize := func(s []string, checkExists bool) { - for i, v := range s { - s[i] = "/" + strings.Trim(v, "/") - // check if file/folder exists - if checkExists { - realPath, err := filepath.Abs(config.Path + s[i]) - if err != nil { - logger.Warningf("could not get absolute path for %v: %v", s[i], err) - continue - } - if _, err := os.Stat(realPath); os.IsNotExist(err) { - logger.Warningf("configured exclude/include path %v does not exist", realPath) - } - } - } +// setConditionalsMap builds optimized map structures from conditional rules for O(1) lookups +func setConditionals(config *Source) { + rules := config.Config.Conditionals.ItemRules + + // Initialize the maps structure (only exact match maps for Names) + resolved := &ResolvedConditionalsConfig{ + FileNames: make(map[string]ConditionalIndexConfig), + FolderNames: make(map[string]ConditionalIndexConfig), + FilePaths: make(map[string]ConditionalIndexConfig), + FolderPaths: make(map[string]ConditionalIndexConfig), + FileEndsWith: make([]ConditionalIndexConfig, 0), + FolderEndsWith: make([]ConditionalIndexConfig, 0), + FileStartsWith: make([]ConditionalIndexConfig, 0), + FolderStartsWith: make([]ConditionalIndexConfig, 0), + NeverWatchPaths: make(map[string]struct{}), + IncludeRootItems: make(map[string]struct{}), + } + + for _, rule := range rules { + if rule.FileEndsWith != "" { + resolved.FileEndsWith = append(resolved.FileEndsWith, rule) + } + if rule.FolderEndsWith != "" { + resolved.FolderEndsWith = append(resolved.FolderEndsWith, rule) + } + if rule.FileStartsWith != "" { + resolved.FileStartsWith = append(resolved.FileStartsWith, rule) + } + if rule.FolderStartsWith != "" { + resolved.FolderStartsWith = append(resolved.FolderStartsWith, rule) + } + if rule.FilePath != "" { + resolved.FilePaths[rule.FilePath] = rule + } + if rule.FolderPath != "" { + resolved.FolderPaths[rule.FolderPath] = rule + } + if rule.NeverWatchPath != "" { + resolved.NeverWatchPaths[rule.NeverWatchPath] = struct{}{} + } + if rule.IncludeRootItem != "" { + resolved.IncludeRootItems[rule.IncludeRootItem] = struct{}{} + } + } + config.Config.ResolvedConditionals = resolved +} + +func modifyExcludeInclude(config *Source) { + // Helper to normalize a full path value (FilePaths, FolderPaths) + // These always start with "/" and match against full index paths + normalizeFullPath := func(value string, checkExists bool) string { + if value == "" { + return "" + } + normalized := "/" + strings.Trim(value, "/") + // check if file/folder exists + if checkExists { + realPath, err := filepath.Abs(config.Path + normalized) + if err != nil { + logger.Warningf("could not get absolute path for %v: %v", normalized, err) + return normalized + } + if _, err := os.Stat(realPath); os.IsNotExist(err) { + logger.Warningf("configured exclude/include path %v does not exist", realPath) + } + } + return normalized + } + + // Helper to normalize a name-based value (FileNames, FolderNames, StartsWith, EndsWith) + // These match against baseName, so no leading slash + normalizeName := func(value string) string { + // Just trim slashes - names shouldn't have slashes + return strings.Trim(value, "/") + } + + // Normalize []ConditionalIndexConfig slices for full paths + for i, rule := range config.Config.Conditionals.ItemRules { + + // normalize full paths + config.Config.Conditionals.ItemRules[i].FilePath = normalizeFullPath(rule.FilePath, true) + config.Config.Conditionals.ItemRules[i].FolderPath = normalizeFullPath(rule.FolderPath, true) + config.Config.Conditionals.ItemRules[i].NeverWatchPath = normalizeFullPath(rule.NeverWatchPath, true) + config.Config.Conditionals.ItemRules[i].IncludeRootItem = normalizeFullPath(rule.IncludeRootItem, true) + + // normalize names + config.Config.Conditionals.ItemRules[i].FileNames = normalizeName(rule.FileNames) + config.Config.Conditionals.ItemRules[i].FolderNames = normalizeName(rule.FolderNames) } - normalize(config.Config.Exclude.FolderPaths, true) - normalize(config.Config.Exclude.FilePaths, true) - normalize(config.Config.Include.RootFolders, true) - normalize(config.Config.Include.RootFiles, true) - normalize(config.Config.NeverWatchPaths, true) } diff --git a/backend/common/settings/config_test.go b/backend/common/settings/config_test.go index ac5fc1b069..a9e16d37e3 100644 --- a/backend/common/settings/config_test.go +++ b/backend/common/settings/config_test.go @@ -2,6 +2,7 @@ package settings import ( "os" + "path/filepath" "reflect" "testing" @@ -42,8 +43,19 @@ func Test_setDefaults(t *testing.T) { } func TestConfigLoadChanged(t *testing.T) { + // Create isolated test directory + testDir := t.TempDir() + validContent, err := os.ReadFile("./validConfig.yaml") + if err != nil { + t.Fatalf("failed to read validConfig.yaml: %v", err) + } + configFile := filepath.Join(testDir, "config.yaml") + if err = os.WriteFile(configFile, validContent, 0644); err != nil { + t.Fatalf("failed to write test config: %v", err) + } + defaultConfig := setDefaults(true) - err := loadConfigWithDefaults("./validConfig.yaml", true) + err = loadConfigWithDefaults(configFile, true) if err != nil { t.Fatalf("error loading config file: %v", err) } @@ -54,11 +66,22 @@ func TestConfigLoadChanged(t *testing.T) { } func TestConfigLoadEnvVars(t *testing.T) { + // Create isolated test directory + testDir := t.TempDir() + validContent, err := os.ReadFile("./validConfig.yaml") + if err != nil { + t.Fatalf("failed to read validConfig.yaml: %v", err) + } + configFile := filepath.Join(testDir, "config.yaml") + if err = os.WriteFile(configFile, validContent, 0644); err != nil { + t.Fatalf("failed to write test config: %v", err) + } + defaultConfig := setDefaults(true) expectedKey := "MYKEY" // mock environment variables os.Setenv("FILEBROWSER_ONLYOFFICE_SECRET", expectedKey) - err := loadConfigWithDefaults("./validConfig.yaml", true) + err = loadConfigWithDefaults(configFile, true) if err != nil { t.Fatalf("error loading config file: %v", err) } @@ -72,8 +95,19 @@ func TestConfigLoadEnvVars(t *testing.T) { } func TestConfigLoadSpecificValues(t *testing.T) { + // Create isolated test directory + testDir := t.TempDir() + validContent, err := os.ReadFile("./validConfig.yaml") + if err != nil { + t.Fatalf("failed to read validConfig.yaml: %v", err) + } + configFile := filepath.Join(testDir, "config.yaml") + if err = os.WriteFile(configFile, validContent, 0644); err != nil { + t.Fatalf("failed to write test config: %v", err) + } + defaultConfig := setDefaults(true) - err := loadConfigWithDefaults("./validConfig.yaml", true) + err = loadConfigWithDefaults(configFile, true) if err != nil { t.Fatalf("error loading config file: %v", err) } @@ -93,9 +127,23 @@ func TestConfigLoadSpecificValues(t *testing.T) { } func TestInvalidConfig(t *testing.T) { - configFile := "./invalidConfig.yaml" - err := loadConfigWithDefaults(configFile, true) + // Create isolated test directory + testDir := t.TempDir() + invalidContent, err := os.ReadFile("./invalidConfig.yaml") + if err != nil { + t.Fatalf("failed to read invalidConfig.yaml: %v", err) + } + configFile := filepath.Join(testDir, "config.yaml") + if err = os.WriteFile(configFile, invalidContent, 0644); err != nil { + t.Fatalf("failed to write test config: %v", err) + } + + err = loadConfigWithDefaults(configFile, true) + // Config loads successfully but validation should catch missing sources if err == nil { - t.Fatalf("expected error loading config file %s, got nil", configFile) + err = ValidateConfig(Config) + if err == nil { + t.Fatal("expected validation error for config with missing required sources, got nil") + } } } diff --git a/backend/common/settings/generator.go b/backend/common/settings/generator.go index fffc651003..aff34b334b 100644 --- a/backend/common/settings/generator.go +++ b/backend/common/settings/generator.go @@ -705,6 +705,13 @@ func GenerateYaml() { Config.Server.Sources = []*Source{ { Path: ".", + Config: SourceConfig{ + Conditionals: ConditionalFilter{ + ItemRules: []ConditionalIndexConfig{ + {}, // Add empty sample rule to show all fields in generated YAML + }, + }, + }, }, } @@ -719,6 +726,7 @@ func GenerateYaml() { setupSources(true) setupUrls() + setupVideoPreview() setupFrontend(true) // Restore original paths so the YAML output has the correct paths, not the placeholder diff --git a/backend/common/settings/multiconfig_test.go b/backend/common/settings/multiconfig_test.go index 8caf0e29ee..5cd66889ab 100644 --- a/backend/common/settings/multiconfig_test.go +++ b/backend/common/settings/multiconfig_test.go @@ -29,7 +29,8 @@ simple_auth: &simple_auth enabled: true minLength: 8 ` - anchorsPath := filepath.Join(testDir, "anchors.yaml") + // Use pattern-based naming: main config is "config.yaml", so anchors must be "*-config.yaml" + anchorsPath := filepath.Join(testDir, "definitions-config.yaml") if err := os.WriteFile(anchorsPath, []byte(anchorsConfig), 0644); err != nil { t.Fatalf("Failed to write anchors config: %v", err) } @@ -61,7 +62,8 @@ userDefaults: } // Test loading the multi-config setup - err := loadConfigWithDefaults(mainPath, false) + // Use generate=true to skip filesystem validation of fake paths + err := loadConfigWithDefaults(mainPath, true) if err != nil { t.Fatalf("Failed to load multi-config: %v", err) } @@ -128,7 +130,8 @@ frontend: } // Test that fallback works for simple configs - err := loadConfigWithDefaults(configPath, false) + // Use generate=true to skip filesystem validation + err := loadConfigWithDefaults(configPath, true) if err != nil { t.Fatalf("Failed to load simple config: %v", err) } @@ -163,7 +166,8 @@ base_permissions: &base_permissions admin: false api: false ` - anchorsPath := filepath.Join(testDir, "anchors.yaml") + // Use pattern-based naming: main config is "config.yaml", so anchors must be "*-config.yaml" + anchorsPath := filepath.Join(testDir, "definitions-config.yaml") if err := os.WriteFile(anchorsPath, []byte(anchorsConfig), 0644); err != nil { t.Fatalf("Failed to write anchors config: %v", err) } @@ -194,7 +198,8 @@ frontend: } // Test loading the nested reference setup - err := loadConfigWithDefaults(mainPath, false) + // Use generate=true to skip filesystem validation + err := loadConfigWithDefaults(mainPath, true) if err != nil { t.Fatalf("Failed to load nested config: %v", err) } diff --git a/backend/common/settings/structs.go b/backend/common/settings/structs.go index 68f32c1114..474eb29321 100644 --- a/backend/common/settings/structs.go +++ b/backend/common/settings/structs.go @@ -160,37 +160,59 @@ type Source struct { } type SourceConfig struct { - DenyByDefault bool `json:"denyByDefault,omitempty"` // deny access unless an "allow" access rule was specifically created. - Private bool `json:"private"` // designate as source as private -- currently just means no sharing permitted. - Disabled bool `json:"disabled,omitempty"` // disable the source, this is useful so you don't need to remove it from the config file - IndexingInterval uint32 `json:"indexingIntervalMinutes,omitempty"` // optional manual overide interval in minutes to re-index the source - DisableIndexing bool `json:"disableIndexing,omitempty"` // disable the indexing of this source - MaxWatchers int `json:"maxWatchers"` // number of concurrent watchers to use for this source, currently not supported - NeverWatchPaths []string `json:"neverWatchPaths"` // paths that get initially once. Useful for folders that rarely change contents (without source path prefix) - Exclude ExcludeIndexFilter `json:"exclude"` // exclude files and folders from indexing, if include is not set - Include IncludeIndexFilter `json:"include"` // include files and folders from indexing, if exclude is not set - DefaultUserScope string `json:"defaultUserScope"` // default "/" should match folders under path - DefaultEnabled bool `json:"defaultEnabled"` // should be added as a default source for new users? - CreateUserDir bool `json:"createUserDir"` // create a user directory for each user - IndexAlbumArt bool `json:"indexAlbumArt"` // deprecated: always enabled since 0.8.6 + DenyByDefault bool `json:"denyByDefault,omitempty"` // deny access unless an "allow" access rule was specifically created. + Private bool `json:"private"` // designate as source as private -- currently just means no sharing permitted. + Disabled bool `json:"disabled,omitempty"` // disable the source, this is useful so you don't need to remove it from the config file + IndexingInterval uint32 `json:"indexingIntervalMinutes,omitempty"` // optional manual overide interval in minutes to re-index the source + DisableIndexing bool `json:"disableIndexing,omitempty"` // disable the indexing of this source + Conditionals ConditionalFilter `json:"conditionals"` // conditional rules to apply when indexing to include/exclude certain items + DefaultUserScope string `json:"defaultUserScope"` // default "/" should match folders under path + DefaultEnabled bool `json:"defaultEnabled"` // should be added as a default source for new users? + CreateUserDir bool `json:"createUserDir"` // create a user directory for each user + // hidden but used internally - optimized map lookups for conditional rules + ResolvedConditionals *ResolvedConditionalsConfig `json:"-"` } -type IncludeIndexFilter struct { - RootFolders []string `json:"rootFolders"` // list of root folders to include, relative to the source path (eg. "folder1") - RootFiles []string `json:"rootFiles"` // list of root files to include, relative to the source path (eg. "file1.txt") +type ConditionalFilter struct { + Hidden bool `json:"hidden"` // exclude hidden files and folders. + ZeroSizeFolders bool `json:"ignoreZeroSizeFolders"` // ignore folders with 0 size + ItemRules []ConditionalIndexConfig `json:"rules"` // list of item rules to apply to specific paths } -type ExcludeIndexFilter struct { - Hidden bool `json:"hidden"` // exclude hidden files and folders. - ZeroSizeFolders bool `json:"ignoreZeroSizeFolders"` // ignore folders with 0 size - FilePaths []string `json:"filePaths"` // list of filepaths Eg. "folder1" or "file1.txt" or "folder1/file1.txt" (without source path prefix) - FolderPaths []string `json:"folderPaths"` // (filepath) list of folder names to include/exclude. Eg. "folder1" or "folder1/subfolder" (do not include source path, just the subpaths from the source path) - FileNames []string `json:"fileNames"` // (global) list of file names to include/exclude. Eg. "a.jpg" - FolderNames []string `json:"folderNames"` // (global) list of folder names to include/exclude. Eg. "@eadir" or ".thumbnails" - FileEndsWith []string `json:"fileEndsWith"` // (global) exclude files that end with these suffixes. Eg. ".jpg" or ".txt" - FolderEndsWith []string `json:"folderEndsWith"` // (global) exclude folders that end with these suffixes. Eg. ".thumbnails" or ".git" - FileStartsWith []string `json:"fileStartsWith"` // (global) exclude files that start with these prefixes. Eg. "archive-" or "backup-" - FolderStartsWith []string `json:"folderStartsWith"` // (global) exclude folders that start with these prefixes. Eg. "archive-" or "backup-" +type ConditionalIndexConfig struct { + NeverWatchPath string `json:"neverWatchPath"` // index the folder in the first pass to get included in search, but never re-indexed. + IncludeRootItem string `json:"includeRootItem"` // include only these items at root folder level + FileStartsWith string `json:"fileStartsWith"` // (global) exclude files that start with these prefixes. Eg. "archive-" or "backup-" + FolderStartsWith string `json:"folderStartsWith"` // (global) exclude folders that start with these prefixes. Eg. "archive-" or "backup-" + FileEndsWith string `json:"fileEndsWith"` // (global) exclude files that end with these suffixes. Eg. ".jpg" or ".txt" + FolderEndsWith string `json:"folderEndsWith"` // (global) exclude folders that end with these suffixes. Eg. ".thumbnails" or ".git" + FolderPath string `json:"folderPath"` // (global) exclude folders that match this path. Eg. "/path/to/folder" or "/path/to/folder/subfolder" + FilePath string `json:"filePath"` // (global) exclude files that match this path. Eg. "/path/to/file.txt" or "/path/to/file.txt/subfile.txt" + FileNames string `json:"fileNames"` // (global) exclude files that match these names. Eg. "file.txt" or "test.csv" + FolderNames string `json:"folderNames"` // (global) exclude folders that match these names. Eg. "folder" or "subfolder" + Viewable bool `json:"viewable"` // Enable viewing in UI but exclude from indexing +} + +// ConditionalMaps provides O(1) lookup performance for conditional rules +// Maps are built from ConditionalFilter during initialization +type ResolvedConditionalsConfig struct { + // Exact match maps - O(1) lookup (only for names, not StartsWith/EndsWith) + FileNames map[string]ConditionalIndexConfig // key: file name + FolderNames map[string]ConditionalIndexConfig // key: folder name + + // exact match for paths + FilePaths map[string]ConditionalIndexConfig // key: file path + FolderPaths map[string]ConditionalIndexConfig // key: folder path + + FileEndsWith []ConditionalIndexConfig // list of item rules that have been resolved for specific paths + FolderEndsWith []ConditionalIndexConfig // list of item rules that have been resolved for specific paths + FileStartsWith []ConditionalIndexConfig // list of item rules that have been resolved for specific paths + FolderStartsWith []ConditionalIndexConfig // list of item rules that have been resolved for specific paths + + // NeverWatch paths map - O(1) lookup for all paths with neverWatch: true + // This replaces the old NeverWatchPaths slice + NeverWatchPaths map[string]struct{} // key: full folder path + IncludeRootItems map[string]struct{} // key: inclusive root item } type Frontend struct { diff --git a/backend/common/settings/yaml.go b/backend/common/settings/yaml.go new file mode 100644 index 0000000000..9c070126f0 --- /dev/null +++ b/backend/common/settings/yaml.go @@ -0,0 +1,111 @@ +package settings + +import ( + "fmt" + "os" + "path/filepath" + "sort" + "strings" +) + +// combineYAMLFiles combines multiple YAML files from a directory into a single YAML document +// This allows YAML anchors defined in one file to be referenced in another +// +// Pattern matching: If main config is "config.yaml", only files matching "*-config.yaml" are merged +// Examples: +// - config.yaml + server-config.yaml + auth-config.yaml +// - test.yaml + database-test.yaml + frontend-test.yaml +// - myapp.yml + server-myapp.yml +func combineYAMLFiles(configFilePath string) ([]byte, error) { + // Get absolute path and expand tilde + expandedPath := configFilePath + if strings.HasPrefix(configFilePath, "~/") { + homeDir, err := os.UserHomeDir() + if err != nil { + return nil, fmt.Errorf("failed to expand home directory: %v", err) + } + expandedPath = filepath.Join(homeDir, configFilePath[2:]) + } + + absPath, err := filepath.Abs(expandedPath) + if err != nil { + return nil, fmt.Errorf("failed to resolve config file path: %v", err) + } + + configDir := filepath.Dir(absPath) + configFileName := filepath.Base(absPath) + + // Extract base name pattern for matching related config files + // e.g., "config.yaml" -> match "*-config.yaml" + // "test.yml" -> match "*-test.yml" + ext := filepath.Ext(configFileName) + baseName := strings.TrimSuffix(configFileName, ext) + pattern := "-" + baseName + ext + + // Find all YAML files in the directory that match the pattern + entries, err := os.ReadDir(configDir) + if err != nil { + return nil, fmt.Errorf("failed to read config directory: %v", err) + } + + var yamlFiles []string + var mainConfigContent []byte + + for _, entry := range entries { + if entry.IsDir() { + continue + } + + name := entry.Name() + + // Skip hidden files (dotfiles like .goreleaser.yaml) + if strings.HasPrefix(name, ".") { + continue + } + + fileExt := strings.ToLower(filepath.Ext(name)) + + // Only process .yaml and .yml files + if fileExt != ".yaml" && fileExt != ".yml" { + continue + } + + fullPath := filepath.Join(configDir, name) + + // Keep track of the main config file to process it last + if name == configFileName { + content, err := os.ReadFile(fullPath) + if err != nil { + return nil, fmt.Errorf("failed to read main config file: %v", err) + } + mainConfigContent = content + } else if strings.HasSuffix(name, pattern) { + // Only include files that match the pattern (e.g., *-config.yaml) + yamlFiles = append(yamlFiles, fullPath) + } + } + + // Sort the auxiliary files for consistent ordering + sort.Strings(yamlFiles) + + // Combine all YAML files as raw text into a single document + // We do NOT use `---` separators because anchors don't work across document boundaries + var combined strings.Builder + + // First, add all auxiliary YAML files (these typically contain anchor definitions) + for _, file := range yamlFiles { + content, err := os.ReadFile(file) + if err != nil { + return nil, fmt.Errorf("failed to read YAML file %s: %v", file, err) + } + combined.Write(content) + combined.WriteString("\n") // Add newline between files + } + + // Finally, add the main config file (this typically contains the references) + if mainConfigContent != nil { + combined.Write(mainConfigContent) + } + + return []byte(combined.String()), nil +} diff --git a/backend/common/utils/file.go b/backend/common/utils/file.go index b00711c62f..45453ab35e 100644 --- a/backend/common/utils/file.go +++ b/backend/common/utils/file.go @@ -48,7 +48,6 @@ type FileOptions struct { Path string // realpath Source string IsDir bool - Modify bool Expand bool ReadHeader bool Content bool diff --git a/backend/database/access/helper.go b/backend/database/access/helper.go index 232190d857..7ed5667472 100644 --- a/backend/database/access/helper.go +++ b/backend/database/access/helper.go @@ -26,12 +26,16 @@ func (s *Storage) CheckChildItemAccess(response *iteminfo.ExtendedFileInfo, inde return errors.ErrAccessDenied } + // Save original folders and files before filtering + originalFolders := response.Folders + originalFiles := response.Files + // Filter and return only the items the user has access to response.Folders = make([]iteminfo.ItemInfo, 0) response.Files = make([]iteminfo.ItemInfo, 0) // Check each subfolder for access permissions - for _, folder := range response.Folders { + for _, folder := range originalFolders { indexPath := parentPath + folder.Name if s.Permitted(index.Path, indexPath, username) { response.Folders = append(response.Folders, folder) @@ -39,7 +43,7 @@ func (s *Storage) CheckChildItemAccess(response *iteminfo.ExtendedFileInfo, inde } // Check each subfile for access permissions - for _, file := range response.Files { + for _, file := range originalFiles { indexPath := parentPath + file.Name if s.Permitted(index.Path, indexPath, username) { response.Files = append(response.Files, file) diff --git a/backend/database/share/extended.go b/backend/database/share/extended.go index 45f04831ec..9d60b6c51c 100644 --- a/backend/database/share/extended.go +++ b/backend/database/share/extended.go @@ -1,8 +1,11 @@ package share import ( + "fmt" "os" "path/filepath" + + "github.com/gtsteffaniak/filebrowser/backend/common/settings" ) // IsSingleFileShare determines if this share is for a single file (not a directory). @@ -140,3 +143,11 @@ func (l *Link) HasReachedUserLimit(username string) bool { count := l.GetUserDownloadCount(username) return count >= l.DownloadsLimit } + +func (l *Link) GetSourceName() (string, error) { + sourceInfo, ok := settings.Config.Server.SourceMap[l.Source] + if !ok { + return "", fmt.Errorf("source not found") + } + return sourceInfo.Name, nil +} diff --git a/backend/database/share/share.go b/backend/database/share/share.go index 9fa3dc1ce7..d76927d8d3 100644 --- a/backend/database/share/share.go +++ b/backend/database/share/share.go @@ -3,9 +3,6 @@ package share import "sync" type CommonShare struct { - //AllowEdit bool `json:"allowEdit,omitempty"` - AllowUpload bool `json:"allowUpload,omitempty"` - DisableFileViewer bool `json:"disableFileViewer,omitempty"` DownloadsLimit int `json:"downloadsLimit,omitempty"` ShareTheme string `json:"shareTheme,omitempty"` DisableAnonymous bool `json:"disableAnonymous,omitempty"` @@ -32,6 +29,12 @@ type CommonShare struct { ShareType string `json:"shareType"` // type of share: normal, upload, max PerUserDownloadLimit bool `json:"perUserDownloadLimit,omitempty"` ExtractEmbeddedSubtitles bool `json:"extractEmbeddedSubtitles,omitempty"` // can be io intensive for large files and take 10-30 seconds. + AllowDelete bool `json:"allowDelete,omitempty"` + AllowCreate bool `json:"allowCreate,omitempty"` // allow creating files + AllowModify bool `json:"allowModify,omitempty"` // allow modifying files + DisableFileViewer bool `json:"disableFileViewer,omitempty"` // don't allow viewing files + DisableDownload bool `json:"disableDownload,omitempty"` // don't allow downloading files + AllowReplacements bool `json:"allowReplacements,omitempty"` // allow replacements of files } type CreateBody struct { CommonShare @@ -44,15 +47,17 @@ type CreateBody struct { // Link is the information needed to build a shareable link. type Link struct { CommonShare - Mu sync.Mutex `json:"-"` - Downloads int `json:"downloads"` - UserDownloads map[string]int `json:"-"` // Track downloads per username (not persisted) - Hash string `json:"hash" storm:"id,index"` - UserID uint `json:"userID"` - Expire int64 `json:"expire"` - PasswordHash string `json:"password_hash,omitempty"` + Downloads int `json:"downloads"` + Hash string `json:"hash" storm:"id,index"` + UserID uint `json:"userID"` + Expire int64 `json:"expire"` + PasswordHash string `json:"password_hash,omitempty"` // Token is a random value that will only be set when PasswordHash is set. It is // URL-Safe and is used to download links in password-protected shares via a // query arg. Token string `json:"token,omitempty"` + + Mu sync.Mutex `json:"-"` + UserDownloads map[string]int `json:"-"` // Track downloads per username (not persisted) + } diff --git a/backend/database/users/users.go b/backend/database/users/users.go index 84265c95b0..d9efe5d1cf 100644 --- a/backend/database/users/users.go +++ b/backend/database/users/users.go @@ -27,11 +27,14 @@ type AuthToken struct { } type Permissions struct { - Api bool `json:"api"` - Admin bool `json:"admin"` - Modify bool `json:"modify"` - Share bool `json:"share"` - Realtime bool `json:"realtime"` + Api bool `json:"api"` // allow api access + Admin bool `json:"admin"` // allow admin access + Modify bool `json:"modify"` // allow modifying files + Share bool `json:"share"` // allow sharing files + Realtime bool `json:"realtime"` // allow realtime updates + Delete bool `json:"delete"` // allow deleting files + Create bool `json:"create"` // allow creating or uploading files + Download bool `json:"download"` // allow downloading files } // SortingSettings represents the sorting settings. @@ -69,7 +72,8 @@ type User struct { LoginMethod LoginMethod `json:"loginMethod"` OtpEnabled bool `json:"otpEnabled"` // true if TOTP is enabled, false otherwise // legacy for migration purposes... og filebrowser has perm attribute - Perm Permissions `json:"perm,omitzero"` + Perm Permissions `json:"perm,omitzero"` + Version int `json:"version"` } type SourceScope struct { diff --git a/backend/go.mod b/backend/go.mod index 18f66decd5..42eccdbade 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -4,28 +4,28 @@ go 1.25.0 require ( github.com/asdine/storm/v3 v3.2.1 - github.com/coreos/go-oidc/v3 v3.15.0 + github.com/coreos/go-oidc/v3 v3.16.0 github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8 github.com/dsoprea/go-exif/v3 v3.0.1 github.com/gen2brain/go-fitz v1.24.15 - github.com/go-playground/validator/v10 v10.27.0 + github.com/go-playground/validator/v10 v10.28.0 github.com/goccy/go-yaml v1.18.0 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/google/go-cmp v0.7.0 github.com/gtsteffaniak/go-cache v1.0.0 - github.com/gtsteffaniak/go-logger v0.2.3-0.20250926212932-e91a612f674c - github.com/kovidgoyal/imaging v1.6.4 + github.com/gtsteffaniak/go-logger v0.2.3 + github.com/kovidgoyal/imaging v1.7.0 github.com/pquerna/otp v1.5.0 github.com/spf13/afero v1.15.0 github.com/stretchr/testify v1.11.1 github.com/swaggo/http-swagger v1.3.4 github.com/swaggo/swag v1.16.6 - golang.org/x/crypto v0.42.0 - golang.org/x/image v0.31.0 - golang.org/x/mod v0.28.0 - golang.org/x/oauth2 v0.31.0 - golang.org/x/sys v0.36.0 - golang.org/x/time v0.13.0 + golang.org/x/crypto v0.43.0 + golang.org/x/image v0.32.0 + golang.org/x/mod v0.29.0 + golang.org/x/oauth2 v0.32.0 + golang.org/x/sys v0.37.0 + golang.org/x/time v0.14.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -103,19 +103,14 @@ require ( github.com/ghostiam/protogetter v0.3.16 // indirect github.com/go-critic/go-critic v0.13.0 // indirect github.com/go-errors/errors v1.5.1 // indirect - github.com/go-jose/go-jose/v4 v4.1.2 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect github.com/go-openapi/jsonpointer v0.22.1 // indirect github.com/go-openapi/jsonreference v0.21.2 // indirect github.com/go-openapi/spec v0.22.0 // indirect - github.com/go-openapi/swag v0.25.1 // indirect - github.com/go-openapi/swag/cmdutils v0.25.1 // indirect github.com/go-openapi/swag/conv v0.25.1 // indirect - github.com/go-openapi/swag/fileutils v0.25.1 // indirect github.com/go-openapi/swag/jsonname v0.25.1 // indirect github.com/go-openapi/swag/jsonutils v0.25.1 // indirect github.com/go-openapi/swag/loading v0.25.1 // indirect - github.com/go-openapi/swag/mangling v0.25.1 // indirect - github.com/go-openapi/swag/netutils v0.25.1 // indirect github.com/go-openapi/swag/stringutils v0.25.1 // indirect github.com/go-openapi/swag/typeutils v0.25.1 // indirect github.com/go-openapi/swag/yamlutils v0.25.1 // indirect @@ -134,7 +129,7 @@ require ( github.com/godoc-lint/godoc-lint v0.10.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gohugoio/hugo v0.149.1 // indirect - github.com/golang/geo v0.0.0-20250917161122-64cb148137c6 // indirect + github.com/golang/geo v0.0.0-20251008113719-ccf458c07da6 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golangci/asciicheck v0.5.0 // indirect github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect @@ -152,7 +147,6 @@ require ( github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.5.0 // indirect github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -162,7 +156,6 @@ require ( github.com/jgautheron/goconst v1.8.2 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jjti/go-spancheck v0.6.5 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/julz/importas v0.2.0 // indirect github.com/jupiterrider/ffi v0.5.1 // indirect github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect @@ -238,7 +231,6 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/swaggo/files v1.0.1 // indirect - github.com/tdakkota/asciicheck v0.4.1 // indirect github.com/tdewolff/parse/v2 v2.8.3 // indirect github.com/tetafro/godot v1.5.4 // indirect github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect @@ -266,10 +258,10 @@ require ( go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 // indirect - golang.org/x/net v0.44.0 // indirect + golang.org/x/net v0.46.0 // indirect golang.org/x/sync v0.17.0 // indirect - golang.org/x/text v0.29.0 // indirect - golang.org/x/tools v0.37.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/tools v0.38.0 // indirect google.golang.org/protobuf v1.36.8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/backend/go.sum b/backend/go.sum index 77325c872b..838d13d35f 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -51,16 +51,10 @@ github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCg github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= -github.com/Antonboom/errname v1.1.0 h1:A+ucvdpMwlo/myWrkHEUEBWc/xuXdud23S8tmTb/oAE= -github.com/Antonboom/errname v1.1.0/go.mod h1:O1NMrzgUcVBGIfi3xlVuvX8Q/VP/73sseCaAppfjqZw= github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= -github.com/Antonboom/nilnil v1.1.0 h1:jGxJxjgYS3VUUtOTNk8Z1icwT5ESpLH/426fjmQG+ng= -github.com/Antonboom/nilnil v1.1.0/go.mod h1:b7sAlogQjFa1wV8jUW3o4PMzDVFLbTux+xnQdvzdcIE= github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= -github.com/Antonboom/testifylint v1.6.1 h1:6ZSytkFWatT8mwZlmRCHkWz1gPi+q6UBSbieji2Gj/o= -github.com/Antonboom/testifylint v1.6.1/go.mod h1:k+nEkathI2NFjKO6HvwmSrbzUcQ6FAnbZV+ZRrnXPLI= github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 h1:+tu3HOoMXB7RXEINRVIpxJCT+KdYiI7LAEAUrOw3dIU= @@ -71,8 +65,6 @@ github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= @@ -160,8 +152,6 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= -github.com/bombsimon/wsl/v5 v5.1.1 h1:cQg5KJf9FlctAH4cpL9vLKnziYknoCMCdqXl0wjl72Q= -github.com/bombsimon/wsl/v5 v5.1.1/go.mod h1:Gp8lD04z27wm3FANIUPZycXp+8huVsn0oxc+n4qfV9I= github.com/bombsimon/wsl/v5 v5.2.0 h1:PyCCwd3Q7abGs3e34IW4jLYlBS+FbsU6iK+Tb3NnDp4= github.com/bombsimon/wsl/v5 v5.2.0/go.mod h1:Gp8lD04z27wm3FANIUPZycXp+8huVsn0oxc+n4qfV9I= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -205,8 +195,8 @@ github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyM github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/coreos/go-oidc/v3 v3.15.0 h1:R6Oz8Z4bqWR7VFQ+sPSvZPQv4x8M+sJkDO5ojgwlyAg= -github.com/coreos/go-oidc/v3 v3.15.0/go.mod h1:HaZ3szPaZ0e4r6ebqvsLWlk2Tn+aejfmrfah6hnSYEU= +github.com/coreos/go-oidc/v3 v3.16.0 h1:qRQUCFstKpXwmEjDQTIbyY/5jF00+asXzSkmkoa/mow= +github.com/coreos/go-oidc/v3 v3.16.0/go.mod h1:wqPbKFrVnE90vty060SB40FCJ8fTHTxSwyXJqZH+sI8= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -248,8 +238,6 @@ github.com/dsoprea/go-utility/v2 v2.0.0-20221003142440-7a1927d49d9d/go.mod h1:LV github.com/dsoprea/go-utility/v2 v2.0.0-20221003160719-7bc88537c05e/go.mod h1:VZ7cB0pTjm1ADBWhJUOHESu4ZYy9JN+ZPqjfiW09EPU= github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349 h1:DilThiXje0z+3UQ5YjYiSRRzVdtamFpvBQXKwMglWqw= github.com/dsoprea/go-utility/v2 v2.0.0-20221003172846-a3e1774ef349/go.mod h1:4GC5sXji84i/p+irqghpPFZBF8tRN/Q7+700G0/DLe8= -github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= -github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/ebitengine/purego v0.9.0 h1:mh0zpKBIXDceC63hpvPuGLiJ8ZAa3DfrFTudmfi8A4k= github.com/ebitengine/purego v0.9.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -281,8 +269,6 @@ github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghostiam/protogetter v0.3.15 h1:1KF5sXel0HE48zh1/vn0Loiw25A9ApyseLzQuif1mLY= -github.com/ghostiam/protogetter v0.3.15/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= github.com/ghostiam/protogetter v0.3.16 h1:UkrisuJBYLnZW6FcYUNBDJOqY3X22RtoYMlCsiNlFFA= github.com/ghostiam/protogetter v0.3.16/go.mod h1:4SRRIv6PcjkIMpUkRUsP4TsUTqO/N3Fmvwivuc/sCHA= github.com/go-critic/go-critic v0.13.0 h1:kJzM7wzltQasSUXtYyTl6UaPVySO6GkaR1thFnJ6afY= @@ -296,8 +282,8 @@ github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -306,64 +292,27 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.22.0 h1:TmMhghgNef9YXxTu1tOopo+0BGEytxA+okbry0HjZsM= -github.com/go-openapi/jsonpointer v0.22.0/go.mod h1:xt3jV88UtExdIkkL7NloURjRQjbeUgcxFblMjq2iaiU= github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= -github.com/go-openapi/jsonreference v0.21.1 h1:bSKrcl8819zKiOgxkbVNRUBIr6Wwj9KYrDbMjRs0cDA= -github.com/go-openapi/jsonreference v0.21.1/go.mod h1:PWs8rO4xxTUqKGu+lEvvCxD5k2X7QYkKAepJyCmSTT8= github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= -github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= -github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/spec v0.22.0 h1:xT/EsX4frL3U09QviRIZXvkh80yibxQmtoEvyqug0Tw= github.com/go-openapi/spec v0.22.0/go.mod h1:K0FhKxkez8YNS94XzF8YKEMULbFrRw4m15i2YUht4L0= -github.com/go-openapi/swag v0.24.1 h1:DPdYTZKo6AQCRqzwr/kGkxJzHhpKxZ9i/oX0zag+MF8= -github.com/go-openapi/swag v0.24.1/go.mod h1:sm8I3lCPlspsBBwUm1t5oZeWZS0s7m/A+Psg0ooRU0A= -github.com/go-openapi/swag v0.25.1 h1:6uwVsx+/OuvFVPqfQmOOPsqTcm5/GkBhNwLqIR916n8= -github.com/go-openapi/swag v0.25.1/go.mod h1:bzONdGlT0fkStgGPd3bhZf1MnuPkf2YAys6h+jZipOo= -github.com/go-openapi/swag/cmdutils v0.24.0 h1:KlRCffHwXFI6E5MV9n8o8zBRElpY4uK4yWyAMWETo9I= -github.com/go-openapi/swag/cmdutils v0.24.0/go.mod h1:uxib2FAeQMByyHomTlsP8h1TtPd54Msu2ZDU/H5Vuf8= -github.com/go-openapi/swag/cmdutils v0.25.1 h1:nDke3nAFDArAa631aitksFGj2omusks88GF1VwdYqPY= -github.com/go-openapi/swag/cmdutils v0.25.1/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.24.0 h1:ejB9+7yogkWly6pnruRX45D1/6J+ZxRu92YFivx54ik= -github.com/go-openapi/swag/conv v0.24.0/go.mod h1:jbn140mZd7EW2g8a8Y5bwm8/Wy1slLySQQ0ND6DPc2c= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= -github.com/go-openapi/swag/fileutils v0.24.0 h1:U9pCpqp4RUytnD689Ek/N1d2N/a//XCeqoH508H5oak= -github.com/go-openapi/swag/fileutils v0.24.0/go.mod h1:3SCrCSBHyP1/N+3oErQ1gP+OX1GV2QYFSnrTbzwli90= -github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= -github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= -github.com/go-openapi/swag/jsonname v0.24.0 h1:2wKS9bgRV/xB8c62Qg16w4AUiIrqqiniJFtZGi3dg5k= -github.com/go-openapi/swag/jsonname v0.24.0/go.mod h1:GXqrPzGJe611P7LG4QB9JKPtUZ7flE4DOVechNaDd7Q= github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= -github.com/go-openapi/swag/jsonutils v0.24.0 h1:F1vE1q4pg1xtO3HTyJYRmEuJ4jmIp2iZ30bzW5XgZts= -github.com/go-openapi/swag/jsonutils v0.24.0/go.mod h1:vBowZtF5Z4DDApIoxcIVfR8v0l9oq5PpYRUuteVu6f0= github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= -github.com/go-openapi/swag/loading v0.24.0 h1:ln/fWTwJp2Zkj5DdaX4JPiddFC5CHQpvaBKycOlceYc= -github.com/go-openapi/swag/loading v0.24.0/go.mod h1:gShCN4woKZYIxPxbfbyHgjXAhO61m88tmjy0lp/LkJk= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= -github.com/go-openapi/swag/mangling v0.24.0 h1:PGOQpViCOUroIeak/Uj/sjGAq9LADS3mOyjznmHy2pk= -github.com/go-openapi/swag/mangling v0.24.0/go.mod h1:Jm5Go9LHkycsz0wfoaBDkdc4CkpuSnIEf62brzyCbhc= -github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= -github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= -github.com/go-openapi/swag/netutils v0.24.0 h1:Bz02HRjYv8046Ycg/w80q3g9QCWeIqTvlyOjQPDjD8w= -github.com/go-openapi/swag/netutils v0.24.0/go.mod h1:WRgiHcYTnx+IqfMCtu0hy9oOaPR0HnPbmArSRN1SkZM= -github.com/go-openapi/swag/netutils v0.25.1 h1:2wFLYahe40tDUHfKT1GRC4rfa5T1B4GWZ+msEFA4Fl4= -github.com/go-openapi/swag/netutils v0.25.1/go.mod h1:CAkkvqnUJX8NV96tNhEQvKz8SQo2KF0f7LleiJwIeRE= -github.com/go-openapi/swag/stringutils v0.24.0 h1:i4Z/Jawf9EvXOLUbT97O0HbPUja18VdBxeadyAqS1FM= -github.com/go-openapi/swag/stringutils v0.24.0/go.mod h1:5nUXB4xA0kw2df5PRipZDslPJgJut+NjL7D25zPZ/4w= github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= -github.com/go-openapi/swag/typeutils v0.24.0 h1:d3szEGzGDf4L2y1gYOSSLeK6h46F+zibnEas2Jm/wIw= -github.com/go-openapi/swag/typeutils v0.24.0/go.mod h1:q8C3Kmk/vh2VhpCLaoR2MVWOGP8y7Jc8l82qCTd1DYI= github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= -github.com/go-openapi/swag/yamlutils v0.24.0 h1:bhw4894A7Iw6ne+639hsBNRHg9iZg/ISrOVr+sJGp4c= -github.com/go-openapi/swag/yamlutils v0.24.0/go.mod h1:DpKv5aYuaGm/sULePoeiG8uwMpZSfReo1HR3Ik0yaG8= github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= @@ -372,8 +321,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= +github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -434,8 +383,8 @@ github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/geo v0.0.0-20250917161122-64cb148137c6 h1:8VSqEdhJCzXKe/SYulyQ7jgHNxP+BoCPmqzWF5STIyw= -github.com/golang/geo v0.0.0-20250917161122-64cb148137c6/go.mod h1:AN0OjM34c3PbjAsX+QNma1nYtJtRxl+s9MZNV7S+efw= +github.com/golang/geo v0.0.0-20251008113719-ccf458c07da6 h1:9GWB2BLkXw73MNn6FZZIea1ZHtrdBpffeSz0JFGnj8I= +github.com/golang/geo v0.0.0-20251008113719-ccf458c07da6/go.mod h1:AN0OjM34c3PbjAsX+QNma1nYtJtRxl+s9MZNV7S+efw= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -471,15 +420,10 @@ github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4n github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= -github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU= -github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= -github.com/golangci/golangci-lint v1.64.8 h1:y5TdeVidMtBGG32zgSC7ZXTFNHrsJkDnpO4ItB3Am+I= -github.com/golangci/golangci-lint/v2 v2.4.0 h1:qz6O6vr7kVzXJqyvHjHSz5fA3D+PM8v96QU5gxZCNWM= -github.com/golangci/golangci-lint/v2 v2.4.0/go.mod h1:Oq7vuAf6L1iNL34uHDcsIF6Mnc0amOPdsT3/GlpHD+I= github.com/golangci/golangci-lint/v2 v2.5.0 h1:BDRg4ASm4J1y/DSRY6zwJ5tr5Yy8ZqbZ79XrCeFxaQo= github.com/golangci/golangci-lint/v2 v2.5.0/go.mod h1:IJtWJBZkLbx7AVrIUzLd8Oi3ADtwaNpWbR3wthVWHcc= github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 h1:AkK+w9FZBXlU/xUmBtSJN1+tAI4FIvy5WtnUnY8e4p8= @@ -526,37 +470,24 @@ github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxV github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= -github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8= github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk= github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= -github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= github.com/gtsteffaniak/go-cache v1.0.0 h1:CuZw6eI/be6Oi3oR94Jb5LhcZShMCs6+1wvS7WGN8oQ= github.com/gtsteffaniak/go-cache v1.0.0/go.mod h1:rHUZvf4huhMX/bnNK4/oQ3sNAE2fYC2jFpAWZiBPWac= -github.com/gtsteffaniak/go-logger v0.2.1 h1:NTim7RgpZ0+JAuep+2n1a7oHJbnyaksnWJStdM7qMeU= -github.com/gtsteffaniak/go-logger v0.2.1/go.mod h1:U3ZkdAclcxXNMvoQLq+zDkqcTmdqhX3hTf+6AuTo6v0= -github.com/gtsteffaniak/go-logger v0.2.2 h1:5bEX4ndHK0CsHZjw76T+j0phKoaEGiDwC8erseF99yU= -github.com/gtsteffaniak/go-logger v0.2.2/go.mod h1:U3ZkdAclcxXNMvoQLq+zDkqcTmdqhX3hTf+6AuTo6v0= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926211917-4f1ceadcc169 h1:kW5TWd6IsIB3ypImyoPGWj+jzXaG3muQ1lXdJpj7KCc= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926211917-4f1ceadcc169/go.mod h1:rapapTju4D7bwt6h4JOdZNUXDjnp0WkTBd6TN5yWglI= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926212455-9b14f7183bd2 h1:gCyi3Whqu0rp8+HG/VEjjBi1vZvp+yBl4c8pHABeV0s= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926212455-9b14f7183bd2/go.mod h1:rapapTju4D7bwt6h4JOdZNUXDjnp0WkTBd6TN5yWglI= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926212932-e91a612f674c h1:JGf2H8yweS5xYO5kGF0/IDs4WalX3TMhLq4D2gDSQ/g= -github.com/gtsteffaniak/go-logger v0.2.3-0.20250926212932-e91a612f674c/go.mod h1:rapapTju4D7bwt6h4JOdZNUXDjnp0WkTBd6TN5yWglI= +github.com/gtsteffaniak/go-logger v0.2.3 h1:8nSC5xSMnMYQI61tsBS1tARpnkv/rOh5lzEXtAG72Nw= +github.com/gtsteffaniak/go-logger v0.2.3/go.mod h1:rapapTju4D7bwt6h4JOdZNUXDjnp0WkTBd6TN5yWglI= github.com/hairyhenderson/go-codeowners v0.7.0 h1:s0W4wF8bdsBEjTWzwzSlsatSthWtTAF2xLgo4a4RwAo= github.com/hairyhenderson/go-codeowners v0.7.0/go.mod h1:wUlNgQ3QjqC4z8DnM5nnCYVq/icpqXJyJOukKx5U8/Q= github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= @@ -611,8 +542,8 @@ github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/tt github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kovidgoyal/imaging v1.6.4 h1:K0idhRPXnRrJBKnBYcTfI1HTWSNDeAn7hYDvf9I0dCk= -github.com/kovidgoyal/imaging v1.6.4/go.mod h1:bEIgsaZmXlvFfkv/CUxr9rJook6AQkJnpB5EPosRfRY= +github.com/kovidgoyal/imaging v1.7.0 h1:SFWQPJdEuaRY7WhL+MJyoN5IvslgqU+z0iPaoGl3yuM= +github.com/kovidgoyal/imaging v1.7.0/go.mod h1:mBprO214rATK/6OaPAUXmHbSMelPSFEmoBAt/IJdmno= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -621,8 +552,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= -github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= github.com/kunwardeep/paralleltest v1.0.14 h1:wAkMoMeGX/kGfhQBPODT/BL8XhK23ol/nuQ3SwFaUw8= @@ -635,12 +564,8 @@ github.com/ldez/exptostd v0.4.4 h1:58AtQjnLcT/tI5W/1KU7xE/O7zW9RAWB6c/ScQAnfus= github.com/ldez/exptostd v0.4.4/go.mod h1:QfdzPw6oHjFVdNV7ILoPu5sw3OZ3OG1JS0I5JN3J4Js= github.com/ldez/gomoddirectives v0.7.0 h1:EOx8Dd56BZYSez11LVgdj025lKwlP0/E5OLSl9HDwsY= github.com/ldez/gomoddirectives v0.7.0/go.mod h1:wR4v8MN9J8kcwvrkzrx6sC9xe9Cp68gWYCsda5xvyGc= -github.com/ldez/grignotin v0.10.0 h1:NQPeh1E/Eza4F0exCeC1WkpnLvgUcQDT8MQ1vOLML0E= -github.com/ldez/grignotin v0.10.0/go.mod h1:oR4iCKUP9fwoeO6vCQeD7M5SMxCT6xdVas4vg0h1LaI= github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= -github.com/ldez/tagliatelle v0.7.1 h1:bTgKjjc2sQcsgPiT902+aadvMjCeMHrY7ly2XKFORIk= -github.com/ldez/tagliatelle v0.7.1/go.mod h1:3zjxUpsNB2aEZScWiZTHrAXOl1x25t3cRmzfK1mlo2I= github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk= github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc= @@ -659,8 +584,6 @@ github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8 github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/makeworld-the-better-one/dither/v2 v2.4.0 h1:Az/dYXiTcwcRSe59Hzw4RI1rSnAZns+1msaCXetrMFE= github.com/makeworld-the-better-one/dither/v2 v2.4.0/go.mod h1:VBtN8DXO7SNtyGmLiGA7IsFeKrBkQPze1/iAeM95arc= -github.com/manuelarte/embeddedstructfieldcheck v0.3.0 h1:VhGqK8gANDvFYDxQkjPbv7/gDJtsGU9k6qj/hC2hgso= -github.com/manuelarte/embeddedstructfieldcheck v0.3.0/go.mod h1:LSo/IQpPfx1dXMcX4ibZCYA7Yy6ayZHIaOGM70+1Wy8= github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww= github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8= @@ -683,8 +606,6 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mgechev/revive v1.11.0 h1:b/gLLpBE427o+Xmd8G58gSA+KtBwxWinH/A565Awh0w= -github.com/mgechev/revive v1.11.0/go.mod h1:tI0oLF/2uj+InHCBLrrqfTKfjtFTBCFFfG05auyzgdw= github.com/mgechev/revive v1.12.0 h1:Q+/kkbbwerrVYPv9d9efaPGmAO/NsxwW/nE6ahpQaCU= github.com/mgechev/revive v1.12.0/go.mod h1:VXsY2LsTigk8XU9BpZauVLjVrhICMOV3k1lpB3CXrp8= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= @@ -716,8 +637,6 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.20.0 h1:OmWLkAFO2HUTYcU6mprnKud1Ey5pVdiVNYGO5HVicx8= -github.com/nunnatsa/ginkgolinter v0.20.0/go.mod h1:dCIuFlTPfQerXgGUju3VygfAFPdC5aE1mdacCDKDJcQ= github.com/nunnatsa/ginkgolinter v0.21.0 h1:IYwuX+ajy3G1MezlMLB1BENRtFj16+Evyi4uki1NOOQ= github.com/nunnatsa/ginkgolinter v0.21.0/go.mod h1:QlzY9UP9zaqu58FjYxhp9bnjuwXwG1bfW5rid9ChNMw= github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= @@ -732,9 +651,8 @@ github.com/olekukonko/tablewriter v1.0.9 h1:XGwRsYLC2bY7bNd93Dk51bcPZksWZmLYuaTH github.com/olekukonko/tablewriter v1.0.9/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo= github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8= -github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= -github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY= +github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -817,8 +735,6 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= -github.com/securego/gosec/v2 v2.22.7 h1:8/9P+oTYI4yIpAzccQKVsg1/90Po+JzGtAhqoHImDeM= -github.com/securego/gosec/v2 v2.22.7/go.mod h1:510TFNDMrIPytokyHQAVLvPeDr41Yihn2ak8P+XQfNE= github.com/securego/gosec/v2 v2.22.8 h1:3NMpmfXO8wAVFZPNsd3EscOTa32Jyo6FLLlW53bexMI= github.com/securego/gosec/v2 v2.22.8/go.mod h1:ZAw8K2ikuH9qDlfdV87JmNghnVfKB1XC7+TVzk6Utto= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -841,16 +757,11 @@ github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.9.2 h1:SsGfm7M8QOFtEzumm7UZrZdLLquNdzFYfIbEXntcFbE= github.com/spf13/cast v1.9.2/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= -github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -878,8 +789,6 @@ github.com/swaggo/http-swagger v1.3.4 h1:q7t/XLx0n15H1Q9/tk3Y9L4n210XzJF5WtnDX64 github.com/swaggo/http-swagger v1.3.4/go.mod h1:9dAh0unqMBAlbp1uE2Uc2mQTxNMU/ha4UbucIg1MFkQ= github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI= github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg= -github.com/tdakkota/asciicheck v0.4.1 h1:bm0tbcmi0jezRA2b5kg4ozmMuGAFotKI3RZfrhfovg8= -github.com/tdakkota/asciicheck v0.4.1/go.mod h1:0k7M3rCfRXb0Z6bwgvkEIMleKH3kXNz9UqJ9Xuqopr8= github.com/tdewolff/minify/v2 v2.24.2 h1:vnY3nTulEAbCAAlxTxPPDkzG24rsq31SOzp63yT+7mo= github.com/tdewolff/minify/v2 v2.24.2/go.mod h1:1JrCtoZXaDbqioQZfk3Jdmr0GPJKiU7c1Apmb+7tCeE= github.com/tdewolff/parse/v2 v2.8.3 h1:5VbvtJ83cfb289A1HzRA9sf02iT8YyUwN84ezjkdY1I= @@ -890,8 +799,6 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.5.1 h1:PZnjCol4+FqaEzvZg5+O8IY2P3hfY9JzRBNPv1pEDS4= -github.com/tetafro/godot v1.5.1/go.mod h1:cCdPtEndkmqqrhiCfkmxDodMQJ/f3L1BCNskCUZdTwk= github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= @@ -943,16 +850,12 @@ gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/musttag v0.13.1 h1:lw2sJyu7S1X8lc8zWUAdH42y+afdcCnHhWpnkWvd6vU= -go-simpler.org/musttag v0.13.1/go.mod h1:8r450ehpMLQgvpb6sg+hV5Ur47eH6olp/3yEanfG97k= go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ= go.augendre.info/arangolint v0.2.0 h1:2NP/XudpPmfBhQKX4rMk+zDYIj//qbt4hfZmSSTcpj8= go.augendre.info/arangolint v0.2.0/go.mod h1:Vx4KSJwu48tkE+8uxuf0cbBnAPgnt8O1KWiT7bljq7w= -go.augendre.info/fatcontext v0.8.0 h1:2dfk6CQbDGeu1YocF59Za5Pia7ULeAM6friJ3LP7lmk= -go.augendre.info/fatcontext v0.8.0/go.mod h1:oVJfMgwngMsHO+KB2MdgzcO+RvtNdiCEOlWvSFtax/s= go.augendre.info/fatcontext v0.8.1 h1:/T4+cCjpL9g71gJpcFAgVo/K5VFpqlN+NPU7QXxD5+A= go.augendre.info/fatcontext v0.8.1/go.mod h1:r3Qz4ZOzex66wfyyj5VZ1xUcl81vzvHQ6/GWzzlMEwA= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -982,8 +885,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= -golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= +golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -998,14 +901,12 @@ golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b h1:DXr+pvt3nC887026GRP39Ej11 golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b/go.mod h1:4QTo5u+SEIbbKW1RacMZq1YEfOBqeXa19JeshGi+zc4= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b h1:KdrhdYPDUvJTvrDK9gdjfFd6JTk8vA1WJoldYSi0kHo= -golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b/go.mod h1:LKZHyeOpPuZcMgxeHjJp4p5yvxrCX1xDvH10zYHhjjQ= golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 h1:Yl4H5w2RV7L/dvSHp2GerziT5K2CORgFINPaMFxWGWw= golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.31.0 h1:mLChjE2MV6g1S7oqbXC0/UcKijjm5fnJLUYKIYrLESA= -golang.org/x/image v0.31.0/go.mod h1:R9ec5Lcp96v9FTF+ajwaH3uGxPH4fKfHHAVbUILxghA= +golang.org/x/image v0.32.0 h1:6lZQWq75h7L5IWNk0r+SCpUJ6tUVd3v4ZHnbRKLkUDQ= +golang.org/x/image v0.32.0/go.mod h1:/R37rrQmKXtO6tYXAjtDLwQgFLHmhW+V6ayXlxzP2Pc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1031,8 +932,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= -golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1075,16 +976,16 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= -golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo= -golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1155,8 +1056,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -1173,13 +1074,13 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI= -golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1212,7 +1113,6 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1222,20 +1122,17 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= @@ -1353,8 +1250,6 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= -mvdan.cc/gofumpt v0.8.0 h1:nZUCeC2ViFaerTcYKstMmfysj6uhQrA2vJe+2vwGU6k= -mvdan.cc/gofumpt v0.8.0/go.mod h1:vEYnSzyGPmjvFkqJWtXkh79UwPWP9/HMxQdGEXZHjpg= mvdan.cc/gofumpt v0.9.1 h1:p5YT2NfFWsYyTieYgwcQ8aKV3xRvFH4uuN/zB2gBbMQ= mvdan.cc/gofumpt v0.9.1/go.mod h1:3xYtNemnKiXaTh6R4VtlqDATFwBbdXI8lJvH/4qk7mw= mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 h1:WjUu4yQoT5BHT1w8Zu56SP8367OuBV5jvo+4Ulppyf8= diff --git a/backend/http/api.go b/backend/http/api.go index d805f9f942..7aeda75476 100644 --- a/backend/http/api.go +++ b/backend/http/api.go @@ -49,6 +49,8 @@ func createApiKeyHandler(w http.ResponseWriter, r *http.Request, d *requestConte Api: strings.Contains(permissionsStr, "api") && d.user.Permissions.Api, Admin: strings.Contains(permissionsStr, "admin") && d.user.Permissions.Admin, Modify: strings.Contains(permissionsStr, "modify") && d.user.Permissions.Modify, + Delete: strings.Contains(permissionsStr, "delete") && d.user.Permissions.Delete, + Create: strings.Contains(permissionsStr, "create") && d.user.Permissions.Create, Share: strings.Contains(permissionsStr, "share") && d.user.Permissions.Share, Realtime: strings.Contains(permissionsStr, "realtime") && d.user.Permissions.Realtime, } diff --git a/backend/http/httpRouter.go b/backend/http/httpRouter.go index 63eeb5f87f..e85b22ec5b 100644 --- a/backend/http/httpRouter.go +++ b/backend/http/httpRouter.go @@ -140,6 +140,9 @@ func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete ch publicAPI.HandleFunc("GET /onlyoffice/callback", withHashFile(onlyofficeCallbackHandler)) publicAPI.HandleFunc("GET /onlyoffice/config", withHashFile(onlyofficeClientConfigGetHandler)) publicAPI.HandleFunc("POST /resources", withHashFile(publicUploadHandler)) + publicAPI.HandleFunc("PUT /resources", withHashFile(publicPutHandler)) + publicAPI.HandleFunc("DELETE /resources", withHashFile(publicDeleteHandler)) + publicAPI.HandleFunc("PATCH /resources", withHashFile(publicPatchHandler)) // Settings routes api.HandleFunc("GET /settings", withAdmin(settingsGetHandler)) diff --git a/backend/http/middleware.go b/backend/http/middleware.go index 973806bb20..5cf639982e 100644 --- a/backend/http/middleware.go +++ b/backend/http/middleware.go @@ -103,7 +103,6 @@ func withHashFileHelper(fn handleFunc) handleFunc { file, err := FileInfoFasterFunc(utils.FileOptions{ Path: utils.JoinPathAsUnix(link.Path, path), Source: link.Source, - Modify: false, Expand: true, Content: getContent, ExtractEmbeddedSubtitles: settings.Config.Integrations.Media.ExtractEmbeddedSubtitles && link.ExtractEmbeddedSubtitles, @@ -115,7 +114,7 @@ func withHashFileHelper(fn handleFunc) handleFunc { file.Token = link.Token file.Source = "" file.Hash = link.Hash - if !link.EnableOnlyOffice || !link.DisableFileViewer || reachedDownloadsLimit { + if !link.EnableOnlyOffice || link.DisableFileViewer || reachedDownloadsLimit { file.OnlyOfficeId = "" } if getContent && file.Content != "" { diff --git a/backend/http/onlyOffice.go b/backend/http/onlyOffice.go index 6df39b1731..f8517551f7 100644 --- a/backend/http/onlyOffice.go +++ b/backend/http/onlyOffice.go @@ -54,18 +54,19 @@ func onlyofficeClientConfigGetHandler(w http.ResponseWriter, r *http.Request, d // Extract clean parameters from request source := r.URL.Query().Get("source") - path := r.URL.Query().Get("path") + providedPath := r.URL.Query().Get("path") + hash := r.URL.Query().Get("hash") // Validate required parameters - if (path == "" || source == "") && d.fileInfo.Hash == "" { - logger.Errorf("OnlyOffice callback missing required parameters: source=%s, path=%s", source, path) + if (providedPath == "" || source == "") && hash == "" { + logger.Errorf("OnlyOffice callback missing required parameters: source=%s, path=%s", source, providedPath) return http.StatusBadRequest, errors.New("missing required parameters: path + source/hash are required") } themeMode := utils.Ternary(d.user.DarkMode, "dark", "light") var sourceInfo *settings.Source var ok bool - if d.fileInfo.Hash != "" { - sourceInfo, ok = settings.Config.Server.SourceMap[source] + if hash != "" { + sourceInfo, ok = settings.Config.Server.SourceMap[d.share.Source] if !ok { logger.Error("OnlyOffice: source not found") return http.StatusInternalServerError, fmt.Errorf("source not found") @@ -77,7 +78,9 @@ func onlyofficeClientConfigGetHandler(w http.ResponseWriter, r *http.Request, d return http.StatusInternalServerError, fmt.Errorf("source not found") } } - if d.fileInfo.Hash == "" { + source = sourceInfo.Name + path := providedPath + if hash == "" { // Build file info based on whether this is a share or regular request // Regular user request - need to resolve scope userScope, scopeErr := settings.GetScopeFromSourceName(d.user.Scopes, source) @@ -85,23 +88,22 @@ func onlyofficeClientConfigGetHandler(w http.ResponseWriter, r *http.Request, d logger.Errorf("OnlyOffice: source %s not available for user %s: %v", source, d.user.Username, scopeErr) return http.StatusForbidden, fmt.Errorf("source %s is not available", source) } - indexPath := utils.JoinPathAsUnix(userScope, path) - logger.Debugf("OnlyOffice user request: resolved path=%s", indexPath) + path = utils.JoinPathAsUnix(userScope, path) + logger.Debugf("OnlyOffice user request: resolved path=%s", path) fileInfo, err := files.FileInfoFaster(utils.FileOptions{ - Path: indexPath, - Modify: d.user.Permissions.Modify, - Source: source, - Expand: false, + Username: d.user.Username, + Path: path, + Source: source, + Expand: false, }, store.Access) if err != nil { - logger.Errorf("OnlyOffice: failed to get file info for source=%s, path=%s: %v", source, indexPath, err) + logger.Errorf("OnlyOffice: failed to get file info for source=%s, path=%s: %v", source, path, err) return errToStatus(err), err } d.fileInfo = *fileInfo } else { - source = sourceInfo.Name // path is index path, so we build from share path - path = utils.JoinPathAsUnix(d.share.Path, path) + path = utils.JoinPathAsUnix(d.share.Path, providedPath) if d.share.EnforceDarkLightMode == "dark" { themeMode = "dark" } @@ -116,19 +118,14 @@ func onlyofficeClientConfigGetHandler(w http.ResponseWriter, r *http.Request, d canEdit := iteminfo.CanEditOnlyOffice(d.user.Permissions.Modify, fileType) canEditMode := utils.Ternary(canEdit, "edit", "view") if d.fileInfo.Hash != "" { - if d.share.EnableOnlyOfficeEditing { - canEditMode = "edit" + // For shares, check both EnableOnlyOfficeEditing and AllowEdit permissions + if d.share.EnableOnlyOfficeEditing && d.share.AllowModify { + // Editing also requires authentication (not anonymous) + if d.user.Username != "anonymous" { + canEditMode = "edit" + } } } - // For shares, we need to keep track of the original relative path for the callback URL - var callbackPath string - if d.fileInfo.Hash != "" { - // For shares, use the original path parameter (relative to share) - callbackPath = r.URL.Query().Get("path") - } else { - // For regular requests, use the processed path - callbackPath = path - } // Generate document ID for OnlyOffice documentId, err := getOnlyOfficeId(d.fileInfo.RealPath) @@ -138,10 +135,10 @@ func onlyofficeClientConfigGetHandler(w http.ResponseWriter, r *http.Request, d } // Build download URL that OnlyOffice server will use - downloadURL := buildOnlyOfficeDownloadURL(source, callbackPath, d.fileInfo.Hash, d.token) + downloadURL := buildOnlyOfficeDownloadURL(source, providedPath, d.fileInfo.Hash, d.token) // Build callback URL for OnlyOffice to notify us of changes - callbackURL := buildOnlyOfficeCallbackURL(source, callbackPath, d.fileInfo.Hash, d.token) + callbackURL := buildOnlyOfficeCallbackURL(source, providedPath, d.fileInfo.Hash, d.token) // Build OnlyOffice client configuration clientConfig := map[string]interface{}{ @@ -261,9 +258,9 @@ func processOnlyOfficeCallback(w http.ResponseWriter, r *http.Request, d *reques var sourceInfo *settings.Source var ok bool if d.fileInfo.Hash != "" { - sourceInfo, ok = settings.Config.Server.SourceMap[source] + sourceInfo, ok = settings.Config.Server.SourceMap[d.share.Source] if !ok { - logger.Error("OnlyOffice: source not found") + logger.Error("OnlyOffice: share source not found") return http.StatusInternalServerError, fmt.Errorf("source not found") } } else { @@ -303,6 +300,19 @@ func processOnlyOfficeCallback(w http.ResponseWriter, r *http.Request, d *reques if data.Status == onlyOfficeStatusDocumentClosedWithChanges || data.Status == onlyOfficeStatusForceSaveWhileDocumentStillOpen { + // Check share permissions first if this is a share request + if d.fileInfo.Hash != "" { + if !d.share.AllowModify { + logger.Warningf("OnlyOffice callback: edit permission not allowed for this share") + return http.StatusForbidden, fmt.Errorf("edit permission not allowed for this share") + } + // Share edit operations also require authentication (not anonymous) + if d.user.Username == "anonymous" { + logger.Warningf("OnlyOffice callback: edit operations require authentication") + return http.StatusForbidden, fmt.Errorf("edit operations require authentication") + } + } + // Verify user has modify permissions if !d.user.Permissions.Modify { logger.Warningf("OnlyOffice callback: user %s lacks modify permissions for source=%s, path=%s", @@ -330,7 +340,6 @@ func processOnlyOfficeCallback(w http.ResponseWriter, r *http.Request, d *reques } resolvedPath = utils.JoinPathAsUnix(userScope, path) } - // Write the updated document fileOpts := utils.FileOptions{ Path: resolvedPath, @@ -341,7 +350,6 @@ func processOnlyOfficeCallback(w http.ResponseWriter, r *http.Request, d *reques logger.Errorf("OnlyOffice callback: failed to write updated document: %v", writeErr) return http.StatusInternalServerError, writeErr } - } // Return success response to OnlyOffice server diff --git a/backend/http/public.go b/backend/http/public.go index 3a60d9f854..8f02d5144c 100644 --- a/backend/http/public.go +++ b/backend/http/public.go @@ -8,8 +8,12 @@ import ( "path/filepath" "strings" + "github.com/gtsteffaniak/filebrowser/backend/adapters/fs/files" + "github.com/gtsteffaniak/filebrowser/backend/common/errors" "github.com/gtsteffaniak/filebrowser/backend/common/settings" "github.com/gtsteffaniak/filebrowser/backend/common/utils" + "github.com/gtsteffaniak/filebrowser/backend/indexing" + "github.com/gtsteffaniak/filebrowser/backend/preview" "github.com/gtsteffaniak/go-logger/logger" _ "github.com/gtsteffaniak/filebrowser/backend/swagger/docs" @@ -37,6 +41,11 @@ func publicRawHandler(w http.ResponseWriter, r *http.Request, d *requestContext) return http.StatusNotImplemented, fmt.Errorf("downloads are disabled for upload shares") } + // Check DisableDownload permission for normal shares + if d.share.DisableDownload { + return http.StatusForbidden, fmt.Errorf("downloads are not allowed for this share") + } + // Check global download limit (if not using per-user limits) if !d.share.PerUserDownloadLimit && d.share.DownloadsLimit > 0 && d.share.Downloads >= d.share.DownloadsLimit { return http.StatusForbidden, fmt.Errorf("share downloads limit reached") @@ -103,6 +112,9 @@ func publicRawHandler(w http.ResponseWriter, r *http.Request, d *requestContext) var status int status, err = rawFilesHandler(w, r, d, fileList) if err != nil { + if err == errors.ErrDownloadNotAllowed { + return http.StatusForbidden, errors.ErrDownloadNotAllowed + } logger.Errorf("public share handler: error processing filelist: '%v' with error %v", f, err) return status, fmt.Errorf("error processing filelist: %v", f) } @@ -150,8 +162,12 @@ func publicGetResourceHandler(w http.ResponseWriter, r *http.Request, d *request // @Failure 501 {object} map[string]string "Uploading disabled for non-upload shares" // @Router /public/api/resources [post] func publicUploadHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { - if d.share.ShareType != "upload" { - return http.StatusNotImplemented, fmt.Errorf("uploading is disabled for non-upload shares") + if d.share.ShareType != "upload" && !d.share.AllowCreate { + return http.StatusForbidden, fmt.Errorf("uploading is disabled for this share") + } + + if !d.share.AllowReplacements && r.URL.Query().Get("action") == "override" { + return http.StatusForbidden, fmt.Errorf("cannot overwrite files for this share") } fullPath := filepath.Join(d.share.Path, r.URL.Query().Get("targetPath")) @@ -165,7 +181,7 @@ func publicUploadHandler(w http.ResponseWriter, r *http.Request, d *requestConte status, err := resourcePostHandler(w, r, d) if err != nil { - logger.Errorf("public upload handler: error uploading: '%v' with error %v", d.fileInfo, err) + logger.Errorf("public upload handler: error uploading with error %v", err) return http.StatusInternalServerError, fmt.Errorf("upload failure occured on backend") } return status, err @@ -215,15 +231,19 @@ func publicPreviewHandler(w http.ResponseWriter, r *http.Request, d *requestCont // Restore source name from share for preview generation // The middleware clears file.Source for security, but we need it for index lookups - if d.fileInfo.Source == "" && d.share != nil { - sourceInfo, ok := settings.Config.Server.SourceMap[d.share.Source] - if !ok { - // Don't expose internal errors to share users - return http.StatusNotFound, fmt.Errorf("resource not available") - } - d.fileInfo.Source = sourceInfo.Name + source, err := d.share.GetSourceName() + if err != nil { + return http.StatusNotFound, fmt.Errorf("source not available") } - + fileInfo, err := FileInfoFasterFunc(utils.FileOptions{ + Path: utils.JoinPathAsUnix(d.share.Path, d.fileInfo.Path), + Source: source, + Metadata: true, + }, nil) + if err != nil { + return http.StatusNotFound, fmt.Errorf("resource not available") + } + d.fileInfo = *fileInfo status, err := previewHelperFunc(w, r, d) if err != nil { // Obfuscate errors for shares to prevent information leakage @@ -231,3 +251,162 @@ func publicPreviewHandler(w http.ResponseWriter, r *http.Request, d *requestCont } return status, err } + +// publicPutHandler handles the PUT request for a public share. +// @Summary Update a file in a public share +// @Description Updates the content of a file in a public share. +// @Tags Public Shares +// @Accept json +// @Produce json +// @Param hash query string true "Share hash for authentication" +// @Param path query string true "Path to the file to update" +// @Param content body string true "New content for the file" +// @Success 200 {object} map[string]string "File updated successfully" +// @Failure 400 {object} map[string]string "Invalid request or parameters" +// @Failure 403 {object} map[string]string "Share unavailable or update not allowed" +// @Failure 404 {object} map[string]string "Share not found or file not found" +// @Failure 500 {object} map[string]string "Internal server error" +// @Router /public/api/resources [put] +func publicPutHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { + // update path to be the source path + if !d.share.AllowModify { + return http.StatusForbidden, fmt.Errorf("create is not allowed for this share") + } + source, err := d.share.GetSourceName() + if err != nil { + return http.StatusNotFound, fmt.Errorf("source not available") + } + + if !d.share.AllowModify { + return http.StatusForbidden, fmt.Errorf("edit permission not allowed for this share") + } + path := r.URL.Query().Get("path") + + // Decode the URL-encoded path + path, err = url.QueryUnescape(path) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid path encoding: %v", err) + } + fileOpts := utils.FileOptions{ + Username: d.user.Username, + Path: utils.JoinPathAsUnix(d.share.Path, path), + Source: source, + Expand: false, + } + err = files.WriteFile(fileOpts, r.Body) + return errToStatus(err), err +} + +func publicDeleteHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { + if !d.share.AllowDelete { + return http.StatusForbidden, fmt.Errorf("delete is not allowed for this share") + } + + // TODO source := r.URL.Query().Get("source") + encodedPath := r.URL.Query().Get("path") + + // Decode the URL-encoded path + path, err := url.QueryUnescape(encodedPath) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid path encoding: %v", err) + } + indexPath := utils.JoinPathAsUnix(d.share.Path, path) + source, err := d.share.GetSourceName() + if err != nil { + return http.StatusNotFound, fmt.Errorf("source not available") + } + + fileInfo, err := files.FileInfoFaster(utils.FileOptions{ + Username: d.user.Username, + Path: indexPath, + Source: source, + Expand: false, + }, nil) + if err != nil { + return http.StatusNotFound, fmt.Errorf("resource not available") + } + + // delete thumbnails + preview.DelThumbs(r.Context(), *fileInfo) + + err = files.DeleteFiles(source, fileInfo.RealPath, filepath.Dir(fileInfo.RealPath)) + if err != nil { + return http.StatusInternalServerError, fmt.Errorf("an error occured while deleting the resource") + } + return http.StatusOK, nil +} + +func publicPatchHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { + if !d.share.AllowModify { + return http.StatusForbidden, fmt.Errorf("edit permission not allowed for this share") + } + // The middleware clears file.Source for security, but we need it for index lookups + source, err := d.share.GetSourceName() + if err != nil { + return http.StatusNotFound, fmt.Errorf("source not available") + } + action := r.URL.Query().Get("action") + encodedFrom := r.URL.Query().Get("from") + // Decode the URL-encoded path + src, err := url.QueryUnescape(encodedFrom) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid path encoding: %v", err) + } + dst := r.URL.Query().Get("destination") + dst, err = url.QueryUnescape(dst) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid path encoding: %v", err) + } + + idx := indexing.GetIndex(source) + if idx == nil { + return http.StatusNotFound, fmt.Errorf("source for share not found") + } + + // get full paths for both locations + srcFullPath := utils.JoinPathAsUnix(d.share.Path, src) + if srcFullPath == "/" { + return http.StatusForbidden, fmt.Errorf("an error occured accessing the share") + } + dstFullPath := utils.JoinPathAsUnix(d.share.Path, dst) + if dstFullPath == "/" { + return http.StatusForbidden, fmt.Errorf("an error occured accessing the share") + } + + // get real source and isDir + realSrc, isSrcDir, err := idx.GetRealPath(srcFullPath) + if err != nil { + return http.StatusNotFound, err + } + // get real destination and isDir parent + parentRealDest, _, err := idx.GetRealPath(filepath.Dir(dstFullPath)) + if err != nil { + return http.StatusNotFound, err + } + dstFullPath = parentRealDest + "/" + filepath.Base(dst) + rename := r.URL.Query().Get("rename") == "true" + if rename { + dstFullPath = addVersionSuffix(dstFullPath) + } + // Validate move/rename operation to prevent circular references + if action == "rename" || action == "move" { + err = validateMoveOperation(realSrc, dstFullPath, isSrcDir) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid move or rename operation") + } + } + err = patchAction(r.Context(), patchActionParams{ + action: action, + srcIndex: source, + dstIndex: source, + src: realSrc, + dst: dstFullPath, + d: d, + isSrcDir: isSrcDir, + }) + if err != nil { + logger.Debugf("Could not run patch action. src=%v dst=%v err=%v", realSrc, dstFullPath, err) + return http.StatusInternalServerError, fmt.Errorf("an error occured while processing the request") + } + return http.StatusOK, nil +} diff --git a/backend/http/raw.go b/backend/http/raw.go index 6fb64d3be5..4b812e031b 100644 --- a/backend/http/raw.go +++ b/backend/http/raw.go @@ -110,12 +110,20 @@ func addFile(path string, d *requestContext, tarWriter *tar.Writer, zipWriter *z if idx == nil { return fmt.Errorf("source %s is not available", source) } - _, err = files.FileInfoFaster(utils.FileOptions{ - Username: d.user.Username, - Path: path, - Source: source, - Expand: false, - }, store.Access) + if d.share != nil { + _, err = files.FileInfoFaster(utils.FileOptions{ + Path: path, + Source: source, + Expand: false, + }, nil) + } else { + _, err = files.FileInfoFaster(utils.FileOptions{ + Username: d.user.Username, + Path: path, + Source: source, + Expand: false, + }, store.Access) + } if err != nil { return err } @@ -232,6 +240,9 @@ func addSingleFile(realPath, archivePath string, zipWriter *zip.Writer, tarWrite } func rawFilesHandler(w http.ResponseWriter, r *http.Request, d *requestContext, fileList []string) (int, error) { + if !d.user.Permissions.Download && d.share == nil { + return http.StatusForbidden, fmt.Errorf("user is not allowed to download") + } splitFile := strings.Split(fileList[0], "::") if len(splitFile) != 2 { return http.StatusBadRequest, fmt.Errorf("invalid file in files request: %v", fileList[0]) diff --git a/backend/http/resource.go b/backend/http/resource.go index 2b90fdb0e5..40d7939531 100644 --- a/backend/http/resource.go +++ b/backend/http/resource.go @@ -87,13 +87,9 @@ func resourceGetHandler(w http.ResponseWriter, r *http.Request, d *requestContex userscope = strings.TrimRight(userscope, "/") scopePath := utils.JoinPathAsUnix(userscope, path) getContent := r.URL.Query().Get("content") == "true" - if d.share != nil && d.share.DisableFileViewer { - getContent = false - } fileInfo, err := files.FileInfoFaster(utils.FileOptions{ Username: d.user.Username, Path: scopePath, - Modify: d.user.Permissions.Modify, Source: source, Expand: true, Content: getContent, @@ -102,6 +98,9 @@ func resourceGetHandler(w http.ResponseWriter, r *http.Request, d *requestContex if err != nil { return errToStatus(err), err } + if !d.user.Permissions.Download && fileInfo.Content != "" { + return http.StatusForbidden, fmt.Errorf("user is not allowed to get content, requires download permission") + } if userscope != "/" { fileInfo.Path = strings.TrimPrefix(fileInfo.Path, userscope) } @@ -123,6 +122,7 @@ func resourceGetHandler(w http.ResponseWriter, r *http.Request, d *requestContex } else if err != nil { return http.StatusInternalServerError, err } + fileInfo.Checksums = make(map[string]string) fileInfo.Checksums[algo] = checksum } return renderJSON(w, r, fileInfo) @@ -143,6 +143,11 @@ func resourceGetHandler(w http.ResponseWriter, r *http.Request, d *requestContex // @Failure 500 {object} map[string]string "Internal server error" // @Router /api/resources [delete] func resourceDeleteHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { + + if !d.user.Permissions.Delete { + return http.StatusForbidden, fmt.Errorf("user is not allowed to delete") + } + // TODO source := r.URL.Query().Get("source") encodedPath := r.URL.Query().Get("path") source := r.URL.Query().Get("source") @@ -169,7 +174,6 @@ func resourceDeleteHandler(w http.ResponseWriter, r *http.Request, d *requestCon Username: d.user.Username, Path: utils.JoinPathAsUnix(userscope, path), Source: source, - Modify: d.user.Permissions.Modify, Expand: false, }, store.Access) if err != nil { @@ -217,17 +221,9 @@ func resourcePostHandler(w http.ResponseWriter, r *http.Request, d *requestConte logger.Debugf("invalid path encoding: %v", err) return http.StatusBadRequest, fmt.Errorf("invalid path encoding: %v", err) } - shareUpload := false - if d.share != nil { - if d.share.ShareType == "upload" { - shareUpload = true - } - } - if !d.user.Permissions.Modify && !shareUpload { - logger.Debugf("user is not allowed to create or modify") + if !d.user.Permissions.Create { return http.StatusForbidden, fmt.Errorf("user is not allowed to create or modify") } - // Determine if this is a directory or file based on trailing slash isDir := strings.HasSuffix(path, "/") // Strip trailing slash from userscope to prevent double slashes @@ -242,7 +238,6 @@ func resourcePostHandler(w http.ResponseWriter, r *http.Request, d *requestConte Username: d.user.Username, Path: utils.JoinPathAsUnix(userscope, path), Source: source, - Modify: d.user.Permissions.Modify, Expand: false, } idx := indexing.GetIndex(source) @@ -423,9 +418,7 @@ func resourcePutHandler(w http.ResponseWriter, r *http.Request, d *requestContex if err != nil { return http.StatusBadRequest, fmt.Errorf("invalid source encoding: %v", err) } - if !d.user.Permissions.Modify { - return http.StatusForbidden, fmt.Errorf("user is not allowed to create or modify") - } + encodedPath := r.URL.Query().Get("path") // Decode the URL-encoded path @@ -448,7 +441,6 @@ func resourcePutHandler(w http.ResponseWriter, r *http.Request, d *requestContex Username: d.user.Username, Path: utils.JoinPathAsUnix(userscope, path), Source: source, - Modify: d.user.Permissions.Modify, Expand: false, } @@ -536,7 +528,7 @@ func resourcePatchHandler(w http.ResponseWriter, r *http.Request, d *requestCont return http.StatusNotFound, fmt.Errorf("source %s not found", dstIndex) } // check target dir exists - parentDir, isDstDir, err := idx.GetRealPath(userscopeDst, filepath.Dir(dst)) + parentDir, _, err := idx.GetRealPath(userscopeDst, filepath.Dir(dst)) if err != nil { logger.Debugf("Could not get real path for parent dir: %v %v %v", userscopeDst, filepath.Dir(dst), err) return http.StatusNotFound, err @@ -564,15 +556,10 @@ func resourcePatchHandler(w http.ResponseWriter, r *http.Request, d *requestCont return http.StatusForbidden, fmt.Errorf("access denied to destination path %s", dst) } } - overwrite := r.URL.Query().Get("overwrite") == "true" rename := r.URL.Query().Get("rename") == "true" if rename { realDest = addVersionSuffix(realDest) } - // Permission for overwriting the file - if overwrite && !d.user.Permissions.Modify { - return http.StatusForbidden, fmt.Errorf("forbidden: user does not have permission to overwrite file") - } // Validate move/rename operation to prevent circular references if action == "rename" || action == "move" { @@ -589,7 +576,6 @@ func resourcePatchHandler(w http.ResponseWriter, r *http.Request, d *requestCont dst: realDest, d: d, isSrcDir: isSrcDir, - isDstDir: isDstDir, }) if err != nil { logger.Debugf("Could not run patch action. src=%v dst=%v err=%v", realSrc, realDest, err) @@ -621,13 +607,12 @@ type patchActionParams struct { dst string d *requestContext isSrcDir bool - isDstDir bool } func patchAction(ctx context.Context, params patchActionParams) error { switch params.action { case "copy": - err := files.CopyResource(params.isSrcDir, params.isDstDir, params.srcIndex, params.dstIndex, params.src, params.dst) + err := files.CopyResource(params.isSrcDir, params.srcIndex, params.dstIndex, params.src, params.dst) return err case "rename", "move": idx := indexing.GetIndex(params.srcIndex) @@ -640,7 +625,6 @@ func patchAction(ctx context.Context, params patchActionParams) error { Path: srcPath, Source: params.srcIndex, IsDir: params.isSrcDir, - Modify: params.d.user.Permissions.Modify, }, store.Access) if err != nil { @@ -649,7 +633,7 @@ func patchAction(ctx context.Context, params patchActionParams) error { // delete thumbnails preview.DelThumbs(ctx, *fileInfo) - return files.MoveResource(params.isSrcDir, params.isDstDir, params.srcIndex, params.dstIndex, params.src, params.dst, store.Share) + return files.MoveResource(params.isSrcDir, params.srcIndex, params.dstIndex, params.src, params.dst, store.Share) default: return fmt.Errorf("unsupported action %s: %w", params.action, errors.ErrInvalidRequestParams) } diff --git a/backend/http/share.go b/backend/http/share.go index dfd2c7459d..be40f5f42a 100644 --- a/backend/http/share.go +++ b/backend/http/share.go @@ -224,6 +224,9 @@ func sharePostHandler(w http.ResponseWriter, r *http.Request, d *requestContext) body.Path = s.Path body.Source = s.Source s.CommonShare = body.CommonShare + if s.ShareType == "upload" && !body.AllowCreate { + s.AllowCreate = true + } // Reset download counts if limit settings changed if shouldResetCounts { @@ -281,6 +284,9 @@ func sharePostHandler(w http.ResponseWriter, r *http.Request, d *requestContext) return http.StatusForbidden, fmt.Errorf("path not found: %s", body.Path) } } + if body.ShareType == "upload" && !body.AllowCreate { + body.AllowCreate = true + } body.Source = source.Path // backend source is path s = &share.Link{ Expire: expire, diff --git a/backend/http/static.go b/backend/http/static.go index 06f6e7f6cc..2579e985c6 100644 --- a/backend/http/static.go +++ b/backend/http/static.go @@ -106,6 +106,18 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont shareProps["shareType"] = utils.Ternary(d.share.ShareType == "", "normal", d.share.ShareType) shareProps["perUserDownloadLimit"] = d.share.PerUserDownloadLimit shareProps["extractEmbeddedSubtitles"] = d.share.ExtractEmbeddedSubtitles + shareProps["disableDownload"] = d.share.DisableDownload + shareProps["allowCreate"] = d.share.AllowCreate + shareProps["allowModify"] = d.share.AllowModify + shareProps["allowDelete"] = d.share.AllowDelete + shareProps["allowReplacements"] = d.share.AllowReplacements + shareProps["downloadsLimit"] = d.share.DownloadsLimit + shareProps["shareTheme"] = d.share.ShareTheme + shareProps["disableAnonymous"] = d.share.DisableAnonymous + shareProps["maxBandwidth"] = d.share.MaxBandwidth + shareProps["keepAfterExpiration"] = d.share.KeepAfterExpiration + shareProps["allowedUsernames"] = d.share.AllowedUsernames + shareProps["hideNavButtons"] = d.share.HideNavButtons // Additional computed properties from extended.go shareProps["hasPassword"] = d.share.HasPassword() diff --git a/backend/http/utils.go b/backend/http/utils.go index a24b3b8fdd..c7d1ffed35 100644 --- a/backend/http/utils.go +++ b/backend/http/utils.go @@ -14,6 +14,8 @@ func errToStatus(err error) int { return http.StatusOK case os.IsPermission(err): return http.StatusForbidden + case errors.Is(err, libErrors.ErrAccessDenied): + return http.StatusForbidden case os.IsNotExist(err), err == libErrors.ErrNotExist: return http.StatusNotFound case os.IsExist(err), err == libErrors.ErrExist: diff --git a/backend/indexing/conditionalRules_test.go b/backend/indexing/conditionalRules_test.go new file mode 100644 index 0000000000..34a670001a --- /dev/null +++ b/backend/indexing/conditionalRules_test.go @@ -0,0 +1,576 @@ +package indexing + +import ( + "testing" + + "github.com/gtsteffaniak/filebrowser/backend/common/settings" +) + +// setupConditionalTestIndex creates a test index with conditional rules configured +func setupConditionalTestIndex(conditionals settings.ConditionalFilter) *Index { + source := &settings.Source{ + Name: "test", + Path: "/test/path", + Config: settings.SourceConfig{ + DisableIndexing: false, + Conditionals: conditionals, + }, + } + + // Build the conditional maps (this is normally done during config loading) + source.Config.ResolvedConditionals = &settings.ResolvedConditionalsConfig{ + FileNames: make(map[string]settings.ConditionalIndexConfig), + FolderNames: make(map[string]settings.ConditionalIndexConfig), + FilePaths: make(map[string]settings.ConditionalIndexConfig), + FolderPaths: make(map[string]settings.ConditionalIndexConfig), + NeverWatchPaths: make(map[string]struct{}), + IncludeRootItems: make(map[string]struct{}), + } + + // Build maps from ItemRules - match the real setConditionals implementation + resolved := source.Config.ResolvedConditionals + for _, rule := range conditionals.ItemRules { + // Note: FileNames and FolderNames are NOT populated from rules in the real implementation + // They remain empty maps (unused in current implementation) + + // Handle exact path matches + if rule.FilePath != "" { + resolved.FilePaths[rule.FilePath] = rule + } + if rule.FolderPath != "" { + resolved.FolderPaths[rule.FolderPath] = rule + } + + // Handle StartsWith/EndsWith (stored in slices) + if rule.FileEndsWith != "" { + resolved.FileEndsWith = append(resolved.FileEndsWith, rule) + } + if rule.FolderEndsWith != "" { + resolved.FolderEndsWith = append(resolved.FolderEndsWith, rule) + } + if rule.FileStartsWith != "" { + resolved.FileStartsWith = append(resolved.FileStartsWith, rule) + } + if rule.FolderStartsWith != "" { + resolved.FolderStartsWith = append(resolved.FolderStartsWith, rule) + } + + // Handle NeverWatchPath + if rule.NeverWatchPath != "" { + resolved.NeverWatchPaths[rule.NeverWatchPath] = struct{}{} + } + + // Handle IncludeRootItem + if rule.IncludeRootItem != "" { + resolved.IncludeRootItems[rule.IncludeRootItem] = struct{}{} + } + } + + return &Index{ + Source: *source, + mock: true, + } +} + +func TestShouldSkip_FolderStartsWith(t *testing.T) { + tests := []struct { + name string + ruleValue string + fullPath string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip folder starting with 'graham'", + ruleValue: "graham", // After normalization (no leading slash) + fullPath: "/graham/", // Full index path + baseName: "graham", // Base name + shouldSkip: true, + description: "Folder 'graham' should be skipped", + }, + { + name: "Skip folder starting with 'temp'", + ruleValue: "temp", + fullPath: "/temp/", + baseName: "temp", + shouldSkip: true, + description: "Folder 'temp' should be skipped", + }, + { + name: "Skip folder starting with 'tmp-'", + ruleValue: "tmp-", + fullPath: "/tmp-backup/", + baseName: "tmp-backup", + shouldSkip: true, + description: "Folder 'tmp-backup' starts with 'tmp-' and should be skipped", + }, + { + name: "Don't skip folder not starting with rule", + ruleValue: "graham", + fullPath: "/other/", + baseName: "other", + shouldSkip: false, + description: "Folder 'other' doesn't start with 'graham'", + }, + { + name: "Don't skip folder that contains but doesn't start", + ruleValue: "graham", + fullPath: "/mygraham/", + baseName: "mygraham", + shouldSkip: false, + description: "Folder 'mygraham' contains but doesn't start with 'graham'", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FolderStartsWith: tt.ruleValue}, + }, + }) + + result := idx.shouldSkip(true, false, tt.fullPath, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (fullPath=%s, baseName=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.fullPath, tt.baseName, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FolderNames(t *testing.T) { + tests := []struct { + name string + ruleValue string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip exact folder name match", + ruleValue: "node_modules", + baseName: "node_modules", + shouldSkip: true, + description: "Exact match should be skipped", + }, + { + name: "Skip folder name '@eaDir'", + ruleValue: "@eaDir", + baseName: "@eaDir", + shouldSkip: true, + description: "Synology thumbnail folder should be skipped", + }, + { + name: "Don't skip partial match", + ruleValue: "node_modules", + baseName: "node_modules_backup", + shouldSkip: false, + description: "Partial match should not be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FolderNames: tt.ruleValue}, + }, + }) + + // Manually populate FolderNames map since setConditionals doesn't do it + idx.Config.ResolvedConditionals.FolderNames[tt.ruleValue] = settings.ConditionalIndexConfig{FolderNames: tt.ruleValue} + + result := idx.shouldSkip(true, false, "/"+tt.baseName+"/", tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (baseName=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.baseName, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FolderPaths(t *testing.T) { + tests := []struct { + name string + ruleValue string + fullPath string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip exact folder path", + ruleValue: "/graham/", // Exact path with trailing slash + fullPath: "/graham/", // Full index path + baseName: "graham", // Base name + shouldSkip: true, + description: "Exact path match should be skipped (O(1) lookup)", + }, + { + name: "Skip subfolder with prefix matching", + ruleValue: "/graham/", + fullPath: "/graham/subfolder/", + baseName: "subfolder", + shouldSkip: true, + description: "FolderPaths now does prefix matching for child folders", + }, + { + name: "Don't skip unrelated path", + ruleValue: "/graham/", + fullPath: "/other/", + baseName: "other", + shouldSkip: false, + description: "Unrelated path should not be skipped", + }, + { + name: "Skip nested path and its children", + ruleValue: "/projects/old/", + fullPath: "/projects/old/backup/", + baseName: "backup", + shouldSkip: true, + description: "Nested path under rule should be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FolderPath: tt.ruleValue}, + }, + }) + + result := idx.shouldSkip(true, false, tt.fullPath, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (fullPath=%s, baseName=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.fullPath, tt.baseName, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FileStartsWith(t *testing.T) { + tests := []struct { + name string + ruleValue string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip file starting with 'Docker'", + ruleValue: "Docker", // After normalization (no leading slash) + baseName: "Docker.dmg", + shouldSkip: true, + description: "File 'Docker.dmg' should be skipped", + }, + { + name: "Skip file starting with '.'", + ruleValue: ".", + baseName: ".DS_Store", + shouldSkip: true, + description: "Hidden file should be skipped", + }, + { + name: "Don't skip file not starting with rule", + ruleValue: "tmp", + baseName: "document.txt", + shouldSkip: false, + description: "File not starting with 'tmp' should not be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FileStartsWith: tt.ruleValue}, + }, + }) + + result := idx.shouldSkip(false, false, "/"+tt.baseName, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (baseName=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.baseName, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FileEndsWith(t *testing.T) { + tests := []struct { + name string + ruleValue string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip file ending with '.tmp'", + ruleValue: ".tmp", + baseName: "document.tmp", + shouldSkip: true, + description: "Temporary file should be skipped", + }, + { + name: "Skip file ending with '~'", + ruleValue: "~", + baseName: "document.txt~", + shouldSkip: true, + description: "Backup file should be skipped", + }, + { + name: "Don't skip file with different extension", + ruleValue: ".tmp", + baseName: "document.txt", + shouldSkip: false, + description: "Regular file should not be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FileEndsWith: tt.ruleValue}, + }, + }) + + result := idx.shouldSkip(false, false, "/"+tt.baseName, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (baseName=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.baseName, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FilePaths(t *testing.T) { + tests := []struct { + name string + ruleValue string + fullPath string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip exact file path", + ruleValue: "/config.txt", + fullPath: "/config.txt", + baseName: "config.txt", + shouldSkip: true, + description: "Exact file path match should be skipped (O(1) lookup)", + }, + { + name: "Skip file in excluded folder with prefix matching", + ruleValue: "/logs", + fullPath: "/logs/app.log", + baseName: "app.log", + shouldSkip: true, + description: "FilePaths now does prefix matching for files in excluded folders", + }, + { + name: "Don't skip file in different folder", + ruleValue: "/logs", + fullPath: "/data/file.txt", + baseName: "file.txt", + shouldSkip: false, + description: "File in different folder should not be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FilePath: tt.ruleValue}, + }, + }) + + result := idx.shouldSkip(false, false, tt.fullPath, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (fullPath=%s, rule=%s)", + tt.description, tt.shouldSkip, result, tt.fullPath, tt.ruleValue) + } + }) + } +} + +func TestShouldSkip_FileInExcludedFolderPath(t *testing.T) { + // Test that files in excluded folder paths are also skipped + // Uses FilePaths rule which applies to both the folder and its files via prefix matching + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FilePath: "/graham/"}, + }, + }) + + tests := []struct { + fullPath string + baseName string + shouldSkip bool + reason string + }{ + {"/graham/file.txt", "file.txt", true, "File in excluded folder should be skipped"}, + {"/graham/subfolder/file.txt", "file.txt", true, "File in subfolder of excluded folder should be skipped"}, + {"/other/file.txt", "file.txt", false, "File in different folder should not be skipped"}, + } + + for _, tt := range tests { + result := idx.shouldSkip(false, false, tt.fullPath, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("File %s (%s): expected shouldSkip=%v, got %v", + tt.fullPath, tt.reason, tt.shouldSkip, result) + } + } +} + +func TestShouldSkip_MultipleRules(t *testing.T) { + // Test that multiple rules work together + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FolderStartsWith: "temp"}, + {FolderStartsWith: "tmp"}, + {FolderNames: "node_modules"}, + {FolderNames: "@eaDir"}, + {FileStartsWith: "."}, + {FileEndsWith: ".tmp"}, + {FileEndsWith: "~"}, + }, + }) + + // Manually populate FolderNames map + idx.Config.ResolvedConditionals.FolderNames["node_modules"] = settings.ConditionalIndexConfig{FolderNames: "node_modules"} + idx.Config.ResolvedConditionals.FolderNames["@eaDir"] = settings.ConditionalIndexConfig{FolderNames: "@eaDir"} + + tests := []struct { + isDir bool + fullPath string + baseName string + shouldSkip bool + reason string + }{ + // Folders + {true, "/temp/", "temp", true, "starts with temp"}, + {true, "/tmp-backup/", "tmp-backup", true, "starts with tmp"}, + {true, "/node_modules/", "node_modules", true, "exact name match"}, + {true, "/@eaDir/", "@eaDir", true, "exact name match"}, + {true, "/regular/", "regular", false, "no rule matches"}, + + // Files + {false, "/.DS_Store", ".DS_Store", true, "starts with ."}, + {false, "/file.tmp", "file.tmp", true, "ends with .tmp"}, + {false, "/file.txt~", "file.txt~", true, "ends with ~"}, + {false, "/document.txt", "document.txt", false, "no rule matches"}, + } + + for _, tt := range tests { + result := idx.shouldSkip(tt.isDir, false, tt.fullPath, tt.baseName, actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("%s (%s): expected shouldSkip=%v, got %v", + tt.baseName, tt.reason, tt.shouldSkip, result) + } + } +} + +func TestShouldSkip_ViewableStillSkips(t *testing.T) { + // Test that Viewable:true doesn't affect shouldSkip behavior + // The Viewable field is checked separately in IsViewable(), not in shouldSkip() + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {FolderStartsWith: "important", Viewable: true}, // Viewable but still skipped from indexing + }, + }) + + // shouldSkip still returns true even with Viewable:true (it's checked separately) + result := idx.shouldSkip(true, false, "/important/", "important", actionConfig{}) + if result != true { + t.Errorf("Folder should be skipped (Viewable is checked separately), got shouldSkip=%v", result) + } +} + +func TestShouldSkip_HiddenFiles(t *testing.T) { + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + Hidden: true, // Skip hidden files + }) + + tests := []struct { + isHidden bool + shouldSkip bool + }{ + {true, true}, + {false, false}, + } + + for _, tt := range tests { + result := idx.shouldSkip(false, tt.isHidden, "/file.txt", "file.txt", actionConfig{}) + if result != tt.shouldSkip { + t.Errorf("isHidden=%v: expected shouldSkip=%v, got %v", + tt.isHidden, tt.shouldSkip, result) + } + } +} + +func TestShouldSkip_NeverWatch(t *testing.T) { + // Test NeverWatch functionality - folders should be skipped during routine scans + idx := setupConditionalTestIndex(settings.ConditionalFilter{ + ItemRules: []settings.ConditionalIndexConfig{ + {NeverWatchPath: "/cache/"}, // Must match the fullPath exactly + {NeverWatchPath: "/logs/"}, // Must match the fullPath exactly + }, + }) + + // Simulate a routine scan (wasIndexed=true, IsRoutineScan=true) + idx.wasIndexed = true + config := actionConfig{IsRoutineScan: true} + + tests := []struct { + name string + fullPath string + baseName string + shouldSkip bool + description string + }{ + { + name: "Skip NeverWatch path during routine scan", + fullPath: "/cache/", + baseName: "cache", + shouldSkip: true, + description: "Folder with neverWatch should be skipped in routine scan", + }, + { + name: "Skip NeverWatch name during routine scan", + fullPath: "/logs/", + baseName: "logs", + shouldSkip: true, + description: "Folder with neverWatch name should be skipped in routine scan", + }, + { + name: "Don't skip regular folder", + fullPath: "/regular/", + baseName: "regular", + shouldSkip: false, + description: "Regular folder should not be skipped", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := idx.shouldSkip(true, false, tt.fullPath, tt.baseName, config) + if result != tt.shouldSkip { + t.Errorf("%s: expected shouldSkip=%v, got %v (fullPath=%s, baseName=%s)", + tt.description, tt.shouldSkip, result, tt.fullPath, tt.baseName) + } + }) + } + + // Test initial scan (IsRoutineScan=false) - NeverWatch folders should NOT be skipped + config.IsRoutineScan = false + result := idx.shouldSkip(true, false, "/cache/", "cache", config) + if result != false { + t.Errorf("NeverWatch folder should NOT be skipped during initial scan, got shouldSkip=%v", result) + } +} diff --git a/backend/indexing/indexingFiles.go b/backend/indexing/indexingFiles.go index 81574a3d1c..c2ff02498e 100644 --- a/backend/indexing/indexingFiles.go +++ b/backend/indexing/indexingFiles.go @@ -5,7 +5,6 @@ import ( "os" "path/filepath" "runtime" - "slices" "strings" "sync" "time" @@ -25,17 +24,10 @@ var ( // actionConfig holds all configuration options for indexing operations type actionConfig struct { - Quick bool // whether to perform a quick scan (skip unchanged directories) - Recursive bool // whether to recursively index subdirectories - ForceCheck bool // whether to check indexing skip rules. -} - -// NewactionConfig creates a new actionConfig with common presets -func NewactionConfig() *actionConfig { - return &actionConfig{ - Quick: false, - Recursive: true, - } + Quick bool // whether to perform a quick scan (skip unchanged directories) + Recursive bool // whether to recursively index subdirectories + CheckViewable bool // whether to check if the path has viewable:true (for API access checks) + IsRoutineScan bool // whether this is a routine/scheduled scan (vs initial indexing) } // reduced index is json exposed to the client @@ -64,7 +56,7 @@ type Index struct { FilesChangedDuringIndexing bool `json:"-"` mock bool mu sync.RWMutex - hasIndex bool + wasIndexed bool FoundHardLinks map[string]uint64 `json:"-"` // hardlink path -> size processedInodes map[uint64]struct{} `json:"-"` totalSize uint64 `json:"-"` @@ -123,12 +115,12 @@ func Initialize(source *settings.Source, mock bool) { } // indexDirectoryWithOptions wraps indexDirectory with actionConfig -func (idx *Index) indexDirectoryWithOptions(adjustedPath string, config *actionConfig) error { +func (idx *Index) indexDirectoryWithOptions(adjustedPath string, config actionConfig) error { return idx.indexDirectory(adjustedPath, config) } // Define a function to recursively index files and directories -func (idx *Index) indexDirectory(adjustedPath string, config *actionConfig) error { +func (idx *Index) indexDirectory(adjustedPath string, config actionConfig) error { // Normalize path to always have trailing slash (except for root which is just "/") if adjustedPath != "/" { adjustedPath = strings.TrimSuffix(adjustedPath, "/") + "/" @@ -149,7 +141,7 @@ func (idx *Index) indexDirectory(adjustedPath string, config *actionConfig) erro // check if excluded from indexing hidden := isHidden(dirInfo, idx.Path+adjustedPath) - if idx.shouldSkip(dirInfo.IsDir(), hidden, adjustedPath, dirInfo.Name()) { + if idx.shouldSkip(dirInfo.IsDir(), hidden, adjustedPath, dirInfo.Name(), config) { return errors.ErrNotIndexed } @@ -182,7 +174,7 @@ func (idx *Index) indexDirectory(adjustedPath string, config *actionConfig) erro idx.mu.Unlock() } else if config.Quick { for _, item := range cacheDirItems { - subConfig := &actionConfig{ + subConfig := actionConfig{ Quick: config.Quick, Recursive: true, } @@ -231,6 +223,10 @@ func (idx *Index) GetFsDirInfo(adjustedPath string) (*iteminfo.FileInfo, error) }, } fileInfo.DetectType(realPath, false) + + // Set HasPreview flags using consolidated helper + setFilePreviewFlags(&fileInfo.ItemInfo, realPath) + return &fileInfo, nil } @@ -241,10 +237,10 @@ func (idx *Index) GetFsDirInfo(adjustedPath string) (*iteminfo.FileInfo, error) // adjustedPath is already normalized with trailing slash combinedPath := adjustedPath var response *iteminfo.FileInfo - response, err = idx.GetDirInfo(dir, dirInfo, realPath, adjustedPath, combinedPath, &actionConfig{ - Quick: false, - Recursive: false, - ForceCheck: true, + response, err = idx.GetDirInfo(dir, dirInfo, realPath, adjustedPath, combinedPath, actionConfig{ + Quick: false, + Recursive: false, + CheckViewable: true, }) if err != nil { return nil, err @@ -274,7 +270,7 @@ func (idx *Index) GetFsDirInfo(adjustedPath string) (*iteminfo.FileInfo, error) } -func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjustedPath, combinedPath string, config *actionConfig) (*iteminfo.FileInfo, error) { +func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjustedPath, combinedPath string, config actionConfig) (*iteminfo.FileInfo, error) { // Ensure combinedPath has exactly one trailing slash to prevent double slashes in subdirectory paths combinedPath = strings.TrimRight(combinedPath, "/") + "/" // Read directory contents @@ -300,12 +296,21 @@ func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjus baseName := file.Name() fullCombined := combinedPath + baseName if adjustedPath == "/" { - if !idx.shouldInclude(isDir, combinedPath, file.Name()) { + if !idx.shouldInclude(file.Name()) { continue } } - if !config.ForceCheck && idx.shouldSkip(isDir, hidden, fullCombined, baseName) { - continue + // Skip logic based on mode + if config.CheckViewable { + // When checking viewable items: skip if shouldSkip=true AND not viewable + if idx.shouldSkip(isDir, hidden, fullCombined, baseName, config) && !idx.IsViewable(isDir, fullCombined) { + continue + } + } else { + // Normal indexing mode: skip if shouldSkip=true + if idx.shouldSkip(isDir, hidden, fullCombined, baseName, config) { + continue + } } itemInfo := &iteminfo.ItemInfo{ Name: file.Name(), @@ -315,8 +320,9 @@ func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjus if isDir { dirPath := combinedPath + file.Name() - if idx.hasIndex && config.Recursive && len(idx.Config.NeverWatchPaths) > 0 { - if slices.Contains(idx.Config.NeverWatchPaths, fullCombined) { + // Check NeverWatchPaths map - O(1) lookup for paths with neverWatch: true + if idx.wasIndexed && config.Recursive && idx.Config.ResolvedConditionals != nil { + if _, exists := idx.Config.ResolvedConditionals.NeverWatchPaths[fullCombined]; exists { realDirInfo, exists := idx.GetMetadataInfo(dirPath, true) if exists { itemInfo.Size = realDirInfo.Size @@ -353,40 +359,21 @@ func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjus } else { size, shouldCountSize := idx.handleFile(file, fullCombined) itemInfo.DetectType(realPath+"/"+file.Name(), false) - simpleType := strings.Split(itemInfo.Type, "/")[0] - if simpleType == "audio" { - // Check if this file is new or changed by comparing with previous metadata - shouldCheckAlbumArt := false - previousInfo, exists := idx.GetReducedMetadata(fullCombined, false) - if !exists { - // File is new - check album art - shouldCheckAlbumArt = true - } else if previousInfo.ModTime != file.ModTime() { - // File has been modified - check album art - shouldCheckAlbumArt = true - } else { - // File unchanged - use cached album art info - itemInfo.HasPreview = previousInfo.HasPreview + // Set HasPreview flags - use cached metadata optimization only when indexing is enabled + if !idx.Config.DisableIndexing && config.Recursive { + // Optimization: For audio files during indexing, check if we can use cached album art info + simpleType := strings.Split(itemInfo.Type, "/")[0] + if simpleType == "audio" { + previousInfo, exists := idx.GetReducedMetadata(fullCombined, false) + if exists && time.Time.Equal(previousInfo.ModTime, file.ModTime()) { + // File unchanged - use cached album art info + itemInfo.HasPreview = previousInfo.HasPreview + } } + } + // When indexing is disabled or CheckViewable mode, always check directly + setFilePreviewFlags(itemInfo, realPath+"/"+file.Name()) - if shouldCheckAlbumArt { - itemInfo.HasPreview = iteminfo.HasAlbumArt(realPath+"/"+file.Name(), filepath.Ext(file.Name())) - } - } - ext := strings.ToLower(filepath.Ext(file.Name())) - extWithoutPeriod := strings.TrimPrefix(ext, ".") - if simpleType == "image" { - itemInfo.HasPreview = true - } - switch extWithoutPeriod { - case "heic", "heif": - if settings.CanConvertImage(extWithoutPeriod) { - itemInfo.HasPreview = true - } - } - if simpleType == "video" && settings.CanConvertVideo(extWithoutPeriod) { - itemInfo.HasPreview = true - } itemInfo.Size = int64(size) // Update parent folder preview status for images, videos, and audio with album art @@ -395,15 +382,6 @@ func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjus hasPreview = true } - // Set HasPreview for office docs and PDFs - // These files are previewable but DON'T set parent folder preview - if settings.Config.Integrations.OnlyOffice.Secret != "" && iteminfo.IsOnlyOffice(file.Name()) { - itemInfo.HasPreview = true - } - if iteminfo.HasDocConvertableExtension(itemInfo.Name, itemInfo.Type) { - itemInfo.HasPreview = true - } - fileInfos = append(fileInfos, *itemInfo) if shouldCountSize { totalSize += itemInfo.Size @@ -414,7 +392,7 @@ func (idx *Index) GetDirInfo(dirInfo *os.File, stat os.FileInfo, realPath, adjus } } - if totalSize == 0 && idx.Config.Exclude.ZeroSizeFolders { + if totalSize == 0 && idx.Config.Conditionals.ZeroSizeFolders { return nil, errors.ErrNotIndexed } @@ -485,7 +463,7 @@ func (idx *Index) GetRealPath(relativePath ...string) (string, bool, error) { } func (idx *Index) RefreshFileInfo(opts utils.FileOptions) error { - config := &actionConfig{ + config := actionConfig{ Quick: false, Recursive: opts.Recursive, } @@ -536,102 +514,194 @@ func isHidden(file os.FileInfo, srcPath string) bool { return false } -func (idx *Index) shouldInclude(isDir bool, fullCombined, baseName string) bool { - rules := idx.Config.Include - hasRules := false - if len(rules.RootFolders) > 0 { - hasRules = true - for _, p := range rules.RootFolders { - if strings.HasPrefix(fullCombined, p) { +// setFilePreviewFlags determines if a file should have a preview based on its type +// This consolidates the logic used in both GetFsDirInfo and GetDirInfo +func setFilePreviewFlags(fileInfo *iteminfo.ItemInfo, realPath string) { + simpleType := strings.Split(fileInfo.Type, "/")[0] + ext := strings.ToLower(filepath.Ext(fileInfo.Name)) + extWithoutPeriod := strings.TrimPrefix(ext, ".") + + // Check if it's an image + if simpleType == "image" { + fileInfo.HasPreview = true + } + + // Check for HEIC/HEIF + switch extWithoutPeriod { + case "heic", "heif": + if settings.CanConvertImage(extWithoutPeriod) { + fileInfo.HasPreview = true + } + } + + // Check if it's a video + if simpleType == "video" && settings.CanConvertVideo(extWithoutPeriod) { + fileInfo.HasPreview = true + } + + // Check for audio with album art (always check, don't rely on cache) + if simpleType == "audio" { + fileInfo.HasPreview = iteminfo.HasAlbumArt(realPath, ext) + } + + // Check for office docs and PDFs + if settings.Config.Integrations.OnlyOffice.Secret != "" && iteminfo.IsOnlyOffice(fileInfo.Name) { + fileInfo.HasPreview = true + } + if iteminfo.HasDocConvertableExtension(fileInfo.Name, fileInfo.Type) { + fileInfo.HasPreview = true + } +} + +// IsViewable checks if a path has viewable:true (allows FS access without indexing) +func (idx *Index) IsViewable(isDir bool, adjustedPath string) bool { + rules := idx.Config.ResolvedConditionals + + baseName := filepath.Base(strings.TrimSuffix(adjustedPath, "/")) + + if isDir { + // Exact match (O(1)) + if rule, exists := rules.FolderNames[baseName]; exists && rule.Viewable { + return true + } + // Prefix/suffix (O(n)) + for _, rule := range rules.FolderPaths { + if strings.HasPrefix(adjustedPath, rule.FolderPath) && rule.Viewable { return true } } - } - if len(rules.RootFiles) > 0 { - hasRules = true - for _, p := range rules.RootFiles { - if strings.HasPrefix(fullCombined, p) { + for _, rule := range rules.FolderEndsWith { + if strings.HasSuffix(baseName, rule.FolderEndsWith) && rule.Viewable { + return true + } + } + for _, rule := range rules.FolderStartsWith { + if strings.HasPrefix(baseName, rule.FolderStartsWith) && rule.Viewable { + return true + } + } + } else { + // Exact match (O(1)) + if rule, exists := rules.FileNames[baseName]; exists && rule.Viewable { + return true + } + // Prefix/suffix (O(n)) + for _, rule := range rules.FilePaths { + if strings.HasPrefix(adjustedPath, rule.FilePath) && rule.Viewable { + return true + } + } + for _, rule := range rules.FileEndsWith { + if strings.HasSuffix(baseName, rule.FileEndsWith) && rule.Viewable { + return true + } + } + for _, rule := range rules.FileStartsWith { + if strings.HasPrefix(baseName, rule.FileStartsWith) && rule.Viewable { return true } } - } - if !hasRules { - return true } return false } -func (idx *Index) shouldSkip(isDir bool, isHidden bool, fullCombined, baseName string) bool { +func (idx *Index) shouldSkip(isDir bool, isHidden bool, fullCombined, baseName string, config actionConfig) bool { + rules := idx.Config.ResolvedConditionals + if rules == nil { + rules = &settings.ResolvedConditionalsConfig{} + } + if fullCombined == "/" { + return false + } + // When indexing is disabled globally, behavior depends on the mode if idx.Config.DisableIndexing { + // If checking viewable (filesystem access), don't skip - show everything from filesystem + if config.CheckViewable { + return false + } + // If indexing mode, skip everything return true } - rules := idx.Config.Exclude - - if isDir { - if len(rules.FolderPaths) > 0 { - for _, p := range rules.FolderPaths { - if strings.HasPrefix(fullCombined, p) { - return true - } - } - } - if len(rules.FolderNames) > 0 && slices.Contains(rules.FolderNames, baseName) { + if isDir && config.IsRoutineScan { + // Check NeverWatch: Skip directories with index=true AND neverWatch=true during routine scans + // This allows them to be indexed once but never re-scanned + _, ok := rules.NeverWatchPaths[fullCombined] + if ok { + // skip scanning, but is viewable return true } + } + + if isDir { + if rule, ok := rules.FolderNames[baseName]; ok { + if _, ok := rules.FolderPaths[fullCombined]; !ok { + // create a rule so sub folders can be skipped + rules.FolderPaths[fullCombined] = rule + } + return true + } + + // Check FolderPaths: Two-stage check for performance + // Stage 1: O(1) exact match (fast path for the folder itself) + if _, ok := rules.FolderPaths[fullCombined]; ok { + return true + } + // Stage 2: O(n) prefix match (for child folders) + for path := range rules.FolderPaths { + if strings.HasPrefix(fullCombined, path) { + return true + } + } + + // Check FolderEndsWith (suffix match on base name) - use original slice if len(rules.FolderEndsWith) > 0 { - for _, end := range rules.FolderEndsWith { - if strings.HasSuffix(baseName, end) { + for _, rule := range rules.FolderEndsWith { + if hasSuffix := strings.HasSuffix(baseName, rule.FolderEndsWith); hasSuffix { return true } } } - if len(rules.FolderStartsWith) > 0 { - for _, start := range rules.FolderStartsWith { - if strings.HasPrefix(baseName, start) { - return true - } + for _, rule := range rules.FolderStartsWith { + if hasPrefix := strings.HasPrefix(baseName, rule.FolderStartsWith); hasPrefix { + return true } } } else { - if len(rules.FilePaths) > 0 { - for _, p := range rules.FilePaths { - if strings.HasPrefix(fullCombined, p) { - return true - } - } - } - if len(rules.FileNames) > 0 && slices.Contains(rules.FileNames, baseName) { + // Check FileNames (exact match on base name) - O(1) lookup + if _, ok := rules.FileNames[baseName]; ok { return true } - if len(rules.FileEndsWith) > 0 { - for _, end := range rules.FileEndsWith { - if strings.HasSuffix(baseName, end) { - return true - } + + // Check FilePaths: Two-stage check for performance + // Stage 1: O(1) exact match (fast path for the file itself) + if _, ok := rules.FilePaths[fullCombined]; ok { + return true + } + // Stage 2: O(n) prefix match (for files in excluded folders) + for path := range rules.FilePaths { + if strings.HasPrefix(fullCombined, path) { + return true } } - if len(rules.FileStartsWith) > 0 { - for _, start := range rules.FileStartsWith { - if strings.HasPrefix(baseName, start) { - return true - } + + for _, rule := range rules.FileEndsWith { + if hasSuffix := strings.HasSuffix(baseName, rule.FileEndsWith); hasSuffix { + return true } } - // Exclude if parent directory matches FolderPaths - if len(rules.FolderPaths) > 0 { - parent := filepath.Dir(fullCombined) - for _, p := range rules.FolderPaths { - if strings.HasPrefix(parent, p) { - return true - } + for _, rule := range rules.FileStartsWith { + if hasPrefix := strings.HasPrefix(baseName, rule.FileStartsWith); hasPrefix { + return true } } + } - if rules.Hidden && isHidden { + if idx.Config.Conditionals.Hidden && isHidden { return true } + return false } @@ -649,7 +719,7 @@ func (idx *Index) SetUsage(totalBytes uint64) { idx.DiskTotal = totalBytes } -func (idx *Index) SetStatus(status IndexStatus) { +func (idx *Index) SetStatus(status IndexStatus) error { idx.mu.Lock() idx.Status = status switch status { @@ -659,7 +729,7 @@ func (idx *Index) SetStatus(status IndexStatus) { idx.runningScannerCount = 0 } idx.mu.Unlock() - idx.SendSourceUpdateEvent() + return idx.SendSourceUpdateEvent() } func (idx *Index) handleFile(file os.FileInfo, fullCombined string) (size uint64, shouldCountSize bool) { @@ -709,3 +779,21 @@ func (idx *Index) MakeIndexPath(path string) string { path = strings.TrimSuffix(path, "/") + "/" return path } + +func (idx *Index) shouldInclude(baseName string) bool { + rules := idx.Config.ResolvedConditionals + if rules == nil { + rules = &settings.ResolvedConditionalsConfig{} + } + hasRules := false + if len(rules.IncludeRootItems) > 0 { + hasRules = true + if _, exists := rules.IncludeRootItems["/"+baseName]; exists { + return true + } + } + if !hasRules { + return true + } + return false +} diff --git a/backend/indexing/indexingFiles_test.go b/backend/indexing/indexingFiles_test.go index 4a52f22edd..0b5b17e2df 100644 --- a/backend/indexing/indexingFiles_test.go +++ b/backend/indexing/indexingFiles_test.go @@ -20,7 +20,7 @@ func setupTestIndex(t *testing.T) (*Index, string, func()) { DisableIndexing: false, }, }, - hasIndex: true, + wasIndexed: true, mock: true, // Enable mock mode Directories: make(map[string]*iteminfo.FileInfo), DirectoriesLedger: make(map[string]struct{}), diff --git a/backend/indexing/indexingSchedule.go b/backend/indexing/indexingSchedule.go index 15c9cfbe8e..8480ae8ebf 100644 --- a/backend/indexing/indexingSchedule.go +++ b/backend/indexing/indexingSchedule.go @@ -49,19 +49,20 @@ func (idx *Index) newScanner(origin string) { } } -func (idx *Index) PreScan() { - idx.SetStatus(INDEXING) +func (idx *Index) PreScan() error { + return idx.SetStatus(INDEXING) } -func (idx *Index) PostScan() { +func (idx *Index) PostScan() error { idx.mu.Lock() idx.garbageCollection() - idx.hasIndex = true + idx.wasIndexed = true idx.runningScannerCount-- idx.mu.Unlock() if idx.runningScannerCount == 0 { - idx.SetStatus(READY) + return idx.SetStatus(READY) } + return nil } func (idx *Index) garbageCollection() { @@ -104,25 +105,24 @@ func (idx *Index) UpdateSchedule() { } } -func (idx *Index) SendSourceUpdateEvent() { +func (idx *Index) SendSourceUpdateEvent() error { if idx.mock { logger.Debug("Skipping source update event for mock index.") - return + return nil } reducedIndex, err := GetIndexInfo(idx.Name) if err != nil { - logger.Errorf("Error getting index info: %v", err) - return + return err } sourceAsMap := map[string]ReducedIndex{ idx.Name: reducedIndex, } message, err := json.Marshal(sourceAsMap) if err != nil { - logger.Errorf("Error marshalling source update message: %v", err) - return + return err } events.SendSourceUpdate(idx.Name, string(message)) + return nil } func (idx *Index) RunIndexing(origin string, quick bool) { @@ -130,7 +130,11 @@ func (idx *Index) RunIndexing(origin string, quick bool) { logger.Debugf("Indexing already in progress for [%v]", idx.Name) return } - idx.PreScan() + err := idx.PreScan() + if err != nil { + logger.Errorf("Error during indexing: %v", err) + return + } prevNumDirs := idx.NumDirs prevNumFiles := idx.NumFiles @@ -148,11 +152,12 @@ func (idx *Index) RunIndexing(origin string, quick bool) { startTime := time.Now() idx.FilesChangedDuringIndexing = false // Perform the indexing operation - config := &actionConfig{ - Quick: quick, - Recursive: true, + config := actionConfig{ + Quick: quick, + Recursive: true, + IsRoutineScan: idx.wasIndexed, // This is a routine scan if we already have an index } - err := idx.indexDirectory("/", config) + err = idx.indexDirectory("/", config) if err != nil { logger.Errorf("Error during indexing: %v", err) } @@ -187,7 +192,11 @@ func (idx *Index) RunIndexing(origin string, quick bool) { logger.Debugf("Time spent indexing [%v]: %v seconds", idx.Name, idx.FullScanTime) } - idx.PostScan() + err = idx.PostScan() + if err != nil { + logger.Errorf("Error during post scan indexing: %v", err) + return + } } func (idx *Index) setupIndexingScanners() { diff --git a/backend/indexing/indexing_test.go b/backend/indexing/indexing_test.go index d10fd7f01b..8c2d9b5461 100644 --- a/backend/indexing/indexing_test.go +++ b/backend/indexing/indexing_test.go @@ -124,6 +124,8 @@ func TestMakeIndexPathRoot(t *testing.T) { } } +// TODO: Update these tests to use new ConditionalFilter structure +/* func TestCheckIndexExclude(t *testing.T) { tests := []struct { name string @@ -165,14 +167,16 @@ func TestCheckIndexExclude(t *testing.T) { }, }, } - result := idx.shouldSkip(tc.isDir, tc.isHidden, tc.fullPath, tc.baseName) + result := idx.shouldSkip(tc.isDir, tc.isHidden, tc.fullPath, tc.baseName, nil) if result != tc.expect { t.Errorf("shouldSkip(%v, %v, %q, %q) = %v; want %v", tc.isDir, tc.isHidden, tc.fullPath, tc.baseName, result, tc.expect) } }) } } +*/ +/* func TestCheckIndexInclude(t *testing.T) { tests := []struct { name string @@ -207,10 +211,11 @@ func TestCheckIndexInclude(t *testing.T) { }, }, } - result := idx.shouldInclude(tc.isDir, tc.fullPath, tc.baseName) - if result != tc.expect { - t.Errorf("shouldInclude(%v, %q, %q) = %v; want %v", tc.isDir, tc.fullPath, tc.baseName, result, tc.expect) - } - }) + result := idx.shouldInclude(tc.isDir, tc.fullPath, tc.baseName) + if result != tc.expect { + t.Errorf("shouldInclude(%v, %q, %q) = %v; want %v", tc.isDir, tc.fullPath, tc.baseName, result, tc.expect) + } + }) } } +*/ diff --git a/backend/indexing/mutate.go b/backend/indexing/mutate.go index 5fe1dcfdf7..0d22eafe16 100644 --- a/backend/indexing/mutate.go +++ b/backend/indexing/mutate.go @@ -167,8 +167,9 @@ func GetIndexInfo(sourceName string) (ReducedIndex, error) { if !ok { totalBytes, err := getPartitionSize(sourcePath) if err != nil { - logger.Errorf("error getting disk usage for %s: %v", sourcePath, err) - idx.SetStatus(UNAVAILABLE) + idx.mu.Lock() + idx.Status = UNAVAILABLE + idx.mu.Unlock() return ReducedIndex{}, fmt.Errorf("error getting disk usage for %s: %v", sourcePath, err) } diff --git a/backend/indexing/unix.go b/backend/indexing/unix.go index e8036e04bb..9c27be3b80 100644 --- a/backend/indexing/unix.go +++ b/backend/indexing/unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package indexing diff --git a/backend/indexing/windows.go b/backend/indexing/windows.go index 6e8cbac830..7eb674fd50 100644 --- a/backend/indexing/windows.go +++ b/backend/indexing/windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows package indexing diff --git a/backend/preview/doc.go b/backend/preview/doc.go index 39d4e34ac0..9812d6d97c 100644 --- a/backend/preview/doc.go +++ b/backend/preview/doc.go @@ -1,5 +1,4 @@ //go:build mupdf -// +build mupdf package preview diff --git a/backend/preview/docDefault.go b/backend/preview/docDefault.go index e3d0010bd7..c3584bacb3 100644 --- a/backend/preview/docDefault.go +++ b/backend/preview/docDefault.go @@ -1,5 +1,4 @@ //go:build !mupdf -// +build !mupdf package preview diff --git a/backend/swagger/docs/docs.go b/backend/swagger/docs/docs.go index 9c3ddd7b92..4ed90b382a 100644 --- a/backend/swagger/docs/docs.go +++ b/backend/swagger/docs/docs.go @@ -2320,6 +2320,91 @@ const docTemplate = `{ } }, "/public/api/resources": { + "put": { + "description": "Updates the content of a file in a public share.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Public Shares" + ], + "summary": "Update a file in a public share", + "parameters": [ + { + "type": "string", + "description": "Share hash for authentication", + "name": "hash", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Path to the file to update", + "name": "path", + "in": "query", + "required": true + }, + { + "description": "New content for the file", + "name": "content", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "File updated successfully", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Invalid request or parameters", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Share unavailable or update not allowed", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Share not found or file not found", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, "post": { "description": "Handles file and directory uploads to an upload-only public share. Supports chunked uploads, conflict resolution (override), and directory creation.", "consumes": [ @@ -2833,6 +2918,75 @@ const docTemplate = `{ } } }, + "settings.ConditionalFilter": { + "type": "object", + "properties": { + "hidden": { + "description": "exclude hidden files and folders.", + "type": "boolean" + }, + "ignoreZeroSizeFolders": { + "description": "ignore folders with 0 size", + "type": "boolean" + }, + "rules": { + "description": "list of item rules to apply to specific paths", + "type": "array", + "items": { + "$ref": "#/definitions/settings.ConditionalIndexConfig" + } + } + } + }, + "settings.ConditionalIndexConfig": { + "type": "object", + "properties": { + "fileEndsWith": { + "description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"", + "type": "string" + }, + "fileNames": { + "description": "(global) exclude files that match these names. Eg. \"file.txt\" or \"test.csv\"", + "type": "string" + }, + "filePath": { + "description": "(global) exclude files that match this path. Eg. \"/path/to/file.txt\" or \"/path/to/file.txt/subfile.txt\"", + "type": "string" + }, + "fileStartsWith": { + "description": "(global) exclude files that start with these prefixes. Eg. \"archive-\" or \"backup-\"", + "type": "string" + }, + "folderEndsWith": { + "description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"", + "type": "string" + }, + "folderNames": { + "description": "(global) exclude folders that match these names. Eg. \"folder\" or \"subfolder\"", + "type": "string" + }, + "folderPath": { + "description": "(global) exclude folders that match this path. Eg. \"/path/to/folder\" or \"/path/to/folder/subfolder\"", + "type": "string" + }, + "folderStartsWith": { + "description": "(global) exclude folders that start with these prefixes. Eg. \"archive-\" or \"backup-\"", + "type": "string" + }, + "includeRootItem": { + "description": "include only these items at root folder level", + "type": "string" + }, + "neverWatchPath": { + "description": "index the folder in the first pass to get included in search, but never re-indexed.", + "type": "string" + }, + "viewable": { + "description": "Enable viewing in UI but exclude from indexing", + "type": "boolean" + } + } + }, "settings.CustomTheme": { "type": "object", "properties": { @@ -2846,75 +3000,6 @@ const docTemplate = `{ } } }, - "settings.ExcludeIndexFilter": { - "type": "object", - "properties": { - "fileEndsWith": { - "description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"", - "type": "array", - "items": { - "type": "string" - } - }, - "fileNames": { - "description": "(global) list of file names to include/exclude. Eg. \"a.jpg\"", - "type": "array", - "items": { - "type": "string" - } - }, - "filePaths": { - "description": "list of filepaths Eg. \"folder1\" or \"file1.txt\" or \"folder1/file1.txt\" (without source path prefix)", - "type": "array", - "items": { - "type": "string" - } - }, - "fileStartsWith": { - "description": "(global) exclude files that start with these prefixes. Eg. \"archive-\" or \"backup-\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderEndsWith": { - "description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderNames": { - "description": "(global) list of folder names to include/exclude. Eg. \"@eadir\" or \".thumbnails\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderPaths": { - "description": "(filepath) list of folder names to include/exclude. Eg. \"folder1\" or \"folder1/subfolder\" (do not include source path, just the subpaths from the source path)", - "type": "array", - "items": { - "type": "string" - } - }, - "folderStartsWith": { - "description": "(global) exclude folders that start with these prefixes. Eg. \"archive-\" or \"backup-\"", - "type": "array", - "items": { - "type": "string" - } - }, - "hidden": { - "description": "exclude hidden files and folders.", - "type": "boolean" - }, - "ignoreZeroSizeFolders": { - "description": "ignore folders with 0 size", - "type": "boolean" - } - } - }, "settings.ExternalLink": { "type": "object", "required": [ @@ -3010,25 +3095,6 @@ const docTemplate = `{ } } }, - "settings.IncludeIndexFilter": { - "type": "object", - "properties": { - "rootFiles": { - "description": "list of root files to include, relative to the source path (eg. \"file1.txt\")", - "type": "array", - "items": { - "type": "string" - } - }, - "rootFolders": { - "description": "list of root folders to include, relative to the source path (eg. \"folder1\")", - "type": "array", - "items": { - "type": "string" - } - } - } - }, "settings.Integrations": { "type": "object", "properties": { @@ -3387,6 +3453,14 @@ const docTemplate = `{ "settings.SourceConfig": { "type": "object", "properties": { + "conditionals": { + "description": "conditional rules to apply when indexing to include/exclude certain items", + "allOf": [ + { + "$ref": "#/definitions/settings.ConditionalFilter" + } + ] + }, "createUserDir": { "description": "create a user directory for each user", "type": "boolean" @@ -3411,41 +3485,10 @@ const docTemplate = `{ "description": "disable the source, this is useful so you don't need to remove it from the config file", "type": "boolean" }, - "exclude": { - "description": "exclude files and folders from indexing, if include is not set", - "allOf": [ - { - "$ref": "#/definitions/settings.ExcludeIndexFilter" - } - ] - }, - "include": { - "description": "include files and folders from indexing, if exclude is not set", - "allOf": [ - { - "$ref": "#/definitions/settings.IncludeIndexFilter" - } - ] - }, - "indexAlbumArt": { - "description": "deprecated: always enabled since 0.8.6", - "type": "boolean" - }, "indexingIntervalMinutes": { "description": "optional manual overide interval in minutes to re-index the source", "type": "integer" }, - "maxWatchers": { - "description": "number of concurrent watchers to use for this source, currently not supported", - "type": "integer" - }, - "neverWatchPaths": { - "description": "paths that get initially once. Useful for folders that rarely change contents (without source path prefix)", - "type": "array", - "items": { - "type": "string" - } - }, "private": { "description": "designate as source as private -- currently just means no sharing permitted.", "type": "boolean" @@ -3606,8 +3649,19 @@ const docTemplate = `{ "share.CreateBody": { "type": "object", "properties": { - "allowUpload": { - "description": "AllowEdit bool ` + "`" + `json:\"allowEdit,omitempty\"` + "`" + `", + "allowCreate": { + "description": "allow creating files", + "type": "boolean" + }, + "allowDelete": { + "type": "boolean" + }, + "allowModify": { + "description": "allow modifying files", + "type": "boolean" + }, + "allowReplacements": { + "description": "allow replacements of files", "type": "boolean" }, "allowedUsernames": { @@ -3625,7 +3679,12 @@ const docTemplate = `{ "disableAnonymous": { "type": "boolean" }, + "disableDownload": { + "description": "don't allow downloading files", + "type": "boolean" + }, "disableFileViewer": { + "description": "don't allow viewing files", "type": "boolean" }, "disableShareCard": { @@ -3716,8 +3775,19 @@ const docTemplate = `{ "share.Link": { "type": "object", "properties": { - "allowUpload": { - "description": "AllowEdit bool ` + "`" + `json:\"allowEdit,omitempty\"` + "`" + `", + "allowCreate": { + "description": "allow creating files", + "type": "boolean" + }, + "allowDelete": { + "type": "boolean" + }, + "allowModify": { + "description": "allow modifying files", + "type": "boolean" + }, + "allowReplacements": { + "description": "allow replacements of files", "type": "boolean" }, "allowedUsernames": { @@ -3735,7 +3805,12 @@ const docTemplate = `{ "disableAnonymous": { "type": "boolean" }, + "disableDownload": { + "description": "don't allow downloading files", + "type": "boolean" + }, "disableFileViewer": { + "description": "don't allow viewing files", "type": "boolean" }, "disableShareCard": { @@ -3884,18 +3959,35 @@ const docTemplate = `{ "type": "object", "properties": { "admin": { + "description": "allow admin access", "type": "boolean" }, "api": { + "description": "allow api access", + "type": "boolean" + }, + "create": { + "description": "allow creating or uploading files", + "type": "boolean" + }, + "delete": { + "description": "allow deleting files", + "type": "boolean" + }, + "download": { + "description": "allow downloading files", "type": "boolean" }, "modify": { + "description": "allow modifying files", "type": "boolean" }, "realtime": { + "description": "allow realtime updates", "type": "boolean" }, "share": { + "description": "allow sharing files", "type": "boolean" } } @@ -4130,6 +4222,9 @@ const docTemplate = `{ "username": { "type": "string" }, + "version": { + "type": "integer" + }, "viewMode": { "description": "view mode to use: eg. normal, list, grid, or compact", "type": "string" diff --git a/backend/swagger/docs/swagger.json b/backend/swagger/docs/swagger.json index 60a952bd9c..a5de754410 100644 --- a/backend/swagger/docs/swagger.json +++ b/backend/swagger/docs/swagger.json @@ -2309,6 +2309,91 @@ } }, "/public/api/resources": { + "put": { + "description": "Updates the content of a file in a public share.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Public Shares" + ], + "summary": "Update a file in a public share", + "parameters": [ + { + "type": "string", + "description": "Share hash for authentication", + "name": "hash", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Path to the file to update", + "name": "path", + "in": "query", + "required": true + }, + { + "description": "New content for the file", + "name": "content", + "in": "body", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "File updated successfully", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "400": { + "description": "Invalid request or parameters", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Share unavailable or update not allowed", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Share not found or file not found", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, "post": { "description": "Handles file and directory uploads to an upload-only public share. Supports chunked uploads, conflict resolution (override), and directory creation.", "consumes": [ @@ -2822,6 +2907,75 @@ } } }, + "settings.ConditionalFilter": { + "type": "object", + "properties": { + "hidden": { + "description": "exclude hidden files and folders.", + "type": "boolean" + }, + "ignoreZeroSizeFolders": { + "description": "ignore folders with 0 size", + "type": "boolean" + }, + "rules": { + "description": "list of item rules to apply to specific paths", + "type": "array", + "items": { + "$ref": "#/definitions/settings.ConditionalIndexConfig" + } + } + } + }, + "settings.ConditionalIndexConfig": { + "type": "object", + "properties": { + "fileEndsWith": { + "description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"", + "type": "string" + }, + "fileNames": { + "description": "(global) exclude files that match these names. Eg. \"file.txt\" or \"test.csv\"", + "type": "string" + }, + "filePath": { + "description": "(global) exclude files that match this path. Eg. \"/path/to/file.txt\" or \"/path/to/file.txt/subfile.txt\"", + "type": "string" + }, + "fileStartsWith": { + "description": "(global) exclude files that start with these prefixes. Eg. \"archive-\" or \"backup-\"", + "type": "string" + }, + "folderEndsWith": { + "description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"", + "type": "string" + }, + "folderNames": { + "description": "(global) exclude folders that match these names. Eg. \"folder\" or \"subfolder\"", + "type": "string" + }, + "folderPath": { + "description": "(global) exclude folders that match this path. Eg. \"/path/to/folder\" or \"/path/to/folder/subfolder\"", + "type": "string" + }, + "folderStartsWith": { + "description": "(global) exclude folders that start with these prefixes. Eg. \"archive-\" or \"backup-\"", + "type": "string" + }, + "includeRootItem": { + "description": "include only these items at root folder level", + "type": "string" + }, + "neverWatchPath": { + "description": "index the folder in the first pass to get included in search, but never re-indexed.", + "type": "string" + }, + "viewable": { + "description": "Enable viewing in UI but exclude from indexing", + "type": "boolean" + } + } + }, "settings.CustomTheme": { "type": "object", "properties": { @@ -2835,75 +2989,6 @@ } } }, - "settings.ExcludeIndexFilter": { - "type": "object", - "properties": { - "fileEndsWith": { - "description": "(global) exclude files that end with these suffixes. Eg. \".jpg\" or \".txt\"", - "type": "array", - "items": { - "type": "string" - } - }, - "fileNames": { - "description": "(global) list of file names to include/exclude. Eg. \"a.jpg\"", - "type": "array", - "items": { - "type": "string" - } - }, - "filePaths": { - "description": "list of filepaths Eg. \"folder1\" or \"file1.txt\" or \"folder1/file1.txt\" (without source path prefix)", - "type": "array", - "items": { - "type": "string" - } - }, - "fileStartsWith": { - "description": "(global) exclude files that start with these prefixes. Eg. \"archive-\" or \"backup-\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderEndsWith": { - "description": "(global) exclude folders that end with these suffixes. Eg. \".thumbnails\" or \".git\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderNames": { - "description": "(global) list of folder names to include/exclude. Eg. \"@eadir\" or \".thumbnails\"", - "type": "array", - "items": { - "type": "string" - } - }, - "folderPaths": { - "description": "(filepath) list of folder names to include/exclude. Eg. \"folder1\" or \"folder1/subfolder\" (do not include source path, just the subpaths from the source path)", - "type": "array", - "items": { - "type": "string" - } - }, - "folderStartsWith": { - "description": "(global) exclude folders that start with these prefixes. Eg. \"archive-\" or \"backup-\"", - "type": "array", - "items": { - "type": "string" - } - }, - "hidden": { - "description": "exclude hidden files and folders.", - "type": "boolean" - }, - "ignoreZeroSizeFolders": { - "description": "ignore folders with 0 size", - "type": "boolean" - } - } - }, "settings.ExternalLink": { "type": "object", "required": [ @@ -2999,25 +3084,6 @@ } } }, - "settings.IncludeIndexFilter": { - "type": "object", - "properties": { - "rootFiles": { - "description": "list of root files to include, relative to the source path (eg. \"file1.txt\")", - "type": "array", - "items": { - "type": "string" - } - }, - "rootFolders": { - "description": "list of root folders to include, relative to the source path (eg. \"folder1\")", - "type": "array", - "items": { - "type": "string" - } - } - } - }, "settings.Integrations": { "type": "object", "properties": { @@ -3376,6 +3442,14 @@ "settings.SourceConfig": { "type": "object", "properties": { + "conditionals": { + "description": "conditional rules to apply when indexing to include/exclude certain items", + "allOf": [ + { + "$ref": "#/definitions/settings.ConditionalFilter" + } + ] + }, "createUserDir": { "description": "create a user directory for each user", "type": "boolean" @@ -3400,41 +3474,10 @@ "description": "disable the source, this is useful so you don't need to remove it from the config file", "type": "boolean" }, - "exclude": { - "description": "exclude files and folders from indexing, if include is not set", - "allOf": [ - { - "$ref": "#/definitions/settings.ExcludeIndexFilter" - } - ] - }, - "include": { - "description": "include files and folders from indexing, if exclude is not set", - "allOf": [ - { - "$ref": "#/definitions/settings.IncludeIndexFilter" - } - ] - }, - "indexAlbumArt": { - "description": "deprecated: always enabled since 0.8.6", - "type": "boolean" - }, "indexingIntervalMinutes": { "description": "optional manual overide interval in minutes to re-index the source", "type": "integer" }, - "maxWatchers": { - "description": "number of concurrent watchers to use for this source, currently not supported", - "type": "integer" - }, - "neverWatchPaths": { - "description": "paths that get initially once. Useful for folders that rarely change contents (without source path prefix)", - "type": "array", - "items": { - "type": "string" - } - }, "private": { "description": "designate as source as private -- currently just means no sharing permitted.", "type": "boolean" @@ -3595,8 +3638,19 @@ "share.CreateBody": { "type": "object", "properties": { - "allowUpload": { - "description": "AllowEdit bool `json:\"allowEdit,omitempty\"`", + "allowCreate": { + "description": "allow creating files", + "type": "boolean" + }, + "allowDelete": { + "type": "boolean" + }, + "allowModify": { + "description": "allow modifying files", + "type": "boolean" + }, + "allowReplacements": { + "description": "allow replacements of files", "type": "boolean" }, "allowedUsernames": { @@ -3614,7 +3668,12 @@ "disableAnonymous": { "type": "boolean" }, + "disableDownload": { + "description": "don't allow downloading files", + "type": "boolean" + }, "disableFileViewer": { + "description": "don't allow viewing files", "type": "boolean" }, "disableShareCard": { @@ -3705,8 +3764,19 @@ "share.Link": { "type": "object", "properties": { - "allowUpload": { - "description": "AllowEdit bool `json:\"allowEdit,omitempty\"`", + "allowCreate": { + "description": "allow creating files", + "type": "boolean" + }, + "allowDelete": { + "type": "boolean" + }, + "allowModify": { + "description": "allow modifying files", + "type": "boolean" + }, + "allowReplacements": { + "description": "allow replacements of files", "type": "boolean" }, "allowedUsernames": { @@ -3724,7 +3794,12 @@ "disableAnonymous": { "type": "boolean" }, + "disableDownload": { + "description": "don't allow downloading files", + "type": "boolean" + }, "disableFileViewer": { + "description": "don't allow viewing files", "type": "boolean" }, "disableShareCard": { @@ -3873,18 +3948,35 @@ "type": "object", "properties": { "admin": { + "description": "allow admin access", "type": "boolean" }, "api": { + "description": "allow api access", + "type": "boolean" + }, + "create": { + "description": "allow creating or uploading files", + "type": "boolean" + }, + "delete": { + "description": "allow deleting files", + "type": "boolean" + }, + "download": { + "description": "allow downloading files", "type": "boolean" }, "modify": { + "description": "allow modifying files", "type": "boolean" }, "realtime": { + "description": "allow realtime updates", "type": "boolean" }, "share": { + "description": "allow sharing files", "type": "boolean" } } @@ -4119,6 +4211,9 @@ "username": { "type": "string" }, + "version": { + "type": "integer" + }, "viewMode": { "description": "view mode to use: eg. normal, list, grid, or compact", "type": "string" diff --git a/backend/swagger/docs/swagger.yaml b/backend/swagger/docs/swagger.yaml index e6f81ddcb0..28d7d3413c 100644 --- a/backend/swagger/docs/swagger.yaml +++ b/backend/swagger/docs/swagger.yaml @@ -167,6 +167,65 @@ definitions: description: 'secret: secret used to encrypt TOTP secrets' type: string type: object + settings.ConditionalFilter: + properties: + hidden: + description: exclude hidden files and folders. + type: boolean + ignoreZeroSizeFolders: + description: ignore folders with 0 size + type: boolean + rules: + description: list of item rules to apply to specific paths + items: + $ref: '#/definitions/settings.ConditionalIndexConfig' + type: array + type: object + settings.ConditionalIndexConfig: + properties: + fileEndsWith: + description: (global) exclude files that end with these suffixes. Eg. ".jpg" + or ".txt" + type: string + fileNames: + description: (global) exclude files that match these names. Eg. "file.txt" + or "test.csv" + type: string + filePath: + description: (global) exclude files that match this path. Eg. "/path/to/file.txt" + or "/path/to/file.txt/subfile.txt" + type: string + fileStartsWith: + description: (global) exclude files that start with these prefixes. Eg. "archive-" + or "backup-" + type: string + folderEndsWith: + description: (global) exclude folders that end with these suffixes. Eg. ".thumbnails" + or ".git" + type: string + folderNames: + description: (global) exclude folders that match these names. Eg. "folder" + or "subfolder" + type: string + folderPath: + description: (global) exclude folders that match this path. Eg. "/path/to/folder" + or "/path/to/folder/subfolder" + type: string + folderStartsWith: + description: (global) exclude folders that start with these prefixes. Eg. + "archive-" or "backup-" + type: string + includeRootItem: + description: include only these items at root folder level + type: string + neverWatchPath: + description: index the folder in the first pass to get included in search, + but never re-indexed. + type: string + viewable: + description: Enable viewing in UI but exclude from indexing + type: boolean + type: object settings.CustomTheme: properties: css: @@ -176,63 +235,6 @@ definitions: description: The description of the theme to display in the UI. type: string type: object - settings.ExcludeIndexFilter: - properties: - fileEndsWith: - description: (global) exclude files that end with these suffixes. Eg. ".jpg" - or ".txt" - items: - type: string - type: array - fileNames: - description: (global) list of file names to include/exclude. Eg. "a.jpg" - items: - type: string - type: array - filePaths: - description: list of filepaths Eg. "folder1" or "file1.txt" or "folder1/file1.txt" - (without source path prefix) - items: - type: string - type: array - fileStartsWith: - description: (global) exclude files that start with these prefixes. Eg. "archive-" - or "backup-" - items: - type: string - type: array - folderEndsWith: - description: (global) exclude folders that end with these suffixes. Eg. ".thumbnails" - or ".git" - items: - type: string - type: array - folderNames: - description: (global) list of folder names to include/exclude. Eg. "@eadir" - or ".thumbnails" - items: - type: string - type: array - folderPaths: - description: (filepath) list of folder names to include/exclude. Eg. "folder1" - or "folder1/subfolder" (do not include source path, just the subpaths from - the source path) - items: - type: string - type: array - folderStartsWith: - description: (global) exclude folders that start with these prefixes. Eg. - "archive-" or "backup-" - items: - type: string - type: array - hidden: - description: exclude hidden files and folders. - type: boolean - ignoreZeroSizeFolders: - description: ignore folders with 0 size - type: boolean - type: object settings.ExternalLink: properties: text: @@ -302,21 +304,6 @@ definitions: styling: $ref: '#/definitions/settings.StylingConfig' type: object - settings.IncludeIndexFilter: - properties: - rootFiles: - description: list of root files to include, relative to the source path (eg. - "file1.txt") - items: - type: string - type: array - rootFolders: - description: list of root folders to include, relative to the source path - (eg. "folder1") - items: - type: string - type: array - type: object settings.Integrations: properties: media: @@ -582,6 +569,11 @@ definitions: type: object settings.SourceConfig: properties: + conditionals: + allOf: + - $ref: '#/definitions/settings.ConditionalFilter' + description: conditional rules to apply when indexing to include/exclude certain + items createUserDir: description: create a user directory for each user type: boolean @@ -601,30 +593,9 @@ definitions: description: disable the source, this is useful so you don't need to remove it from the config file type: boolean - exclude: - allOf: - - $ref: '#/definitions/settings.ExcludeIndexFilter' - description: exclude files and folders from indexing, if include is not set - include: - allOf: - - $ref: '#/definitions/settings.IncludeIndexFilter' - description: include files and folders from indexing, if exclude is not set - indexAlbumArt: - description: 'deprecated: always enabled since 0.8.6' - type: boolean indexingIntervalMinutes: description: optional manual overide interval in minutes to re-index the source type: integer - maxWatchers: - description: number of concurrent watchers to use for this source, currently - not supported - type: integer - neverWatchPaths: - description: paths that get initially once. Useful for folders that rarely - change contents (without source path prefix) - items: - type: string - type: array private: description: designate as source as private -- currently just means no sharing permitted. @@ -751,8 +722,16 @@ definitions: type: object share.CreateBody: properties: - allowUpload: - description: AllowEdit bool `json:"allowEdit,omitempty"` + allowCreate: + description: allow creating files + type: boolean + allowDelete: + type: boolean + allowModify: + description: allow modifying files + type: boolean + allowReplacements: + description: allow replacements of files type: boolean allowedUsernames: items: @@ -764,7 +743,11 @@ definitions: type: string disableAnonymous: type: boolean + disableDownload: + description: don't allow downloading files + type: boolean disableFileViewer: + description: don't allow viewing files type: boolean disableShareCard: type: boolean @@ -827,8 +810,16 @@ definitions: type: object share.Link: properties: - allowUpload: - description: AllowEdit bool `json:"allowEdit,omitempty"` + allowCreate: + description: allow creating files + type: boolean + allowDelete: + type: boolean + allowModify: + description: allow modifying files + type: boolean + allowReplacements: + description: allow replacements of files type: boolean allowedUsernames: items: @@ -840,7 +831,11 @@ definitions: type: string disableAnonymous: type: boolean + disableDownload: + description: don't allow downloading files + type: boolean disableFileViewer: + description: don't allow viewing files type: boolean disableShareCard: type: boolean @@ -946,14 +941,28 @@ definitions: users.Permissions: properties: admin: + description: allow admin access type: boolean api: + description: allow api access + type: boolean + create: + description: allow creating or uploading files + type: boolean + delete: + description: allow deleting files + type: boolean + download: + description: allow downloading files type: boolean modify: + description: allow modifying files type: boolean realtime: + description: allow realtime updates type: boolean share: + description: allow sharing files type: boolean type: object users.Preview: @@ -1122,6 +1131,8 @@ definitions: type: string username: type: string + version: + type: integer viewMode: description: 'view mode to use: eg. normal, list, grid, or compact' type: string @@ -2771,6 +2782,63 @@ paths: summary: Upload files to a public upload share tags: - Public Shares + put: + consumes: + - application/json + description: Updates the content of a file in a public share. + parameters: + - description: Share hash for authentication + in: query + name: hash + required: true + type: string + - description: Path to the file to update + in: query + name: path + required: true + type: string + - description: New content for the file + in: body + name: content + required: true + schema: + type: string + produces: + - application/json + responses: + "200": + description: File updated successfully + schema: + additionalProperties: + type: string + type: object + "400": + description: Invalid request or parameters + schema: + additionalProperties: + type: string + type: object + "403": + description: Share unavailable or update not allowed + schema: + additionalProperties: + type: string + type: object + "404": + description: Share not found or file not found + schema: + additionalProperties: + type: string + type: object + "500": + description: Internal server error + schema: + additionalProperties: + type: string + type: object + summary: Update a file in a public share + tags: + - Public Shares /public/api/share: get: consumes: diff --git a/frontend/public/config.generated.yaml b/frontend/public/config.generated.yaml index 3ff4340cbf..04c4d45a4b 100644 --- a/frontend/public/config.generated.yaml +++ b/frontend/public/config.generated.yaml @@ -27,22 +27,21 @@ server: disabled: false # disable the source, this is useful so you don't need to remove it from the config file indexingIntervalMinutes: 0 # optional manual overide interval in minutes to re-index the source disableIndexing: false # disable the indexing of this source - maxWatchers: 0 # number of concurrent watchers to use for this source, currently not supported - neverWatchPaths: # paths that get initially once. Useful for folders that rarely change contents (without source path prefix) - exclude: # exclude files and folders from indexing, if include is not set + conditionals: # conditional rules to apply when indexing to include/exclude certain items hidden: false # exclude hidden files and folders. ignoreZeroSizeFolders: false # ignore folders with 0 size - filePaths: # list of filepaths Eg. "folder1" or "file1.txt" or "folder1/file1.txt" (without source path prefix) - folderPaths: # (filepath) list of folder names to include/exclude. Eg. "folder1" or "folder1/subfolder" (do not include source path, just the subpaths from the source path) - fileNames: # (global) list of file names to include/exclude. Eg. "a.jpg" - folderNames: # (global) list of folder names to include/exclude. Eg. "@eadir" or ".thumbnails" - fileEndsWith: # (global) exclude files that end with these suffixes. Eg. ".jpg" or ".txt" - folderEndsWith: # (global) exclude folders that end with these suffixes. Eg. ".thumbnails" or ".git" - fileStartsWith: # (global) exclude files that start with these prefixes. Eg. "archive-" or "backup-" - folderStartsWith: # (global) exclude folders that start with these prefixes. Eg. "archive-" or "backup-" - include: # include files and folders from indexing, if exclude is not set - rootFolders: # list of root folders to include, relative to the source path (eg. "folder1") - rootFiles: # list of root files to include, relative to the source path (eg. "file1.txt") + rules: # list of item rules to apply to specific paths + - neverWatchPath: "" # index the folder in the first pass to get included in search, but never re-indexed. + includeRootItem: "" # include only these items at root folder level + fileStartsWith: "" # (global) exclude files that start with these prefixes. Eg. "archive-" or "backup-" + folderStartsWith: "" # (global) exclude folders that start with these prefixes. Eg. "archive-" or "backup-" + fileEndsWith: "" # (global) exclude files that end with these suffixes. Eg. ".jpg" or ".txt" + folderEndsWith: "" # (global) exclude folders that end with these suffixes. Eg. ".thumbnails" or ".git" + folderPath: "" # (global) exclude folders that match this path. Eg. "/path/to/folder" or "/path/to/folder/subfolder" + filePath: "" # (global) exclude files that match this path. Eg. "/path/to/file.txt" or "/path/to/file.txt/subfile.txt" + fileNames: "" # (global) exclude files that match these names. Eg. "file.txt" or "test.csv" + folderNames: "" # (global) exclude folders that match these names. Eg. "folder" or "subfolder" + viewable: false # Enable viewing in UI but exclude from indexing defaultUserScope: "/" # default "/" should match folders under path defaultEnabled: true # should be added as a default source for new users? createUserDir: false # create a user directory for each user @@ -143,11 +142,14 @@ userDefaults: defaultMediaPlayer: false # disable html5 media player and use the default media player folder: false # show thumbnail preview image for folder files permissions: - api: false - admin: false - modify: false - share: false - realtime: false + api: false # allow api access + admin: false # allow admin access + modify: false # allow modifying files + share: false # allow sharing files + realtime: false # allow realtime updates + delete: false # allow deleting files + create: false # allow creating or uploading files + download: false # allow downloading files loginMethod: "password" # login method to use: eg. password, proxy, oidc disableUpdateNotifications: false # disable update notifications banner for admin users deleteWithoutConfirming: false # delete files without confirmation diff --git a/frontend/src/assets/fonts/material/icons.woff2 b/frontend/public/fonts/material-icons.woff2 similarity index 100% rename from frontend/src/assets/fonts/material/icons.woff2 rename to frontend/public/fonts/material-icons.woff2 diff --git a/frontend/src/assets/fonts/roboto/bold-latin.woff2 b/frontend/public/fonts/roboto-bold-latin.woff2 similarity index 100% rename from frontend/src/assets/fonts/roboto/bold-latin.woff2 rename to frontend/public/fonts/roboto-bold-latin.woff2 diff --git a/frontend/src/assets/fonts/roboto/medium-latin.woff2 b/frontend/public/fonts/roboto-medium-latin.woff2 similarity index 100% rename from frontend/src/assets/fonts/roboto/medium-latin.woff2 rename to frontend/public/fonts/roboto-medium-latin.woff2 diff --git a/frontend/src/assets/fonts/roboto/normal-latin.woff2 b/frontend/public/fonts/roboto-normal-latin.woff2 similarity index 100% rename from frontend/src/assets/fonts/roboto/normal-latin.woff2 rename to frontend/public/fonts/roboto-normal-latin.woff2 diff --git a/frontend/public/index.html b/frontend/public/index.html index e736d79f1b..f7bb86504e 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -9,7 +9,11 @@ - + + + + + @@ -26,10 +30,10 @@ - + - + + + + diff --git a/frontend/src/components/prompts/Delete.vue b/frontend/src/components/prompts/Delete.vue index 212da8b485..4c0a592634 100644 --- a/frontend/src/components/prompts/Delete.vue +++ b/frontend/src/components/prompts/Delete.vue @@ -23,7 +23,7 @@ + + diff --git a/frontend/src/components/prompts/MoveCopy.vue b/frontend/src/components/prompts/MoveCopy.vue index 670313f6d2..b5c322a44c 100644 --- a/frontend/src/components/prompts/MoveCopy.vue +++ b/frontend/src/components/prompts/MoveCopy.vue @@ -9,7 +9,7 @@ sync

{{ $t("prompts.operationInProgress") }}

-
+
@@ -35,14 +35,15 @@ + + \ No newline at end of file diff --git a/frontend/src/components/prompts/Prompts.vue b/frontend/src/components/prompts/Prompts.vue index b32d589455..1ab202acd1 100644 --- a/frontend/src/components/prompts/Prompts.vue +++ b/frontend/src/components/prompts/Prompts.vue @@ -31,7 +31,10 @@ import buttons from "@/utils/buttons"; import Totp from "./Totp.vue"; import Access from "./Access.vue"; import Password from "./Password.vue"; +import PlaybackQueue from "./PlaybackQueue.vue"; import FileList from "./FileList.vue"; +import SaveBeforeExit from "./SaveBeforeExit.vue"; +import CopyPasteConfirm from "./CopyPasteConfirm.vue"; import { state, getters, mutations } from "@/store"; // Import your custom store export default { @@ -59,7 +62,10 @@ export default { ActionApi, Access, Password, + PlaybackQueue, "file-list": FileList, + SaveBeforeExit, + CopyPasteConfirm, }, data() { return { @@ -97,6 +103,9 @@ export default { case "replace": prompt.showConfirm(event); break; + case "CopyPasteConfirm": + prompt.confirm(); + break; } } }); diff --git a/frontend/src/components/prompts/Rename.vue b/frontend/src/components/prompts/Rename.vue index 56d28495b2..fc0da1a420 100644 --- a/frontend/src/components/prompts/Rename.vue +++ b/frontend/src/components/prompts/Rename.vue @@ -29,10 +29,9 @@
+ diff --git a/frontend/src/components/prompts/Share.vue b/frontend/src/components/prompts/Share.vue index 8c28804c1d..dfcaf93ead 100644 --- a/frontend/src/components/prompts/Share.vue +++ b/frontend/src/components/prompts/Share.vue @@ -98,10 +98,11 @@
- + + + + + 0) { - return this.$t("prompts.uploadSettingsChunked", { - maxConcurrentUpload, - uploadChunkSizeMb - }); - } else { - return this.$t("prompts.uploadSettingsNoChunk", { - maxConcurrentUpload - }); + let uploadChunkSizeMb = state.user.fileLoading?.uploadChunkSizeMb || 5; + if (uploadChunkSizeMb === 0) { + uploadChunkSizeMb = 5; } + return this.$t("prompts.uploadSettingsChunked", { + maxConcurrentUpload, + uploadChunkSizeMb + }); } }, setup(props) { @@ -197,7 +194,10 @@ export default { // Upload settings const maxConcurrentUpload = ref(state.user.fileLoading?.maxConcurrentUpload || 3); - const uploadChunkSizeMb = ref(state.user.fileLoading?.uploadChunkSizeMb || 0); + const uploadChunkSizeMb = ref(state.user.fileLoading?.uploadChunkSizeMb || 5); + if (uploadChunkSizeMb.value === 0) { + uploadChunkSizeMb.value = 5; + } const clearAll = ref(state.user.fileLoading?.clearAll || false); const showTooltip = (event, text) => { diff --git a/frontend/src/components/prompts/UserEdit.vue b/frontend/src/components/prompts/UserEdit.vue index 54cbbd9509..a7945e285e 100644 --- a/frontend/src/components/prompts/UserEdit.vue +++ b/frontend/src/components/prompts/UserEdit.vue @@ -9,7 +9,6 @@
-

sentiment_dissatisfied {{ $t("files.lonely") }}

-
@@ -63,7 +61,6 @@

-

@@ -333,7 +330,7 @@ export default { if (this.globalVars.passwordAvailable) validMethods.push("password"); if (this.globalVars.oidcAvailable) validMethods.push("oidc"); if (this.globalVars.proxyAvailable) validMethods.push("proxy"); - + if (!this.user.loginMethod || !validMethods.includes(this.user.loginMethod)) { this.user.loginMethod = this.firstAvailableLoginMethod; } @@ -349,7 +346,7 @@ export default { if (this.globalVars.passwordAvailable) validMethods.push("password"); if (this.globalVars.oidcAvailable) validMethods.push("oidc"); if (this.globalVars.proxyAvailable) validMethods.push("proxy"); - + if (!this.user.loginMethod || !validMethods.includes(this.user.loginMethod)) { this.user.loginMethod = this.firstAvailableLoginMethod; } @@ -499,9 +496,9 @@ export default { if (this.globalVars.passwordAvailable) validMethods.push("password"); if (this.globalVars.oidcAvailable) validMethods.push("oidc"); if (this.globalVars.proxyAvailable) validMethods.push("proxy"); - + const isValidMethod = validMethods.includes(this.user.loginMethod); - + if (!this.user.loginMethod || this.user.loginMethod === null || !isValidMethod) { this.user.loginMethod = this.firstAvailableLoginMethod; } diff --git a/frontend/src/components/settings/Permissions.vue b/frontend/src/components/settings/Permissions.vue index ba55ca4096..d4ec96f3e7 100644 --- a/frontend/src/components/settings/Permissions.vue +++ b/frontend/src/components/settings/Permissions.vue @@ -2,19 +2,14 @@

{{ $t("settings.permissions-name") }}

{{ $t("settings.permissionsHelp") }}

+ + + + - - +
diff --git a/frontend/src/components/sidebar/General.vue b/frontend/src/components/sidebar/General.vue index 7ddbc41646..feed159aca 100644 --- a/frontend/src/components/sidebar/General.vue +++ b/frontend/src/components/sidebar/General.vue @@ -16,7 +16,7 @@ settings
-
+
@@ -147,6 +147,7 @@ import ProgressBar from "@/components/ProgressBar.vue"; import { state, getters, mutations } from "@/store"; // Import your custom store import { getHumanReadableFilesize } from "@/utils/filesizes.js"; import { fromNow } from "@/utils/moment"; +import * as url from "@/utils/url"; export default { name: "SidebarGeneral", @@ -223,13 +224,29 @@ export default { mutations.updateCurrentUser({ stickySidebar: !state.user.stickySidebar }); }, navigateTo(path,hash) { - mutations.setPreviousHistoryItem({ - name: state.req.name, - source: state.req.source, - path: state.req.path, - }); - this.$router.push({ path: path, hash: hash }); - mutations.closeHovers(); + // Check if this is a file system navigation (starts with /files/) + if (path.startsWith('/files/')) { + // Extract source and path from the /files/ URL + const pathParts = path.replace('/files/', '').split('/'); + const source = pathParts[0]; + const filePath = '/' + pathParts.slice(1).join('/'); + const previousHistoryItem = { + name: state.req.name, + source: state.req.source, + path: state.req.path, + }; + url.goToItem(source, filePath, previousHistoryItem); + mutations.closeHovers(); + } else { + // For non-file system navigation (like settings), use the original method + mutations.setPreviousHistoryItem({ + name: state.req.name, + source: state.req.source, + path: state.req.path, + }); + this.$router.push({ path: path, hash: hash }); + mutations.closeHovers(); + } }, navigateToLogin() { this.$router.push({ path: "/login", query: { redirect: this.$route.path } }); diff --git a/frontend/src/components/sidebar/Sidebar.vue b/frontend/src/components/sidebar/Sidebar.vue index 96202e570e..a580c64661 100644 --- a/frontend/src/components/sidebar/Sidebar.vue +++ b/frontend/src/components/sidebar/Sidebar.vue @@ -50,6 +50,24 @@ export default { mounted() { // Ensure the sidebar is initialized correctly mutations.setSeenUpdate(localStorage.getItem("seenUpdate")); + // Add keyboard event listener for Ctrl+B to toggle sidebar + this.handleKeydown = (event) => { + if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'b') { + console.log("sticky sidebar", state.user.stickySidebar); + event.preventDefault(); + if (state.user.stickySidebar) { + mutations.updateCurrentUser({ stickySidebar: false }); + } + mutations.toggleSidebar(); + } + }; + document.addEventListener('keydown', this.handleKeydown); + }, + beforeUnmount() { + // Clean up event listener + if (this.handleKeydown) { + document.removeEventListener('keydown', this.handleKeydown); + } }, computed: { externalLinks: () => globalVars.externalLinks, diff --git a/frontend/src/css/fonts.css b/frontend/src/css/fonts.css index 7c42887006..2298d2d5a2 100644 --- a/frontend/src/css/fonts.css +++ b/frontend/src/css/fonts.css @@ -1,49 +1,21 @@ +/* Roboto Regular - Optimized for FileBrowser languages */ @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-cyrillic-ext.woff2) format('woff2'); - unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; + font-display: block; + src: local('Roboto'), local('Roboto-Regular'), + url(/fonts/roboto-normal-latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } @font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-cyrillic.woff2) format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-greek-ext.woff2) format('woff2'); - unicode-range: U+1F00-1FFF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-greek.woff2) format('woff2'); - unicode-range: U+0370-03FF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-vietnamese.woff2) format('woff2'); - unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-latin-ext.woff2) format('woff2'); + font-display: swap; + src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-normal-latin.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } @@ -51,7 +23,28 @@ font-family: 'Roboto'; font-style: normal; font-weight: 400; - src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-latin.woff2) format('woff2'); + font-display: swap; + src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-normal-latin.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-normal-latin.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} + +/* Roboto Medium - Optimized for FileBrowser languages */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: local('Roboto Medium'), local('Roboto-Medium'), + url(/fonts/roboto-medium-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } @@ -59,47 +52,8 @@ font-family: 'Roboto'; font-style: normal; font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-cyrillic-ext.woff2) format('woff2'); - unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-cyrillic.woff2) format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-greek-ext.woff2) format('woff2'); - unicode-range: U+1F00-1FFF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-greek.woff2) format('woff2'); - unicode-range: U+0370-03FF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-vietnamese.woff2) format('woff2'); - unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-latin-ext.woff2) format('woff2'); + font-display: swap; + src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium-latin.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } @@ -107,7 +61,28 @@ font-family: 'Roboto'; font-style: normal; font-weight: 500; - src: local('Roboto Medium'), local('Roboto-Medium'), url(../assets/fonts/roboto/medium-latin.woff2) format('woff2'); + font-display: swap; + src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium-latin.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium-latin.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} + +/* Roboto Bold - Optimized for FileBrowser languages */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: local('Roboto Bold'), local('Roboto-Bold'), + url(/fonts/roboto-bold-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } @@ -115,47 +90,8 @@ font-family: 'Roboto'; font-style: normal; font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-cyrillic-ext.woff2) format('woff2'); - unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-cyrillic.woff2) format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-greek-ext.woff2) format('woff2'); - unicode-range: U+1F00-1FFF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-greek.woff2) format('woff2'); - unicode-range: U+0370-03FF; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-vietnamese.woff2) format('woff2'); - unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-latin-ext.woff2) format('woff2'); + font-display: swap; + src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold-latin.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } @@ -163,23 +99,35 @@ font-family: 'Roboto'; font-style: normal; font-weight: 700; - src: local('Roboto Bold'), local('Roboto-Bold'), url(../assets/fonts/roboto/bold-latin.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; + font-display: swap; + src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold-latin.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } -/* fallback */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold-latin.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} + +/* Material Icons - Optimized with preload */ @font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; - src: url(../assets/fonts/material/icons.woff2) format('woff2'); + font-display: block; + src: url(/fonts/material-icons.woff2) format('woff2'); } -/* fallback */ + @font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400; - src: url(../assets/fonts/material/symbols-outlined.woff) format('woff'); + font-display: swap; + src: url(/fonts/material-icons.woff2) format('woff2'); } .material-icons { diff --git a/frontend/src/i18n/ar.json b/frontend/src/i18n/ar.json index 418abc5475..188d74f3e8 100644 --- a/frontend/src/i18n/ar.json +++ b/frontend/src/i18n/ar.json @@ -57,7 +57,11 @@ "galleryView": "عرض المعرض", "uploadFiles": "تحميل الملفات", "uploadFolder": "تحميل المجلد", - "openUploadViewer": "فتح مدير التحميل المفتوح" + "openUploadViewer": "فتح مدير التحميل المفتوح", + "selectAll": "اختر الكل", + "discardAndExit": "التخلص والخروج", + "saveAndExit": "الحفظ والخروج", + "keepEditing": "استمر في التحرير" }, "download": { "downloadFile": "Download File", @@ -86,13 +90,19 @@ "sortByLastModified": "الترتيب بآخر تعديل", "sortByName": "الترتيب بالإسم", "sortBySize": "الترتيب بالحجم", - "noPreview": "المعاينة غير متوفرة لهذا الملف." + "noPreview": "المعاينة غير متوفرة لهذا الملف.", + "noDownloadAccess": "التنزيل غير متاح." }, "help": { "click": "حدد الملف أو المجلد", "ctrl": { "click": "حدد أكثر من ملف او مجلد", - "d": "تنزيل عناصر مختارة" + "d": "تنزيل عناصر مختارة", + "b": "تبديل الشريط الجانبي", + "comma": "الانتقال إلى الإعدادات", + "c": "نسخ العناصر المحددة", + "v": "لصق العناصر المنسوخة/المقطوعة", + "x": "قطع العناصر المختارة" }, "del": "حذف البيانات المحددة", "esc": "مسح التحديد وإغلاق النافذة المنبثقة", @@ -100,7 +110,8 @@ "help": "مساعدة", "f1": "إظهار موجه المساعدة", "description": "يمكنك عرض خيارات التنقل الأساسية أدناه. للحصول على معلومات إضافية، يرجى زيارة", - "wiki": "ويكي متصفح الملفات الكمي" + "slash": "تفعيل البحث", + "wiki": "مستندات FileBrowser Quantum الرسمية" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "تم نسخ الملفات بنجاح!", "lastModified": "آخر تعديل{suffix}", "size": "الحجم{suffix}", - "operationInProgress": "العملية جارية، يرجى الانتظار..." + "operationInProgress": "العملية جارية، يرجى الانتظار...", + "saveBeforeExit": "التغييرات غير المحفوظة", + "saveBeforeExitMessage": "لديك تغييرات غير محفوظة في المحرر. ماذا تريد أن تفعل؟", + "copyPasteConfirm": "تأكيد النسخ/اللصق", + "copyItemQuestion": "نسخ هذا العنصر إلى الموقع الجديد؟", + "moveItemQuestion": "نقل هذا العنصر إلى الموقع الجديد؟", + "sourcePath": "المصدر:", + "destinationPath": "الوجهة" }, "search": { "images": "الصور", @@ -271,7 +289,10 @@ "share": "Share files", "admin": "المدير", "api": "إنشاء مفاتيح API طويلة الأمد وإدارتها", - "realtime": "تمكين الاتصالات والتحديثات في الوقت الفعلي" + "realtime": "تمكين الاتصالات والتحديثات في الوقت الفعلي", + "create": "إنشاء الملفات", + "delete": "حذف الملفات", + "download": "تنزيل الملفات" }, "permissions-name": "الصلاحيات", "permissionsHelp": "يمكنك تعيين المستخدم كـ \"مدير\" أو تحديد الصلاحيات بشكل منفرد.\n إذا قمت بتحديد المستخدم كـ \"مدير\"، باقي الخيارات سيتم تحديدها تلقائياً.\n إدارة المستخدمين تبقى صلاحية فريدة للـ \"مدير\" فقط.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "عند التمكين، سيتم تطبيق حد التنزيلات على كل مستخدم. لن يتمكن المستخدمون المجهولون من تنزيل أي ملفات من هذه المشاركة.", "descriptionUploadDefault": "تم إرسال مشاركة إليك لتحميل الملفات.", "extractEmbeddedSubtitles": "استخراج الترجمات المضمنة", - "extractEmbeddedSubtitlesDescription": "استخراج العناوين الفرعية المضمنة من ملفات الوسائط عند التحميل - قد يكون هذا بطيئًا بالنسبة للملفات الكبيرة." + "extractEmbeddedSubtitlesDescription": "استخراج العناوين الفرعية المضمنة من ملفات الوسائط عند التحميل - قد يكون هذا بطيئًا بالنسبة للملفات الكبيرة.", + "disableDownload": "تعطيل تنزيل الملفات", + "disableDownloadDescription": "لن يتمكن أي شخص من تنزيل الملفات أو عرض محتوى الملف.", + "allowModify": "السماح بتحرير الملفات", + "allowModifyDescription": "يمكن لأي شخص تحرير الملفات في هذه المشاركة.", + "allowDelete": "السماح بحذف الملفات", + "allowDeleteDescription": "يمكن لأي شخص حذف الملفات والمجلدات من هذه المشاركة.", + "allowReplacements": "السماح باستبدال الملفات", + "allowReplacementsDescription": "يمكن لأي شخص استبدال الملفات الموجودة عند تحميل ملفات بنفس الاسم.", + "allowCreate": "إتاحة إنشاء الملفات والمجلدات وتحميلها", + "allowCreateDescription": "يمكن لأي شخص إنشاء ملفات ومجلدات جديدة وتحميلها في هذه المشاركة." }, "api": { "title": "مفاتيح واجهة برمجة التطبيقات (API):", @@ -594,15 +625,19 @@ "uninitialized": "فشل في تهيئة المحرر. يرجى إعادة التحميل.", "saveFailed": "فشل حفظ الملف. يرجى المحاولة مرة أخرى.", "saveAborted": "تم إجهاض الحفظ. اسم الملف غير مطابق للملف النشط.", - "saveDisabled": "حفظ الملفات المشتركة غير مدعوم.", "saveAbortedMessage": "تم إجهاض عملية الحفظ. الملف النشط للتطبيق ({activeFile}) لا يتطابق مع الملف الذي تحاول حفظه ({tryingToSave}).", "syncFailed": "فشل مزامنة الحالة مع مسار \"{filename}\" بعد 5 محاولات. إجهاض إعداد المحرر لمنع تلف البيانات." }, "player": { - "LoopEnabled": "تمكين الحلقة", - "LoopDisabled": "حلقة معطلة", + "LoopEnabled": "تفعيل التكرار", + "LoopDisabled": "تعطيل التكرار", "PlayAllOncePlayback": "تشغيل الكل مرة واحدة", - "ShuffleAllPlayback": "تشغيل الكل عشوائيًا", - "PlayAllLoopedPlayback": "تشغيل كل المقاطع بشكل متكرر" + "ShuffleAllPlayback": "تشغيل عشوائي للكل", + "PlayAllLoopedPlayback": "تشغيل الكل مع التكرار", + "QueueButtonHint": "إظهار قائمة التشغيل", + "QueuePlayback": "قائمة التشغيل", + "changePlaybackMode": "تغيير وضع التشغيل", + "changePlaybackModeHint": "غير وضع التشغيل لرؤية المزيد من الملفات", + "emptyQueue": "قائمة التشغيل فارغة" } } diff --git a/frontend/src/i18n/cz.json b/frontend/src/i18n/cz.json index 350b9c06f7..24d005aeeb 100644 --- a/frontend/src/i18n/cz.json +++ b/frontend/src/i18n/cz.json @@ -57,7 +57,11 @@ "galleryView": "Pohled do galerie", "uploadFiles": "Nahrávání souborů", "uploadFolder": "Nahrát složku", - "openUploadViewer": "Otevřít Správce nahrávání" + "openUploadViewer": "Otevřít Správce nahrávání", + "selectAll": "Vyberte vše", + "discardAndExit": "Vyřazení a ukončení", + "saveAndExit": "Uložit a ukončit", + "keepEditing": "Pokračovat v úpravách" }, "download": { "downloadFile": "Stáhnout soubor", @@ -89,13 +93,19 @@ "sortByLastModified": "Řadit podle poslední změny", "sortByName": "Řadit podle názvu", "sortBySize": "Řadit podle velikosti", - "noPreview": "Náhled pro tento soubor není dostupný." + "noPreview": "Náhled pro tento soubor není dostupný.", + "noDownloadAccess": "Stahování není k dispozici." }, "help": { "click": "označit soubor nebo složku", "ctrl": { "click": "označit více souborů nebo složek", - "d": "stáhnout vybrané položky" + "d": "stáhnout vybrané položky", + "b": "přepínání postranního panelu", + "comma": "přejít do nastavení", + "c": "kopírování vybraných položek", + "v": "vložit zkopírované/vyjmuté položky", + "x": "řezání vybraných položek" }, "del": "smazat označené položky", "esc": "zrušit označení a/nebo zavřít dialog", @@ -103,7 +113,8 @@ "help": "Nápověda", "f1": "zobrazit výzvu nápovědy", "description": "Základní možnosti navigace si můžete prohlédnout níže. Další informace naleznete na adrese", - "wiki": "FileBrowser Quantum Wiki" + "slash": "aktivovat vyhledávání", + "wiki": "Oficiální dokumenty k aplikaci FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -198,7 +209,17 @@ "perUserDownloadLimitDescription": "Pokud je tato možnost povolena, bude limit stahování platit pro každého uživatele. Anonymní uživatelé nebudou moci z této sdílené složky stahovat žádné soubory.", "descriptionUploadDefault": "Byla vám zaslána sdílená složka pro nahrávání souborů.", "extractEmbeddedSubtitles": "Výpis vložených titulků", - "extractEmbeddedSubtitlesDescription": "Extrahovat vložené titulky z mediálních souborů při načítání - u velkých souborů to může být pomalé." + "extractEmbeddedSubtitlesDescription": "Extrahovat vložené titulky z mediálních souborů při načítání - u velkých souborů to může být pomalé.", + "disableDownload": "Zakázat stahování souborů", + "disableDownloadDescription": "Nikdo nebude moci stahovat soubory ani prohlížet jejich obsah.", + "allowModify": "Povolení úprav souborů", + "allowModifyDescription": "Soubory v tomto sdíleném souboru může upravovat kdokoli.", + "allowDelete": "Povolit mazání souborů", + "allowDeleteDescription": "Soubory a složky může z této sdílené složky odstranit kdokoli.", + "allowReplacements": "Povolení nahrazení souborů", + "allowReplacementsDescription": "Při nahrávání souborů se stejným názvem může kdokoli nahradit stávající soubory.", + "allowCreate": "Umožnit vytváření a nahrávání souborů a složek", + "allowCreateDescription": "V této sdílené složce může kdokoli vytvářet a nahrávat nové soubory a složky." }, "prompts": { "copy": "Kopírovat", @@ -260,7 +281,14 @@ "copySuccess": "Soubory byly úspěšně zkopírovány!", "lastModified": "Poslední úprava{suffix}", "size": "Velikost{suffix}", - "operationInProgress": "Probíhá operace, vyčkejte prosím..." + "operationInProgress": "Probíhá operace, vyčkejte prosím...", + "saveBeforeExit": "Neuložené změny", + "saveBeforeExitMessage": "V editoru máte neuložené změny. Co byste chtěli udělat?", + "copyPasteConfirm": "Potvrzení o kopírování/vkládání", + "copyItemQuestion": "Zkopírovat tuto položku do nového umístění?", + "moveItemQuestion": "Přesunout tuto položku na nové místo?", + "sourcePath": "Zdroj:", + "destinationPath": "Cílová destinace:" }, "search": { "images": "Obrázky", @@ -414,7 +442,10 @@ "modify": "Upravit soubory", "share": "Sdílet soubory", "api": "Vytvářet a spravovat dlouhodobé API klíče", - "realtime": "Povolit real-time připojení a aktualizace" + "realtime": "Povolit real-time připojení a aktualizace", + "create": "Vytvořit soubory", + "delete": "Odstranění souborů", + "download": "Soubory ke stažení" }, "permissions-name": "Oprávnění", "permissionsHelp": "Uživatele můžete nastavit jako administrátora nebo vybrat jednotlivá oprávnění. Pokud zvolíte \"Administrátor\", ostatní možnosti budou automaticky zaškrtnuty. Správa uživatelů zůstává pouze výsadou administrátora.\n", @@ -594,15 +625,19 @@ "uninitialized": "Nepodařilo se inicializovat editor. Prosím, načtěte jej znovu.", "saveFailed": "Soubor se nepodařilo uložit. Zkuste to prosím znovu.", "saveAborted": "Uložení přerušeno. Název souboru neodpovídá aktivnímu souboru.", - "saveDisabled": "Ukládání sdílených souborů není podporováno.", "saveAbortedMessage": "Operace ukládání byla přerušena. Aktivní soubor aplikace ({activeFile}) neodpovídá souboru, který se pokoušíte uložit ({tryingToSave}).", "syncFailed": "po 5 pokusech se nepodařilo synchronizovat stav s trasou pro \"{filename}\". Přerušení nastavení editoru, aby se zabránilo poškození dat." }, "player": { "LoopEnabled": "Smyčka povolena", "LoopDisabled": "Smyčka zakázána", - "PlayAllOncePlayback": "Přehrát vše najednou", - "ShuffleAllPlayback": "Zamíchat vše", - "PlayAllLoopedPlayback": "Přehrát vše v smyčce" + "PlayAllOncePlayback": "Přehrát vše jednou", + "ShuffleAllPlayback": "Náhodné přehrávání všeho", + "PlayAllLoopedPlayback": "Přehrát vše ve smyčce", + "QueueButtonHint": "Zobrazit frontu přehrávání", + "QueuePlayback": "Fronta přehrávání", + "changePlaybackMode": "Změnit režim přehrávání", + "changePlaybackModeHint": "Změňte režim přehrávání, abyste viděli více souborů", + "emptyQueue": "Fronta je prázdná" } } diff --git a/frontend/src/i18n/de.json b/frontend/src/i18n/de.json index b795e111c9..7120857f45 100644 --- a/frontend/src/i18n/de.json +++ b/frontend/src/i18n/de.json @@ -57,7 +57,11 @@ "galleryView": "Galerie-Ansicht", "uploadFiles": "Dateien hochladen", "uploadFolder": "Upload-Ordner", - "openUploadViewer": "Upload-Manager öffnen" + "openUploadViewer": "Upload-Manager öffnen", + "selectAll": "Alle auswählen", + "discardAndExit": "Verwerfen und Beenden", + "saveAndExit": "Speichern und Beenden", + "keepEditing": "Weiter bearbeiten" }, "download": { "downloadFile": "Datei herunterladen", @@ -69,7 +73,7 @@ "internal": "Etwas ist schief gelaufen.", "notFound": "Dieser Ort kann nicht angezeigt werden.", "connection": "Der Server ist nicht erreichbar.", - "shareNotFound": "Ungültige oder abgelaufene Aktie." + "shareNotFound": "Ungültige oder abgelaufene Freigabe." }, "files": { "body": "Body", @@ -86,13 +90,19 @@ "sortByLastModified": "Nach Änderungsdatum sortieren", "sortByName": "Nach Namen sortieren", "sortBySize": "Nach Größe sortieren", - "noPreview": "Für diese Datei ist keine Vorschau verfügbar." + "noPreview": "Für diese Datei ist keine Vorschau verfügbar.", + "noDownloadAccess": "Der Download ist nicht verfügbar." }, "help": { "click": "Wähle Datei oder Ordner", "ctrl": { "click": "Markiere mehrere Dateien oder Ordner", - "d": "ausgewählte Artikel herunterladen" + "d": "ausgewählte Artikel herunterladen", + "b": "Seitenleiste umklappen", + "comma": "zu den Einstellungen gehen", + "c": "ausgewählte Elemente kopieren", + "v": "Kopierte/ausgeschnittene Elemente einfügen", + "x": "ausgewählte Artikel ausschneiden" }, "del": "Löscht die ausgewählten Elemente", "esc": "Auswahl zurücksetzen und/oder Dialog schließen", @@ -100,7 +110,8 @@ "help": "Hilfe", "f1": "Hilfeprompt anzeigen", "description": "Nachstehend finden Sie die grundlegenden Navigationsoptionen. Für zusätzliche Informationen besuchen Sie bitte", - "wiki": "FileBrowser Quantum Wiki" + "slash": "Suche aktivieren", + "wiki": "FileBrowser Quantum Offizielle Dokumente" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Dateien erfolgreich kopiert!", "lastModified": "Zuletzt modifiziert{suffix}", "size": "Größe{suffix}", - "operationInProgress": "Operation im Gange, bitte warten..." + "operationInProgress": "Operation im Gange, bitte warten...", + "saveBeforeExit": "Nicht gespeicherte Änderungen", + "saveBeforeExitMessage": "Sie haben ungespeicherte Änderungen im Editor. Was würden Sie gerne tun?", + "copyPasteConfirm": "Kopieren/Einfügen-Bestätigung", + "copyItemQuestion": "Dieses Element an den neuen Ort kopieren?", + "moveItemQuestion": "Diesen Artikel an den neuen Ort verschieben?", + "sourcePath": "Quelle:", + "destinationPath": "Zielort:" }, "search": { "images": "Bilder", @@ -275,7 +293,10 @@ "share": "Datei teilen", "admin": "Verwalter", "api": "Erstellen und Verwalten von API-Schlüsseln mit langer Lebensdauer", - "realtime": "Verbindungen und Aktualisierungen in Echtzeit ermöglichen" + "realtime": "Verbindungen und Aktualisierungen in Echtzeit ermöglichen", + "create": "Dateien erstellen", + "delete": "Dateien löschen", + "download": "Dateien herunterladen" }, "permissions-name": "Berechtigungen", "permissionsHelp": "Sie können einem Benutzer Administratorrechte einräumen oder die Berechtigunen individuell festlegen. Wenn Sie \"Administrator\" auswählen, werden alle anderen Rechte automatisch vergeben. Die Nutzerverwaltung kann nur durch einen Administrator erfolgen.\n", @@ -388,7 +409,7 @@ "shareDurationDescription": "Dauer, bevor die Freigabe abläuft. Für eine dauerhafte Freigabe leer lassen.", "passwordDescription": "Optionales Kennwort, das für den Zugriff auf diese Freigabe erforderlich ist, einschließlich authentifizierter Benutzer.", "allowedUsernamesListDescription": "Durch Kommata getrennte Benutzernamen, die auf die Freigabe zugreifen können (wenn aktiviert).", - "shareThemeColorDescription": "CSS-Farbwert, der auf das Thema der Aktie angewendet wird (z. B. rot, #0ea5e9, rgb(14,165,233)).", + "shareThemeColorDescription": "CSS-Farbwert, der auf das Thema der Freigabe angewendet wird (z. B. rot, #0ea5e9, rgb(14,165,233)).", "shareTitleDescription": "Benutzerdefinierter Seitentitel, der auf der Freigabeseite angezeigt wird.", "shareDescriptionHelp": "Kurze Beschreibung, die auf der Freigabeseite angezeigt wird (kann in Meta-Tags verwendet werden).", "shareLogoDescription": "Logo-Bild-URL oder -Pfad, auf den der Client zugreifen kann - es wird entweder ein absoluter oder ein Indexpfad akzeptiert: z. B. \"https://domain.com/logo.png\" oder \"/pfad/zu/logo.png\".", @@ -397,7 +418,7 @@ "hideNavButtons": "Navigationsschaltflächen ausblenden", "hideNavButtonsDescription": "Blenden Sie die Navigationsschaltflächen auf der Navigationsleiste in der Freigabe aus, um ein minimalistisches Aussehen zu erzielen.", "viewModeDescription": "Standardlayout für die gemeinsame Seite.", - "descriptionDefault": "Sie haben eine Aktie zur Ansicht oder zum Download erhalten.", + "descriptionDefault": "Sie haben eine Freigabe zur Ansicht oder zum Download erhalten.", "disableShareCard": "Freigabekarte deaktivieren", "disableShareCardDescription": "Deaktivieren Sie die Freigabekarte auf der freigegebenen Seite in der Seitenleiste oder oben auf der Seite auf dem Handy.", "disableSidebar": "Seitenleiste deaktivieren", @@ -415,7 +436,7 @@ "defaultViewMode": "Standard-Ansichtsmodus", "defaultViewModeDescription": "Legen Sie den Standardanzeigemodus für anonyme Benutzer fest, die diese Freigabe anzeigen. Angemeldete Benutzer können ihre Ansichtseinstellungen immer noch ändern.", "disableFileViewer": "Dateibetrachter deaktivieren", - "shareType": "Typ der Aktie", + "shareType": "Typ der Freigabe", "shareTypeDescription": "Der Typ der zu erstellenden Freigabe. Normale Freigaben ermöglichen das Anzeigen und Herunterladen von Dateien. Upload-Freigaben ermöglichen das Hochladen von Dateien in die Freigabe.", "normalShare": "Normal", "uploadShare": "Nur hochladen", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Wenn diese Option aktiviert ist, wird das Download-Limit auf jeden Benutzer angewendet. Anonyme Benutzer können keine Dateien von dieser Freigabe herunterladen.", "descriptionUploadDefault": "Sie haben eine Freigabe zum Hochladen von Dateien erhalten.", "extractEmbeddedSubtitles": "Eingebettete Untertitel extrahieren", - "extractEmbeddedSubtitlesDescription": "Extrahieren von eingebetteten Untertiteln aus Mediendateien beim Laden - dies kann bei großen Dateien langsam sein." + "extractEmbeddedSubtitlesDescription": "Extrahieren von eingebetteten Untertiteln aus Mediendateien beim Laden - dies kann bei großen Dateien langsam sein.", + "disableDownload": "Herunterladen von Dateien deaktivieren", + "disableDownloadDescription": "Niemand wird in der Lage sein, Dateien herunterzuladen oder den Inhalt einer Datei einzusehen.", + "allowModify": "Bearbeitung von Dateien zulassen", + "allowModifyDescription": "Jeder kann Dateien in dieser Freigabe bearbeiten.", + "allowDelete": "Löschen von Dateien zulassen", + "allowDeleteDescription": "Jeder kann Dateien und Ordner von dieser Freigabe löschen.", + "allowReplacements": "Ersetzen von Dateien zulassen", + "allowReplacementsDescription": "Jeder kann beim Hochladen von Dateien mit demselben Namen bestehende Dateien ersetzen.", + "allowCreate": "Ermöglicht das Erstellen und Hochladen von Dateien und Ordnern", + "allowCreateDescription": "Jeder kann neue Dateien und Ordner in dieser Freigabe erstellen und hochladen." }, "api": { "title": "API-Schlüssel:", @@ -594,15 +625,19 @@ "uninitialized": "Der Editor konnte nicht initialisiert werden. Bitte neu laden.", "saveFailed": "Datei konnte nicht gespeichert werden. Bitte versuchen Sie es erneut.", "saveAborted": "Speichern abgebrochen. Der Dateiname stimmt nicht mit der aktiven Datei überein.", - "saveDisabled": "Das Speichern von gemeinsam genutzten Dateien wird nicht unterstützt.", "saveAbortedMessage": "Der Speichervorgang wurde abgebrochen. Die aktive Datei der Anwendung ({activeFile}) stimmt nicht mit der Datei überein, die Sie zu speichern versuchen ({tryingToSave}).", "syncFailed": "Nach 5 Versuchen ist es nicht gelungen, den Status mit der Route für \"{filename}\" zu synchronisieren. Abbruch der Editor-Einrichtung, um Datenbeschädigung zu vermeiden." }, "player": { - "LoopEnabled": "Schleife aktiviert", - "LoopDisabled": "Schleife deaktiviert", - "PlayAllOncePlayback": "Alle auf einmal abspielen", - "ShuffleAllPlayback": "Alle mischen", - "PlayAllLoopedPlayback": "Alle in Schleife abspielen" + "LoopEnabled": "Wiederholung aktiviert", + "LoopDisabled": "Wiederholung deaktiviert", + "PlayAllOncePlayback": "Alle einmal abspielen", + "ShuffleAllPlayback": "Alles zufällig abspielen", + "PlayAllLoopedPlayback": "Alle in Wiederholung abspielen", + "QueueButtonHint": "Wiedergabeliste anzeigen", + "QueuePlayback": "Wiedergabeliste", + "changePlaybackMode": "Wiedergabemodus ändern", + "changePlaybackModeHint": "Ändern Sie den Wiedergabemodus, um mehr Dateien zu sehen", + "emptyQueue": "Warteschlange ist leer" } } diff --git a/frontend/src/i18n/el.json b/frontend/src/i18n/el.json index 170ff133e7..142b790a82 100644 --- a/frontend/src/i18n/el.json +++ b/frontend/src/i18n/el.json @@ -57,7 +57,11 @@ "galleryView": "Προβολή γκαλερί", "uploadFiles": "Ανέβασμα αρχείων", "uploadFolder": "Φόρτωση φακέλου", - "openUploadViewer": "Άνοιγμα του Διαχειριστή φόρτωσης" + "openUploadViewer": "Άνοιγμα του Διαχειριστή φόρτωσης", + "selectAll": "Επιλέξτε όλα", + "discardAndExit": "Απόρριψη και έξοδος", + "saveAndExit": "Αποθήκευση και έξοδος", + "keepEditing": "Συνεχίστε την επεξεργασία" }, "download": { "downloadFile": "Λήψη αρχείου", @@ -89,13 +93,19 @@ "sortByLastModified": "Ταξινόμηση κατά πρόσφατη τροποποίηση", "sortByName": "Ταξινόμηση κατά όνομα", "sortBySize": "Ταξινόμηση κατά μέγεθος", - "noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο." + "noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο.", + "noDownloadAccess": "Η λήψη δεν είναι διαθέσιμη." }, "help": { "click": "επιλέξτε αρχείο ή φάκελο", "ctrl": { "click": "επιλογή πολλαπλών αρχείων ή φακέλων", - "d": "λήψη επιλεγμένων στοιχείων" + "d": "λήψη επιλεγμένων στοιχείων", + "b": "εναλλαγή πλευρικής μπάρας", + "comma": "μεταβείτε στις ρυθμίσεις", + "c": "αντιγραφή επιλεγμένων στοιχείων", + "v": "επικόλληση αντιγραμμένων/κομμένων στοιχείων", + "x": "κόψτε επιλεγμένα αντικείμενα" }, "del": "διαγραφή επιλεγμένων στοιχείων", "esc": "καθαρίζει την επιλογή ή/και κλείνει το παράθυρο", @@ -103,7 +113,8 @@ "help": "Βοήθεια", "f1": "Εμφάνιση προτροπής βοήθειας", "description": "Μπορείτε να δείτε τις βασικές επιλογές πλοήγησης παρακάτω. Για πρόσθετες πληροφορίες, επισκεφθείτε τη διεύθυνση", - "wiki": "FileBrowser Quantum Wiki" + "slash": "ενεργοποιήστε την αναζήτηση", + "wiki": "Επίσημα έγγραφα του FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -205,7 +216,14 @@ "copySuccess": "Τα αρχεία αντιγράφηκαν με επιτυχία!", "lastModified": "Τελευταία τροποποίηση{suffix}", "size": "Μέγεθος{suffix}", - "operationInProgress": "Λειτουργία σε εξέλιξη, παρακαλώ περιμένετε..." + "operationInProgress": "Λειτουργία σε εξέλιξη, παρακαλώ περιμένετε...", + "saveBeforeExit": "Μη αποθηκευμένες αλλαγές", + "saveBeforeExitMessage": "Έχετε μη αποθηκευμένες αλλαγές στον επεξεργαστή. Τι θα θέλατε να κάνετε;", + "copyPasteConfirm": "Επιβεβαίωση αντιγραφής/επικόλλησης", + "copyItemQuestion": "Αντιγράψτε αυτό το στοιχείο στη νέα θέση;", + "moveItemQuestion": "Μετακινήστε αυτό το στοιχείο στη νέα θέση;", + "sourcePath": "Πηγή:", + "destinationPath": "Προορισμός:" }, "search": { "images": "Εικόνες", @@ -281,7 +299,10 @@ "share": "Κοινοποίηση αρχείων", "admin": "Διαχειριστής", "api": "Δημιουργία και διαχείριση κλειδιών API μακράς διάρκειας ζωής", - "realtime": "Ενεργοποίηση συνδέσεων και ενημερώσεων σε πραγματικό χρόνο" + "realtime": "Ενεργοποίηση συνδέσεων και ενημερώσεων σε πραγματικό χρόνο", + "create": "Δημιουργία αρχείων", + "delete": "Διαγραφή αρχείων", + "download": "Λήψη αρχείων" }, "permissions-name": "Δικαιώματα", "permissionsHelp": "Μπορείτε να ορίσετε τον χρήστη ως διαχειριστή ή να επιλέξετε τα δικαιώματα μεμονωμένα. Αν επιλέξετε \"Διαχειριστής\", όλες οι υπόλοιπες επιλογές θα είναι αυτόματα επιλεγμένες. Η διαχείριση χρηστών παραμένει προνόμιο ενός χρήστη με τον ρόλο του διαχειριστή.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Όταν είναι ενεργοποιημένο, το όριο λήψεων θα εφαρμόζεται σε κάθε χρήστη. Οι ανώνυμοι χρήστες δεν θα μπορούν να κατεβάζουν αρχεία από αυτό το share.", "descriptionUploadDefault": "Σας έχει σταλεί ένα share για να ανεβάσετε αρχεία.", "extractEmbeddedSubtitles": "Απόσπασμα ενσωματωμένων υπότιτλων", - "extractEmbeddedSubtitlesDescription": "Εξαγωγή ενσωματωμένων υποτίτλων από αρχεία πολυμέσων κατά τη φόρτωση - αυτό μπορεί να είναι αργό για μεγάλα αρχεία." + "extractEmbeddedSubtitlesDescription": "Εξαγωγή ενσωματωμένων υποτίτλων από αρχεία πολυμέσων κατά τη φόρτωση - αυτό μπορεί να είναι αργό για μεγάλα αρχεία.", + "disableDownload": "Απενεργοποίηση λήψης αρχείων", + "disableDownloadDescription": "Κανείς δεν θα μπορεί να κατεβάζει αρχεία ή να βλέπει το περιεχόμενο ενός αρχείου.", + "allowModify": "Επιτρέψτε την επεξεργασία αρχείων", + "allowModifyDescription": "Οποιοσδήποτε μπορεί να επεξεργαστεί αρχεία σε αυτό το share.", + "allowDelete": "Επιτρέψτε τη διαγραφή αρχείων", + "allowDeleteDescription": "Οποιοσδήποτε μπορεί να διαγράψει αρχεία και φακέλους από αυτή τη κοινή χρήση.", + "allowReplacements": "Επιτρέψτε αντικαταστάσεις αρχείων", + "allowReplacementsDescription": "Οποιοσδήποτε μπορεί να αντικαταστήσει τα υπάρχοντα αρχεία όταν μεταφορτώνει αρχεία με το ίδιο όνομα.", + "allowCreate": "Επιτρέπει τη δημιουργία και μεταφόρτωση αρχείων και φακέλων", + "allowCreateDescription": "Οποιοσδήποτε μπορεί να δημιουργήσει και να ανεβάσει νέα αρχεία και φακέλους σε αυτή τη κοινή χρήση." }, "api": { "title": "Κλειδιά API:", @@ -594,7 +625,6 @@ "uninitialized": "Απέτυχε η αρχικοποίηση του συντάκτη. Παρακαλούμε επαναφορτώστε.", "saveFailed": "Απέτυχε η αποθήκευση του αρχείου. Προσπαθήστε ξανά.", "saveAborted": "Η αποθήκευση διακόπηκε. Το όνομα του αρχείου δεν ταιριάζει με το ενεργό αρχείο.", - "saveDisabled": "Δεν υποστηρίζεται η αποθήκευση κοινόχρηστων αρχείων.", "saveAbortedMessage": "Διακοπή της λειτουργίας αποθήκευσης. Το ενεργό αρχείο της εφαρμογής ({activeFile}) δεν ταιριάζει με το αρχείο που προσπαθείτε να αποθηκεύσετε ({tryingToSave}).", "syncFailed": "απέτυχε να συγχρονίσει την κατάσταση με τη διαδρομή για το \"{filename}\" μετά από 5 προσπάθειες. Διακοπή της ρύθμισης του συντάκτη για να αποφευχθεί η αλλοίωση των δεδομένων." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Απενεργοποιημένη επανάληψη", "PlayAllOncePlayback": "Αναπαραγωγή όλων μία φορά", "ShuffleAllPlayback": "Τυχαία αναπαραγωγή όλων", - "PlayAllLoopedPlayback": "Αναπαραγωγή όλων με επανάληψη" + "PlayAllLoopedPlayback": "Αναπαραγωγή όλων με επανάληψη", + "QueueButtonHint": "Εμφάνιση ουράς αναπαραγωγής", + "QueuePlayback": "Ουρά Αναπαραγωγής", + "changePlaybackMode": "Αλλαγή λειτουργίας αναπαραγωγής", + "changePlaybackModeHint": "Αλλάξτε λειτουργία αναπαραγωγής για να δείτε περισσότερα αρχεία", + "emptyQueue": "Η ουρά είναι άδεια" } } diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index ff23934978..61c7e09fa4 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -55,9 +55,13 @@ "normalView": "Normal View", "galleryView": "Gallery View", "selectedCount": "Number of items selected to perform an action", + "selectAll": "Select all", "uploadFiles": "Upload Files", "uploadFolder": "Upload Folder", - "openUploadViewer": "Open Upload Manager" + "openUploadViewer": "Open Upload Manager", + "discardAndExit": "Discard and Exit", + "saveAndExit": "Save and Exit", + "keepEditing": "Keep Editing" }, "download": { "downloadFile": "Download File", @@ -89,21 +93,28 @@ "sortByLastModified": "Sort by last modified", "sortByName": "Sort by name", "sortBySize": "Sort by size", - "noPreview": "Preview is not available for this file." + "noPreview": "Preview is not available for this file.", + "noDownloadAccess": "Download is not available." }, "help": { "click": "select file or directory", "ctrl": { "click": "select multiple files or directories", - "d": "download selected items" + "c": "copy selected items", + "v": "paste copied/cut items", + "x": "cut selected items", + "d": "download selected items", + "b": "toggle sidebar", + "comma": "go to settings" }, "del": "delete selected items", "esc": "clear selection and/or close the prompt", "f2": "rename file", "f1": "show help prompt", + "slash": "activate search", "help": "Help", "description": "You can view the basic naviagation options below. For additional information, please visit", - "wiki": "FileBrowser Quantum Wiki" + "wiki": "FileBrowser Quantum Official Docs" }, "languages": { "he": "עברית", @@ -198,7 +209,17 @@ "perUserDownloadLimit": "Apply the downloads limit to each user", "perUserDownloadLimitDescription": "When enabled, the downloads limit will be applied to each user. Anonymous users will not be able to download any files from this share.", "extractEmbeddedSubtitles": "Extract embedded subtitles", - "extractEmbeddedSubtitlesDescription": "Extract embedded subtitles from media files on load -- this can be slow for large files." + "extractEmbeddedSubtitlesDescription": "Extract embedded subtitles from media files on load -- this can be slow for large files.", + "disableDownload": "Disable downloading files", + "disableDownloadDescription": "Anyone won't be able to download files or view a file's content.", + "allowModify": "Allow editing files", + "allowModifyDescription": "Anyone can edit files in this share.", + "allowDelete": "Allow deleting files", + "allowDeleteDescription": "Anyone can delete files and folders from this share.", + "allowCreate": "Allow creating and uploading files and folders", + "allowCreateDescription": "Anyone can create and upload new files and folders in this share.", + "allowReplacements": "Allow file replacements", + "allowReplacementsDescription": "Anyone can replace existing files when uploading files with the same name." }, "prompts": { "operationInProgress": "Operation in progress, please wait...", @@ -249,6 +270,8 @@ "renameMessageInvalid": "A file can't container \"/\" or \"\\\"", "replace": "Replace", "replaceMessage": "One of the files you're trying to upload is conflicting because of its name. Do you wish to continue to upload or replace the existing one?\n", + "saveBeforeExit": "Unsaved Changes", + "saveBeforeExitMessage": "You have unsaved changes in the editor. What would you like to do?", "schedule": "Schedule", "scheduleMessage": "Pick a date and time to schedule the publication of this post.", "show": "Show", @@ -260,7 +283,12 @@ "optionalPasswordHelp": "If set, users must enter this password to view the shared content.", "typeName": "Type:", "deleted": "Deleted successfully!", - "conflictsDetected": "Conflicts detected" + "conflictsDetected": "Conflicts detected", + "copyPasteConfirm": "Copy/Paste Confirmation", + "copyItemQuestion": "Copy this item to the new location?", + "moveItemQuestion": "Move this item to the new location?", + "sourcePath": "Source:", + "destinationPath": "Destination:" }, "search": { "searchContext": "Search Context: {context}", @@ -427,7 +455,10 @@ "modify": "Edit files", "share": "Share files", "api": "Create and manage long-live API keys", - "realtime": "Enable real-time connections and updates" + "realtime": "Enable real-time connections and updates", + "create": "Create files", + "delete": "Delete files", + "download": "Download files" }, "permissions-name": "Permissions", "permissionsHelp": "You can set the user to be an administrator or choose the permissions individually. If you select \"Administrator\", all of the other options will be automatically checked. The management of users remains a privilege of an administrator.\n", @@ -594,7 +625,6 @@ "uninitialized":"Failed to initialize the editor. Please reload.", "saveFailed":"Failed to save file. Please try again.", "saveAborted":"Save aborted. The file name does not match the active file.", - "saveDisabled":"Saving shared files is not supported.", "saveAbortedMessage":"Save operation aborted. The application's active file ({activeFile}) does not match the file you are trying to save ({tryingToSave}).", "syncFailed":"failed to sync state with the route for \"{filename}\" after 5 attempts. Aborting editor setup to prevent data corruption." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Loop Disabled", "PlayAllOncePlayback": "Play All Once", "ShuffleAllPlayback": "Shuffle All", - "PlayAllLoopedPlayback": "Play All Looped" + "PlayAllLoopedPlayback": "Play All Looped", + "QueueButtonHint": "Show playback queue", + "QueuePlayback": "Playback Queue", + "changePlaybackMode": "Change playback mode", + "changePlaybackModeHint": "Change playback mode to see more files", + "emptyQueue": "Queue is empty" } } diff --git a/frontend/src/i18n/es.json b/frontend/src/i18n/es.json index 11da104c8a..2e5d702dcf 100644 --- a/frontend/src/i18n/es.json +++ b/frontend/src/i18n/es.json @@ -57,7 +57,11 @@ "galleryView": "Galería", "uploadFiles": "Cargar archivos", "uploadFolder": "Cargar carpeta", - "openUploadViewer": "Abrir Upload Manager" + "openUploadViewer": "Abrir Upload Manager", + "selectAll": "Seleccionar todo", + "discardAndExit": "Descartar y salir", + "saveAndExit": "Guardar y salir", + "keepEditing": "Seguir editando" }, "download": { "downloadFile": "Descargar archivo", @@ -86,13 +90,19 @@ "sortByLastModified": "Ordenar por fecha de modificación", "sortByName": "Ordenar por nombre", "sortBySize": "Ordenar por tamaño", - "noPreview": "Vista previa no disponible" + "noPreview": "Vista previa no disponible", + "noDownloadAccess": "La descarga no está disponible." }, "help": { "click": "Selecciona un archivo o carpeta", "ctrl": { "click": "Selecciona varios archivos o carpetas (Selección multiple)", - "d": "descargar artículos seleccionados" + "d": "descargar artículos seleccionados", + "b": "barra lateral", + "comma": "ir a configuración", + "c": "copiar elementos seleccionados", + "v": "pegar elementos copiados o cortados", + "x": "cortar los elementos seleccionados" }, "del": "Eliminar archivos/carpetas seleccionados", "esc": "Cancela la selección o cierra la ventana actual (ej: Para salir rápido cuando estas viendo una imagen o video)", @@ -100,7 +110,8 @@ "help": "Ayuda", "f1": "mostrar mensaje de ayuda", "description": "A continuación puede ver las opciones básicas de navegación. Para más información, visite", - "wiki": "Wiki de FileBrowser Quantum" + "slash": "activar búsqueda", + "wiki": "Documentación oficial de FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "¡Archivos copiados correctamente!", "lastModified": "Última modificación{suffix}", "size": "Tamaño {suffix}", - "operationInProgress": "Operación en curso, por favor espere..." + "operationInProgress": "Operación en curso, por favor espere...", + "saveBeforeExit": "Cambios no guardados", + "saveBeforeExitMessage": "Tienes cambios sin guardar en el editor. ¿Qué desea hacer?", + "copyPasteConfirm": "Confirmación de copiar/pegar", + "copyItemQuestion": "¿Copiar este elemento en la nueva ubicación?", + "moveItemQuestion": "¿Mover este elemento a la nueva ubicación?", + "sourcePath": "Fuente:", + "destinationPath": "Destino:" }, "search": { "images": "Imágenes", @@ -276,7 +294,10 @@ "share": "Compartir archivos", "admin": "Administrador", "api": "Claves API", - "realtime": "Actualizaciones en tiempo real" + "realtime": "Actualizaciones en tiempo real", + "create": "Crear archivos", + "delete": "Eliminar archivos", + "download": "Descargar archivos" }, "permissions-name": "Permisos", "permissionsHelp": "Puedes elegir permisos individualmente. Si seleccionas \"Administrador\", todas las demás opciones serán activadas, y los usuarios con ese permiso podrán modificar a otros usuarios.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Cuando se activa, el límite de descargas se aplicará a cada usuario. Los usuarios anónimos no podrán descargar ningún archivo de este recurso compartido.", "descriptionUploadDefault": "Se le ha enviado una acción para cargar archivos.", "extractEmbeddedSubtitles": "Extraer subtítulos incrustados", - "extractEmbeddedSubtitlesDescription": "Extrae los subtítulos incrustados de los archivos multimedia al cargarlos -- esto puede ser lento para archivos grandes." + "extractEmbeddedSubtitlesDescription": "Extrae los subtítulos incrustados de los archivos multimedia al cargarlos -- esto puede ser lento para archivos grandes.", + "disableDownload": "Desactivar la descarga de archivos", + "disableDownloadDescription": "Nadie podrá descargar archivos ni ver su contenido.", + "allowModify": "Permitir la edición de archivos", + "allowModifyDescription": "Cualquiera puede editar archivos en este recurso compartido.", + "allowDelete": "Permitir la eliminación de archivos", + "allowDeleteDescription": "Cualquiera puede borrar archivos y carpetas de este recurso compartido.", + "allowReplacements": "Permitir la sustitución de archivos", + "allowReplacementsDescription": "Cualquiera puede sustituir archivos existentes al cargar archivos con el mismo nombre.", + "allowCreate": "Permitir crear y cargar archivos y carpetas", + "allowCreateDescription": "Cualquiera puede crear y cargar nuevos archivos y carpetas en este recurso compartido." }, "api": { "title": "Gestión de claves API", @@ -594,7 +625,6 @@ "uninitialized": "Error al iniciar el editor, inténtelo de nuevo", "saveFailed": "No se ha podido guardar el archivo. Por favor, inténtelo de nuevo.", "saveAborted": "No se ha podido guardar el archivo. El nombre del archivo no coincide con el que estás editando.", - "saveDisabled": "No es posible guardar archivos compartidos.", "saveAbortedMessage": "Operación de guardado abortada. El archivo activo de la aplicación ({activeFile}) no coincide con el archivo que está intentando guardar ({tryingToSave}).", "syncFailed": "No se ha podido sincronizar el estado con la ruta para \"{filename}\" después de 5 intentos. Abortar la configuración del editor para evitar la corrupción de datos." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Bucle desactivado", "PlayAllOncePlayback": "Reproducir todo una vez", "ShuffleAllPlayback": "Reproducir todo aleatoriamente", - "PlayAllLoopedPlayback": "Reproducir todo en bucle" + "PlayAllLoopedPlayback": "Reproducir todo en bucle", + "QueueButtonHint": "Mostrar cola de Reproducción", + "QueuePlayback": "Cola de Reproducción", + "changePlaybackMode": "Cambiar modo de Reproducción", + "changePlaybackModeHint": "Cambia el modo de reproducción para ver más", + "emptyQueue": "La cola de reproducción está vacia..." } } diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.json index 9a2b5259cb..0fc0d9d36d 100644 --- a/frontend/src/i18n/fr.json +++ b/frontend/src/i18n/fr.json @@ -57,7 +57,11 @@ "galleryView": "Vue de la galerie", "uploadFiles": "Téléchargement de fichiers", "uploadFolder": "Télécharger le dossier", - "openUploadViewer": "Ouvrir le gestionnaire de téléchargement" + "openUploadViewer": "Ouvrir le gestionnaire de téléchargement", + "selectAll": "Sélectionner tout", + "discardAndExit": "Rejeter et quitter", + "saveAndExit": "Sauvegarder et quitter", + "keepEditing": "Continuer à éditer" }, "download": { "downloadFile": "Télécharger le fichier", @@ -86,13 +90,19 @@ "sortByLastModified": "Trier par date de dernière modification", "sortByName": "Trier par nom", "sortBySize": "Trier par taille", - "noPreview": "Il n'y a pas de prévisualisation pour ce fichier." + "noPreview": "Il n'y a pas de prévisualisation pour ce fichier.", + "noDownloadAccess": "Le téléchargement n'est pas disponible." }, "help": { "click": "Sélectionner un élément", "ctrl": { "click": "Sélectionner plusieurs éléments", - "d": "télécharger les éléments sélectionnés" + "d": "télécharger les éléments sélectionnés", + "b": "barre latérale à bascule", + "comma": "accéder aux paramètres", + "c": "copier les éléments sélectionnés", + "v": "coller les éléments copiés/coupés", + "x": "couper les articles sélectionnés" }, "del": "Supprimer les éléments sélectionnés", "esc": "Désélectionner et/ou fermer la boîte de dialogue", @@ -100,7 +110,8 @@ "help": "Aide", "f1": "show help prompt", "description": "Vous pouvez consulter les options de navigation de base ci-dessous. Pour plus d'informations, veuillez consulter le site", - "wiki": "Wiki FileBrowser Quantum" + "slash": "activer la recherche", + "wiki": "Documents officiels de FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Les fichiers ont été copiés avec succès !", "lastModified": "Dernière modification{suffix}", "size": "Taille{suffix}", - "operationInProgress": "Opération en cours, veuillez patienter..." + "operationInProgress": "Opération en cours, veuillez patienter...", + "saveBeforeExit": "Modifications non sauvegardées", + "saveBeforeExitMessage": "Vous avez des modifications non enregistrées dans l'éditeur. Que souhaitez-vous faire ?", + "copyPasteConfirm": "Confirmation du copier/coller", + "copyItemQuestion": "Copier cet élément vers le nouvel emplacement ?", + "moveItemQuestion": "Déplacer cet élément vers le nouvel emplacement ?", + "sourcePath": "Source :", + "destinationPath": "Destination :" }, "search": { "images": "Images", @@ -272,7 +290,10 @@ "share": "Partager des fichiers", "admin": "Administrateur", "api": "Créer et gérer des clés API à longue durée de vie", - "realtime": "Permettre des connexions et des mises à jour en temps réel" + "realtime": "Permettre des connexions et des mises à jour en temps réel", + "create": "Créer des fichiers", + "delete": "Supprimer des fichiers", + "download": "Télécharger les fichiers" }, "permissions-name": "Permissions", "permissionsHelp": "Vous pouvez définir l'utilisateur comme étant un administrateur ou encore choisir les permissions individuellement. Si vous sélectionnez \"Administrateur\", toutes les autres options seront automatiquement activées. La gestion des utilisateurs est un privilège que seul l'administrateur possède.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Lorsque cette option est activée, la limite de téléchargements est appliquée à chaque utilisateur. Les utilisateurs anonymes ne pourront pas télécharger de fichiers à partir de ce partage.", "descriptionUploadDefault": "Un partage vous a été envoyé pour télécharger des fichiers.", "extractEmbeddedSubtitles": "Extraire les sous-titres intégrés", - "extractEmbeddedSubtitlesDescription": "Extraire les sous-titres intégrés des fichiers multimédias lors du chargement - cette opération peut s'avérer lente pour les fichiers volumineux." + "extractEmbeddedSubtitlesDescription": "Extraire les sous-titres intégrés des fichiers multimédias lors du chargement - cette opération peut s'avérer lente pour les fichiers volumineux.", + "disableDownload": "Désactiver le téléchargement de fichiers", + "disableDownloadDescription": "Personne ne pourra télécharger des fichiers ou en visualiser le contenu.", + "allowModify": "Permettre l'édition de fichiers", + "allowModifyDescription": "Tout le monde peut modifier les fichiers de ce partage.", + "allowDelete": "Autoriser la suppression de fichiers", + "allowDeleteDescription": "N'importe qui peut supprimer des fichiers et des dossiers de ce partage.", + "allowReplacements": "Autoriser les remplacements de fichiers", + "allowReplacementsDescription": "Toute personne peut remplacer des fichiers existants lorsqu'elle télécharge des fichiers portant le même nom.", + "allowCreate": "Permettre la création et le téléchargement de fichiers et de dossiers", + "allowCreateDescription": "Tout le monde peut créer et télécharger de nouveaux fichiers et dossiers dans ce partage." }, "api": { "title": "Clés API :", @@ -594,7 +625,6 @@ "uninitialized": "Échec de l'initialisation de l'éditeur. Veuillez recharger.", "saveFailed": "Échec de l'enregistrement du fichier. Veuillez réessayer.", "saveAborted": "Sauvegarde interrompue. Le nom du fichier ne correspond pas au fichier actif.", - "saveDisabled": "L'enregistrement de fichiers partagés n'est pas possible.", "saveAbortedMessage": "L'opération d'enregistrement a été interrompue. Le fichier actif de l'application ({activeFile}) ne correspond pas au fichier que vous essayez d'enregistrer ({tryingToSave}).", "syncFailed": "n'a pas réussi à synchroniser l'état avec l'itinéraire pour \"{filename}\" après 5 tentatives. Abandon de la configuration de l'éditeur pour éviter la corruption des données." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Boucle désactivée", "PlayAllOncePlayback": "Lire tout une fois", "ShuffleAllPlayback": "Lecture aléatoire de tout", - "PlayAllLoopedPlayback": "Lire tout en boucle" + "PlayAllLoopedPlayback": "Lire tout en boucle", + "QueueButtonHint": "Afficher la file de lecture", + "QueuePlayback": "File de Lecture", + "changePlaybackMode": "Changer le mode de lecture", + "changePlaybackModeHint": "Changez le mode de lecture pour voir plus de fichiers", + "emptyQueue": "La file est vide" } } diff --git a/frontend/src/i18n/he.json b/frontend/src/i18n/he.json index df8dd3a703..64475db135 100644 --- a/frontend/src/i18n/he.json +++ b/frontend/src/i18n/he.json @@ -57,7 +57,11 @@ "galleryView": "תצוגת גלריה", "uploadFiles": "העלאת קבצים", "uploadFolder": "העלה תיקייה", - "openUploadViewer": "פתח את מנהל ההעלאה" + "openUploadViewer": "פתח את מנהל ההעלאה", + "selectAll": "בחר הכל", + "discardAndExit": "מחק וצא", + "saveAndExit": "שמור וצא", + "keepEditing": "המשך עריכה" }, "download": { "downloadFile": "הורד קובץ", @@ -86,13 +90,19 @@ "sortByLastModified": "מיין לפי השינוי האחרון", "sortByName": "מיין לפי שם", "sortBySize": "מיין לפי גודל", - "noPreview": "תצוגה מקדימה לא זמינה לקובץ זה" + "noPreview": "תצוגה מקדימה לא זמינה לקובץ זה", + "noDownloadAccess": "ההורדה אינה זמינה." }, "help": { "click": "בחר קובץ או תקייה", "ctrl": { "click": "בחר מספר קבצים או תקיות", - "d": "הורדת פריטים נבחרים" + "d": "הורדת פריטים נבחרים", + "b": "החלף סרגל צד", + "comma": "עבור להגדרות", + "c": "העתק פריטים נבחרים", + "v": "הדבק פריטים שהועתקו/נחתכו", + "x": "חתוך פריטים נבחרים" }, "del": "מחק את מה שנבחר", "esc": "נקה את הבחירה ו/או סגור את השדה", @@ -100,7 +110,8 @@ "help": "עזרה", "f1": "הצג עזרה", "description": "ניתן לצפות באפשרויות הניווט הבסיסיות להלן. למידע נוסף, בקרו בכתובת", - "wiki": "FileBrowser Quantum Wiki" + "slash": "הפעל חיפוש", + "wiki": "מסמכים רשמיים של FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "הקבצים הועתקו בהצלחה!", "lastModified": "שינוי אחרון{suffix}", "size": "גודל{suffix}", - "operationInProgress": "הפעולה מתבצעת, אנא המתן..." + "operationInProgress": "הפעולה מתבצעת, אנא המתן...", + "saveBeforeExit": "שינויים שלא נשמרו", + "saveBeforeExitMessage": "יש לך שינויים שלא נשמרו בעורך. מה ברצונך לעשות?", + "copyPasteConfirm": "העתקה/הדבקה אישור", + "copyItemQuestion": "האם להעתיק פריט זה למיקום החדש?", + "moveItemQuestion": "האם להעביר פריט זה למיקום החדש?", + "sourcePath": "מקור:", + "destinationPath": "יעד:" }, "search": { "images": "תמונות", @@ -273,7 +291,10 @@ "share": "שיתוף קבצים", "admin": "מנהל", "api": "יצירת מפתחות API ארוכי טווח וניהולם", - "realtime": "אפשר חיבורים ועדכונים בזמן אמת" + "realtime": "אפשר חיבורים ועדכונים בזמן אמת", + "create": "יצירת קבצים", + "delete": "מחק קבצים", + "download": "הורדת קבצים" }, "permissions-name": "הרשאות", "permissionsHelp": "אתה יכול להגדיר את המשתמש להיות מנהל מערכת או לבחור את ההרשאות בנפרד. אם תבחר \"מנהל מערכת\", כל ההרשאות ייבחרו אוטומטית. ניהול המשתמשים נשאר הרשאה של מנהל מערכת.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "כאשר אפשרות זו מופעלת, מגבלת ההורדות תחול על כל משתמש. משתמשים אנונימיים לא יוכלו להוריד קבצים משיתוף זה.", "descriptionUploadDefault": "נשלחה אליך שיתוף כדי להעלות קבצים.", "extractEmbeddedSubtitles": "חלץ כתוביות מוטמעות", - "extractEmbeddedSubtitlesDescription": "חלץ כתוביות מוטמעות מקבצי מדיה בעת הטעינה - פעולה זו עשויה להיות איטית עבור קבצים גדולים." + "extractEmbeddedSubtitlesDescription": "חלץ כתוביות מוטמעות מקבצי מדיה בעת הטעינה - פעולה זו עשויה להיות איטית עבור קבצים גדולים.", + "disableDownload": "השבת הורדת קבצים", + "disableDownloadDescription": "אף אחד לא יוכל להוריד קבצים או להציג את תוכנם.", + "allowModify": "אפשר עריכת קבצים", + "allowModifyDescription": "כל אחד יכול לערוך קבצים בשיתוף זה.", + "allowDelete": "אפשר מחיקת קבצים", + "allowDeleteDescription": "כל אחד יכול למחוק קבצים ותיקיות משיתוף זה.", + "allowReplacements": "אפשר החלפת קבצים", + "allowReplacementsDescription": "כל אחד יכול להחליף קבצים קיימים בעת העלאת קבצים עם אותו שם.", + "allowCreate": "אפשר ליצור ולהעלות קבצים ותיקיות", + "allowCreateDescription": "כל אחד יכול ליצור ולהעלות קבצים ותיקיות חדשים בשיתוף זה." }, "api": { "title": "מפתחות API", @@ -594,7 +625,6 @@ "uninitialized": "לא ניתן לאתחל את העורך. אנא טען מחדש.", "saveFailed": "לא ניתן לשמור את הקובץ. אנא נסה שוב.", "saveAborted": "שמירה בוטלה. שם הקובץ אינו תואם לקובץ הפעיל.", - "saveDisabled": "שמירת קבצים משותפים אינה נתמכת.", "saveAbortedMessage": "פעולת השמירה בוטלה. הקובץ הפעיל של היישום ({activeFile}) אינו תואם לקובץ שאתה מנסה לשמור ({tryingToSave}).", "syncFailed": "לא הצליח לסנכרן את המצב עם המסלול עבור \"{filename}\" לאחר 5 ניסיונות. מבטל את הגדרת העורך כדי למנוע פגיעה בנתונים." }, @@ -603,6 +633,11 @@ "LoopDisabled": "לולאה מושבתת", "PlayAllOncePlayback": "נגן הכל פעם אחת", "ShuffleAllPlayback": "ערבב הכל", - "PlayAllLoopedPlayback": "נגן הכל בלולאה" + "PlayAllLoopedPlayback": "נגן הכל בלולאה", + "QueueButtonHint": "הצג תור ניגון", + "QueuePlayback": "תור ניגון", + "changePlaybackMode": "שנה מצב ניגון", + "changePlaybackModeHint": "שנה מצב ניגון כדי לראות יותר קבצים", + "emptyQueue": "התור ריק" } } diff --git a/frontend/src/i18n/hu.json b/frontend/src/i18n/hu.json index 9f18c11ce6..6c97d73fe1 100644 --- a/frontend/src/i18n/hu.json +++ b/frontend/src/i18n/hu.json @@ -57,7 +57,11 @@ "galleryView": "Galéria nézet", "uploadFiles": "Fájlok feltöltése", "uploadFolder": "Mappa feltöltése", - "openUploadViewer": "Nyissa meg a Feltöltéskezelőt" + "openUploadViewer": "Nyissa meg a Feltöltéskezelőt", + "selectAll": "Válasszon ki mindent", + "discardAndExit": "Dobás és kilépés", + "saveAndExit": "Mentés és kilépés", + "keepEditing": "Szerkesztés folytatása" }, "download": { "downloadFile": "Fájl letöltése", @@ -86,13 +90,19 @@ "sortByLastModified": "Rendezés utolsó módosítás szerint", "sortByName": "Rendezés név szerint", "sortBySize": "Rendezés méret szerint", - "noPreview": "Ehhez a fájlhoz nincs előnézet." + "noPreview": "Ehhez a fájlhoz nincs előnézet.", + "noDownloadAccess": "A letöltés nem elérhető." }, "help": { "click": "mappa vagy fájl kijelölése", "ctrl": { "click": "több mappa vagy fájl kijelölése", - "d": "kiválasztott elemek letöltése" + "d": "kiválasztott elemek letöltése", + "b": "oldalsáv átkapcsolása", + "comma": "menj a beállításokhoz", + "c": "kiválasztott elemek másolása", + "v": "másolt/kivágott elemek beillesztése", + "x": "kiválasztott tételek kivágása" }, "del": "kijelölt elemek törlése", "esc": "kijelölés törlése és/vagy parancssor bezárása", @@ -100,7 +110,8 @@ "help": "Súgó", "f1": "show help prompt", "description": "Az alábbiakban megtekintheti az alapvető navigációs lehetőségeket. További információkért kérjük, látogasson el a következő weboldalra", - "wiki": "FileBrowser Quantum Wiki" + "slash": "keresés aktiválása", + "wiki": "FileBrowser Quantum hivatalos dokumentumok" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "A fájlok másolása sikeres volt!", "lastModified": "Utoljára módosítva{suffix}", "size": "Méret{suffix}", - "operationInProgress": "Művelet folyamatban, kérjük várjon..." + "operationInProgress": "Művelet folyamatban, kérjük várjon...", + "saveBeforeExit": "Nem mentett változtatások", + "saveBeforeExitMessage": "A szerkesztőben elmentetlen módosítások vannak. Mit szeretne tenni?", + "copyPasteConfirm": "Másolás/beillesztés megerősítés", + "copyItemQuestion": "Másolja ezt az elemet az új helyre?", + "moveItemQuestion": "Áthelyezni ezt az elemet az új helyre?", + "sourcePath": "Forrás:", + "destinationPath": "Úti cél:" }, "search": { "images": "Képek", @@ -273,7 +291,10 @@ "share": "Fájlok megosztása", "admin": "Adminisztrátor", "api": "Hosszú élettartamú API-kulcsok létrehozása és kezelése", - "realtime": "Valós idejű kapcsolatok és frissítések engedélyezése" + "realtime": "Valós idejű kapcsolatok és frissítések engedélyezése", + "create": "Fájlok létrehozása", + "delete": "Fájlok törlése", + "download": "Fájlok letöltése" }, "permissions-name": "Jogosultságok", "permissionsHelp": "A felhasználót beállíthatja rendszergazdának, vagy egyénileg is kiválaszthatja a jogosultságokat. Ha a \"Rendszergazda\" lehetőséget választja, az összes többi opció automatikusan be lesz jelölve. A felhasználók kezelése továbbra is a rendszergazda kiváltsága marad.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Ha engedélyezve van, a letöltési limit minden egyes felhasználóra vonatkozik. A névtelen felhasználók nem tölthetnek le fájlokat erről a megosztásról.", "descriptionUploadDefault": "Megosztást küldtek Önnek fájlok feltöltéséhez.", "extractEmbeddedSubtitles": "Beágyazott feliratok kivonása", - "extractEmbeddedSubtitlesDescription": "Beágyazott feliratok kivonása a médiafájlokból betöltéskor -- ez nagy fájlok esetén lassú lehet." + "extractEmbeddedSubtitlesDescription": "Beágyazott feliratok kivonása a médiafájlokból betöltéskor -- ez nagy fájlok esetén lassú lehet.", + "disableDownload": "Letiltja a fájlok letöltését", + "disableDownloadDescription": "Senki nem lesz képes letölteni fájlokat vagy megtekinteni egy fájl tartalmát.", + "allowModify": "Fájlok szerkesztésének engedélyezése", + "allowModifyDescription": "Ezen a megosztáson bárki szerkesztheti a fájlokat.", + "allowDelete": "Fájlok törlésének engedélyezése", + "allowDeleteDescription": "Bárki törölhet fájlokat és mappákat erről a megosztásról.", + "allowReplacements": "Fájlok cseréjének engedélyezése", + "allowReplacementsDescription": "Az azonos nevű fájlok feltöltésekor bárki helyettesítheti a meglévő fájlokat.", + "allowCreate": "Fájlok és mappák létrehozásának és feltöltésének lehetővé tétele", + "allowCreateDescription": "Bárki létrehozhat és feltölthet új fájlokat és mappákat ezen a megosztáson." }, "api": { "title": "API-kulcsok:", @@ -594,7 +625,6 @@ "uninitialized": "Nem sikerült inicializálni a szerkesztőt. Kérjük, töltse újra.", "saveFailed": "A fájl mentése sikertelen. Kérjük, próbálja újra.", "saveAborted": "A mentés megszakadt. A fájl neve nem egyezik az aktív fájléval.", - "saveDisabled": "A megosztott fájlok mentése nem támogatott.", "saveAbortedMessage": "A mentési művelet megszakadt. Az alkalmazás aktív fájlja ({activeFile}) nem egyezik meg a menteni kívánt fájllal ({tryingToSave}).", "syncFailed": "5 próbálkozás után nem sikerült szinkronizálni az állapotot a \"{filename}\" útvonallal. A szerkesztő beállításának megszakítása az adatok sérülésének elkerülése érdekében." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Hurok letiltva", "PlayAllOncePlayback": "Összes lejátszása egyszer", "ShuffleAllPlayback": "Összes keverése", - "PlayAllLoopedPlayback": "Összes lejátszása hurkokban" + "PlayAllLoopedPlayback": "Összes lejátszása hurkokban", + "QueueButtonHint": "Lejátszási sor megjelenítése", + "QueuePlayback": "Lejátszási Sor", + "changePlaybackMode": "Lejátszási mód változtatása", + "changePlaybackModeHint": "Változtasd meg a lejátszási módot, hogy több fájlt láss", + "emptyQueue": "A sor üres" } } diff --git a/frontend/src/i18n/is.json b/frontend/src/i18n/is.json index 2f87c845aa..99bde14c2d 100644 --- a/frontend/src/i18n/is.json +++ b/frontend/src/i18n/is.json @@ -54,7 +54,10 @@ "compactView": "Þjappað yfirlit", "normalView": "Venjulegt yfirlit", "galleryView": "Galleríyfirlit", - "selectedCount": "Fjöldi valinna atriða til að framkvæma aðgerð" + "selectedCount": "Fjöldi valinna atriði til að framkvæma aðgerð", + "uploadFiles": "Hlaða upp skrám", + "uploadFolder": "Hlaða upp möppu", + "openUploadViewer": "Opna upphleðslustjóra" }, "download": { "downloadFile": "Sækja skrá", @@ -171,6 +174,7 @@ "viewModeDescription": "Sjálfgefið útlit fyrir deilda síðuna.", "titleDefault": "Deildar skrár - {title}", "descriptionDefault": "Deiling hefur verið send til þín til að skoða eða sækja.", + "descriptionUploadDefault": "Deiling hefur verið send til þín til að hlaða upp skrám.", "disableShareCard": "Gera deilingarkort óvirkt", "disableShareCardDescription": "Gera deilingarkortið óvirkt á deilda síðunni í hliðarstikunni eða efst á síðunni á farsíma.", "disableSidebar": "Gera hliðarstiku óvirka", @@ -186,7 +190,15 @@ "enableOnlyOffice": "Virkja OnlyOffice skoðara", "enableOnlyOfficeDescription": "Leyfa skoðun skrifstofuskráa með OnlyOffice í þessari deilingu.", "enableOnlyOfficeEditing": "Virkja OnlyOffice ritstjórn", - "enableOnlyOfficeEditingDescription": "Leyfa breytingu á skrifstofuskrám með OnlyOffice í þessari deilingu." + "enableOnlyOfficeEditingDescription": "Leyfa breytingu á skrifstofuskrám með OnlyOffice í þessari deilingu.", + "shareType": "Tegund deilingar", + "shareTypeDescription": "Tegund deilingar sem á að búa til. Venjulegar deilingar leyfa skoðun og niðurhal skráa. Upphleðsludeilingar leyfa að hlaða upp skrám í deilinguna.", + "normalShare": "Venjuleg", + "uploadShare": "Aðeins upphleðsla", + "perUserDownloadLimit": "Beita niðurhalsmörkum fyrir hvern notanda", + "perUserDownloadLimitDescription": "Þegar virkt, verða niðurhalsmörkin notuð fyrir hvern notanda. Nafnlausir notendur munu ekki geta sótt neinar skrár úr þessari deilingu.", + "extractEmbeddedSubtitles": "Draga út innfellda texta", + "extractEmbeddedSubtitlesDescription": "Draga út innfellda texta úr miðlaskrám við hleðslu -- þetta getur verið hægt fyrir stórar skrár." }, "prompts": { "operationInProgress": "Aðgerð í gangi, vinsamlega bíðið...", @@ -334,7 +346,9 @@ "disableOfficeEditorDescription": "Bilskiptur listi yfir skráarendingar til að gera OnlyOffice ritstjóra og skoðara óvirkan fyrir. (t.d., '.txt .html .pdf').", "disableOfficeEditor": "Gera skrifstofuskoðara óvirkan fyrir ákveðnar skráarendingar", "fileViewerOptions": "Skráaskoðaravalkostir", - "themeAndLanguage": "Þema & Tungumál" + "themeAndLanguage": "Þema & Tungumál", + "defaultLandingPage": "Sjálfgefin landingssíða", + "defaultLandingPageDescription": "t.d. '/files/mysource/mysubpath' eða '/settings' - sjálfgefna síðan er /files sem fer í fyrsta upprunalista" }, "settings": { "systemAdmin": "Kerfi & Stjórnandi", @@ -565,7 +579,8 @@ "uploadChunkSizeMb": "Upphleðslu klumpastærð í MB", "uploadChunkSizeMbHelp": "Yfirleitt 5 til 50 MB, minni er betri fyrir óstöðugar eða takmarkaðar tengingar. Að setja á 0 mun gera upphleðslu klumpun óvirka.", "clearAll": "Hreinsa klárað ætti að fjarlægja villu, hlé og árekstur", - "clearAllDescription": "Hreinsa kláraður hnappurinn mun hreinsa allar upphleðslur í loknu ástandi, þar með talið villa, gert hlé og árekstrar ástand." + "clearAllDescription": "Hreinsa kláraður hnappurinn mun hreinsa allar upphleðslur í loknu ástandi, þar með talið villa, gert hlé og árekstrar ástand.", + "uploadSettings": "Upphleðslustillingar" }, "colors": { "red": "rauður", @@ -588,6 +603,11 @@ "LoopDisabled": "Endurtekning Óvirk", "PlayAllOncePlayback": "Spila Allt Einu Sinni", "ShuffleAllPlayback": "Stokka Allt", - "PlayAllLoopedPlayback": "Spila Allt í Endurtekningu" + "PlayAllLoopedPlayback": "Spila Allt í Endurtekningu", + "QueueButtonHint": "Sýna spilunarröð", + "QueuePlayback": "Spilunarröð", + "changePlaybackMode": "Breyta spilunarmodi", + "changePlaybackModeHint": "Breyttu spilunarmoda til að sjá fleiri skrár", + "emptyQueue": "Röðin er tóm" } -} \ No newline at end of file +} diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json index 78ce8c586b..92eb601708 100644 --- a/frontend/src/i18n/it.json +++ b/frontend/src/i18n/it.json @@ -57,7 +57,11 @@ "galleryView": "Vista della galleria", "uploadFiles": "Caricare i file", "uploadFolder": "Cartella di caricamento", - "openUploadViewer": "Aprire Gestione caricamenti" + "openUploadViewer": "Aprire Gestione caricamenti", + "selectAll": "Seleziona tutti", + "discardAndExit": "Scartare e uscire", + "saveAndExit": "Salvare e uscire", + "keepEditing": "Continuare a modificare" }, "download": { "downloadFile": "Scarica file", @@ -86,13 +90,19 @@ "sortByLastModified": "Ordina per ultima modifica", "sortByName": "Ordina per nome", "sortBySize": "Ordina per dimensione", - "noPreview": "L'anteprima non è disponibile per questo file." + "noPreview": "L'anteprima non è disponibile per questo file.", + "noDownloadAccess": "Il download non è disponibile." }, "help": { "click": "seleziona un file o una cartella", "ctrl": { "click": "seleziona più file o cartelle", - "d": "scaricare gli articoli selezionati" + "d": "scaricare gli articoli selezionati", + "b": "Alterna la barra laterale", + "comma": "vai alle impostazioni", + "c": "copiare gli elementi selezionati", + "v": "incolla gli elementi copiati/tagliati", + "x": "tagliare gli articoli selezionati" }, "del": "elimina gli elementi selezionati", "esc": "annulla la selezione e/o chiude la finestra aperta", @@ -100,7 +110,8 @@ "help": "Aiuto", "f1": "mostra la richiesta di aiuto", "description": "Le opzioni di navigazione di base sono riportate di seguito. Per ulteriori informazioni, visitate il sito", - "wiki": "Wiki di FileBrowser Quantum" + "slash": "attivare la ricerca", + "wiki": "Documenti ufficiali di FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "I file sono stati copiati con successo!", "lastModified": "Ultima modifica{suffix}", "size": "Dimensione{suffix}", - "operationInProgress": "Operazione in corso, attendere..." + "operationInProgress": "Operazione in corso, attendere...", + "saveBeforeExit": "Modifiche non salvate", + "saveBeforeExitMessage": "Le modifiche non sono state salvate nell'editor. Cosa si desidera fare?", + "copyPasteConfirm": "Conferma del copia/incolla", + "copyItemQuestion": "Copiare questo elemento nella nuova posizione?", + "moveItemQuestion": "Spostare questo elemento nella nuova posizione?", + "sourcePath": "Fonte:", + "destinationPath": "Destinazione:" }, "search": { "images": "Immagini", @@ -271,7 +289,10 @@ "share": "Condividere file", "admin": "Amministratore", "api": "Creare e gestire chiavi API a lunga durata", - "realtime": "Consentire connessioni e aggiornamenti in tempo reale" + "realtime": "Consentire connessioni e aggiornamenti in tempo reale", + "create": "Creare file", + "delete": "Eliminare i file", + "download": "Scarica i file" }, "permissions-name": "Permessi", "permissionsHelp": "È possibile impostare l'utente come amministratore o scegliere i permessi singolarmente. Se si seleziona \"Amministratore\", tutte le altre opzioni saranno automaticamente assegnate. La gestione degli utenti rimane un privilegio di un amministratore.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Se abilitato, il limite di download verrà applicato a ciascun utente. Gli utenti anonimi non potranno scaricare alcun file da questa condivisione.", "descriptionUploadDefault": "È stata inviata una condivisione per caricare i file.", "extractEmbeddedSubtitles": "Estrarre i sottotitoli incorporati", - "extractEmbeddedSubtitlesDescription": "Estrarre i sottotitoli incorporati dai file multimediali al momento del caricamento: questa operazione può essere lenta per i file di grandi dimensioni." + "extractEmbeddedSubtitlesDescription": "Estrarre i sottotitoli incorporati dai file multimediali al momento del caricamento: questa operazione può essere lenta per i file di grandi dimensioni.", + "disableDownload": "Disattivare il download dei file", + "disableDownloadDescription": "Chiunque non sarà in grado di scaricare i file o di visualizzarne il contenuto.", + "allowModify": "Consentire la modifica dei file", + "allowModifyDescription": "Chiunque può modificare i file in questa condivisione.", + "allowDelete": "Consentire l'eliminazione dei file", + "allowDeleteDescription": "Chiunque può eliminare file e cartelle da questa condivisione.", + "allowReplacements": "Consentire la sostituzione dei file", + "allowReplacementsDescription": "Chiunque può sostituire i file esistenti quando carica file con lo stesso nome.", + "allowCreate": "Consente la creazione e il caricamento di file e cartelle.", + "allowCreateDescription": "Chiunque può creare e caricare nuovi file e cartelle in questa condivisione." }, "api": { "title": "Chiavi API:", @@ -594,7 +625,6 @@ "uninitialized": "Impossibile inizializzare l'editor. Ricaricare.", "saveFailed": "Impossibile salvare il file. Riprovare.", "saveAborted": "Salvataggio interrotto. Il nome del file non corrisponde al file attivo.", - "saveDisabled": "Il salvataggio di file condivisi non è supportato.", "saveAbortedMessage": "Operazione di salvataggio interrotta. Il file attivo dell'applicazione ({activeFile}) non corrisponde al file che si sta cercando di salvare ({tryingToSave}).", "syncFailed": "non è riuscito a sincronizzare lo stato con il percorso per \"{filename}\" dopo 5 tentativi. Interruzione dell'impostazione dell'editor per evitare la corruzione dei dati." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Loop disabilitato", "PlayAllOncePlayback": "Riproduci tutto una volta", "ShuffleAllPlayback": "Riproduzione casuale di tutto", - "PlayAllLoopedPlayback": "Riproduci tutto in ripetizione" + "PlayAllLoopedPlayback": "Riproduci tutto in ripetizione", + "QueueButtonHint": "Mostra coda di riproduzione", + "QueuePlayback": "Coda di Riproduzione", + "changePlaybackMode": "Cambia modalità di riproduzione", + "changePlaybackModeHint": "Cambia modalità di riproduzione per vedere più file", + "emptyQueue": "La coda è vuota" } } diff --git a/frontend/src/i18n/ja.json b/frontend/src/i18n/ja.json index b2db3aa301..6dc3eedc13 100644 --- a/frontend/src/i18n/ja.json +++ b/frontend/src/i18n/ja.json @@ -57,7 +57,11 @@ "galleryView": "ギャラリービュー", "uploadFiles": "ファイルのアップロード", "uploadFolder": "フォルダのアップロード", - "openUploadViewer": "アップロードマネージャーを開く" + "openUploadViewer": "アップロードマネージャーを開く", + "selectAll": "すべて選択", + "discardAndExit": "破棄と終了", + "saveAndExit": "保存して終了する", + "keepEditing": "編集を続ける" }, "download": { "downloadFile": "ファイルをダウンロード", @@ -86,13 +90,19 @@ "sortByLastModified": "最終変更日付によるソート", "sortByName": "名前によるソート", "sortBySize": "サイズによるソート", - "noPreview": "このファイルではプレビューは利用できません。" + "noPreview": "このファイルではプレビューは利用できません。", + "noDownloadAccess": "ダウンロードはできません。" }, "help": { "click": "ファイルやディレクトリを選択", "ctrl": { "click": "複数のファイルやディレクトリを選択", - "d": "ダウンロード" + "d": "ダウンロード", + "b": "トグル・サイドバー", + "comma": "設定に進む", + "c": "選択した項目をコピーする", + "v": "コピー/カットした項目を貼り付ける", + "x": "選択された項目をカット" }, "del": "選択した項目を削除", "esc": "選択をクリアーまたはプロンプトを閉じる", @@ -100,7 +110,8 @@ "help": "ヘルプ", "f1": "ヘルプ画面を表示する", "description": "基本的なナビゲーションオプションは以下の通りです。その他の情報については", - "wiki": "ファイルブラウザ ドキュメント" + "slash": "検索をアクティブにする", + "wiki": "FileBrowser Quantum 公式ドキュメント" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "uploadSettingsNoChunk": "最大同時アップロード数:{maxConcurrentUpload}、チャンクアップロード無効", "lastModified": "最終更新日{suffix}", "size": "サイズ{suffix}", - "operationInProgress": "操作中です、しばらくお待ちください..." + "operationInProgress": "操作中です、しばらくお待ちください...", + "saveBeforeExit": "未保存の変更", + "saveBeforeExitMessage": "エディタに未保存の変更があります。どうしますか?", + "copyPasteConfirm": "コピー・ペースト確認", + "copyItemQuestion": "このアイテムを新しい場所にコピーしますか?", + "moveItemQuestion": "このアイテムを新しい場所に移動しますか?", + "sourcePath": "ソース", + "destinationPath": "目的地だ:" }, "search": { "images": "画像", @@ -271,7 +289,10 @@ "share": "ファイルを共有", "admin": "管理者", "api": "長期間有効なAPIキーの作成と管理", - "realtime": "リアルタイム接続と更新を有効にする" + "realtime": "リアルタイム接続と更新を有効にする", + "create": "ファイル作成", + "delete": "ファイルの削除", + "download": "ファイルのダウンロード" }, "permissions-name": "権限", "permissionsHelp": "ユーザーを管理者に設定するか、権限を個別に設定できます。「管理者」を選択した場合、その他のすべての選択肢は自動的に設定されます。ユーザーの管理は管理者の権限として保持されます。", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "有効にすると、各ユーザーにダウンロード制限が適用されます。匿名ユーザーはこの共有からファイルをダウンロードできません。", "descriptionUploadDefault": "ファイルをアップロードするための共有が送信されました。", "extractEmbeddedSubtitles": "埋め込み字幕の抽出", - "extractEmbeddedSubtitlesDescription": "読み込み時にメディアファイルから埋め込まれたサブタイトルを抽出する。" + "extractEmbeddedSubtitlesDescription": "読み込み時にメディアファイルから埋め込まれたサブタイトルを抽出する。", + "disableDownload": "ファイルのダウンロードを無効にする", + "disableDownloadDescription": "誰でもファイルをダウンロードしたり、ファイルの内容を見たりすることができなくなる。", + "allowModify": "ファイルの編集を許可する", + "allowModifyDescription": "誰でもこの共有内のファイルを編集することができます。", + "allowDelete": "ファイルの削除を許可する", + "allowDeleteDescription": "誰でもこの共有からファイルやフォルダを削除することができます。", + "allowReplacements": "ファイルの置き換えを許可する", + "allowReplacementsDescription": "同じ名前のファイルをアップロードすれば、誰でも既存のファイルを置き換えることができます。", + "allowCreate": "ファイルやフォルダの作成とアップロードが可能", + "allowCreateDescription": "誰でもこの共有に新しいファイルやフォルダを作成し、アップロードすることができます。" }, "api": { "title": "APIキー:", @@ -594,7 +625,6 @@ "uninitialized": "エディタの初期化に失敗しました。再読み込みしてください。", "saveFailed": "ファイルの保存に失敗しました。もう一度お試しください。", "saveAborted": "保存が中止されました。ファイル名がアクティブなファイルと一致しません。", - "saveDisabled": "共有ファイルの保存はサポートされていません。", "saveAbortedMessage": "保存操作が中断されました。アプリケーションのアクティブファイル({activeFile})と保存しようとしているファイル({tryingToSave})が一致しません。", "syncFailed": "\"{filename}\"のルートとステートの同期に失敗しました。データの破損を防ぐためにエディタのセットアップを中止しています。" }, @@ -603,6 +633,11 @@ "LoopDisabled": "ループ無効", "PlayAllOncePlayback": "すべて一度再生", "ShuffleAllPlayback": "すべてシャッフル再生", - "PlayAllLoopedPlayback": "すべてループ再生" + "PlayAllLoopedPlayback": "すべてループ再生", + "QueueButtonHint": "再生キューを表示", + "QueuePlayback": "再生キュー", + "changePlaybackMode": "再生モードを変更", + "changePlaybackModeHint": "再生モードを変更してより多くのファイルを表示", + "emptyQueue": "キューは空です" } } diff --git a/frontend/src/i18n/ko.json b/frontend/src/i18n/ko.json index d4853232fb..2f9ed212ed 100644 --- a/frontend/src/i18n/ko.json +++ b/frontend/src/i18n/ko.json @@ -57,7 +57,11 @@ "galleryView": "갤러리 보기", "uploadFiles": "파일 업로드", "uploadFolder": "폴더 업로드", - "openUploadViewer": "업로드 관리자 열기" + "openUploadViewer": "업로드 관리자 열기", + "selectAll": "모두 선택", + "discardAndExit": "삭제 및 종료", + "saveAndExit": "저장 및 종료", + "keepEditing": "계속 편집" }, "download": { "downloadFile": "파일 다운로드", @@ -86,13 +90,19 @@ "sortByLastModified": "수정시간순 정렬", "sortByName": "이름순", "sortBySize": "크기순", - "noPreview": "이 파일에는 미리 보기를 사용할 수 없습니다." + "noPreview": "이 파일에는 미리 보기를 사용할 수 없습니다.", + "noDownloadAccess": "다운로드할 수 없습니다." }, "help": { "click": "파일이나 디렉토리를 선택해주세요.", "ctrl": { "click": "여러 개의 파일이나 디렉토리를 선택해주세요.", - "d": "선택한 항목 다운로드" + "d": "선택한 항목 다운로드", + "b": "사이드바 토글", + "comma": "설정으로 이동", + "c": "선택한 항목 복사", + "v": "복사/잘라낸 항목 붙여넣기", + "x": "선택한 항목 잘라내기" }, "del": "선택된 파일 삭제", "esc": "선택 취소/프롬프트 닫기", @@ -100,7 +110,8 @@ "help": "도움말", "f1": "도움말 프롬프트 표시", "description": "아래에서 기본 탐색 옵션을 확인할 수 있습니다. 자세한 내용은 다음을 참조하세요.", - "wiki": "파일브라우저 퀀텀 위키" + "slash": "검색 활성화", + "wiki": "FileBrowser 퀀텀 공식 문서" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "파일이 성공적으로 복사되었습니다!", "lastModified": "마지막 수정{suffix}", "size": "크기{suffix}", - "operationInProgress": "작업이 진행 중입니다 잠시만 기다려주세요..." + "operationInProgress": "작업이 진행 중입니다 잠시만 기다려주세요...", + "saveBeforeExit": "저장되지 않은 변경 사항", + "saveBeforeExitMessage": "편집기에 저장되지 않은 변경 내용이 있습니다. 어떻게 하시겠습니까?", + "copyPasteConfirm": "복사/붙여넣기 확인", + "copyItemQuestion": "이 항목을 새 위치로 복사하시겠습니까?", + "moveItemQuestion": "이 항목을 새 위치로 옮기시겠습니까?", + "sourcePath": "출처:", + "destinationPath": "목적지:" }, "search": { "images": "이미지", @@ -271,7 +289,10 @@ "share": "파일 공유하기", "admin": "관리자", "api": "긴 수명의 API 키 생성 및 관리", - "realtime": "실시간 연결 및 업데이트 사용" + "realtime": "실시간 연결 및 업데이트 사용", + "create": "파일 만들기", + "delete": "파일 삭제", + "download": "파일 다운로드" }, "permissions-name": "권한", "permissionsHelp": "사용자를 관리자로 만들거나 권한을 부여할 수 있습니다. 관리자를 선택하면, 모든 옵션이 자동으로 선택됩니다. 사용자 관리는 현재 관리자만 할 수 있습니다.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "이 기능을 활성화하면 각 사용자에게 다운로드 제한이 적용됩니다. 익명 사용자는 이 공유에서 어떤 파일도 다운로드할 수 없습니다.", "descriptionUploadDefault": "파일을 업로드할 수 있는 공유가 전송되었습니다.", "extractEmbeddedSubtitles": "임베디드 자막 추출", - "extractEmbeddedSubtitlesDescription": "로드 시 미디어 파일에서 임베디드 자막을 추출 - 대용량 파일의 경우 속도가 느려질 수 있습니다." + "extractEmbeddedSubtitlesDescription": "로드 시 미디어 파일에서 임베디드 자막을 추출 - 대용량 파일의 경우 속도가 느려질 수 있습니다.", + "disableDownload": "파일 다운로드 비활성화", + "disableDownloadDescription": "누구도 파일을 다운로드하거나 파일의 콘텐츠를 볼 수 없습니다.", + "allowModify": "파일 편집 허용", + "allowModifyDescription": "누구나 이 공유에서 파일을 편집할 수 있습니다.", + "allowDelete": "파일 삭제 허용", + "allowDeleteDescription": "누구나 이 공유 폴더에서 파일과 폴더를 삭제할 수 있습니다.", + "allowReplacements": "파일 교체 허용", + "allowReplacementsDescription": "같은 이름의 파일을 업로드할 때 누구나 기존 파일을 대체할 수 있습니다.", + "allowCreate": "파일 및 폴더 생성 및 업로드 허용", + "allowCreateDescription": "누구나 이 공유 폴더에 새 파일과 폴더를 만들고 업로드할 수 있습니다." }, "api": { "title": "API 키:", @@ -594,7 +625,6 @@ "uninitialized": "편집기를 초기화하지 못했습니다. 다시 로드하세요.", "saveFailed": "파일을 저장하지 못했습니다. 다시 시도하세요.", "saveAborted": "저장이 중단되었습니다. 파일 이름이 활성 파일과 일치하지 않습니다.", - "saveDisabled": "공유 파일 저장은 지원되지 않습니다.", "saveAbortedMessage": "저장 작업이 중단되었습니다. 애플리케이션의 활성 파일({activeFile})이 저장하려는 파일({tryingToSave})과 일치하지 않습니다.", "syncFailed": "5번 시도 후 \"{filename}\"의 경로와 상태를 동기화하지 못했습니다. 데이터 손상을 방지하기 위해 편집기 설정을 중단합니다." }, @@ -603,6 +633,11 @@ "LoopDisabled": "반복 비활성화", "PlayAllOncePlayback": "모두 한 번 재생", "ShuffleAllPlayback": "모두 셔플 재생", - "PlayAllLoopedPlayback": "모두 반복 재생" + "PlayAllLoopedPlayback": "모두 반복 재생", + "QueueButtonHint": "재생 대기열 표시", + "QueuePlayback": "재생 대기열", + "changePlaybackMode": "재생 모드 변경", + "changePlaybackModeHint": "더 많은 파일을 보려면 재생 모드를 변경하세요", + "emptyQueue": "대기열이 비어 있습니다" } } diff --git a/frontend/src/i18n/nl-be.json b/frontend/src/i18n/nl-be.json index 5b27d4c2e9..4c538af93f 100644 --- a/frontend/src/i18n/nl-be.json +++ b/frontend/src/i18n/nl-be.json @@ -57,7 +57,11 @@ "galleryView": "Galerij", "uploadFiles": "Bestanden uploaden", "uploadFolder": "Map uploaden", - "openUploadViewer": "Uploadmanager openen" + "openUploadViewer": "Uploadmanager openen", + "selectAll": "Alles selecteren", + "discardAndExit": "Weggooien en afsluiten", + "saveAndExit": "Opslaan en afsluiten", + "keepEditing": "Blijven bewerken" }, "download": { "downloadFile": "Bestand downloaden", @@ -86,13 +90,19 @@ "sortByLastModified": "Sorteren op laatst bewerkt", "sortByName": "Sorteren op naam", "sortBySize": "Sorteren op grootte", - "noPreview": "Preview is niet beschikbaar voor dit bestand." + "noPreview": "Preview is niet beschikbaar voor dit bestand.", + "noDownloadAccess": "Download is niet beschikbaar." }, "help": { "click": "selecteer bestand of map", "ctrl": { "click": "selecteer meerdere bestanden of mappen", - "d": "geselecteerde items downloaden" + "d": "geselecteerde items downloaden", + "b": "naar zijbalk wisselen", + "comma": "ga naar instellingen", + "c": "geselecteerde items kopiëren", + "v": "gekopieerde/afgesneden items plakken", + "x": "geselecteerde items knippen" }, "del": "verwijder geselecteerde items", "esc": "Wis selectie en/of sluit de prompt", @@ -100,7 +110,8 @@ "help": "Help", "f1": "help prompt tonen", "description": "Je kunt de basisnavigatieopties hieronder bekijken. Ga voor aanvullende informatie naar", - "wiki": "FileBrowser Quantum Wiki" + "slash": "Zoeken activeren", + "wiki": "FileBrowser Quantum Officiële documenten" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Bestanden succesvol gekopieerd!", "lastModified": "Laatst gewijzigd{suffix}", "size": "Maat{suffix}", - "operationInProgress": "Werking bezig, even geduld a.u.b..." + "operationInProgress": "Werking bezig, even geduld a.u.b...", + "saveBeforeExit": "Niet-opgeslagen wijzigingen", + "saveBeforeExitMessage": "U hebt niet-opgeslagen wijzigingen in de editor. Wat wilt u doen?", + "copyPasteConfirm": "Bevestiging kopiëren/plakken", + "copyItemQuestion": "Dit item kopiëren naar de nieuwe locatie?", + "moveItemQuestion": "Dit item verplaatsen naar de nieuwe locatie?", + "sourcePath": "Bron:", + "destinationPath": "Bestemming:" }, "search": { "images": "Afbeeldingen", @@ -271,7 +289,10 @@ "share": "Bestanden delen", "admin": "Beheerder", "api": "Langlevende API-sleutels maken en beheren", - "realtime": "Real-time verbindingen en updates mogelijk maken" + "realtime": "Real-time verbindingen en updates mogelijk maken", + "create": "Bestanden maken", + "delete": "Bestanden verwijderen", + "download": "Bestanden downloaden" }, "permissions-name": "Permissies", "permissionsHelp": "U kunt de gebruiker instellen als beheerder of de machtigingen afzonderlijk kiezen. Als u \"Beheerder\" selecteert, worden alle andere opties automatisch gecontroleerd. Het beheer van gebruikers blijft een privilege van een beheerder.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Indien ingeschakeld, wordt de downloadlimiet toegepast op elke gebruiker. Anonieme gebruikers kunnen geen bestanden downloaden van deze share.", "descriptionUploadDefault": "Je hebt een share ontvangen om bestanden te uploaden.", "extractEmbeddedSubtitles": "Ingesloten ondertitels uitpakken", - "extractEmbeddedSubtitlesDescription": "Ingesloten ondertitels uit mediabestanden halen tijdens het laden -- dit kan traag zijn voor grote bestanden." + "extractEmbeddedSubtitlesDescription": "Ingesloten ondertitels uit mediabestanden halen tijdens het laden -- dit kan traag zijn voor grote bestanden.", + "disableDownload": "Het downloaden van bestanden uitschakelen", + "disableDownloadDescription": "Iedereen kan geen bestanden downloaden of de inhoud van een bestand bekijken.", + "allowModify": "Bestanden bewerken toestaan", + "allowModifyDescription": "Iedereen kan bestanden bewerken in deze share.", + "allowDelete": "Bestanden verwijderen toestaan", + "allowDeleteDescription": "Iedereen kan bestanden en mappen van deze share verwijderen.", + "allowReplacements": "Bestandsvervangingen toestaan", + "allowReplacementsDescription": "Iedereen kan bestaande bestanden vervangen door bestanden met dezelfde naam te uploaden.", + "allowCreate": "Bestanden en mappen maken en uploaden", + "allowCreateDescription": "Iedereen kan nieuwe bestanden en mappen aanmaken en uploaden in deze share." }, "api": { "title": "API-sleutels", @@ -594,7 +625,6 @@ "uninitialized": "Het is niet gelukt de editor te initialiseren. Gelieve opnieuw te laden.", "saveFailed": "Het is niet gelukt om het bestand op te slaan. Probeer het opnieuw.", "saveAborted": "Opslaan afgebroken. De bestandsnaam komt niet overeen met het actieve bestand.", - "saveDisabled": "Het opslaan van gedeelde bestanden wordt niet ondersteund.", "saveAbortedMessage": "Opslaan afgebroken. Het actieve bestand van de toepassing ({activeFile}) komt niet overeen met het bestand dat u probeert op te slaan ({tryingToSave}).", "syncFailed": "Na 5 pogingen is het niet gelukt om de status te synchroniseren met de route voor \"{filename}\". Installatie van editor afgebroken om gegevensbeschadiging te voorkomen." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Herhaling uitgeschakeld", "PlayAllOncePlayback": "Alles eenmaal afspelen", "ShuffleAllPlayback": "Alles willekeurig afspelen", - "PlayAllLoopedPlayback": "Alles herhaald afspelen" + "PlayAllLoopedPlayback": "Alles herhaald afspelen", + "QueueButtonHint": "Toon afspeellijst", + "QueuePlayback": "Afspeellijst", + "changePlaybackMode": "Afspeelmodus wijzigen", + "changePlaybackModeHint": "Wijzig afspeelmodus om meer bestanden te zien", + "emptyQueue": "Wachtrij is leeg" } } diff --git a/frontend/src/i18n/pl.json b/frontend/src/i18n/pl.json index d7facb6b1b..ac14ac9f25 100644 --- a/frontend/src/i18n/pl.json +++ b/frontend/src/i18n/pl.json @@ -57,7 +57,11 @@ "galleryView": "Widok galerii", "uploadFiles": "Przesyłanie plików", "uploadFolder": "Folder przesyłania", - "openUploadViewer": "Otwórz Menedżera przesyłania" + "openUploadViewer": "Otwórz Menedżera przesyłania", + "selectAll": "Wybierz wszystko", + "discardAndExit": "Odrzuć i wyjdź", + "saveAndExit": "Zapisz i wyjdź", + "keepEditing": "Kontynuuj edycję" }, "download": { "downloadFile": "Pobierz plik", @@ -86,13 +90,19 @@ "sortByLastModified": "Sortuj wg. daty modyfikacji", "sortByName": "Sortuj wg. nazwy", "sortBySize": "Sortuj wg. rozmiaru", - "noPreview": "Podgląd nie jest dostępny dla tego pliku." + "noPreview": "Podgląd nie jest dostępny dla tego pliku.", + "noDownloadAccess": "Pobieranie nie jest dostępne." }, "help": { "click": "wybierz plik lub foler", "ctrl": { "click": "wybierz wiele plików lub folderów", - "d": "Pobierz wybrane elementy" + "d": "Pobierz wybrane elementy", + "b": "przełączanie paska bocznego", + "comma": "przejdź do ustawień", + "c": "kopiowanie wybranych elementów", + "v": "wklejanie skopiowanych/wyciętych elementów", + "x": "wycinanie wybranych elementów" }, "del": "usuń zaznaczone", "esc": "wyczyść zaznaczenie i/lub zamknij okno z powiadomieniem", @@ -100,7 +110,8 @@ "help": "Pomoc", "f1": "pokaż monit pomocy", "description": "Poniżej znajdują się podstawowe opcje nawigacji. Dodatkowe informacje można znaleźć na stronie", - "wiki": "FileBrowser Quantum Wiki" + "slash": "aktywuj wyszukiwanie", + "wiki": "Oficjalne dokumenty FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Pliki zostały skopiowane pomyślnie!", "lastModified": "Ostatnia modyfikacja{suffix}", "size": "Rozmiar{suffix}", - "operationInProgress": "Operacja w toku, proszę czekać..." + "operationInProgress": "Operacja w toku, proszę czekać...", + "saveBeforeExit": "Niezapisane zmiany", + "saveBeforeExitMessage": "Masz niezapisane zmiany w edytorze. Co chcesz zrobić?", + "copyPasteConfirm": "Potwierdzenie kopiowania/wklejania", + "copyItemQuestion": "Skopiować ten element do nowej lokalizacji?", + "moveItemQuestion": "Przenieść ten element do nowej lokalizacji?", + "sourcePath": "Źródło:", + "destinationPath": "Miejsce docelowe:" }, "search": { "images": "Zdjęcia", @@ -271,7 +289,10 @@ "share": "Udostępnianie plików", "admin": "Administrator", "api": "Tworzenie i zarządzanie kluczami API o długiej żywotności", - "realtime": "Połączenia i aktualizacje w czasie rzeczywistym" + "realtime": "Połączenia i aktualizacje w czasie rzeczywistym", + "create": "Tworzenie plików", + "delete": "Usuwanie plików", + "download": "Pobieranie plików" }, "permissions-name": "Uprawnienia", "permissionsHelp": "Możesz uczynić użytkownika administratorem, lub wybrać uprawnienia indywidualnie. Jeśli zaznaczysz opcję \"Administrator\", wszystkie pozostałe opcje zostaną automatycznie zaznaczone. Zarządzanie użytkownikami pozostaje przywilejem administratora.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Po włączeniu limit pobrań zostanie zastosowany do każdego użytkownika. Anonimowi użytkownicy nie będą mogli pobierać żadnych plików z tego folderu udostępnionego.", "descriptionUploadDefault": "Udział został wysłany w celu przesłania plików.", "extractEmbeddedSubtitles": "Wyodrębnianie osadzonych napisów", - "extractEmbeddedSubtitlesDescription": "Wyodrębnianie osadzonych napisów z plików multimedialnych podczas ładowania - może to być powolne w przypadku dużych plików." + "extractEmbeddedSubtitlesDescription": "Wyodrębnianie osadzonych napisów z plików multimedialnych podczas ładowania - może to być powolne w przypadku dużych plików.", + "disableDownload": "Wyłącz pobieranie plików", + "disableDownloadDescription": "Nikt nie będzie mógł pobierać plików ani przeglądać ich zawartości.", + "allowModify": "Zezwalaj na edycję plików", + "allowModifyDescription": "Każdy może edytować pliki w tym udziale.", + "allowDelete": "Zezwalaj na usuwanie plików", + "allowDeleteDescription": "Każdy może usuwać pliki i foldery z tego udziału.", + "allowReplacements": "Zezwalaj na zastępowanie plików", + "allowReplacementsDescription": "Każdy może zastąpić istniejące pliki podczas przesyłania plików o tej samej nazwie.", + "allowCreate": "Zezwalanie na tworzenie i przesyłanie plików i folderów", + "allowCreateDescription": "Każdy może tworzyć i przesyłać nowe pliki i foldery w tym udziale." }, "api": { "title": "Klucze API:", @@ -594,7 +625,6 @@ "uninitialized": "Nie udało się zainicjować edytora. Przeładuj ponownie.", "saveFailed": "Nie udało się zapisać pliku. Spróbuj ponownie.", "saveAborted": "Zapisywanie przerwane. Nazwa pliku nie pasuje do aktywnego pliku.", - "saveDisabled": "Zapisywanie udostępnionych plików nie jest obsługiwane.", "saveAbortedMessage": "Operacja zapisywania została przerwana. Aktywny plik aplikacji ({activeFile}) nie jest zgodny z plikiem, który próbujesz zapisać ({tryingToSave}).", "syncFailed": "Nie udało się zsynchronizować stanu z trasą dla \"{filename}\" po 5 próbach. Przerwano konfigurację edytora, aby zapobiec uszkodzeniu danych." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Pętla wyłączona", "PlayAllOncePlayback": "Odtwórz wszystkie raz", "ShuffleAllPlayback": "Losowe odtwarzanie wszystkich", - "PlayAllLoopedPlayback": "Odtwórz wszystkie w pętli" + "PlayAllLoopedPlayback": "Odtwórz wszystkie w pętli", + "QueueButtonHint": "Pokaż kolejkę odtwarzania", + "QueuePlayback": "Kolejka Odtwarzania", + "changePlaybackMode": "Zmień tryb odtwarzania", + "changePlaybackModeHint": "Zmień tryb odtwarzania, aby zobaczyć więcej plików", + "emptyQueue": "Kolejka jest pusta" } } diff --git a/frontend/src/i18n/pt-br.json b/frontend/src/i18n/pt-br.json index f2ea9b7902..2380af1b8a 100644 --- a/frontend/src/i18n/pt-br.json +++ b/frontend/src/i18n/pt-br.json @@ -57,7 +57,11 @@ "galleryView": "Visualização da galeria", "uploadFiles": "Carregar arquivos", "uploadFolder": "Upload de pasta", - "openUploadViewer": "Abrir o Upload Manager" + "openUploadViewer": "Abrir o Upload Manager", + "selectAll": "Selecionar tudo", + "discardAndExit": "Descartar e sair", + "saveAndExit": "Salvar e sair", + "keepEditing": "Continuar editando" }, "download": { "downloadFile": "Baixar arquivo", @@ -86,13 +90,19 @@ "sortByLastModified": "Ordenar pela última modificação", "sortByName": "Ordenar pelo nome", "sortBySize": "Ordenar pelo tamanho", - "noPreview": "Pré-visualização não disponível para este arquivo." + "noPreview": "Pré-visualização não disponível para este arquivo.", + "noDownloadAccess": "O download não está disponível." }, "help": { "click": "selecionar pasta ou arquivo", "ctrl": { "click": "selecionar várias pastas e arquivos", - "d": "baixar itens selecionados" + "d": "baixar itens selecionados", + "b": "alternar a barra lateral", + "comma": "ir para as configurações", + "c": "copiar itens selecionados", + "v": "colar itens copiados/cortados", + "x": "cortar itens selecionados" }, "del": "apagar os arquivos selecionados", "esc": "limpar seleção e/ou fechar menu", @@ -100,7 +110,8 @@ "help": "Ajuda", "f1": "mostrar prompt de ajuda", "description": "Você pode ver as opções básicas de navegação abaixo. Para obter informações adicionais, visite", - "wiki": "Wiki do FileBrowser Quantum" + "slash": "ativar a pesquisa", + "wiki": "Documentos oficiais do FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Os arquivos foram copiados com sucesso!", "lastModified": "Última modificação{suffix}", "size": "Tamanho{suffix}", - "operationInProgress": "Operação em andamento, aguarde..." + "operationInProgress": "Operação em andamento, aguarde...", + "saveBeforeExit": "Alterações não salvas", + "saveBeforeExitMessage": "Você tem alterações não salvas no editor. O que você gostaria de fazer?", + "copyPasteConfirm": "Confirmação de copiar/colar", + "copyItemQuestion": "Copiar esse item para o novo local?", + "moveItemQuestion": "Mover esse item para o novo local?", + "sourcePath": "Fonte:", + "destinationPath": "Destino:" }, "search": { "images": "Imagens", @@ -274,7 +292,10 @@ "share": "Compartilhar arquivos", "admin": "Administrador", "api": "Criar e gerenciar chaves de API de longa duração", - "realtime": "Permitir conexões e atualizações em tempo real" + "realtime": "Permitir conexões e atualizações em tempo real", + "create": "Criar arquivos", + "delete": "Excluir arquivos", + "download": "Baixar arquivos" }, "permissions-name": "Permissões", "permissionsHelp": "Pode definir o usuário como administrador ou escolher as permissões manualmente. Se selecionar a opção \"Administrador\", todas as outras opções serão automaticamente selecionadas. A gestão dos usuários é um privilégio restringido aos administradores.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Quando ativado, o limite de downloads será aplicado a cada usuário. Os usuários anônimos não poderão fazer download de nenhum arquivo desse compartilhamento.", "descriptionUploadDefault": "Um compartilhamento foi enviado a você para carregar arquivos.", "extractEmbeddedSubtitles": "Extrair legendas incorporadas", - "extractEmbeddedSubtitlesDescription": "Extrair legendas incorporadas de arquivos de mídia ao carregar - isso pode ser lento em arquivos grandes." + "extractEmbeddedSubtitlesDescription": "Extrair legendas incorporadas de arquivos de mídia ao carregar - isso pode ser lento em arquivos grandes.", + "disableDownload": "Desativar o download de arquivos", + "disableDownloadDescription": "Qualquer pessoa não poderá fazer download de arquivos ou visualizar o conteúdo de um arquivo.", + "allowModify": "Permitir a edição de arquivos", + "allowModifyDescription": "Qualquer pessoa pode editar arquivos nesse compartilhamento.", + "allowDelete": "Permitir a exclusão de arquivos", + "allowDeleteDescription": "Qualquer pessoa pode excluir arquivos e pastas desse compartilhamento.", + "allowReplacements": "Permitir substituições de arquivos", + "allowReplacementsDescription": "Qualquer pessoa pode substituir arquivos existentes ao fazer upload de arquivos com o mesmo nome.", + "allowCreate": "Permitir a criação e o upload de arquivos e pastas", + "allowCreateDescription": "Qualquer pessoa pode criar e carregar novos arquivos e pastas nesse compartilhamento." }, "api": { "title": "Chaves de API:", @@ -594,7 +625,6 @@ "uninitialized": "Falha ao inicializar o editor. Favor recarregar.", "saveFailed": "Falha ao salvar o arquivo. Tente novamente.", "saveAborted": "Salvamento abortado. O nome do arquivo não corresponde ao arquivo ativo.", - "saveDisabled": "Não há suporte para o salvamento de arquivos compartilhados.", "saveAbortedMessage": "Operação de salvamento abortada. O arquivo ativo do aplicativo ({activeFile}) não corresponde ao arquivo que você está tentando salvar ({tryingToSave}).", "syncFailed": "Falha ao sincronizar o estado com a rota para \"{filename}\" após 5 tentativas. Abortar a configuração do editor para evitar a corrupção de dados." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Repetição desativada", "PlayAllOncePlayback": "Reproduzir tudo uma vez", "ShuffleAllPlayback": "Reprodução aleatória de tudo", - "PlayAllLoopedPlayback": "Reproduzir tudo em repetição" + "PlayAllLoopedPlayback": "Reproduzir tudo em repetição", + "QueueButtonHint": "Mostrar fila de reprodução", + "QueuePlayback": "Fila de Reprodução", + "changePlaybackMode": "Alterar modo de reprodução", + "changePlaybackModeHint": "Altere o modo de reprodução para ver mais arquivos", + "emptyQueue": "A fila está vazia" } } diff --git a/frontend/src/i18n/pt.json b/frontend/src/i18n/pt.json index a046c74853..caf5f1e7f5 100644 --- a/frontend/src/i18n/pt.json +++ b/frontend/src/i18n/pt.json @@ -57,7 +57,11 @@ "galleryView": "Vista da galeria", "uploadFiles": "Carregar ficheiros", "uploadFolder": "Carregar pasta", - "openUploadViewer": "Abrir o Upload Manager" + "openUploadViewer": "Abrir o Upload Manager", + "selectAll": "Selecionar tudo", + "discardAndExit": "Descartar e sair", + "saveAndExit": "Guardar e sair", + "keepEditing": "Continuar a editar" }, "download": { "downloadFile": "Descarregar ficheiro", @@ -86,13 +90,19 @@ "sortByLastModified": "Ordenar pela última alteração", "sortByName": "Ordenar pelo nome", "sortBySize": "Ordenar pelo tamanho", - "noPreview": "A pré-visualização não está disponível para este ficheiro." + "noPreview": "A pré-visualização não está disponível para este ficheiro.", + "noDownloadAccess": "A transferência não está disponível." }, "help": { "click": "selecionar pasta ou ficheiro", "ctrl": { "click": "selecionar várias pastas e ficheiros", - "d": "descarregar itens selecionados" + "d": "descarregar itens selecionados", + "b": "alternar a barra lateral", + "comma": "ir para as definições", + "c": "copiar itens selecionados", + "v": "colar itens copiados/cortados", + "x": "cortar itens selecionados" }, "del": "eliminar os ficheiros selecionados", "esc": "limpar seleção e/ou fechar menu", @@ -100,7 +110,8 @@ "help": "Ajuda", "f1": "mostrar prompt de ajuda", "description": "Pode ver as opções básicas de navegação abaixo. Para obter informações adicionais, visite", - "wiki": "Wiki do FileBrowser Quantum" + "slash": "ativar a pesquisa", + "wiki": "Documentos oficiais do FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Ficheiros copiados com sucesso!", "lastModified": "Última modificação{suffix}", "size": "Tamanho{suffix}", - "operationInProgress": "Operação em curso, aguarde..." + "operationInProgress": "Operação em curso, aguarde...", + "saveBeforeExit": "Alterações não guardadas", + "saveBeforeExitMessage": "Tem alterações não guardadas no editor. O que é que gostaria de fazer?", + "copyPasteConfirm": "Confirmação de copiar/colar", + "copyItemQuestion": "Copiar este item para a nova localização?", + "moveItemQuestion": "Mover este item para a nova localização?", + "sourcePath": "Fonte:", + "destinationPath": "Destino:" }, "search": { "images": "Imagens", @@ -271,7 +289,10 @@ "share": "Partilhar ficheiros", "admin": "Administrador", "api": "Criar e gerir chaves de API de longa duração", - "realtime": "Permitir ligações e actualizações em tempo real" + "realtime": "Permitir ligações e actualizações em tempo real", + "create": "Criar ficheiros", + "delete": "Eliminar ficheiros", + "download": "Descarregar ficheiros" }, "permissions-name": "Permissões", "permissionsHelp": "Pode definir o utilizador como administrador ou escolher as permissões manualmente. Se selecionar a opção \"Administrador\", todas as outras opções serão automaticamente selecionadas. A gestão dos utilizadores é um privilégio restringido aos administradores.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Quando ativado, o limite de transferências será aplicado a cada utilizador. Os utilizadores anónimos não poderão descarregar quaisquer ficheiros desta partilha.", "descriptionUploadDefault": "Foi-lhe enviada uma partilha para carregar ficheiros.", "extractEmbeddedSubtitles": "Extrair legendas incorporadas", - "extractEmbeddedSubtitlesDescription": "Extrair legendas incorporadas de ficheiros multimédia ao carregar -- isto pode ser lento para ficheiros grandes." + "extractEmbeddedSubtitlesDescription": "Extrair legendas incorporadas de ficheiros multimédia ao carregar -- isto pode ser lento para ficheiros grandes.", + "disableDownload": "Desativar a transferência de ficheiros", + "disableDownloadDescription": "Qualquer pessoa não poderá descarregar ficheiros ou ver o conteúdo de um ficheiro.", + "allowModify": "Permitir a edição de ficheiros", + "allowModifyDescription": "Qualquer pessoa pode editar ficheiros nesta partilha.", + "allowDelete": "Permitir a eliminação de ficheiros", + "allowDeleteDescription": "Qualquer pessoa pode eliminar ficheiros e pastas desta partilha.", + "allowReplacements": "Permitir substituições de ficheiros", + "allowReplacementsDescription": "Qualquer pessoa pode substituir ficheiros existentes ao carregar ficheiros com o mesmo nome.", + "allowCreate": "Permitir a criação e o carregamento de ficheiros e pastas", + "allowCreateDescription": "Qualquer pessoa pode criar e carregar novos ficheiros e pastas nesta partilha." }, "api": { "title": "Chaves da API", @@ -594,7 +625,6 @@ "uninitialized": "Falha ao inicializar o editor. Por favor, recarregue.", "saveFailed": "Falha ao guardar o ficheiro. Por favor, tente novamente.", "saveAborted": "Gravação abortada. O nome do ficheiro não corresponde ao ficheiro ativo.", - "saveDisabled": "A gravação de ficheiros partilhados não é suportada.", "saveAbortedMessage": "Operação de gravação abortada. O ficheiro ativo da aplicação ({activeFile}) não corresponde ao ficheiro que está a tentar guardar ({tryingToSave}).", "syncFailed": "não conseguiu sincronizar o estado com a rota para \"{filename}\" após 5 tentativas. Abortar a configuração do editor para evitar a corrupção de dados." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Repetição desativada", "PlayAllOncePlayback": "Reproduzir tudo uma vez", "ShuffleAllPlayback": "Reprodução aleatória de tudo", - "PlayAllLoopedPlayback": "Reproduzir tudo em repetição" + "PlayAllLoopedPlayback": "Reproduzir tudo em repetição", + "QueueButtonHint": "Mostrar fila de reprodução", + "QueuePlayback": "Fila de Reprodução", + "changePlaybackMode": "Alterar modo de reprodução", + "changePlaybackModeHint": "Altere o modo de reprodução para ver mais arquivos", + "emptyQueue": "A fila está vazia" } } diff --git a/frontend/src/i18n/ro.json b/frontend/src/i18n/ro.json index c3c4f9fe69..9c754c037d 100644 --- a/frontend/src/i18n/ro.json +++ b/frontend/src/i18n/ro.json @@ -57,7 +57,11 @@ "galleryView": "Vizualizare galerie", "uploadFiles": "Încărcați fișiere", "uploadFolder": "Încărcați dosarul", - "openUploadViewer": "Deschideți Managerul de încărcare" + "openUploadViewer": "Deschideți Managerul de încărcare", + "selectAll": "Selectați toate", + "discardAndExit": "Renunțare și ieșire", + "saveAndExit": "Salvare și ieșire", + "keepEditing": "Continuă editarea" }, "download": { "downloadFile": "Descarcă fișier", @@ -86,13 +90,19 @@ "sortByLastModified": "Ordonează dup ultima modificare", "sortByName": "Ordonează după nume", "sortBySize": "Ordonează după dimensiune", - "noPreview": "Previzualizarea nu este disponibilă pentru acest fișier." + "noPreview": "Previzualizarea nu este disponibilă pentru acest fișier.", + "noDownloadAccess": "Descărcarea nu este disponibilă." }, "help": { "click": "alege fișier sau director", "ctrl": { "click": "alege multiple fișiere sau directoare", - "d": "descărcați elementele selectate" + "d": "descărcați elementele selectate", + "b": "comutare bară laterală", + "comma": "mergeți la setări", + "c": "copiați elementele selectate", + "v": "lipiți elementele copiate/tăiate", + "x": "tăiați articolele selectate" }, "del": "șterge elementele selectate", "esc": "elibereaza selecția și/sau închide fereastra", @@ -100,7 +110,8 @@ "help": "Ajutor", "f1": "arată ajutor prompt", "description": "Puteți vizualiza mai jos opțiunile de navigație de bază. Pentru informații suplimentare, vă rugăm să vizitați", - "wiki": "FileBrowser Quantum Wiki" + "slash": "activați căutarea", + "wiki": "FileBrowser Quantum Documente oficiale" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Fișiere copiate cu succes!", "lastModified": "Ultima modificare{suffix}", "size": "Mărime{suffix}", - "operationInProgress": "Operațiune în curs, vă rugăm să așteptați..." + "operationInProgress": "Operațiune în curs, vă rugăm să așteptați...", + "saveBeforeExit": "Modificări nesalvate", + "saveBeforeExitMessage": "Aveți modificări nesalvate în editor. Ce doriți să faceți?", + "copyPasteConfirm": "Confirmare copiere/lipire", + "copyItemQuestion": "Copiați acest element în noua locație?", + "moveItemQuestion": "Mutați acest element în noua locație?", + "sourcePath": "Sursă:", + "destinationPath": "Destinație:" }, "search": { "images": "Imagini", @@ -271,7 +289,10 @@ "share": "Distribuie fișiere", "admin": "Administrator", "api": "Crearea și gestionarea cheilor API cu durată lungă de viață", - "realtime": "Permite conexiuni și actualizări în timp real" + "realtime": "Permite conexiuni și actualizări în timp real", + "create": "Creați fișiere", + "delete": "Ștergeți fișierele", + "download": "Descărcați fișiere" }, "permissions-name": "Permisiuni", "permissionsHelp": "Poți alege ca un utilizator să fie administrator sau să-i alegi permisiunile individual. Dacă alegi \"Administrator\", toate celelalte opțiuni vor fi bifate automat. Gestionarea utilizatorilor rămâne un privilegiu exclusiv al administratorilor.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Atunci când este activată, limita de descărcări va fi aplicată fiecărui utilizator. Utilizatorii anonimi nu vor putea descărca niciun fișier din această partajare.", "descriptionUploadDefault": "V-a fost trimisă o partajare pentru a încărca fișiere.", "extractEmbeddedSubtitles": "Extragerea subtitrărilor încorporate", - "extractEmbeddedSubtitlesDescription": "Extragerea subtitrărilor încorporate din fișierele media la încărcare - acest lucru poate fi lent pentru fișierele mari." + "extractEmbeddedSubtitlesDescription": "Extragerea subtitrărilor încorporate din fișierele media la încărcare - acest lucru poate fi lent pentru fișierele mari.", + "disableDownload": "Dezactivați descărcarea fișierelor", + "disableDownloadDescription": "Oricine nu va putea să descarce fișiere sau să vizualizeze conținutul unui fișier.", + "allowModify": "Permiteți editarea fișierelor", + "allowModifyDescription": "Oricine poate edita fișiere în această partajare.", + "allowDelete": "Permiteți ștergerea fișierelor", + "allowDeleteDescription": "Oricine poate șterge fișiere și foldere din această partajare.", + "allowReplacements": "Permiteți înlocuirea fișierelor", + "allowReplacementsDescription": "Oricine poate înlocui fișierele existente atunci când încarcă fișiere cu același nume.", + "allowCreate": "Permiteți crearea și încărcarea de fișiere și foldere", + "allowCreateDescription": "Oricine poate crea și încărca fișiere și foldere noi în această partajare." }, "api": { "title": "Chei API:", @@ -594,7 +625,6 @@ "uninitialized": "Nu s-a reușit inițializarea editorului. Vă rugăm să reîncărcați.", "saveFailed": "Nu ați reușit să salvați fișierul. Vă rugăm să încercați din nou.", "saveAborted": "Salvare întreruptă. Numele fișierului nu corespunde fișierului activ.", - "saveDisabled": "Salvarea fișierelor partajate nu este acceptată.", "saveAbortedMessage": "Operațiunea de salvare a fost întreruptă. Fișierul activ al aplicației ({activeFile}) nu corespunde cu fișierul pe care încercați să îl salvați ({tryingToSave}).", "syncFailed": "nu a reușit să sincronizeze starea cu ruta pentru \"{filename}\" după 5 încercări. Întreruperea configurării editorului pentru a preveni coruperea datelor." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Buclă dezactivată", "PlayAllOncePlayback": "Redă toate o dată", "ShuffleAllPlayback": "Redare aleatoare a tuturor", - "PlayAllLoopedPlayback": "Redă toate în buclă" + "PlayAllLoopedPlayback": "Redă toate în buclă", + "QueueButtonHint": "Afișează coada de redare", + "QueuePlayback": "Coadă de Redare", + "changePlaybackMode": "Schimbă modul de redare", + "changePlaybackModeHint": "Schimbă modul de redare pentru a vedea mai multe fișiere", + "emptyQueue": "Coada este goală" } } diff --git a/frontend/src/i18n/ru.json b/frontend/src/i18n/ru.json index 5483fe249e..8d5235242d 100644 --- a/frontend/src/i18n/ru.json +++ b/frontend/src/i18n/ru.json @@ -57,7 +57,11 @@ "galleryView": "Просмотр галереи", "uploadFiles": "Загрузка файлов", "uploadFolder": "Папка для загрузки", - "openUploadViewer": "Откройте менеджер загрузки" + "openUploadViewer": "Откройте менеджер загрузки", + "selectAll": "Выбрать все", + "discardAndExit": "Выброс и выход", + "saveAndExit": "Сохранить и выйти", + "keepEditing": "Продолжайте редактировать" }, "download": { "downloadFile": "Скачать файл", @@ -86,13 +90,19 @@ "sortByLastModified": "Сортировка по дате изменения", "sortByName": "Сортировка по имени", "sortBySize": "Сортировка по размеру", - "noPreview": "Предварительный просмотр для этого файла недоступен." + "noPreview": "Предварительный просмотр для этого файла недоступен.", + "noDownloadAccess": "Загрузка недоступна." }, "help": { "click": "выбрать файл или каталог", "ctrl": { "click": "выбрать несколько файлов или каталогов", - "d": "скачать выбранные элементы" + "d": "скачать выбранные элементы", + "b": "переключить боковую панель", + "comma": "перейти к настройкам", + "c": "копирование выбранных элементов", + "v": "Вставить скопированные/вырезанные элементы", + "x": "вырезать выбранные предметы" }, "del": "удалить выбранные элементы", "esc": "очистить выделение и/или закрыть окно", @@ -100,7 +110,8 @@ "help": "Помощь", "f1": "показать подсказку", "description": "Ниже представлены основные варианты навигации. Для получения дополнительной информации, пожалуйста, посетите", - "wiki": "FileBrowser Quantum Wiki" + "slash": "активировать поиск", + "wiki": "Официальные документы FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Файлы успешно скопированы!", "lastModified": "Последнее изменение{suffix}", "size": "Размер{suffix}", - "operationInProgress": "Операция в процессе, пожалуйста, подождите..." + "operationInProgress": "Операция в процессе, пожалуйста, подождите...", + "saveBeforeExit": "Несохраненные изменения", + "saveBeforeExitMessage": "У вас есть несохраненные изменения в редакторе. Что бы вы хотели сделать?", + "copyPasteConfirm": "Подтверждение копирования/вставки", + "copyItemQuestion": "Скопировать этот элемент в новое место?", + "moveItemQuestion": "Переместить этот предмет на новое место?", + "sourcePath": "Источник:", + "destinationPath": "Пункт назначения:" }, "search": { "images": "Изображения", @@ -271,7 +289,10 @@ "share": "Делиться файлами", "admin": "Администратор", "api": "Создание и управление долгоживущими ключами API", - "realtime": "Обеспечьте подключение и обновление в режиме реального времени" + "realtime": "Обеспечьте подключение и обновление в режиме реального времени", + "create": "Создание файлов", + "delete": "Удаление файлов", + "download": "Скачать файлы" }, "permissions-name": "Права доступа", "permissionsHelp": "Можно настроить пользователя как администратора или выбрать разрешения индивидуально. При выборе \"Администратор\", все остальные параметры будут автоматически выбраны. Управление пользователями - привилегия администратора.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Если эта функция включена, лимит загрузок будет применяться к каждому пользователю. Анонимные пользователи не смогут скачивать файлы с этого ресурса.", "descriptionUploadDefault": "Вам был отправлен ресурс для загрузки файлов.", "extractEmbeddedSubtitles": "Извлечение встроенных субтитров", - "extractEmbeddedSubtitlesDescription": "Извлечение встроенных субтитров из медиафайлов при загрузке - это может быть медленным для больших файлов." + "extractEmbeddedSubtitlesDescription": "Извлечение встроенных субтитров из медиафайлов при загрузке - это может быть медленным для больших файлов.", + "disableDownload": "Отключить загрузку файлов", + "disableDownloadDescription": "Любой человек не сможет скачивать файлы или просматривать их содержимое.", + "allowModify": "Разрешить редактирование файлов", + "allowModifyDescription": "Любой может редактировать файлы в этом ресурсе.", + "allowDelete": "Разрешить удаление файлов", + "allowDeleteDescription": "Любой человек может удалять файлы и папки из этого ресурса.", + "allowReplacements": "Разрешить замену файлов", + "allowReplacementsDescription": "Любой человек может заменить существующие файлы при загрузке файлов с тем же именем.", + "allowCreate": "Позволяет создавать и загружать файлы и папки", + "allowCreateDescription": "Любой желающий может создавать и загружать новые файлы и папки в этот ресурс." }, "api": { "title": "Ключи API:", @@ -594,7 +625,6 @@ "uninitialized": "Не удалось инициализировать редактор. Пожалуйста, перезагрузитесь.", "saveFailed": "Не удалось сохранить файл. Пожалуйста, попробуйте еще раз.", "saveAborted": "Сохранение прервано. Имя файла не совпадает с именем активного файла.", - "saveDisabled": "Сохранение общих файлов не поддерживается.", "saveAbortedMessage": "Операция сохранения прервана. Активный файл приложения ({activeFile}) не совпадает с файлом, который вы пытаетесь сохранить ({tryingToSave}).", "syncFailed": "не удалось синхронизировать состояние с маршрутом для \"{filename}\" после 5 попыток. Прерываю настройку редактора, чтобы предотвратить повреждение данных." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Повтор отключен", "PlayAllOncePlayback": "Воспроизвести все один раз", "ShuffleAllPlayback": "Перемешать все", - "PlayAllLoopedPlayback": "Воспроизвести все с повторением" + "PlayAllLoopedPlayback": "Воспроизвести все с повторением", + "QueueButtonHint": "Показать очередь воспроизведения", + "QueuePlayback": "Очередь Воспроизведения", + "changePlaybackMode": "Изменить режим воспроизведения", + "changePlaybackModeHint": "Измените режим воспроизведения, чтобы увидеть больше файлов", + "emptyQueue": "Очередь пуста" } } diff --git a/frontend/src/i18n/sk.json b/frontend/src/i18n/sk.json index d85f006dfe..3492b5d18d 100644 --- a/frontend/src/i18n/sk.json +++ b/frontend/src/i18n/sk.json @@ -57,7 +57,11 @@ "galleryView": "Zobrazenie galérie", "uploadFiles": "Nahrávanie súborov", "uploadFolder": "Odoslanie priečinka", - "openUploadViewer": "Otvoriť Správcu nahrávania" + "openUploadViewer": "Otvoriť Správcu nahrávania", + "selectAll": "Vyberte všetky", + "discardAndExit": "Vyradenie a ukončenie", + "saveAndExit": "Uložiť a ukončiť", + "keepEditing": "Pokračujte v úpravách" }, "download": { "downloadFile": "Stiahnuť súbor", @@ -86,13 +90,19 @@ "sortByLastModified": "Zoradiť podľa dátumu", "sortByName": "Zoradiť podľa názvu", "sortBySize": "Zoradiť podľa veľkosti", - "noPreview": "Pre tento súbor nie je dostupný náhľad." + "noPreview": "Pre tento súbor nie je dostupný náhľad.", + "noDownloadAccess": "Stiahnutie nie je k dispozícii." }, "help": { "click": "vyberie súbor alebo priečinok", "ctrl": { "click": "vyberie viac súborov alebo priečinkov", - "d": "stiahnuť vybrané položky" + "d": "stiahnuť vybrané položky", + "b": "prepínanie bočného panela", + "comma": "prejsť na nastavenia", + "c": "kopírovať vybrané položky", + "v": "vložiť skopírované/vyrezané položky", + "x": "rezanie vybraných položiek" }, "del": "odstráni vybraté položky", "esc": "zruší výber a/alebo zavrie okno", @@ -100,7 +110,8 @@ "help": "Pomoc", "f1": "zobraziť výzvu na pomoc", "description": "Základné možnosti navigácie si môžete pozrieť nižšie. Ďalšie informácie nájdete na stránke", - "wiki": "FileBrowser Quantum Wiki" + "slash": "aktivovať vyhľadávanie", + "wiki": "Oficiálne dokumenty FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Súbory boli úspešne skopírované!", "lastModified": "Posledná úprava{suffix}", "size": "Veľkosť{suffix}", - "operationInProgress": "Operácia prebieha, počkajte, prosím..." + "operationInProgress": "Operácia prebieha, počkajte, prosím...", + "saveBeforeExit": "Neuložené zmeny", + "saveBeforeExitMessage": "V editore máte neuložené zmeny. Čo by ste chceli urobiť?", + "copyPasteConfirm": "Potvrdenie kopírovania/vkladania", + "copyItemQuestion": "Skopírovať túto položku na nové miesto?", + "moveItemQuestion": "Presunúť túto položku na nové miesto?", + "sourcePath": "Zdroj:", + "destinationPath": "Cieľová destinácia:" }, "search": { "images": "Obrázky", @@ -271,7 +289,10 @@ "share": "Zdieľať súbory", "admin": "Správca", "api": "Vytváranie a správa kľúčov API s dlhou životnosťou", - "realtime": "Povolenie pripojení a aktualizácií v reálnom čase" + "realtime": "Povolenie pripojení a aktualizácií v reálnom čase", + "create": "Vytvorenie súborov", + "delete": "Odstránenie súborov", + "download": "Stiahnite si súbory" }, "permissions-name": "Práva", "permissionsHelp": "Môžete nastaviť používateľa, aby bol administrátorom alebo vybrať práva jednotlivo. Ak zvolíte \"Administrator\", všetky ďalšie budú automaticky zaškrtnuté. Manažment používateľov ostáva v správe administrátora.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Ak je táto možnosť povolená, limit stiahnutí sa uplatní na každého používateľa. Anonymní používatelia nebudú môcť z tejto zdieľanej zložky sťahovať žiadne súbory.", "descriptionUploadDefault": "Bola vám odoslaná akcia na nahratie súborov.", "extractEmbeddedSubtitles": "Výpis vložených titulkov", - "extractEmbeddedSubtitlesDescription": "Extrahovať vložené titulky z mediálnych súborov pri načítaní - pri veľkých súboroch to môže byť pomalé." + "extractEmbeddedSubtitlesDescription": "Extrahovať vložené titulky z mediálnych súborov pri načítaní - pri veľkých súboroch to môže byť pomalé.", + "disableDownload": "Zakázať preberanie súborov", + "disableDownloadDescription": "Nikto nebude môcť sťahovať súbory ani zobrazovať ich obsah.", + "allowModify": "Povolenie úprav súborov", + "allowModifyDescription": "Súbory v tejto zdieľanej zložke môže upravovať ktokoľvek.", + "allowDelete": "Povolenie odstraňovania súborov", + "allowDeleteDescription": "Súbory a priečinky z tejto zdieľanej zložky môže vymazať ktokoľvek.", + "allowReplacements": "Povolenie výmeny súborov", + "allowReplacementsDescription": "Pri nahrávaní súborov s rovnakým názvom môže ktokoľvek nahradiť existujúce súbory.", + "allowCreate": "Umožniť vytváranie a nahrávanie súborov a priečinkov", + "allowCreateDescription": "V tomto zdieľanom úložisku môže ktokoľvek vytvárať a nahrávať nové súbory a priečinky." }, "api": { "title": "Kľúče API:", @@ -594,7 +625,6 @@ "uninitialized": "Nepodarilo sa inicializovať editor. Prosím, načítajte ho znova.", "saveFailed": "Nepodarilo sa uložiť súbor. Skúste to prosím znova.", "saveAborted": "Uloženie prerušené. Názov súboru sa nezhoduje s aktívnym súborom.", - "saveDisabled": "Ukladanie zdieľaných súborov nie je podporované.", "saveAbortedMessage": "Operácia uloženia sa prerušila. Aktívny súbor aplikácie ({activeFile}) sa nezhoduje so súborom, ktorý sa pokúšate uložiť ({tryingToSave}).", "syncFailed": "sa nepodarilo synchronizovať stav s trasou pre \"{filename}\" po 5 pokusoch. Prerušenie nastavenia editora, aby sa zabránilo poškodeniu údajov." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Slučka zakázaná", "PlayAllOncePlayback": "Prehrať všetko raz", "ShuffleAllPlayback": "Náhodné prehrávanie všetkého", - "PlayAllLoopedPlayback": "Prehrať všetko v slučke" + "PlayAllLoopedPlayback": "Prehrať všetko v slučke", + "QueueButtonHint": "Zobraziť front prehrávania", + "QueuePlayback": "Front Prehrávania", + "changePlaybackMode": "Zmeniť režim prehrávania", + "changePlaybackModeHint": "Zmeňte režim prehrávania, aby ste videli viac súborov", + "emptyQueue": "Front je prázdny" } } diff --git a/frontend/src/i18n/sv-se.json b/frontend/src/i18n/sv-se.json index 314e5ce22b..27abffb118 100644 --- a/frontend/src/i18n/sv-se.json +++ b/frontend/src/i18n/sv-se.json @@ -57,7 +57,11 @@ "galleryView": "Galleri utsikt", "uploadFiles": "Ladda upp filer", "uploadFolder": "Ladda upp mapp", - "openUploadViewer": "Öppna uppladdningshanteraren" + "openUploadViewer": "Öppna uppladdningshanteraren", + "selectAll": "Välj alla", + "discardAndExit": "Kassera och avsluta", + "saveAndExit": "Spara och avsluta", + "keepEditing": "Fortsätt redigera" }, "download": { "downloadFile": "Ladda ner fil", @@ -86,13 +90,19 @@ "sortByLastModified": "Sortera på senast ändrad", "sortByName": "Sortera på namn", "sortBySize": "Sortera på storlek", - "noPreview": "Förhandsgranskning är inte tillgänglig för den här filen." + "noPreview": "Förhandsgranskning är inte tillgänglig för den här filen.", + "noDownloadAccess": "Nedladdning är inte tillgänglig." }, "help": { "click": "välj fil eller mapp", "ctrl": { "click": "välj flera filer eller mappar", - "d": "ladda ner valda artiklar" + "d": "ladda ner valda artiklar", + "b": "växla sidofält", + "comma": "gå till inställningar", + "c": "kopiera valda objekt", + "v": "klistra in kopierade/avklippta objekt", + "x": "kapa valda artiklar" }, "del": "ta bort valda objekt", "esc": "Rensa markeringen och/eller stänga prompten", @@ -100,7 +110,8 @@ "help": "Hjälp", "f1": "visa hjälp prompt", "description": "Du kan se de grundläggande navigeringsalternativen nedan. För ytterligare information, vänligen besök", - "wiki": "FileBrowser Quantum Wiki" + "slash": "aktivera sökning", + "wiki": "FileBrowser Quantum officiella dokument" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Filerna kopierades framgångsrikt!", "lastModified": "Senast ändrad{suffix}", "size": "Storlek{suffix}", - "operationInProgress": "Operation pågår, vänligen vänta..." + "operationInProgress": "Operation pågår, vänligen vänta...", + "saveBeforeExit": "Osparade ändringar", + "saveBeforeExitMessage": "Du har osparade ändringar i redigeringsverktyget. Vad skulle du vilja göra?", + "copyPasteConfirm": "Kopiera/klistra in bekräftelse", + "copyItemQuestion": "Kopiera det här objektet till den nya platsen?", + "moveItemQuestion": "Flytta det här objektet till den nya platsen?", + "sourcePath": "Källa:", + "destinationPath": "Destination:" }, "search": { "images": "Bilder", @@ -271,7 +289,10 @@ "share": "Dela filer", "admin": "Administratör", "api": "Skapa och hantera API-nycklar med lång livslängd", - "realtime": "Möjliggör anslutningar och uppdateringar i realtid" + "realtime": "Möjliggör anslutningar och uppdateringar i realtid", + "create": "Skapa filer", + "delete": "Radera filer", + "download": "Ladda ner filer" }, "permissions-name": "Rättigheter", "permissionsHelp": "Du kan ange att användaren ska vara administratör eller välja behörigheterna individuellt. Om du väljer \"administratör \" kommer alla andra alternativ att kontrolleras automatiskt. Hanteringen av användare är fortfarande ett privilegium för en administratör.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "När den är aktiverad kommer nedladdningsgränsen att tillämpas på varje användare. Anonyma användare kan inte ladda ner några filer från den här delningen.", "descriptionUploadDefault": "En andel har skickats till dig för att ladda upp filer.", "extractEmbeddedSubtitles": "Extrahera inbäddade undertexter", - "extractEmbeddedSubtitlesDescription": "Extrahera inbäddade undertexter från mediefiler vid laddning - detta kan vara långsamt för stora filer." + "extractEmbeddedSubtitlesDescription": "Extrahera inbäddade undertexter från mediefiler vid laddning - detta kan vara långsamt för stora filer.", + "disableDownload": "Inaktivera nedladdning av filer", + "disableDownloadDescription": "Vem som helst kommer inte att kunna ladda ner filer eller visa innehållet i en fil.", + "allowModify": "Tillåt redigering av filer", + "allowModifyDescription": "Vem som helst kan redigera filer i den här delen.", + "allowDelete": "Tillåt radering av filer", + "allowDeleteDescription": "Vem som helst kan radera filer och mappar från denna delning.", + "allowReplacements": "Tillåt filbyten", + "allowReplacementsDescription": "Vem som helst kan ersätta befintliga filer när de laddar upp filer med samma namn.", + "allowCreate": "Tillåt skapande och uppladdning av filer och mappar", + "allowCreateDescription": "Vem som helst kan skapa och ladda upp nya filer och mappar i den här delen." }, "api": { "title": "API-nycklar", @@ -594,7 +625,6 @@ "uninitialized": "Redigeraren kunde inte initieras. Vänligen ladda om.", "saveFailed": "Misslyckades med att spara filen. Vänligen försök igen.", "saveAborted": "Spara avbröts. Filnamnet stämmer inte överens med den aktiva filen.", - "saveDisabled": "Sparande av delade filer stöds inte.", "saveAbortedMessage": "Spara åtgärden avbröts. Programmets aktiva fil ({activeFile}) stämmer inte överens med den fil du försöker spara ({tryingToSave}).", "syncFailed": "lyckades inte synkronisera tillstånd med rutten för \"{filename}\" efter 5 försök. Avbryter redigeringsinställningen för att förhindra datakorruption." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Loop inaktiverad", "PlayAllOncePlayback": "Spela alla en gång", "ShuffleAllPlayback": "Blanda alla", - "PlayAllLoopedPlayback": "Spela alla i loop" + "PlayAllLoopedPlayback": "Spela alla i loop", + "QueueButtonHint": "Visa uppspelningskö", + "QueuePlayback": "Uppspelningskö", + "changePlaybackMode": "Ändra uppspelningsläge", + "changePlaybackModeHint": "Ändra uppspelningsläge för att se fler filer", + "emptyQueue": "Kön är tom" } } diff --git a/frontend/src/i18n/tr.json b/frontend/src/i18n/tr.json index 093315efcd..c990af04ec 100644 --- a/frontend/src/i18n/tr.json +++ b/frontend/src/i18n/tr.json @@ -57,7 +57,11 @@ "galleryView": "Galeri Görünümü", "uploadFiles": "Dosya Yükleme", "uploadFolder": "Klasör Yükle", - "openUploadViewer": "Yükleme Yöneticisini Açın" + "openUploadViewer": "Yükleme Yöneticisini Açın", + "selectAll": "Tümünü seçin", + "discardAndExit": "At ve Çık", + "saveAndExit": "Kaydet ve Çık", + "keepEditing": "Düzenlemeye Devam Et" }, "download": { "downloadFile": "Dosyayı indir", @@ -86,13 +90,19 @@ "sortByLastModified": "Güncelleme tarihine göre sırala", "sortByName": "İsme göre sırala", "sortBySize": "Boyuta göre sırala", - "noPreview": "Bu dosya için önizleme aktif değil" + "noPreview": "Bu dosya için önizleme aktif değil", + "noDownloadAccess": "İndirme mevcut değil." }, "help": { "click": "dosya veya klasör seçin", "ctrl": { "click": "çoklu dosya ve klasör seçin", - "d": "seçili öğeleri indirin" + "d": "seçili öğeleri indirin", + "b": "kenar çubuğunu değiştir", + "comma": "ayarlara git", + "c": "seçili öğeleri kopyala", + "v": "kopyalanan/kesilen öğeleri yapıştırma", + "x": "seçili öğeleri kes" }, "del": "seçilileri sil", "esc": "seçimi temizle veya kapatın", @@ -100,7 +110,8 @@ "help": "Yardım", "f1": "yardım istemini göster", "description": "Temel navigasyon seçeneklerini aşağıda görüntüleyebilirsiniz. Ek bilgi için lütfen şu adresi ziyaret edin", - "wiki": "FileBrowser Quantum Wiki" + "slash": "aramayı etkinleştir", + "wiki": "FileBrowser Quantum Resmi Dokümanları" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Dosyalar başarıyla kopyalandı!", "lastModified": "Son Değişiklik{suffix}", "size": "Boyut{suffix}", - "operationInProgress": "İşlem devam ediyor, lütfen bekleyin..." + "operationInProgress": "İşlem devam ediyor, lütfen bekleyin...", + "saveBeforeExit": "Kaydedilmemiş Değişiklikler", + "saveBeforeExitMessage": "Düzenleyicide kaydedilmemiş değişiklikleriniz var. Ne yapmak istiyorsunuz?", + "copyPasteConfirm": "Kopyala/Yapıştır Onayı", + "copyItemQuestion": "Bu öğeyi yeni konuma kopyalayayım mı?", + "moveItemQuestion": "Bu öğeyi yeni konuma taşıyın mı?", + "sourcePath": "Kaynak:", + "destinationPath": "Varış yeri:" }, "search": { "images": "Görseller", @@ -271,7 +289,10 @@ "share": "Dosyaları paylaş", "admin": "Yönetici", "api": "Uzun ömürlü API anahtarları oluşturma ve yönetme", - "realtime": "Gerçek zamanlı bağlantıları ve güncellemeleri etkinleştirin" + "realtime": "Gerçek zamanlı bağlantıları ve güncellemeleri etkinleştirin", + "create": "Dosya oluşturma", + "delete": "Dosyaları sil", + "download": "Dosyaları indirin" }, "permissions-name": "İzinler", "permissionsHelp": "Kullanıcıyı yönetici olarak ayarlayabilir veya izinleri ayrı ayrı seçebilirsiniz. \"Yönetici\"yi seçerseniz, diğer tüm seçenekler otomatik olarak kontrol edilecektir. Kullanıcıların yönetimi, bir yöneticinin yetkisi olarak kalır.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Etkinleştirildiğinde, indirme sınırı her kullanıcıya uygulanacaktır. Anonim kullanıcılar bu paylaşımdan herhangi bir dosya indiremeyecektir.", "descriptionUploadDefault": "Dosyaları yüklemeniz için size bir paylaşım gönderildi.", "extractEmbeddedSubtitles": "Gömülü altyazıları çıkarma", - "extractEmbeddedSubtitlesDescription": "Yüklenen medya dosyalarından gömülü altyazıları ayıklayın -- bu işlem büyük dosyalar için yavaş olabilir." + "extractEmbeddedSubtitlesDescription": "Yüklenen medya dosyalarından gömülü altyazıları ayıklayın -- bu işlem büyük dosyalar için yavaş olabilir.", + "disableDownload": "Dosya indirmeyi devre dışı bırak", + "disableDownloadDescription": "Hiç kimse dosya indiremeyecek veya bir dosyanın içeriğini görüntüleyemeyecektir.", + "allowModify": "Dosyaları düzenlemeye izin ver", + "allowModifyDescription": "Bu paylaşımdaki dosyaları herkes düzenleyebilir.", + "allowDelete": "Dosyaların silinmesine izin ver", + "allowDeleteDescription": "Herkes bu paylaşımdan dosya ve klasörleri silebilir.", + "allowReplacements": "Dosya değiştirmelerine izin ver", + "allowReplacementsDescription": "Aynı ada sahip dosyaları yüklerken herkes mevcut dosyaları değiştirebilir.", + "allowCreate": "Dosya ve klasör oluşturmaya ve yüklemeye izin ver", + "allowCreateDescription": "Herkes bu paylaşımda yeni dosyalar ve klasörler oluşturabilir ve yükleyebilir." }, "api": { "title": "API Anahtarları:", @@ -594,7 +625,6 @@ "uninitialized": "Düzenleyici başlatılamadı. Lütfen yeniden yükleyin.", "saveFailed": "Dosya kaydedilemedi. Lütfen tekrar deneyin.", "saveAborted": "Kaydetme işlemi iptal edildi. Dosya adı etkin dosyayla eşleşmiyor.", - "saveDisabled": "Paylaşılan dosyaların kaydedilmesi desteklenmez.", "saveAbortedMessage": "Kaydetme işlemi iptal edildi. Uygulamanın etkin dosyası ({activeFile}) kaydetmeye çalıştığınız dosyayla ({tryingToSave}) eşleşmiyor.", "syncFailed": "\"{filename}\" için 5 denemeden sonra rota ile durum senkronize edilemedi. Veri bozulmasını önlemek için düzenleyici kurulumu iptal ediliyor." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Döngü Devre Dışı", "PlayAllOncePlayback": "Tümünü Bir Kez Oynat", "ShuffleAllPlayback": "Tümünü Karıştır", - "PlayAllLoopedPlayback": "Tümünü Döngüde Oynat" + "PlayAllLoopedPlayback": "Tümünü Döngüde Oynat", + "QueueButtonHint": "Oynatma kuyruğunu göster", + "QueuePlayback": "Oynatma Kuyruğu", + "changePlaybackMode": "Oynatma modunu değiştir", + "changePlaybackModeHint": "Daha fazla dosya görmek için oynatma modunu değiştirin", + "emptyQueue": "Kuyruk boş" } } diff --git a/frontend/src/i18n/ua.json b/frontend/src/i18n/ua.json index 3d3b5ee696..0f1dcde88b 100644 --- a/frontend/src/i18n/ua.json +++ b/frontend/src/i18n/ua.json @@ -57,7 +57,11 @@ "galleryView": "Перегляд галереї", "uploadFiles": "Завантажити файли", "uploadFolder": "Завантажити папку", - "openUploadViewer": "Відкрийте диспетчер завантажень" + "openUploadViewer": "Відкрийте диспетчер завантажень", + "selectAll": "Вибрати все", + "discardAndExit": "Викидання та вихід", + "saveAndExit": "Зберегти та вийти", + "keepEditing": "Продовжуйте редагувати" }, "download": { "downloadFile": "Завантажити файл", @@ -86,13 +90,19 @@ "sortByLastModified": "Сортувати за останнім зміненням", "sortByName": "Сортувати за іменем", "sortBySize": "Сортувати за розміром", - "noPreview": "Попередній перегляд для цього файлу недоступний." + "noPreview": "Попередній перегляд для цього файлу недоступний.", + "noDownloadAccess": "Завантаження недоступне." }, "help": { "click": "вибрати файл чи каталог", "ctrl": { "click": "вибрати кілька файлів чи каталогів", - "d": "завантажити вибрані елементи" + "d": "завантажити вибрані елементи", + "b": "переключити бічну панель", + "comma": "перейти до налаштувань", + "c": "копіювати вибрані елементи", + "v": "вставляти скопійовані/вирізані елементи", + "x": "вирізати вибрані елементи" }, "del": "видалити вибрані елементи", "esc": "очистити виділення та/або закрити вікно", @@ -100,7 +110,8 @@ "help": "Допомога", "f1": "показати запит на допомогу", "description": "Нижче ви можете переглянути основні параметри навігації. Для отримання додаткової інформації, будь ласка, відвідайте", - "wiki": "FileBrowser Quantum Wiki" + "slash": "активувати пошук", + "wiki": "Офіційна документація FileBrowser Quantum" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "Файли успішно скопійовано!", "lastModified": "Останній раз змінено{suffix}", "size": "Розмір{suffix}", - "operationInProgress": "Триває операція, будь ласка, зачекайте..." + "operationInProgress": "Триває операція, будь ласка, зачекайте...", + "saveBeforeExit": "Незбережені зміни", + "saveBeforeExitMessage": "У вас є незбережені зміни в редакторі. Що ви хочете зробити?", + "copyPasteConfirm": "Підтвердження копіювання/вставки", + "copyItemQuestion": "Скопіювати цей елемент на нове місце?", + "moveItemQuestion": "Перемістити цей елемент на нове місце?", + "sourcePath": "Джерело:", + "destinationPath": "Пункт призначення:" }, "search": { "images": "Зображення", @@ -271,7 +289,10 @@ "share": "Ділітися файлами", "admin": "Адміністратор", "api": "Створюйте та керуйте довготривалими ключами API", - "realtime": "Увімкніть з'єднання та оновлення в режимі реального часу" + "realtime": "Увімкніть з'єднання та оновлення в режимі реального часу", + "create": "Створення файлів", + "delete": "Видалення файлів", + "download": "Завантажити файли" }, "permissions-name": "Дозволи", "permissionsHelp": "Можна настроїти користувача як адміністратора або вибрати індивідуальні дозволи. При виборі \"Адміністратор\" всі інші параметри будуть автоматично вибрані. Керування користувачами - привілей адміністратора.\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "Якщо увімкнено, ліміт завантажень буде застосовано до кожного користувача. Анонімні користувачі не зможуть завантажити жодного файлу з цього ресурсу.", "descriptionUploadDefault": "Вам надіслано посилання для завантаження файлів.", "extractEmbeddedSubtitles": "Витягнути вбудовані субтитри", - "extractEmbeddedSubtitlesDescription": "Витягувати вбудовані субтитри з медіафайлів під час завантаження - це може бути повільним для великих файлів." + "extractEmbeddedSubtitlesDescription": "Витягувати вбудовані субтитри з медіафайлів під час завантаження - це може бути повільним для великих файлів.", + "disableDownload": "Вимкнути завантаження файлів", + "disableDownloadDescription": "Ніхто не зможе завантажити файли або переглянути їхній вміст.", + "allowModify": "Дозволити редагування файлів", + "allowModifyDescription": "Будь-хто може редагувати файли у цьому ресурсі.", + "allowDelete": "Дозволити видалення файлів", + "allowDeleteDescription": "Будь-хто може видаляти файли і папки з цього ресурсу.", + "allowReplacements": "Дозволити заміну файлів", + "allowReplacementsDescription": "Будь-хто може замінити існуючі файли при завантаженні файлів з однаковими іменами.", + "allowCreate": "Дозволяє створювати та завантажувати файли та папки", + "allowCreateDescription": "Будь-хто може створювати та завантажувати нові файли та папки до цього ресурсу." }, "api": { "title": "Ключі API", @@ -594,7 +625,6 @@ "uninitialized": "Не вдалося ініціалізувати редактор. Будь ласка, перезавантажте.", "saveFailed": "Не вдалося зберегти файл. Спробуйте ще раз.", "saveAborted": "Збереження перервано. Ім'я файлу не збігається з активним файлом.", - "saveDisabled": "Збереження спільних файлів не підтримується.", "saveAbortedMessage": "Операцію збереження перервано. Активний файл програми ({activeFile}) не відповідає файлу, який ви намагаєтеся зберегти ({tryingToSave}).", "syncFailed": "не вдалося синхронізувати стан з маршрутом для \"{filename}\" після 5 спроб. Переривання налаштування редактора для запобігання пошкодженню даних." }, @@ -603,6 +633,11 @@ "LoopDisabled": "Повтор вимкнено", "PlayAllOncePlayback": "Відтворити все один раз", "ShuffleAllPlayback": "Перемішати все", - "PlayAllLoopedPlayback": "Відтворити все з повторенням" + "PlayAllLoopedPlayback": "Відтворити все з повторенням", + "QueueButtonHint": "Показати чергу відтворення", + "QueuePlayback": "Черга Відтворення", + "changePlaybackMode": "Змінити режим відтворення", + "changePlaybackModeHint": "Змініть режим відтворення, щоб побачити більше файлів", + "emptyQueue": "Черга порожня" } } diff --git a/frontend/src/i18n/zh-cn.json b/frontend/src/i18n/zh-cn.json index 5fc0fe9009..7200515dd9 100644 --- a/frontend/src/i18n/zh-cn.json +++ b/frontend/src/i18n/zh-cn.json @@ -57,7 +57,11 @@ "galleryView": "图库浏览", "uploadFiles": "上传文件", "uploadFolder": "上传文件夹", - "openUploadViewer": "打开上传管理器" + "openUploadViewer": "打开上传管理器", + "selectAll": "选择所有", + "discardAndExit": "丢弃和退出", + "saveAndExit": "保存并退出", + "keepEditing": "继续编辑" }, "download": { "downloadFile": "下载文件", @@ -86,13 +90,19 @@ "sortByLastModified": "按最后修改时间排序", "sortByName": "按名称排序", "sortBySize": "按大小排序", - "noPreview": "此文件无法预览。" + "noPreview": "此文件无法预览。", + "noDownloadAccess": "无法下载。" }, "help": { "click": "选择文件或目录", "ctrl": { "click": "选择多个文件或目录", - "d": "下载所选项目" + "d": "下载所选项目", + "b": "切换侧栏", + "comma": "进入设置", + "c": "复制选定项目", + "v": "粘贴复制/剪切的项目", + "x": "删减" }, "del": "删除所选的文件/文件夹", "esc": "清除已选项或关闭提示信息", @@ -100,7 +110,8 @@ "help": "帮助", "f1": "显示帮助提示", "description": "您可以查看下面的基本导航选项。有关其他信息,请访问", - "wiki": "文件浏览器量子维基" + "slash": "启动搜索", + "wiki": "FileBrowser Quantum 官方文档" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "文件复制成功!", "lastModified": "最后修改{suffix}", "size": "尺寸{suffix}", - "operationInProgress": "操作正在进行中,请稍候..." + "operationInProgress": "操作正在进行中,请稍候...", + "saveBeforeExit": "未保存的更改", + "saveBeforeExitMessage": "编辑器中还有未保存的更改。您想怎么做?", + "copyPasteConfirm": "复制/粘贴确认", + "copyItemQuestion": "将此项目复制到新位置?", + "moveItemQuestion": "将此项目移至新位置?", + "sourcePath": "资料来源", + "destinationPath": "目的地" }, "search": { "images": "图像", @@ -272,7 +290,10 @@ "share": "分享文件", "admin": "管理员", "api": "创建和管理长效 API 密钥", - "realtime": "实现实时连接和更新" + "realtime": "实现实时连接和更新", + "create": "创建文件", + "delete": "删除文件", + "download": "下载文件" }, "permissions-name": "权限", "permissionsHelp": "您可以将该用户设置为管理员或单独选择各项权限。如果您选择了“管理员”,则其他的选项会被自动选中,同时该用户可以管理其他用户。\n", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "启用后,下载限制将应用于每个用户。匿名用户将无法从该共享下载任何文件。", "descriptionUploadDefault": "已为您发送了上传文件的共享。", "extractEmbeddedSubtitles": "提取嵌入式字幕", - "extractEmbeddedSubtitlesDescription": "在加载时从媒体文件中提取内嵌字幕--这对于大文件来说可能会比较慢。" + "extractEmbeddedSubtitlesDescription": "在加载时从媒体文件中提取内嵌字幕--这对于大文件来说可能会比较慢。", + "disableDownload": "禁止下载文件", + "disableDownloadDescription": "任何人都无法下载文件或查看文件内容。", + "allowModify": "允许编辑文件", + "allowModifyDescription": "任何人都可以编辑该共享中的文件。", + "allowDelete": "允许删除文件", + "allowDeleteDescription": "任何人都可以删除该共享中的文件和文件夹。", + "allowReplacements": "允许文件替换", + "allowReplacementsDescription": "上传同名文件时,任何人都可以替换现有文件。", + "allowCreate": "允许创建和上传文件和文件夹", + "allowCreateDescription": "任何人都可以在此共享中创建和上传新文件和文件夹。" }, "api": { "title": "应用程序接口密钥", @@ -594,7 +625,6 @@ "uninitialized": "编辑器初始化失败。请重新加载。", "saveFailed": "保存文件失败。请重试。", "saveAborted": "保存失败。文件名与活动文件不匹配。", - "saveDisabled": "不支持保存共享文件。", "saveAbortedMessage": "保存操作中止。应用程序的活动文件 ({activeFile}) 与您要保存的文件 ({tryingToSave}) 不匹配。", "syncFailed": "经过 5 次尝试后,未能将 \"{filename}\" 的状态与路由同步。终止编辑器设置,以防数据损坏。" }, @@ -603,6 +633,11 @@ "LoopDisabled": "循环已禁用", "PlayAllOncePlayback": "播放全部一次", "ShuffleAllPlayback": "随机播放全部", - "PlayAllLoopedPlayback": "循环播放全部" + "PlayAllLoopedPlayback": "循环播放全部", + "QueueButtonHint": "显示播放队列", + "QueuePlayback": "播放队列", + "changePlaybackMode": "更改播放模式", + "changePlaybackModeHint": "更改播放模式以查看更多文件", + "emptyQueue": "队列为空" } } diff --git a/frontend/src/i18n/zh-tw.json b/frontend/src/i18n/zh-tw.json index 08d64cc934..d7dc66318c 100644 --- a/frontend/src/i18n/zh-tw.json +++ b/frontend/src/i18n/zh-tw.json @@ -57,7 +57,11 @@ "galleryView": "圖庫瀏覽", "uploadFiles": "上傳檔案", "uploadFolder": "上傳資料夾", - "openUploadViewer": "開啟上傳管理員" + "openUploadViewer": "開啟上傳管理員", + "selectAll": "全部選取", + "discardAndExit": "丟棄與退出", + "saveAndExit": "儲存並離開", + "keepEditing": "繼續編輯" }, "download": { "downloadFile": "下載檔案", @@ -86,13 +90,19 @@ "sortByLastModified": "按最後修改時間排序", "sortByName": "按名稱排序", "sortBySize": "按大小排序", - "noPreview": "此檔案無法預覽。" + "noPreview": "此檔案無法預覽。", + "noDownloadAccess": "無法下載。" }, "help": { "click": "選擇檔案或目錄", "ctrl": { "click": "選擇多個檔案或目錄", - "d": "下載所選項目" + "d": "下載所選項目", + "b": "切換側邊欄", + "comma": "前往設定", + "c": "複製選取的項目", + "v": "貼上已複製/剪下的項目", + "x": "切選" }, "del": "刪除所選的檔案/資料夾", "esc": "清除已選項或關閉提示資訊", @@ -100,7 +110,8 @@ "help": "幫助", "f1": "顯示幫助提示", "description": "您可以查看以下的基本導航選項。如需其他資訊,請造訪", - "wiki": "FileBrowser Quantum Wiki" + "slash": "啟動搜尋", + "wiki": "FileBrowser Quantum 官方文件" }, "languages": { "he": "עברית", @@ -202,7 +213,14 @@ "copySuccess": "檔案已成功複製!", "lastModified": "最後修改{suffix}", "size": "尺寸{suffix}", - "operationInProgress": "操作正在進行中,請稍候..." + "operationInProgress": "操作正在進行中,請稍候...", + "saveBeforeExit": "未儲存的變更", + "saveBeforeExitMessage": "您在編輯器中有未儲存的變更。您想做什麼?", + "copyPasteConfirm": "複製/貼上確認", + "copyItemQuestion": "將此項目複製到新位置?", + "moveItemQuestion": "將此項目移至新位置?", + "sourcePath": "來源", + "destinationPath": "目的地:" }, "search": { "images": "影像", @@ -271,7 +289,10 @@ "share": "分享檔案", "admin": "管理員", "api": "建立與管理長效 API 金鑰", - "realtime": "啟用即時連線與更新" + "realtime": "啟用即時連線與更新", + "create": "建立檔案", + "delete": "刪除檔案", + "download": "下載檔案" }, "permissions-name": "權限", "permissionsHelp": "您可以將該使用者設置為管理員,也可以單獨選擇各項權限。如果選擇了「管理員」,則其他的選項會被自動勾上,同時該使用者可以管理其他使用者。", @@ -423,7 +444,17 @@ "perUserDownloadLimitDescription": "啟用時,下載限制會套用至每位使用者。匿名使用者將無法從此共用下載任何檔案。", "descriptionUploadDefault": "已傳送共用給您上傳檔案。", "extractEmbeddedSubtitles": "擷取內嵌字幕", - "extractEmbeddedSubtitlesDescription": "在載入時從媒體檔案中萃取內嵌的字幕 -- 這對於大檔案來說可能會很慢。" + "extractEmbeddedSubtitlesDescription": "在載入時從媒體檔案中萃取內嵌的字幕 -- 這對於大檔案來說可能會很慢。", + "disableDownload": "停用下載檔案", + "disableDownloadDescription": "任何人都無法下載檔案或檢視檔案內容。", + "allowModify": "允許編輯檔案", + "allowModifyDescription": "任何人都可以編輯此共用中的檔案。", + "allowDelete": "允許刪除檔案", + "allowDeleteDescription": "任何人都可以從此共用中刪除檔案和資料夾。", + "allowReplacements": "允許檔案替換", + "allowReplacementsDescription": "任何人在上傳具有相同名稱的檔案時,都可以取代現有檔案。", + "allowCreate": "允許建立和上傳檔案與資料夾", + "allowCreateDescription": "任何人都可以在此共用中建立和上傳新檔案和資料夾。" }, "api": { "title": "API 金鑰", @@ -594,7 +625,6 @@ "uninitialized": "編輯器初始化失敗。請重新載入。", "saveFailed": "儲存檔案失敗。請重試。", "saveAborted": "儲存中止。檔案名稱與使用中的檔案不符。", - "saveDisabled": "不支援儲存共用檔案。", "saveAbortedMessage": "儲存作業中止。應用程式的作用中檔案 ({activeFile}) 與您試圖儲存的檔案 ({tryingToSave}) 不匹配。", "syncFailed": "經過 5 次嘗試後,未能與 \"{filename}\" 的路由同步狀態。中止編輯器設定以防止資料損毀。" }, @@ -603,6 +633,11 @@ "LoopDisabled": "循環已停用", "PlayAllOncePlayback": "播放全部一次", "ShuffleAllPlayback": "隨機播放全部", - "PlayAllLoopedPlayback": "循環播放全部" + "PlayAllLoopedPlayback": "循環播放全部", + "QueueButtonHint": "顯示播放佇列", + "QueuePlayback": "播放佇列", + "changePlaybackMode": "變更播放模式", + "changePlaybackModeHint": "變更播放模式以查看更多檔案", + "emptyQueue": "佇列為空" } } diff --git a/frontend/src/store/getters.js b/frontend/src/store/getters.js index 2e9bda8826..2b32744b0f 100644 --- a/frontend/src/store/getters.js +++ b/frontend/src/store/getters.js @@ -45,11 +45,12 @@ export const getters = { if (!state.user || state.user?.username == "") { return "normal"; } + const userViewmode = getters.displayPreference()?.viewMode || state.user.viewMode // If user is anonymous and on a share, check for defaultViewMode override - if (getters.isShare() && state.user?.username === 'anonymous' && shareInfo.viewMode) { + if (state.user?.username === 'anonymous' && !userViewmode) { return shareInfo.viewMode; } - return getters.displayPreference()?.viewMode || state.user.viewMode || "normal"; + return userViewmode || "normal"; }, sorting: () => { return getters.displayPreference()?.sorting || state.user.sorting || { by: "name", asc: true }; @@ -99,7 +100,7 @@ export const getters = { }, isAdmin: () => state.user.permissions?.admin == true, isFiles: () => state.route.name === 'Files', - isListing: () => getters.isFiles() && state.req.type === 'directory', + isListing: () => getters.isFiles() || getters.isShare() && state.req.type === 'directory', selectedCount: () => Array.isArray(state.selected) ? state.selected.length : 0, getFirstSelected: () => typeof(state.selected[0]) == 'number' ? state.req.items[state.selected[0]] : state.selected[0], @@ -360,6 +361,15 @@ export const getters = { return files.sort((a, b) => a.progress - b.progress) }, fileViewingDisabled: filename => { + if (getters.isShare()) { + if (shareInfo.disableFileViewer || shareInfo.shareType == "upload" || shareInfo.disableDownload) { + return true + } + } else { + if (!state.user.permissions.download) { + return true + } + } const ext = ' ' + getFileExtension(filename) if (state.user.disableViewingExt) { const disabledExts = ' ' + state.user.disableViewingExt.toLowerCase() @@ -419,7 +429,7 @@ export const getters = { disablePreviewExt: "", fileLoading: { maxConcurrent: 1, - chunkSizeMb: 15, + chunkSizeMb: 5, } } }, @@ -464,4 +474,22 @@ export const getters = { isValidShare: () => { return getters.isShare() && shareInfo.isValid; }, + permissions: () => { + if (getters.isShare()) { + return { + share: false, + modify: shareInfo.allowModify, + create: shareInfo.allowCreate, + delete: shareInfo.allowDelete, + download: !shareInfo.disableDownload, + }; + } + return { + share: state.user?.permissions?.share, + modify: state.user?.permissions?.modify, + create: state.user?.permissions?.create, + delete: state.user?.permissions?.delete, + download: state.user?.permissions?.download, + }; + } }; \ No newline at end of file diff --git a/frontend/src/store/mutations.js b/frontend/src/store/mutations.js index 6bf82ee09d..df70405522 100644 --- a/frontend/src/store/mutations.js +++ b/frontend/src/store/mutations.js @@ -25,6 +25,17 @@ export const mutations = { state.contextMenuHasItems = value; emitStateChanged(); }, + setEditorDirty: (value) => { + if (value == state.editorDirty) { + return; + } + state.editorDirty = value; + emitStateChanged(); + }, + setEditorSaveHandler: (handler) => { + state.editorSaveHandler = handler; + emitStateChanged(); + }, setDeletedItem: (value) => { if (value == state.deletedItem) { return; @@ -215,6 +226,8 @@ export const mutations = { confirm: value?.confirm, action: value?.action, props: value?.props, + discard: value?.discard, + cancel: value?.cancel, }); } else { state.prompts.push({ @@ -222,6 +235,8 @@ export const mutations = { confirm: value?.confirm, action: value?.action, props: value?.props, + discard: value?.discard, + cancel: value?.cancel, }); } emitStateChanged(); @@ -288,7 +303,7 @@ export const mutations = { state.displayPreferences = allPreferences[state.user.username] || {}; } catch (error) { - console.log(error); + // Silently ignore errors when loading preferences } emitStateChanged(); }, @@ -433,6 +448,13 @@ export const mutations = { state.req = value; emitStateChanged(); }, + clearRequest: () => { + // Set req to null to prevent API calls with empty paths + // Components should check for null req before accessing + state.req = null; + state.selected = []; + emitStateChanged(); + }, setRoute: (value) => { state.route = value; emitStateChanged(); @@ -675,4 +697,43 @@ export const mutations = { mutations.clearNavigationTimeout(); emitStateChanged(); }, + setNavigationTransitioning: (isTransitioning) => { + state.navigation.isTransitioning = isTransitioning; + if (isTransitioning) { + state.navigation.transitionStartTime = Date.now(); + // Safety timeout: if transition takes more than 5 seconds, clear it + setTimeout(() => { + if (state.navigation.isTransitioning && + state.navigation.transitionStartTime && + Date.now() - state.navigation.transitionStartTime > 5000) { + mutations.setNavigationTransitioning(false); + } + }, 5500); + } else { + state.navigation.transitionStartTime = null; + } + emitStateChanged(); + }, + setPlaybackQueue: (payload) => { + state.playbackQueue.queue = payload.queue || []; + state.playbackQueue.currentIndex = payload.currentIndex ?? -1; + state.playbackQueue.mode = payload.mode || 'single'; + emitStateChanged(); + }, + setPlaybackState: (isPlaying) => { + state.playbackQueue.isPlaying = isPlaying; + emitStateChanged(); + }, + navigateToQueueIndex: (index) => { + if (index < 0 || index >= state.playbackQueue.queue.length) return; + const item = state.playbackQueue.queue[index]; + state.playbackQueue.currentIndex = index; + // Update the current request to trigger navigation + mutations.replaceRequest(item); + emitStateChanged(); + }, + togglePlayPause: () => { + state.playbackQueue.shouldTogglePlayPause = !state.playbackQueue.shouldTogglePlayPause; + emitStateChanged(); + }, }; \ No newline at end of file diff --git a/frontend/src/store/state.js b/frontend/src/store/state.js index 8c4d36806a..37d1f26b9c 100644 --- a/frontend/src/store/state.js +++ b/frontend/src/store/state.js @@ -27,6 +27,8 @@ export const state = reactive({ displayPreferences: {}, usages: {}, editor: null, + editorDirty: false, + editorSaveHandler: null, // Function to save editor content serverHasMultipleSources: false, realtimeActive: undefined, realtimeDownCount: 0, @@ -137,6 +139,14 @@ export const state = reactive({ nextRaw: "", timeout: null, enabled: false, + isTransitioning: false, + transitionStartTime: null, + }, + playbackQueue: { + queue: [], + currentIndex: -1, + mode: 'single', // 'single', 'sequential', 'shuffle', 'loop-single', 'loop-all' + isPlaying: false }, }); diff --git a/frontend/src/store/types.ts b/frontend/src/store/types.ts index a6c645962a..efb2bf2e4b 100644 --- a/frontend/src/store/types.ts +++ b/frontend/src/store/types.ts @@ -58,7 +58,6 @@ export interface UserObject { email: string; avatarUrl: string; }; - // Optional properties that may be added dynamically disableViewingExt?: string[]; displayNames?: string[]; diff --git a/frontend/src/utils/auth.js b/frontend/src/utils/auth.js index b6d94b387e..80947881b4 100644 --- a/frontend/src/utils/auth.js +++ b/frontend/src/utils/auth.js @@ -15,15 +15,15 @@ export async function validateLogin() { "sessionId": state.sessionId, } }); - + if (res.status !== 200) { throw new Error(`{"status":${res.status},"message":"${await res.text()}"}`); } - + const userInfo = await res.json(); mutations.setCurrentUser(userInfo); getters.isLoggedIn() - + if (state.user.loginMethod == "proxy") { let apiPath = getApiPath("api/auth/login") const res = await fetch(apiPath, { diff --git a/frontend/src/utils/mimetype.js b/frontend/src/utils/mimetype.js index f107bfe894..0287e21033 100644 --- a/frontend/src/utils/mimetype.js +++ b/frontend/src/utils/mimetype.js @@ -190,7 +190,7 @@ export function getTypeInfo(mimeType) { ) { return { classes: "gray-icons material-symbols-outlined", - materialIcon: "deployed_code", + materialIcon: "album", simpleType: "binary", }; } diff --git a/frontend/src/utils/upload.js b/frontend/src/utils/upload.js index 9ce0d2d6a1..cc7f8b7cf8 100644 --- a/frontend/src/utils/upload.js +++ b/frontend/src/utils/upload.js @@ -218,7 +218,16 @@ class UploadManager { const hasNoActiveOrPending = this.activeUploads === 0 && !this.hasPending(); if (this.hadActiveUploads && hasNoActiveOrPending) { console.log("all uploads processed ", this.queue); - mutations.setReload(true); + + // Only reload if there are no errors or conflicts - keep prompt open so users can see and retry + const hasErrorsOrConflicts = this.queue.some((item) => + item.status === "error" || item.status === "conflict" + ); + + if (!hasErrorsOrConflicts) { + mutations.setReload(true); + } + this.hadActiveUploads = false; // Reset the flag this.overwriteAll = null; // Reset for next batch of uploads } @@ -268,8 +277,15 @@ class UploadManager { this.hadActiveUploads = true; // Mark that we've had active uploads upload.status = "uploading"; - const chunkSize = (state.user.fileLoading?.uploadChunkSizeMb ?? 5) * 1024 * 1024; - if (chunkSize === 0) { + // Get chunk size in MB, default to 5 if not set or if 0 + let chunkSizeMb = state.user.fileLoading?.uploadChunkSizeMb ?? 5; + if (chunkSizeMb === 0) { + chunkSizeMb = 5; + } + const chunkSize = chunkSizeMb * 1024 * 1024; + + // Use non-chunked upload if file size is less than chunk size + if (upload.size < chunkSize) { const progress = (percent) => { upload.progress = percent; }; @@ -423,10 +439,12 @@ class UploadManager { } clearCompleted() { + let hadCompleted = false; for (let i = this.queue.length - 1; i >= 0; i--) { const status = this.queue[i].status; if (status === "completed") { this.queue.splice(i, 1); + hadCompleted = true; } if (state.user.fileLoading?.clearAll) { if (status === "error" || status === "conflict" || status === "paused") { @@ -434,6 +452,11 @@ class UploadManager { } } } + + // If we had completed uploads and the queue is now empty, trigger reload + if (hadCompleted && this.queue.length === 0) { + mutations.setReload(true); + } } findById(id) { diff --git a/frontend/src/utils/url.js b/frontend/src/utils/url.js index 1047ff54f8..52987851f4 100644 --- a/frontend/src/utils/url.js +++ b/frontend/src/utils/url.js @@ -182,8 +182,8 @@ export function encodedPath(path) { // assume non-encoded input path and source export function goToItem(source, path, previousHistoryItem) { - mutations.resetAll() mutations.setPreviousHistoryItem(previousHistoryItem); + mutations.resetAll() let newPath = encodedPath(path); let fullPath; if (getters.isShare()) { diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 3bb8bfb3bb..4f7e8ac85f 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -211,6 +211,10 @@ export default { } } finally { mutations.setLoading(getters.isShare() ? "share" : "files", false); + // Clear navigation transition when data fetch completes + if (state.navigation.isTransitioning) { + mutations.setNavigationTransitioning(false); + } } setTimeout(() => { @@ -238,7 +242,6 @@ export default { mutations.resetSelected(); mutations.setMultiple(false); - mutations.closeHovers(); if (shareInfo.singleFileShare) { mutations.setSidebarVisible(true); @@ -262,24 +265,31 @@ export default { // If not a directory, fetch content AND parent directory in parallel if (file.type != "directory") { const content = !getters.fileViewingDisabled(file.name); - const directoryPath = url.removeLastDir(this.shareSubPath); - + let directoryPath = url.removeLastDir(this.shareSubPath); + // If directoryPath is empty, the file is in root - use '/' as the directory + if (!directoryPath || directoryPath === '') { + directoryPath = '/'; + } + // Fetch parent directory unless it's the same as the file path + const shouldFetchParent = directoryPath !== this.shareSubPath; // Run both fetches in parallel to minimize total API calls - const [fileRes, dirRes] = await Promise.all([ - publicApi.fetchPub(this.shareSubPath, this.shareHash, this.sharePassword, content), - publicApi.fetchPub(directoryPath, this.shareHash, this.sharePassword, false).catch(err => { - console.warn("Could not fetch parent directory for share navigation:", err); - return null; - }) - ]); + const promises = [ + publicApi.fetchPub(this.shareSubPath, this.shareHash, this.sharePassword, content) + ]; + if (shouldFetchParent) { + promises.push( + publicApi.fetchPub(directoryPath, this.shareHash, this.sharePassword, false).catch(() => null) + ); + } - file = fileRes; + const results = await Promise.all(promises); + file = results[0]; file.hash = this.shareHash; - this.shareToken = fileRes.token; + this.shareToken = results[0].token; // Store the parent directory items for Preview to use - if (dirRes && dirRes.items) { - file.parentDirItems = dirRes.items; + if (shouldFetchParent && results[1] && results[1].items) { + file.parentDirItems = results[1].items; } } @@ -313,6 +323,7 @@ export default { } const result = extractSourceFromPath(getters.routePath()); + if (result.source === "") { // No sources available - show a more graceful message instead of error popup this.error = { message: $t("index.noSources") }; @@ -333,21 +344,33 @@ export default { // If not a directory, fetch content AND parent directory in parallel if (res.type != "directory" && !res.type.startsWith("image")) { const content = !getters.fileViewingDisabled(res.name); - const directoryPath = url.removeLastDir(res.path); + let directoryPath = url.removeLastDir(res.path); + + // If directoryPath is empty, the file is in root - use '/' as the directory + if (!directoryPath || directoryPath === '') { + directoryPath = '/'; + } + + // Fetch parent directory unless it's the same as the file path + const shouldFetchParent = directoryPath !== res.path; // Run both fetches in parallel to minimize total API calls - const [fileRes, dirRes] = await Promise.all([ - filesApi.fetchFiles(res.source, res.path, content), - filesApi.fetchFiles(res.source, directoryPath).catch(err => { - console.warn("Could not fetch parent directory for navigation:", err); - return null; - }) - ]); + const promises = [ + filesApi.fetchFiles(res.source, res.path, content) + ]; + + if (shouldFetchParent) { + promises.push( + filesApi.fetchFiles(res.source, directoryPath).catch(() => null) + ); + } + + const results = await Promise.all(promises); + res = results[0]; - res = fileRes; // Store the parent directory items for Preview to use - if (dirRes && dirRes.items) { - res.parentDirItems = dirRes.items; + if (shouldFetchParent && results[1] && results[1].items) { + res.parentDirItems = results[1].items; } } data = res; @@ -385,6 +408,12 @@ export default { mutations.showHover("help"); // Use mutation } + // Ctrl+, - navigate to settings + if (event.ctrlKey && event.key === ',') { + event.preventDefault(); + router.push('/settings'); + } + // Esc! - for shares, reset selection if ( getters.isShare() && event.keyCode === 27) { if (getters.selectedCount() > 0) { diff --git a/frontend/src/views/Login.vue b/frontend/src/views/Login.vue index 34c5bb09f9..0f07683d11 100644 --- a/frontend/src/views/Login.vue +++ b/frontend/src/views/Login.vue @@ -102,6 +102,13 @@ export default { redirect = globalVars.baseURL + redirect; } this.loginURL += `?redirect=${encodeURIComponent(redirect)}`; + + // If password auth is disabled and OIDC is available, auto-redirect + if (!globalVars.passwordAvailable && globalVars.oidcAvailable) { + window.location.href = this.loginURL; + return; + } + if (!globalVars.recaptcha) return; window.globalVars.recaptcha.ready(function () { window.globalVars.recaptcha.render("globalVars.recaptcha", { @@ -204,7 +211,6 @@ export default { if (!landingPage.startsWith("/")) { landingPage = "/" + landingPage; } - console.log("landingPage:", landingPage); // Prevent redirect loop if landing page is the login page if (!landingPage.includes("/login")) { redirect = landingPage; diff --git a/frontend/src/views/bars/Default.vue b/frontend/src/views/bars/Default.vue index c687b48864..2374cb0107 100644 --- a/frontend/src/views/bars/Default.vue +++ b/frontend/src/views/bars/Default.vue @@ -10,7 +10,7 @@ {{ getTopTitle }} this.performNavigation(cv)); + return; + } + + this.performNavigation(cv); + }, + performNavigation(cv) { if (cv == "listingView" || ( getters.isShare() && !getters.multibuttonState() === "close")) { mutations.toggleSidebar(); } else if (cv == "settings" && state.isMobile) { @@ -175,7 +192,7 @@ export default { mutations.closeHovers(); if (cv === "settings") { if (state.previousHistoryItem?.name) { - url.goToItem(state.previousHistoryItem.source, state.previousHistoryItem.path, {}); + url.goToItem(state.previousHistoryItem.source, state.previousHistoryItem.path, state.previousHistoryItem); return; } router.push({ path: "/files" }); @@ -183,7 +200,7 @@ export default { } if (getters.isPreviewView()) { if (state.previousHistoryItem?.name) { - url.goToItem(state.previousHistoryItem.source, state.previousHistoryItem.path, {}); + url.goToItem(state.previousHistoryItem.source, state.previousHistoryItem.path, state.previousHistoryItem); return; } else { // navigate to parent directory of current url @@ -196,6 +213,26 @@ export default { router.go(-1); } }, + showSaveBeforeExitPrompt(onConfirmAction) { + mutations.showHover({ + name: "SaveBeforeExit", + confirm: async () => { + // Save and exit - trigger the save action + // If save fails, this will throw and be caught by SaveBeforeExit component + await this.save(); + mutations.setEditorDirty(false); + onConfirmAction(); + }, + discard: () => { + // Discard changes and exit + mutations.setEditorDirty(false); + onConfirmAction(); + }, + cancel: () => { + // Keep editing - do nothing + }, + }); + }, }, }; diff --git a/frontend/src/views/files/DocViewer.vue b/frontend/src/views/files/DocViewer.vue index b3e5a01813..482eebe506 100644 --- a/frontend/src/views/files/DocViewer.vue +++ b/frontend/src/views/files/DocViewer.vue @@ -96,14 +96,23 @@ export default defineComponent({ } // Use same directory path calculation as Preview.vue - const directoryPath = url.removeLastDir(state.req.path); + let directoryPath = url.removeLastDir(state.req.path); + + // If directoryPath is empty, the file is in root - use '/' as the directory + if (!directoryPath || directoryPath === '') { + directoryPath = '/'; + } + let listing = null; // Try to get listing from current request first if (state.req.items) { listing = state.req.items; - } else { - // Fetch the directory listing + } else if (state.req.parentDirItems) { + // Use pre-fetched parent directory items from Files.vue + listing = state.req.parentDirItems; + } else if (directoryPath !== state.req.path) { + // Fetch directory listing (now with '/' for root files) try { let res; if (getters.isShare()) { @@ -113,8 +122,13 @@ export default defineComponent({ } listing = res.items; } catch (error) { + console.error("error DocViewer.vue", error); listing = [state.req]; // Fallback to current item only } + } else { + // Shouldn't happen, but fallback to current item + console.error("No listing found DocViewer.vue"); + listing = [state.req]; } mutations.setupNavigation({ @@ -131,17 +145,14 @@ export default defineComponent({ this.error = `This viewer only supports .docx files. Current file: "${ filename || "Not available" }"`; - console.error(`[3a] Filename check FAILED. Stopping execution.`); this.docxHtml = ""; // Ensure view is cleared return; } - console.log("[3a] Filename check PASSED."); this.loading = true; this.error = ""; this.docxHtml = ""; - console.log("[4] Getting download URL from API..."); const downloadUrl = getters.isShare() ? publicApi.getDownloadURL({ path: state.share.subPath, @@ -158,37 +169,25 @@ export default defineComponent({ if (!downloadUrl) { throw new Error("Could not retrieve a valid download URL from the API."); } - console.log("[5] Got download URL:", downloadUrl); - console.log("[6] Fetching data from URL..."); const response = await fetch(downloadUrl); - console.log("[7] Fetch response received. Status:", response.status); if (!response.ok) { throw new Error(`Failed to download file (Status: ${response.status})`); } - console.log("[8] Getting ArrayBuffer from response..."); const arrayBuffer = await response.arrayBuffer(); - console.log(`[8a] Got ArrayBuffer. Size: ${arrayBuffer.byteLength} bytes.`); if (arrayBuffer.byteLength === 0) { throw new Error("Downloaded file is empty (0 bytes)."); } - console.log("[9] Passing ArrayBuffer to mammoth.js for conversion..."); const result = await mammoth.convertToHtml({ arrayBuffer }); this.docxHtml = result.value; - console.log( - "%c[10] SUCCESS: Document rendered.", - "font-weight: bold; color: green;" - ); } catch (e) { - console.error("%c[X] CATCH BLOCK ERROR:", "font-weight: bold; color: red;", e); this.error = e.message || "An unknown error occurred."; } finally { this.loading = false; - console.log("[F] FINALLY block executed."); } }, }, diff --git a/frontend/src/views/files/Editor.vue b/frontend/src/views/files/Editor.vue index 90406704b9..036bf18bdf 100644 --- a/frontend/src/views/files/Editor.vue +++ b/frontend/src/views/files/Editor.vue @@ -12,8 +12,8 @@ import { url } from "@/utils"; import { notify } from "@/notify"; import ace, { version as ace_version } from "ace-builds"; import modelist from "ace-builds/src-noconflict/ext-modelist"; -import "ace-builds/src-min-noconflict/theme-chrome"; -import "ace-builds/src-min-noconflict/theme-twilight"; +import "ace-builds/src-min-noconflict/theme-github"; +import "ace-builds/src-min-noconflict/theme-tomorrow_night_bright"; import "ace-builds/src-min-noconflict/mode-yaml"; import "ace-builds/src-min-noconflict/mode-json"; @@ -40,9 +40,19 @@ export default { data: function () { return { editor: null, // The editor instance + isDirty: false, + originalReq: null, + saveLocked: false, // Lock saves during req transitions + currentReqPath: null, // Track current path for transition detection + navigationGuard: null, // Navigation guard to prevent navigation with unsaved changes + isPromptOpen: false, // Track if prompt is currently open for avoid navigation + pendingNavigation: null, // Store pending navigation while prompt is open }; }, computed: { + permissions() { + return getters.permissions(); + }, isDarkMode() { return getters.isDarkMode(); }, @@ -58,19 +68,17 @@ export default { // Check if state and route are synchronized isStateSynced() { if (this.viewerMode) return true; - if (!this.routeFilename || !this.req) return false; - return this.req.name === this.routeFilename; + if (!this.routeFilename || !this.originalReq) return false; + return this.originalReq.name === this.routeFilename; }, // Editor content to display editorContent() { if (this.viewerMode) { return this.content || ""; } - if (!this.isStateSynced) { return ""; // Show blank content until synced } - return this.req.content === "empty-file-x6OlSil" ? "" : (this.req.content || ""); }, // Editor mode/language @@ -78,37 +86,69 @@ export default { if (this.viewerMode) { return this.getAceMode(this.editorMode); } - if (!this.isStateSynced || !this.req) { return "ace/mode/text"; } - + return modelist.getModeForPath(this.req.name).mode; }, // Editor read-only state editorReadOnly() { + if (!this.permissions.modify) { + return true; + } if (this.readOnly !== null) { return this.readOnly; } - if (this.viewerMode) { return true; } - if (!this.isStateSynced) { return true; // Read-only until synced } - return this.req.type === "textImmutable"; }, }, watch: { + // Lock saves during navigation transitions + 'state.navigation.isTransitioning'(isTransitioning) { + if (isTransitioning && !this.viewerMode) { + this.saveLocked = true; + } else if (!isTransitioning && !this.viewerMode) { + // Unlock after a short delay to ensure req is fully loaded + setTimeout(() => { + this.saveLocked = false; + }, 300); + } + }, + // Update originalReq and lock saves when req changes during navigation + 'req'(newReq, oldReq) { + if (!this.viewerMode && oldReq && newReq && newReq.path !== oldReq.path) { + // Update originalReq to the new file + this.originalReq = newReq; + this.isDirty = false; // Reset dirty flag for new file + mutations.setEditorDirty(false); + + // Lock saves temporarily + this.saveLocked = true; + this.currentReqPath = newReq.path; + + // Unlock after content loads + setTimeout(() => { + if (this.req.path === this.currentReqPath) { + this.saveLocked = false; + } + }, 500); + } + }, // Update editor content reactively editorContent(newContent) { if (this.editor) { const currentValue = this.editor.getValue(); if (currentValue !== newContent) { this.editor.setValue(newContent, -1); // -1 moves cursor to start + this.isDirty = false; + mutations.setEditorDirty(false); } } }, @@ -140,15 +180,52 @@ export default { created() { window.addEventListener("keydown", this.keyEvent); eventBus.on("handleEditorValueRequest", this.handleEditorValueRequest); + + // Show generic browser dialog if the user closes the tab, or try to close the browser with unsaved changes + this.beforeUnloadHandler = (event) => { + if (this.isDirty && !this.viewerMode) { + event.preventDefault(); + } + }; + window.addEventListener("beforeunload", this.beforeUnloadHandler); + + this.setupNavigationGuard(); + }, + beforeRouteLeave(to, from, next) { + // Only show prompt if there are unsaved changes and not in viewer mode + if (this.isDirty && !this.viewerMode) { + this.showSaveBeforeExitPrompt(next); + } else { + next(); + } }, beforeUnmount() { window.removeEventListener("keydown", this.keyEvent); + window.removeEventListener("beforeunload", this.beforeUnloadHandler); + + if (this.readOnly) { + return; + } + + // Clear navigation guard + if (this.navigationGuard) { + this.navigationGuard(); + } + + // Clear dirty state and save handler when leaving editor + mutations.setEditorDirty(false); + mutations.setEditorSaveHandler(null); + if (this.editor) { this.editor.destroy(); } }, mounted: function () { this.initializeEditor(); + this.originalReq = this.req; + + // Register save handler so other components can trigger save + mutations.setEditorSaveHandler(() => this.handleEditorValueRequest()); }, methods: { initializeNavigation() { @@ -173,12 +250,22 @@ export default { return; } - const directoryPath = url.removeLastDir(this.req.path); + let directoryPath = url.removeLastDir(this.req.path); + + // If directoryPath is empty, the file is in root - use '/' as the directory + if (!directoryPath || directoryPath === '') { + directoryPath = '/'; + } + let listing = null; if (this.req.items) { listing = this.req.items; - } else { + } else if (this.req.parentDirItems) { + // Use pre-fetched parent directory items from Files.vue + listing = this.req.parentDirItems; + } else if (directoryPath !== this.req.path) { + // Fetch directory listing (now with '/' for root files) try { let res; if (getters.isShare()) { @@ -188,8 +275,13 @@ export default { } listing = res.items; } catch (error) { + console.error("error Editor.vue", error); listing = [this.req]; } + } else { + console.error("No listing found Editor.vue"); + // Shouldn't happen, but fallback to current item + listing = [this.req]; } mutations.setupNavigation({ @@ -216,24 +308,31 @@ export default { showPrintMargin: false, showGutter: true, showLineNumbers: true, - theme: this.isDarkMode ? "ace/theme/twilight" : "ace/theme/chrome", + theme: this.isDarkMode ? "ace/theme/tomorrow_night_bright" : "ace/theme/github", readOnly: this.editorReadOnly, wrap: false, enableMobileMenu: !this.viewerMode, + useWorker: false, + scrollPastEnd: 0.5, + cursorStyle: "smooth", + highlightGutterLine: true, + animatedScroll: true, + displayIndentGuides: true, + fixedWidthGutter: true, }); - // Disable context menu - this.editor.container.addEventListener("contextmenu", (event) => { - event.preventDefault(); - event.stopPropagation(); - }, true); + this.editor.setOption('displayIndentGuides', true); + + this.editor.on('change', () => { + this.isDirty = true; + mutations.setEditorDirty(true); + }); // Initialize navigation for file editing mode when synced if (this.isStateSynced && !this.viewerMode) { this.initializeNavigation(); } } catch (error) { - console.error("Failed to initialize editor:", error); notify.showError(this.$t("editor.uninitialized")); } }, @@ -257,33 +356,53 @@ export default { return; } + // Check if navigation is transitioning + if (state.navigation.isTransitioning) { + const errorMsg = "Please wait for navigation to complete before saving."; + notify.showError(errorMsg); + throw new Error(errorMsg); + } + + // Check if save is locked due to req transition + if (this.saveLocked) { + const errorMsg = "Please wait a moment before saving."; + notify.showError(errorMsg); + throw new Error(errorMsg); + } + // Filename protection - ensure state is synced before saving if (!this.isStateSynced) { - notify.showError(this.$t("editor.saveAbortedMessage", { - activeFile: this.req?.name || "unknown", - tryingToSave: this.routeFilename || "unknown" - })); - return; + const errorMsg = this.$t("editor.saveAbortedMessage", { + activeFile: this.originalReq?.name || "unknown", + tryingToSave: this.routeFilename || "unknown" + }); + notify.showError(errorMsg); + throw new Error(errorMsg); } if (!this.editor) { - notify.showError(this.$t("editor.uninitialized")); - return; + const errorMsg = this.$t("editor.uninitialized"); + notify.showError(errorMsg); + throw new Error(errorMsg); } try { if (getters.isShare()) { - // TODO: add support for saving shared files - notify.showError(this.$t("share.saveDisabled")); - return; + // Save the file + await publicApi.put(this.originalReq.path, this.editor.getValue()); + } else { + // Save the file + await filesApi.put(this.originalReq.source, this.originalReq.path, this.editor.getValue()); } - // Save the file - await filesApi.put(this.req.source, this.req.path, this.editor.getValue()); - notify.showSuccess(`${this.req.name} saved successfully.`); + notify.showSuccess(`${this.originalReq.name} saved successfully.`); + this.isDirty = false; + mutations.setEditorDirty(false); } catch (error) { - console.error("Save failed:", error); - notify.showError(this.$t("editor.saveFailed")); + // Show error with more details if available + const errorMessage = error.message || this.$t("editor.saveFailed"); + notify.showError(errorMessage); + throw error; // Re-throw to propagate to caller } }, keyEvent(event) { @@ -298,31 +417,141 @@ export default { this.handleEditorValueRequest(); } }, + setupNavigationGuard() { + if (this.viewerMode) return; + + this.navigationGuard = this.$router.beforeEach((to, from, next) => { + // If prompt is already open, block any new navigation attempts + if (this.isPromptOpen) { + next(false); + return; + } + + // Check if we are navigating to a different route + const isDifferentRoute = to.path !== from.path || to.hash !== from.hash; + + if (this.isDirty && !this.viewerMode && isDifferentRoute) { + if (this.req) { + this.pendingNavigation = { to, from, next }; + this.showSaveBeforeExitPrompt(); + return; + } + } + next(); + }); + }, + showSaveBeforeExitPrompt() { + this.isPromptOpen = true; + mutations.showHover({ + name: "SaveBeforeExit", + confirm: async () => { + // Save and exit - throw error if save fails to keep prompt open + try { + await this.handleEditorValueRequest(); + this.isDirty = false; + mutations.setEditorDirty(false); + this.executePendingNavigation(); + } catch (error) { + // If save fails, call next(false) to prevent navigation + next(false); + // Re-throw to keep prompt open + throw error; + } + }, + discard: () => { + // Discard changes and exit + this.isDirty = false; + mutations.setEditorDirty(false); + this.executePendingNavigation(); + }, + cancel: () => { + // Keep editing - block navigation + this.cancelPendingNavigation(); + }, + }); + }, + executePendingNavigation() { + this.isPromptOpen = false; + if (this.pendingNavigation && typeof this.pendingNavigation.next === 'function') { + this.pendingNavigation.next(); + } + this.pendingNavigation = null; + }, + cancelPendingNavigation() { + this.isPromptOpen = false; + if (this.pendingNavigation && typeof this.pendingNavigation.next === 'function') { + this.pendingNavigation.next(false); + } + this.pendingNavigation = null; + }, }, }; + \ No newline at end of file diff --git a/frontend/src/views/files/ListingView.vue b/frontend/src/views/files/ListingView.vue index 36e9993c2f..7ad35fd69c 100644 --- a/frontend/src/views/files/ListingView.vue +++ b/frontend/src/views/files/ListingView.vue @@ -169,7 +169,6 @@ diff --git a/frontend/src/views/files/OnlyOfficeEditor.vue b/frontend/src/views/files/OnlyOfficeEditor.vue index ef6387c2fe..6f918c6b18 100644 --- a/frontend/src/views/files/OnlyOfficeEditor.vue +++ b/frontend/src/views/files/OnlyOfficeEditor.vue @@ -167,7 +167,7 @@ export default {
-
+
Configuration:
OnlyOffice URL: ${this.onlyOfficeUrl}
Internal URL: ${this.getInternalUrlInfo().message}
@@ -220,7 +220,7 @@ export default { const downloadDomain = doc.url ? new URL(doc.url).origin : 'N/A'; configDetailsHtml = ` -
+
OnlyOffice Configuration Details:
Document Key: ${doc.key}
File Type: ${doc.fileType}
@@ -263,7 +263,7 @@ export default {
-
+
Basic Configuration:
OnlyOffice URL: ${this.onlyOfficeUrl}
Internal URL: ${internalUrlInfo.message}
diff --git a/frontend/src/views/files/Preview.vue b/frontend/src/views/files/Preview.vue index 4d12261f0c..d99740fcee 100644 --- a/frontend/src/views/files/Preview.vue +++ b/frontend/src/views/files/Preview.vue @@ -1,7 +1,15 @@