changes to onlyoffice integration

pull/3805/head
Dru Hiyas 2025-03-16 22:08:17 +08:00
parent 3d6c5152fe
commit d84dc3da11
No known key found for this signature in database
GPG Key ID: 11FAAAD2DDC820A0
129 changed files with 8959 additions and 8105 deletions

View File

@ -3,25 +3,20 @@ name: main
on: on:
push: push:
branches: branches:
- "master" - 'master'
tags: tags:
- "v*" - 'v*'
pull_request: pull_request:
jobs: jobs:
# linters # linters
lint-frontend: lint-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: "frontend/package.json"
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22.x" node-version: '18'
cache: "pnpm"
cache-dependency-path: "frontend/pnpm-lock.yaml"
- run: make lint-frontend - run: make lint-frontend
lint-backend: lint-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -29,7 +24,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: 1.23.0 go-version: 1.22.2
- run: make lint-backend - run: make lint-backend
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -37,19 +32,14 @@ jobs:
steps: steps:
- run: echo "done" - run: echo "done"
# tests # tests
test-frontend: test-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: "frontend/package.json"
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22.x" node-version: '18'
cache: "pnpm"
cache-dependency-path: "frontend/pnpm-lock.yaml"
- run: make test-frontend - run: make test-frontend
test-backend: test-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -57,7 +47,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: 1.23.0 go-version: 1.22.2
- run: make test-backend - run: make test-backend
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -65,7 +55,7 @@ jobs:
steps: steps:
- run: echo "done" - run: echo "done"
# release # release
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [lint, test] needs: [lint, test]
@ -76,15 +66,10 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: 1.23.0 go-version: 1.22.2
- uses: pnpm/action-setup@v4
with:
package_json_file: "frontend/package.json"
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: "22.x" node-version: '18'
cache: "pnpm"
cache-dependency-path: "frontend/pnpm-lock.yaml"
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx - name: Set up Docker Buildx

View File

@ -11,7 +11,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v9 - uses: actions/stale@v5
with: with:
stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity.' close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity.'

View File

@ -1,5 +1,3 @@
version: 2
project_name: filebrowser project_name: filebrowser
env: env:
@ -36,10 +34,10 @@ builds:
archives: archives:
- -
name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}" name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
formats: [ 'tar.gz' ] format: tar.gz
format_overrides: format_overrides:
- goos: windows - goos: windows
formats: [ 'zip' ] format: zip
dockers: dockers:
- -
@ -139,7 +137,6 @@ dockers:
- "filebrowser/filebrowser:v{{ .Major }}-amd64-s6" - "filebrowser/filebrowser:v{{ .Major }}-amd64-s6"
extra_files: extra_files:
- docker/root - docker/root
- healthcheck.sh
- -
dockerfile: Dockerfile.s6.aarch64 dockerfile: Dockerfile.s6.aarch64
use: buildx use: buildx
@ -158,7 +155,6 @@ dockers:
- "filebrowser/filebrowser:v{{ .Major }}-arm64-s6" - "filebrowser/filebrowser:v{{ .Major }}-arm64-s6"
extra_files: extra_files:
- docker/root - docker/root
- healthcheck.sh
docker_manifests: docker_manifests:
- name_template: "filebrowser/filebrowser:latest" - name_template: "filebrowser/filebrowser:latest"
image_templates: image_templates:
@ -193,7 +189,7 @@ brews:
repository: repository:
owner: filebrowser owner: filebrowser
name: homebrew-tap name: homebrew-tap
directory: Formula folder: Formula
homepage: https://filebrowser.org homepage: https://filebrowser.org
commit_author: commit_author:
name: FileBrowser Robot name: FileBrowser Robot

View File

@ -1,6 +1,6 @@
[main] [main]
host = https://www.transifex.com host = https://www.transifex.com
lang_map = pt_BR: pt-br, zh_CN: zh-cn, zh_HK: zh-hk, zh_TW: zh-tw, nl_BE: nl-be, sv_SE: sv-se, cz-CS: cz_cs lang_map = pt_BR: pt-br, zh_CN: zh-cn, zh_HK: zh-hk, zh_TW: zh-tw, nl_BE: nl-be, sv_SE: sv-se
[file-browser.file-browser] [file-browser.file-browser]
file_filter = frontend/src/i18n/<lang>.json file_filter = frontend/src/i18n/<lang>.json

View File

@ -2,140 +2,6 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.32.0](https://github.com/filebrowser/filebrowser/compare/v2.31.2...v2.32.0) (2025-01-31)
### Features
* create user on proxy authentication if user does not exist ([#3569](https://github.com/filebrowser/filebrowser/issues/3569)) ([209acf2](https://github.com/filebrowser/filebrowser/commit/209acf2429b06e2e8d78218937c59fd7e7edd1be))
### Bug Fixes
* add proper healthcheck for S6 containers ([#3691](https://github.com/filebrowser/filebrowser/issues/3691)) ([045064f](https://github.com/filebrowser/filebrowser/commit/045064f8b8bf9f86058e877448085e38da8b3f2e))
* disk usage refreshing ([#3692](https://github.com/filebrowser/filebrowser/issues/3692)) ([bbdd313](https://github.com/filebrowser/filebrowser/commit/bbdd313705b8d253f0c47ad717a6e47b2f46e719))
* Fix user creation on proxy auth ([#3666](https://github.com/filebrowser/filebrowser/issues/3666)) ([5300d00](https://github.com/filebrowser/filebrowser/commit/5300d00d2e7dbb80a252aff57e100113f02506c3))
* prompts disappearing on copy / move / upload ([#3537](https://github.com/filebrowser/filebrowser/issues/3537)) ([d1c84a8](https://github.com/filebrowser/filebrowser/commit/d1c84a84123c77dede05c023b3697a432b56122c))
### Refactorings
* Fix eslint warnings ([#3698](https://github.com/filebrowser/filebrowser/issues/3698)) ([0201f9c](https://github.com/filebrowser/filebrowser/commit/0201f9c5c4dd2a4d5a3503e59cdb8045e8d3a91f)), closes [#3407](https://github.com/filebrowser/filebrowser/issues/3407)
### Build
* **deps:** bump cross-spawn from 7.0.3 to 7.0.6 in /tools ([#3601](https://github.com/filebrowser/filebrowser/issues/3601)) ([25372ed](https://github.com/filebrowser/filebrowser/commit/25372edb5c0e616e82b76b5f523633af57d347e0))
* **deps:** bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 ([#3574](https://github.com/filebrowser/filebrowser/issues/3574)) ([2fdea73](https://github.com/filebrowser/filebrowser/commit/2fdea73430011846276a1cda52458f1d670f5ea7))
* **deps:** bump golang.org/x/crypto from 0.26.0 to 0.31.0 ([#3634](https://github.com/filebrowser/filebrowser/issues/3634)) ([e92dbb4](https://github.com/filebrowser/filebrowser/commit/e92dbb4bb8b7894264fbf0a48a641712c3b68766))
* **deps:** bump golang.org/x/net from 0.23.0 to 0.33.0 ([#3712](https://github.com/filebrowser/filebrowser/issues/3712)) ([1194cfe](https://github.com/filebrowser/filebrowser/commit/1194cfe0097a70399c1f06cf0f514b9d70fa463c))
* **deps:** bump vue-i18n from 9.10.2 to 9.14.2 in /frontend ([#3618](https://github.com/filebrowser/filebrowser/issues/3618)) ([0659594](https://github.com/filebrowser/filebrowser/commit/065959451d3ba12019c6151274aa4e6904cdca99))
* fix go releaser ([ba797cd](https://github.com/filebrowser/filebrowser/commit/ba797cda3135eddb9b7165dc5ceb932399cb54df))
* update to node 22 and pnpm ([#3616](https://github.com/filebrowser/filebrowser/issues/3616)) ([d51a343](https://github.com/filebrowser/filebrowser/commit/d51a3438201274a1b826be1b775ca1035ade20c5))
### [2.31.2](https://github.com/filebrowser/filebrowser/compare/v2.31.1...v2.31.2) (2024-10-03)
### Bug Fixes
* added whitespace before version ([#3510](https://github.com/filebrowser/filebrowser/issues/3510)) ([2b37e69](https://github.com/filebrowser/filebrowser/commit/2b37e696c9bde4d0c453de236a3555d982346bbb))
* change location of custom init scripts ([#3493](https://github.com/filebrowser/filebrowser/issues/3493)) ([406d4f7](https://github.com/filebrowser/filebrowser/commit/406d4f78845a1684df7c9c457b208f4dd9b2a930))
* files list alignment ([#3494](https://github.com/filebrowser/filebrowser/issues/3494)) ([64400ff](https://github.com/filebrowser/filebrowser/commit/64400ffda8b09f66b8662a3c9400235139800a4d))
* german translation spelling typos ([#3469](https://github.com/filebrowser/filebrowser/issues/3469)) ([1e7c415](https://github.com/filebrowser/filebrowser/commit/1e7c41505fb6a3b9baa1534787492a186e09bcfb))
### Build
* **deps-dev:** bump vite from 5.2.7 to 5.4.6 in /frontend ([#3496](https://github.com/filebrowser/filebrowser/issues/3496)) ([ec7b643](https://github.com/filebrowser/filebrowser/commit/ec7b643e8e9499f7ff226ec7f8e63a9df9890352))
* **deps:** bump rollup from 4.21.3 to 4.22.4 in /frontend ([#3504](https://github.com/filebrowser/filebrowser/issues/3504)) ([03d74ee](https://github.com/filebrowser/filebrowser/commit/03d74ee7582196c09720f8d488056339f06c446c))
### [2.31.1](https://github.com/filebrowser/filebrowser/compare/v2.31.0...v2.31.1) (2024-08-30)
### Bug Fixes
* command not found in shell ([#3438](https://github.com/filebrowser/filebrowser/issues/3438)) ([121d9ab](https://github.com/filebrowser/filebrowser/commit/121d9abecdc7d4e923cfc5023519995938a6ccae))
### Build
* update to alpine 3.20 ([#3447](https://github.com/filebrowser/filebrowser/issues/3447)) ([7de6bc4](https://github.com/filebrowser/filebrowser/commit/7de6bc4a912b5734dd0df02ed8391e78619e2615))
## [2.31.0](https://github.com/filebrowser/filebrowser/compare/v2.30.0...v2.31.0) (2024-08-29)
### Features
* add Czech translation ([#3416](https://github.com/filebrowser/filebrowser/issues/3416)) ([8e67a12](https://github.com/filebrowser/filebrowser/commit/8e67a12f260caefcbe419c2281025b9b15f02bf3))
* Added epub preview. Resolves [#3375](https://github.com/filebrowser/filebrowser/issues/3375) ([#3376](https://github.com/filebrowser/filebrowser/issues/3376)) ([99a6382](https://github.com/filebrowser/filebrowser/commit/99a6382b320874e94f9bd74708f46dd9a7485d3c))
* implement markdown file preview in Ace editor ([#3431](https://github.com/filebrowser/filebrowser/issues/3431)) ([b0f4604](https://github.com/filebrowser/filebrowser/commit/b0f4604f44e6a35e07df3000f106f523cd942cfc))
* support mime type for epub extension ([#3425](https://github.com/filebrowser/filebrowser/issues/3425)) ([f6f7e5f](https://github.com/filebrowser/filebrowser/commit/f6f7e5fea3ff7073ee652008a51cb5445a6f3d5d))
### Bug Fixes
* clipboard copy in safari ([#3261](https://github.com/filebrowser/filebrowser/issues/3261)) ([1fccc5d](https://github.com/filebrowser/filebrowser/commit/1fccc5d649add2a56c55e75cf9dec4851e6d7cbf))
* CSS selectors for listing icons ([#3277](https://github.com/filebrowser/filebrowser/issues/3277)) ([2a90cdf](https://github.com/filebrowser/filebrowser/commit/2a90cdfdaff8655c7cb1167c01994a0978dece8f))
* fix catalan i18n file ([090272e](https://github.com/filebrowser/filebrowser/commit/090272e3b7c56a940c4aa2d28f860c574aa17d53))
* fixing an issue where the upload indicator would "jump" around in the UI ([#3354](https://github.com/filebrowser/filebrowser/issues/3354)) ([7be5644](https://github.com/filebrowser/filebrowser/commit/7be564495226bc6846289a56edb8893511036c6e))
* **frontend:** N files selected hint use i18n ([#3390](https://github.com/filebrowser/filebrowser/issues/3390)) ([10bf3cf](https://github.com/filebrowser/filebrowser/commit/10bf3cffbf8eb7d95fe4e1cc6acf1012329744b9))
* pdf preview header ([#3274](https://github.com/filebrowser/filebrowser/issues/3274)) ([a838868](https://github.com/filebrowser/filebrowser/commit/a8388689f3019083f263845900f683ddc13884dc))
* pull down to refresh within editor ([#3378](https://github.com/filebrowser/filebrowser/issues/3378)) ([21783ed](https://github.com/filebrowser/filebrowser/commit/21783ed91a13ad52afdb411e43faf14fb6ef6e42))
### Build
* bump go libs ([b596567](https://github.com/filebrowser/filebrowser/commit/b596567c6163d57eaefbf3e30d84cfca65c24cdf))
* bump go version to 1.23.0 ([364fdaa](https://github.com/filebrowser/filebrowser/commit/364fdaaf0c1eace82ff8637d337cc1b32e5e9972))
* bump golangci-lint to 1.60.3 ([a6347c8](https://github.com/filebrowser/filebrowser/commit/a6347c88586e584b4565277b0010fa9ff2576b1f))
* **deps-dev:** bump braces from 3.0.2 to 3.0.3 in /frontend ([#3316](https://github.com/filebrowser/filebrowser/issues/3316)) ([e8589be](https://github.com/filebrowser/filebrowser/commit/e8589be6409a2b29edd44ee2edd3fbf6b2d72724))
* **deps-dev:** bump ws from 8.16.0 to 8.17.1 in /frontend ([#3321](https://github.com/filebrowser/filebrowser/issues/3321)) ([c3465f9](https://github.com/filebrowser/filebrowser/commit/c3465f99136506d51b813be4f31b289e708da0ce))
* **deps:** bump golang.org/x/image from 0.15.0 to 0.18.0 ([#3335](https://github.com/filebrowser/filebrowser/issues/3335)) ([30a8ddf](https://github.com/filebrowser/filebrowser/commit/30a8ddf113862e3de2c09547662b7f2af8a30dfe))
* fix goreleaser file ([056cfa8](https://github.com/filebrowser/filebrowser/commit/056cfa8facdca4c397a6b245028d4c9d3f0ca518))
## [2.30.0](https://github.com/filebrowser/filebrowser/compare/v2.29.0...v2.30.0) (2024-05-19)
### Features
* allow multi-select with SHIFT key in singleClick mode ([#3185](https://github.com/filebrowser/filebrowser/issues/3185)) ([2e47a03](https://github.com/filebrowser/filebrowser/commit/2e47a038d63de8f848b070578c1d71f765438a24))
* Enhance MIME Type Detection for Additional File Extensions ([#3183](https://github.com/filebrowser/filebrowser/issues/3183)) ([be62f56](https://github.com/filebrowser/filebrowser/commit/be62f56782551e17d6d5dc23bc29cc56ef961a66))
### Bug Fixes
* add overlay for sidebar on mobile ([#3197](https://github.com/filebrowser/filebrowser/issues/3197)) ([3b48f75](https://github.com/filebrowser/filebrowser/commit/3b48f75301287fe94cbbacff184b4db03f37f7ea))
* current folder name in page title ([#3200](https://github.com/filebrowser/filebrowser/issues/3200)) ([e336a25](https://github.com/filebrowser/filebrowser/commit/e336a25ad29ed8b956169d426992860a877ee551))
* Fixing the inability to play MKV video files online and enhancing the auxiliary features of the VideoPlayer. ([#3181](https://github.com/filebrowser/filebrowser/issues/3181)) ([782375b](https://github.com/filebrowser/filebrowser/commit/782375b1cb4c4f954468c30ec277ce021c82b40d))
* shell window size ([#3198](https://github.com/filebrowser/filebrowser/issues/3198)) ([4c5b612](https://github.com/filebrowser/filebrowser/commit/4c5b612cb2563817f9da50413c7cf9e89b4c4d4a))
* The file type icon in the file list is sensitive to the case of the suffix name ([#3187](https://github.com/filebrowser/filebrowser/issues/3187)) ([a9c327c](https://github.com/filebrowser/filebrowser/commit/a9c327cc0687796a3c7bfafd4ddabf4342859e31))
## [2.29.0](https://github.com/filebrowser/filebrowser/compare/v2.28.0...v2.29.0) (2024-04-30)
### Features
* Display Upload Progress as Percentage and File Size / Total File Size ([#3111](https://github.com/filebrowser/filebrowser/issues/3111)) ([236ca63](https://github.com/filebrowser/filebrowser/commit/236ca637f99e373adfeaaefc5db6af50bd15b6bf))
* migrate to vue 3 ([#2689](https://github.com/filebrowser/filebrowser/issues/2689)) ([5100e58](https://github.com/filebrowser/filebrowser/commit/5100e587d73831ecdb5e3bd35a78fef96ad248a4))
### Bug Fixes
* abort upload behavior to properly handle server-side deletion and frontend state reset ([#3114](https://github.com/filebrowser/filebrowser/issues/3114)) ([434e49b](https://github.com/filebrowser/filebrowser/commit/434e49bf59e4ddf7ec90893fa3fd53faee8c9cbb))
* apply proper zindex to modal dialogs ([#3172](https://github.com/filebrowser/filebrowser/issues/3172)) ([821f51e](https://github.com/filebrowser/filebrowser/commit/821f51ea5ad1f5c2eb72441bc761031cacee43e1))
* correct list item selector ([#3126](https://github.com/filebrowser/filebrowser/issues/3126)) ([#3147](https://github.com/filebrowser/filebrowser/issues/3147)) ([22a05e1](https://github.com/filebrowser/filebrowser/commit/22a05e1f02a083cf7b630e16873dad0de89b7854))
* don't redirect to login when no auth ([#3165](https://github.com/filebrowser/filebrowser/issues/3165)) ([da5a6e0](https://github.com/filebrowser/filebrowser/commit/da5a6e051faa80134c2adf4e621426cbdf046c88))
* Frontend bug, administrators unable to delete users ([#3170](https://github.com/filebrowser/filebrowser/issues/3170)) ([bee71d9](https://github.com/filebrowser/filebrowser/commit/bee71d93fee137cdd807cd8f7716c7da0830fae7))
* handle quotes in healthcheck.sh ([#3130](https://github.com/filebrowser/filebrowser/issues/3130)) ([18f04a7](https://github.com/filebrowser/filebrowser/commit/18f04a7d26186927f51f46354f3b2164a68f1b41))
* the copy method in clipboard.ts ([#3177](https://github.com/filebrowser/filebrowser/issues/3177)) ([4786187](https://github.com/filebrowser/filebrowser/commit/4786187852b8eef07e40aa00cd159ccc1e7e79dc))
### Build
* bump go version to 1.22.1 ([bbd0abb](https://github.com/filebrowser/filebrowser/commit/bbd0abbdfdbb3ddf3326247b7c6d925751dfabcb))
* bump go version to 1.22.2 ([#3158](https://github.com/filebrowser/filebrowser/issues/3158)) ([a9da7fd](https://github.com/filebrowser/filebrowser/commit/a9da7fd56c849b5a13133136b35ef5ebee622962))
* **deps:** bump golang.org/x/net from 0.22.0 to 0.23.0 ([#3133](https://github.com/filebrowser/filebrowser/issues/3133)) ([6b77b8d](https://github.com/filebrowser/filebrowser/commit/6b77b8d683f7357ef71af678550e78910c10ddeb))
## [2.28.0](https://github.com/filebrowser/filebrowser/compare/v2.27.0...v2.28.0) (2024-04-01) ## [2.28.0](https://github.com/filebrowser/filebrowser/compare/v2.27.0...v2.28.0) (2024-04-01)
@ -146,7 +12,7 @@ All notable changes to this project will be documented in this file. See [standa
* close editor when click escape key ([#2947](https://github.com/filebrowser/filebrowser/issues/2947)) ([70c8261](https://github.com/filebrowser/filebrowser/commit/70c826133b8578b8712e6db8f762a15a076cd9a9)) * close editor when click escape key ([#2947](https://github.com/filebrowser/filebrowser/issues/2947)) ([70c8261](https://github.com/filebrowser/filebrowser/commit/70c826133b8578b8712e6db8f762a15a076cd9a9))
* enable preview in shared folder ([#3055](https://github.com/filebrowser/filebrowser/issues/3055)) ([4c233c3](https://github.com/filebrowser/filebrowser/commit/4c233c3db39ea5a00d6e602ec0ecbddecb590877)) * enable preview in shared folder ([#3055](https://github.com/filebrowser/filebrowser/issues/3055)) ([4c233c3](https://github.com/filebrowser/filebrowser/commit/4c233c3db39ea5a00d6e602ec0ecbddecb590877))
* focus editor when opened ([#2946](https://github.com/filebrowser/filebrowser/issues/2946)) ([b19710e](https://github.com/filebrowser/filebrowser/commit/b19710efca6daa7af56dc211d0051d500d2eea22)) * focus editor when opened ([#2946](https://github.com/filebrowser/filebrowser/issues/2946)) ([b19710e](https://github.com/filebrowser/filebrowser/commit/b19710efca6daa7af56dc211d0051d500d2eea22))
* freezing the list in the background while previewing a file ([#3004](https://github.com/filebrowser/filebrowser/issues/3004)) ([e167c3e](https://github.com/filebrowser/filebrowser/commit/e167c3e1efed8b16be45d994a8d443fda1d8cf49)) * freezing the list in the backgroud while previewing a file ([#3004](https://github.com/filebrowser/filebrowser/issues/3004)) ([e167c3e](https://github.com/filebrowser/filebrowser/commit/e167c3e1efed8b16be45d994a8d443fda1d8cf49))
* prompt to confirm discard editor changes ([#2948](https://github.com/filebrowser/filebrowser/issues/2948)) ([fb1a09c](https://github.com/filebrowser/filebrowser/commit/fb1a09c7c172b913c12b30975ca545e505df0c05)) * prompt to confirm discard editor changes ([#2948](https://github.com/filebrowser/filebrowser/issues/2948)) ([fb1a09c](https://github.com/filebrowser/filebrowser/commit/fb1a09c7c172b913c12b30975ca545e505df0c05))
* select multiple files with ctrl even with singleClick option ([#2953](https://github.com/filebrowser/filebrowser/issues/2953)) ([d49c3df](https://github.com/filebrowser/filebrowser/commit/d49c3dfacfc0ff07e620b3ad2700e64927b06235)) * select multiple files with ctrl even with singleClick option ([#2953](https://github.com/filebrowser/filebrowser/issues/2953)) ([d49c3df](https://github.com/filebrowser/filebrowser/commit/d49c3dfacfc0ff07e620b3ad2700e64927b06235))

View File

@ -1,19 +1,14 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.20 FROM ghcr.io/linuxserver/baseimage-alpine:3.17
RUN apk --update add ca-certificates \ RUN apk --update add ca-certificates \
mailcap \ mailcap \
curl \ curl
jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD /healthcheck.sh || exit 1 CMD curl -f http://localhost/health || exit 1
# copy local files # copy local files
COPY docker/root/ / COPY docker/root/ /
RUN ln -s /config/settings.json /.filebrowser.json
COPY filebrowser /usr/bin/filebrowser COPY filebrowser /usr/bin/filebrowser
# ports and volumes # ports and volumes

View File

@ -1,19 +1,14 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17
RUN apk --update add ca-certificates \ RUN apk --update add ca-certificates \
mailcap \ mailcap \
curl \ curl
jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD /healthcheck.sh || exit 1 CMD curl -f http://localhost/health || exit 1
# copy local files # copy local files
COPY docker/root/ / COPY docker/root/ /
RUN ln -s /config/settings.json /.filebrowser.json
COPY filebrowser /usr/bin/filebrowser COPY filebrowser /usr/bin/filebrowser
# ports and volumes # ports and volumes

16
Dockerfile.s6.armhf Normal file
View File

@ -0,0 +1,16 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17
RUN apk --update add ca-certificates \
mailcap \
curl
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
# copy local files
COPY docker/root/ /
COPY filebrowser /usr/bin/filebrowser
# ports and volumes
VOLUME /srv /config /database
EXPOSE 80

View File

@ -10,7 +10,7 @@ build: | build-frontend build-backend ## Build binary
.PHONY: build-frontend .PHONY: build-frontend
build-frontend: ## Build frontend build-frontend: ## Build frontend
$Q cd frontend && pnpm install --frozen-lockfile && pnpm run build $Q cd frontend && npm ci && npm run build
.PHONY: build-backend .PHONY: build-backend
build-backend: ## Build backend build-backend: ## Build backend
@ -21,7 +21,6 @@ test: | test-frontend test-backend ## Run all tests
.PHONY: test-frontend .PHONY: test-frontend
test-frontend: ## Run frontend tests test-frontend: ## Run frontend tests
$Q cd frontend && pnpm install --frozen-lockfile && pnpm run typecheck
.PHONY: test-backend .PHONY: test-backend
test-backend: ## Run backend tests test-backend: ## Run backend tests
@ -32,7 +31,7 @@ lint: lint-frontend lint-backend ## Run all linters
.PHONY: lint-frontend .PHONY: lint-frontend
lint-frontend: ## Run frontend linters lint-frontend: ## Run frontend linters
$Q cd frontend && pnpm install --frozen-lockfile && pnpm run lint $Q cd frontend && npm ci && npm run lint
.PHONY: lint-backend .PHONY: lint-backend
lint-backend: | $(golangci-lint) ## Run backend linters lint-backend: | $(golangci-lint) ## Run backend linters

View File

@ -1,9 +1,9 @@
package auth package auth
import ( import (
"crypto/rand"
"errors" "errors"
"net/http" "net/http"
"os"
fbErrors "github.com/filebrowser/filebrowser/v2/errors" fbErrors "github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
@ -19,51 +19,16 @@ type ProxyAuth struct {
} }
// Auth authenticates the user via an HTTP header. // Auth authenticates the user via an HTTP header.
func (a ProxyAuth) Auth(r *http.Request, usr users.Store, setting *settings.Settings, srv *settings.Server) (*users.User, error) { func (a ProxyAuth) Auth(r *http.Request, usr users.Store, _ *settings.Settings, srv *settings.Server) (*users.User, error) {
username := r.Header.Get(a.Header) username := r.Header.Get(a.Header)
user, err := usr.Get(srv.Root, username) user, err := usr.Get(srv.Root, username)
if errors.Is(err, fbErrors.ErrNotExist) { if errors.Is(err, fbErrors.ErrNotExist) {
return a.createUser(usr, setting, srv, username) return nil, os.ErrPermission
} }
return user, err return user, err
} }
func (a ProxyAuth) createUser(usr users.Store, setting *settings.Settings, srv *settings.Server, username string) (*users.User, error) {
const passwordSize = 32
randomPasswordBytes := make([]byte, passwordSize)
_, err := rand.Read(randomPasswordBytes)
if err != nil {
return nil, err
}
var hashedRandomPassword string
hashedRandomPassword, err = users.HashPwd(string(randomPasswordBytes))
if err != nil {
return nil, err
}
user := &users.User{
Username: username,
Password: hashedRandomPassword,
LockPassword: true,
}
setting.Defaults.Apply(user)
var userHome string
userHome, err = setting.MakeUserDir(user.Username, user.Scope, srv.Root)
if err != nil {
return nil, err
}
user.Scope = userHome
err = usr.Save(user)
if err != nil {
return nil, err
}
return user, nil
}
// LoginPage tells that proxy auth doesn't require a login page. // LoginPage tells that proxy auth doesn't require a login page.
func (a ProxyAuth) LoginPage() bool { func (a ProxyAuth) LoginPage() bool {
return false return false

View File

@ -48,6 +48,9 @@ func addConfigFlags(flags *pflag.FlagSet) {
flags.String("branding.files", "", "path to directory with images and custom styles") flags.String("branding.files", "", "path to directory with images and custom styles")
flags.Bool("branding.disableExternal", false, "disable external links such as GitHub links") flags.Bool("branding.disableExternal", false, "disable external links such as GitHub links")
flags.Bool("branding.disableUsedPercentage", false, "disable used disk percentage graph") flags.Bool("branding.disableUsedPercentage", false, "disable used disk percentage graph")
flags.String("onlyoffice.url", "", "onlyoffice integration url")
flags.String("onlyoffice.jwtSecret", "", "onlyoffice integration secret")
} }
//nolint:gocyclo //nolint:gocyclo

View File

@ -42,6 +42,10 @@ override the options.`,
Theme: mustGetString(flags, "branding.theme"), Theme: mustGetString(flags, "branding.theme"),
Files: mustGetString(flags, "branding.files"), Files: mustGetString(flags, "branding.files"),
}, },
OnlyOffice: settings.OnlyOffice{
URL: mustGetString(flags, "onlyoffice.url"),
JWTSecret: mustGetString(flags, "onlyoffice.jwtSecret"),
},
} }
ser := &settings.Server{ ser := &settings.Server{

View File

@ -63,6 +63,10 @@ you want to change. Other options will remain unchanged.`,
set.Branding.DisableUsedPercentage = mustGetBool(flags, flag.Name) set.Branding.DisableUsedPercentage = mustGetBool(flags, flag.Name)
case "branding.files": case "branding.files":
set.Branding.Files = mustGetString(flags, flag.Name) set.Branding.Files = mustGetString(flags, flag.Name)
case "onlyoffice.url":
set.OnlyOffice.URL = mustGetString(flags, flag.Name)
case "onlyoffice.jwtSecret":
set.OnlyOffice.JWTSecret = mustGetString(flags, flag.Name)
} }
}) })

View File

@ -76,7 +76,7 @@ var rootCmd = &cobra.Command{
Use: "filebrowser", Use: "filebrowser",
Short: "A stylish web-based file browser", Short: "A stylish web-based file browser",
Long: `File Browser CLI lets you create the database to use with File Browser, Long: `File Browser CLI lets you create the database to use with File Browser,
manage your users and all the configurations without accessing the manage your users and all the configurations without acessing the
web interface. web interface.
If you've never run File Browser, you'll need to have a database for If you've never run File Browser, you'll need to have a database for
@ -108,7 +108,7 @@ name in caps. So to set "database" via an env variable, you should
set FB_DATABASE. set FB_DATABASE.
Also, if the database path doesn't exist, File Browser will enter into Also, if the database path doesn't exist, File Browser will enter into
the quick setup mode and a new database will be bootstrapped and a new the quick setup mode and a new database will be bootstraped and a new
user created with the credentials from options "username" and "password".`, user created with the credentials from options "username" and "password".`,
Run: python(func(cmd *cobra.Command, _ []string, d pythonData) { Run: python(func(cmd *cobra.Command, _ []string, d pythonData) {
log.Println(cfgFile) log.Println(cfgFile)

View File

@ -188,7 +188,7 @@ func cleanUpMapValue(v interface{}) interface{} {
} }
// convertCmdStrToCmdArray checks if cmd string is blank (whitespace included) // convertCmdStrToCmdArray checks if cmd string is blank (whitespace included)
// then returns empty string array, else returns the split word array of cmd. // then returns empty string array, else returns the splitted word array of cmd.
// This is to ensure the result will never be []string{""} // This is to ensure the result will never be []string{""}
func convertCmdStrToCmdArray(cmd string) []string { func convertCmdStrToCmdArray(cmd string) []string {
var cmdArray []string var cmdArray []string

0
docker/root/etc/services.d/filebrowser/run Executable file → Normal file
View File

View File

@ -205,19 +205,10 @@ func (i *FileInfo) Checksum(algo string) error {
} }
func (i *FileInfo) RealPath() string { func (i *FileInfo) RealPath() string {
if realPathFs, ok := i.Fs.(interface { return GetRealPath(i.Fs, i.Path)
RealPath(name string) (fPath string, err error)
}); ok {
realPath, err := realPathFs.RealPath(i.Path)
if err == nil {
return realPath
}
}
return i.Path
} }
//nolint:goconst //nolint:goconst,gocyclo
func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error { func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
if IsNamedPipe(i.Mode) { if IsNamedPipe(i.Mode) {
i.Type = "blob" i.Type = "blob"
@ -276,6 +267,10 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
i.Content = string(content) i.Content = string(content)
} }
return nil return nil
case strings.HasPrefix(mimetype, "application/vnd.openxmlformats-officedocument"),
strings.HasPrefix(mimetype, "application/vnd.oasis.opendocument"):
i.Type = "officedocument"
return nil
default: default:
i.Type = "blob" i.Type = "blob"
} }

View File

@ -1,609 +0,0 @@
package files
// This file contains code primarily sourced from::
// github.com/kataras/iris
import (
"mime"
)
const (
// ContentBinaryHeaderValue header value for binary data.
ContentBinaryHeaderValue = "application/octet-stream"
// ContentWebassemblyHeaderValue header value for web assembly files.
ContentWebassemblyHeaderValue = "application/wasm"
// ContentHTMLHeaderValue is the string of text/html response header's content type value.
ContentHTMLHeaderValue = "text/html"
// ContentJSONHeaderValue header value for JSON data.
ContentJSONHeaderValue = "application/json"
// ContentJSONProblemHeaderValue header value for JSON API problem error.
// Read more at: https://tools.ietf.org/html/rfc7807
ContentJSONProblemHeaderValue = "application/problem+json"
// ContentXMLProblemHeaderValue header value for XML API problem error.
// Read more at: https://tools.ietf.org/html/rfc7807
ContentXMLProblemHeaderValue = "application/problem+xml"
// ContentJavascriptHeaderValue header value for JSONP & Javascript data.
ContentJavascriptHeaderValue = "text/javascript"
// ContentTextHeaderValue header value for Text data.
ContentTextHeaderValue = "text/plain"
// ContentXMLHeaderValue header value for XML data.
ContentXMLHeaderValue = "text/xml"
// ContentXMLUnreadableHeaderValue obsolete header value for XML.
ContentXMLUnreadableHeaderValue = "application/xml"
// ContentMarkdownHeaderValue custom key/content type, the real is the text/html.
ContentMarkdownHeaderValue = "text/markdown"
// ContentYAMLHeaderValue header value for YAML data.
ContentYAMLHeaderValue = "application/x-yaml"
// ContentYAMLTextHeaderValue header value for YAML plain text.
ContentYAMLTextHeaderValue = "text/yaml"
// ContentProtobufHeaderValue header value for Protobuf messages data.
ContentProtobufHeaderValue = "application/x-protobuf"
// ContentMsgPackHeaderValue header value for MsgPack data.
ContentMsgPackHeaderValue = "application/msgpack"
// ContentMsgPack2HeaderValue alternative header value for MsgPack data.
ContentMsgPack2HeaderValue = "application/x-msgpack"
// ContentFormHeaderValue header value for post form data.
ContentFormHeaderValue = "application/x-www-form-urlencoded"
// ContentFormMultipartHeaderValue header value for post multipart form data.
ContentFormMultipartHeaderValue = "multipart/form-data"
// ContentMultipartRelatedHeaderValue header value for multipart related data.
ContentMultipartRelatedHeaderValue = "multipart/related"
// ContentGRPCHeaderValue Content-Type header value for gRPC.
ContentGRPCHeaderValue = "application/grpc"
)
var types = map[string]string{
".3dm": "x-world/x-3dmf",
".3dmf": "x-world/x-3dmf",
".7z": "application/x-7z-compressed",
".a": "application/octet-stream",
".aab": "application/x-authorware-bin",
".aam": "application/x-authorware-map",
".aas": "application/x-authorware-seg",
".abc": "text/vndabc",
".ace": "application/x-ace-compressed",
".acgi": "text/html",
".afl": "video/animaflex",
".ai": "application/postscript",
".aif": "audio/aiff",
".aifc": "audio/aiff",
".aiff": "audio/aiff",
".aim": "application/x-aim",
".aip": "text/x-audiosoft-intra",
".alz": "application/x-alz-compressed",
".ani": "application/x-navi-animation",
".aos": "application/x-nokia-9000-communicator-add-on-software",
".aps": "application/mime",
".apk": "application/vnd.android.package-archive",
".arc": "application/x-arc-compressed",
".arj": "application/arj",
".art": "image/x-jg",
".asf": "video/x-ms-asf",
".asm": "text/x-asm",
".asp": "text/asp",
".asx": "application/x-mplayer2",
".au": "audio/basic",
".avi": "video/x-msvideo",
".avs": "video/avs-video",
".bcpio": "application/x-bcpio",
".bin": "application/mac-binary",
".bmp": "image/bmp",
".boo": "application/book",
".book": "application/book",
".boz": "application/x-bzip2",
".bsh": "application/x-bsh",
".bz2": "application/x-bzip2",
".bz": "application/x-bzip",
".c++": ContentTextHeaderValue,
".c": "text/x-c",
".cab": "application/vnd.ms-cab-compressed",
".cat": "application/vndms-pkiseccat",
".cc": "text/x-c",
".ccad": "application/clariscad",
".cco": "application/x-cocoa",
".cdf": "application/cdf",
".cer": "application/pkix-cert",
".cha": "application/x-chat",
".chat": "application/x-chat",
".chrt": "application/vnd.kde.kchart",
".class": "application/java",
".com": ContentTextHeaderValue,
".conf": ContentTextHeaderValue,
".cpio": "application/x-cpio",
".cpp": "text/x-c",
".cpt": "application/mac-compactpro",
".crl": "application/pkcs-crl",
".crt": "application/pkix-cert",
".crx": "application/x-chrome-extension",
".csh": "text/x-scriptcsh",
".css": "text/css",
".csv": "text/csv",
".cxx": ContentTextHeaderValue,
".dar": "application/x-dar",
".dcr": "application/x-director",
".deb": "application/x-debian-package",
".deepv": "application/x-deepv",
".def": ContentTextHeaderValue,
".der": "application/x-x509-ca-cert",
".dif": "video/x-dv",
".dir": "application/x-director",
".divx": "video/divx",
".dl": "video/dl",
".dmg": "application/x-apple-diskimage",
".doc": "application/msword",
".dot": "application/msword",
".dp": "application/commonground",
".drw": "application/drafting",
".dump": "application/octet-stream",
".dv": "video/x-dv",
".dvi": "application/x-dvi",
".dwf": "drawing/x-dwf=(old)",
".dwg": "application/acad",
".dxf": "application/dxf",
".dxr": "application/x-director",
".el": "text/x-scriptelisp",
".elc": "application/x-bytecodeelisp=(compiled=elisp)",
".eml": "message/rfc822",
".env": "application/x-envoy",
".eps": "application/postscript",
".es": "application/x-esrehber",
".etx": "text/x-setext",
".evy": "application/envoy",
".exe": "application/octet-stream",
".f77": "text/x-fortran",
".f90": "text/x-fortran",
".f": "text/x-fortran",
".fdf": "application/vndfdf",
".fif": "application/fractals",
".fli": "video/fli",
".flo": "image/florian",
".flv": "video/x-flv",
".flx": "text/vndfmiflexstor",
".fmf": "video/x-atomic3d-feature",
".for": "text/x-fortran",
".fpx": "image/vndfpx",
".frl": "application/freeloader",
".funk": "audio/make",
".g3": "image/g3fax",
".g": ContentTextHeaderValue,
".gif": "image/gif",
".gl": "video/gl",
".gsd": "audio/x-gsm",
".gsm": "audio/x-gsm",
".gsp": "application/x-gsp",
".gss": "application/x-gss",
".gtar": "application/x-gtar",
".gz": "application/x-compressed",
".gzip": "application/x-gzip",
".h": "text/x-h",
".hdf": "application/x-hdf",
".help": "application/x-helpfile",
".hgl": "application/vndhp-hpgl",
".hh": "text/x-h",
".hlb": "text/x-script",
".hlp": "application/hlp",
".hpg": "application/vndhp-hpgl",
".hpgl": "application/vndhp-hpgl",
".hqx": "application/binhex",
".hta": "application/hta",
".htc": "text/x-component",
".htm": "text/html",
".html": "text/html",
".htmls": "text/html",
".htt": "text/webviewhtml",
".htx": "text/html",
".ice": "x-conference/x-cooltalk",
".ico": "image/x-icon",
".ics": "text/calendar",
".icz": "text/calendar",
".idc": ContentTextHeaderValue,
".ief": "image/ief",
".iefs": "image/ief",
".iges": "application/iges",
".igs": "application/iges",
".ima": "application/x-ima",
".imap": "application/x-httpd-imap",
".inf": "application/inf",
".ins": "application/x-internett-signup",
".ip": "application/x-ip2",
".isu": "video/x-isvideo",
".it": "audio/it",
".iv": "application/x-inventor",
".ivr": "i-world/i-vrml",
".ivy": "application/x-livescreen",
".jam": "audio/x-jam",
".jav": "text/x-java-source",
".java": "text/x-java-source",
".jcm": "application/x-java-commerce",
".jfif-tbnl": "image/jpeg",
".jfif": "image/jpeg",
".jnlp": "application/x-java-jnlp-file",
".jpe": "image/jpeg",
".jpeg": "image/jpeg",
".jpg": "image/jpeg",
".jps": "image/x-jps",
".js": ContentJavascriptHeaderValue,
".mjs": ContentJavascriptHeaderValue,
".json": ContentJSONHeaderValue,
".vue": ContentJavascriptHeaderValue,
".jut": "image/jutvision",
".kar": "audio/midi",
".karbon": "application/vnd.kde.karbon",
".kfo": "application/vnd.kde.kformula",
".flw": "application/vnd.kde.kivio",
".kml": "application/vnd.google-earth.kml+xml",
".kmz": "application/vnd.google-earth.kmz",
".kon": "application/vnd.kde.kontour",
".kpr": "application/vnd.kde.kpresenter",
".kpt": "application/vnd.kde.kpresenter",
".ksp": "application/vnd.kde.kspread",
".kwd": "application/vnd.kde.kword",
".kwt": "application/vnd.kde.kword",
".ksh": "text/x-scriptksh",
".la": "audio/nspaudio",
".lam": "audio/x-liveaudio",
".latex": "application/x-latex",
".lha": "application/lha",
".lhx": "application/octet-stream",
".list": ContentTextHeaderValue,
".lma": "audio/nspaudio",
".log": ContentTextHeaderValue,
".lsp": "text/x-scriptlisp",
".lst": ContentTextHeaderValue,
".lsx": "text/x-la-asf",
".ltx": "application/x-latex",
".lzh": "application/octet-stream",
".lzx": "application/lzx",
".m1v": "video/mpeg",
".m2a": "audio/mpeg",
".m2v": "video/mpeg",
".m3u": "audio/x-mpegurl",
".m": "text/x-m",
".man": "application/x-troff-man",
".manifest": "text/cache-manifest",
".map": "application/x-navimap",
".mar": ContentTextHeaderValue,
".mbd": "application/mbedlet",
".mc$": "application/x-magic-cap-package-10",
".mcd": "application/mcad",
".mcf": "text/mcf",
".mcp": "application/netmc",
".me": "application/x-troff-me",
".mht": "message/rfc822",
".mhtml": "message/rfc822",
".mid": "application/x-midi",
".midi": "application/x-midi",
".mif": "application/x-frame",
".mime": "message/rfc822",
".mjf": "audio/x-vndaudioexplosionmjuicemediafile",
".mjpg": "video/x-motion-jpeg",
".mm": "application/base64",
".mme": "application/base64",
".mod": "audio/mod",
".moov": "video/quicktime",
".mov": "video/quicktime",
".movie": "video/x-sgi-movie",
".mp2": "audio/mpeg",
".mp3": "audio/mpeg",
".mp4": "video/mp4",
".mpa": "audio/mpeg",
".mpc": "application/x-project",
".mpe": "video/mpeg",
".mpeg": "video/mpeg",
".mpg": "video/mpeg",
".mpga": "audio/mpeg",
".mpp": "application/vndms-project",
".mpt": "application/x-project",
".mpv": "application/x-project",
".mpx": "application/x-project",
".mrc": "application/marc",
".ms": "application/x-troff-ms",
".mv": "video/x-sgi-movie",
".my": "audio/make",
".mzz": "application/x-vndaudioexplosionmzz",
".nap": "image/naplps",
".naplps": "image/naplps",
".nc": "application/x-netcdf",
".ncm": "application/vndnokiaconfiguration-message",
".nif": "image/x-niff",
".niff": "image/x-niff",
".nix": "application/x-mix-transfer",
".nsc": "application/x-conference",
".nvd": "application/x-navidoc",
".o": "application/octet-stream",
".oda": "application/oda",
".odb": "application/vnd.oasis.opendocument.database",
".odc": "application/vnd.oasis.opendocument.chart",
".odf": "application/vnd.oasis.opendocument.formula",
".odg": "application/vnd.oasis.opendocument.graphics",
".odi": "application/vnd.oasis.opendocument.image",
".odm": "application/vnd.oasis.opendocument.text-master",
".odp": "application/vnd.oasis.opendocument.presentation",
".ods": "application/vnd.oasis.opendocument.spreadsheet",
".odt": "application/vnd.oasis.opendocument.text",
".oga": "audio/ogg",
".ogg": "audio/ogg",
".ogv": "video/ogg",
".omc": "application/x-omc",
".omcd": "application/x-omcdatamaker",
".omcr": "application/x-omcregerator",
".otc": "application/vnd.oasis.opendocument.chart-template",
".otf": "application/vnd.oasis.opendocument.formula-template",
".otg": "application/vnd.oasis.opendocument.graphics-template",
".oth": "application/vnd.oasis.opendocument.text-web",
".oti": "application/vnd.oasis.opendocument.image-template",
".otm": "application/vnd.oasis.opendocument.text-master",
".otp": "application/vnd.oasis.opendocument.presentation-template",
".ots": "application/vnd.oasis.opendocument.spreadsheet-template",
".ott": "application/vnd.oasis.opendocument.text-template",
".p10": "application/pkcs10",
".p12": "application/pkcs-12",
".p7a": "application/x-pkcs7-signature",
".p7c": "application/pkcs7-mime",
".p7m": "application/pkcs7-mime",
".p7r": "application/x-pkcs7-certreqresp",
".p7s": "application/pkcs7-signature",
".p": "text/x-pascal",
".part": "application/pro_eng",
".pas": "text/pascal",
".pbm": "image/x-portable-bitmap",
".pcl": "application/vndhp-pcl",
".pct": "image/x-pict",
".pcx": "image/x-pcx",
".pdb": "chemical/x-pdb",
".pdf": "application/pdf",
".pfunk": "audio/make",
".pgm": "image/x-portable-graymap",
".pic": "image/pict",
".pict": "image/pict",
".pkg": "application/x-newton-compatible-pkg",
".pko": "application/vndms-pkipko",
".pl": "text/x-scriptperl",
".plx": "application/x-pixclscript",
".pm4": "application/x-pagemaker",
".pm5": "application/x-pagemaker",
".pm": "text/x-scriptperl-module",
".png": "image/png",
".pnm": "application/x-portable-anymap",
".pot": "application/mspowerpoint",
".pov": "model/x-pov",
".ppa": "application/vndms-powerpoint",
".ppm": "image/x-portable-pixmap",
".pps": "application/mspowerpoint",
".ppt": "application/mspowerpoint",
".ppz": "application/mspowerpoint",
".pre": "application/x-freelance",
".prt": "application/pro_eng",
".ps": "application/postscript",
".psd": "application/octet-stream",
".pvu": "paleovu/x-pv",
".pwz": "application/vndms-powerpoint",
".py": "text/x-scriptphyton",
".pyc": "application/x-bytecodepython",
".qcp": "audio/vndqcelp",
".qd3": "x-world/x-3dmf",
".qd3d": "x-world/x-3dmf",
".qif": "image/x-quicktime",
".qt": "video/quicktime",
".qtc": "video/x-qtc",
".qti": "image/x-quicktime",
".qtif": "image/x-quicktime",
".ra": "audio/x-pn-realaudio",
".ram": "audio/x-pn-realaudio",
".rar": "application/x-rar-compressed",
".ras": "application/x-cmu-raster",
".rast": "image/cmu-raster",
".rexx": "text/x-scriptrexx",
".rf": "image/vndrn-realflash",
".rgb": "image/x-rgb",
".rm": "application/vndrn-realmedia",
".rmi": "audio/mid",
".rmm": "audio/x-pn-realaudio",
".rmp": "audio/x-pn-realaudio",
".rng": "application/ringing-tones",
".rnx": "application/vndrn-realplayer",
".roff": "application/x-troff",
".rp": "image/vndrn-realpix",
".rpm": "audio/x-pn-realaudio-plugin",
".rt": "text/vndrn-realtext",
".rtf": "text/richtext",
".rtx": "text/richtext",
".rv": "video/vndrn-realvideo",
".s": "text/x-asm",
".s3m": "audio/s3m",
".s7z": "application/x-7z-compressed",
".saveme": "application/octet-stream",
".sbk": "application/x-tbook",
".scm": "text/x-scriptscheme",
".sdml": ContentTextHeaderValue,
".sdp": "application/sdp",
".sdr": "application/sounder",
".sea": "application/sea",
".set": "application/set",
".sgm": "text/x-sgml",
".sgml": "text/x-sgml",
".sh": "text/x-scriptsh",
".shar": "application/x-bsh",
".shtml": "text/x-server-parsed-html",
".sid": "audio/x-psid",
".skd": "application/x-koan",
".skm": "application/x-koan",
".skp": "application/x-koan",
".skt": "application/x-koan",
".sit": "application/x-stuffit",
".sitx": "application/x-stuffitx",
".sl": "application/x-seelogo",
".smi": "application/smil",
".smil": "application/smil",
".snd": "audio/basic",
".sol": "application/solids",
".spc": "text/x-speech",
".spl": "application/futuresplash",
".spr": "application/x-sprite",
".sprite": "application/x-sprite",
".spx": "audio/ogg",
".src": "application/x-wais-source",
".ssi": "text/x-server-parsed-html",
".ssm": "application/streamingmedia",
".sst": "application/vndms-pkicertstore",
".step": "application/step",
".stl": "application/sla",
".stp": "application/step",
".sv4cpio": "application/x-sv4cpio",
".sv4crc": "application/x-sv4crc",
".svf": "image/vnddwg",
".svg": "image/svg+xml",
".svr": "application/x-world",
".swf": "application/x-shockwave-flash",
".t": "application/x-troff",
".talk": "text/x-speech",
".tar": "application/x-tar",
".tbk": "application/toolbook",
".tcl": "text/x-scripttcl",
".tcsh": "text/x-scripttcsh",
".tex": "application/x-tex",
".texi": "application/x-texinfo",
".texinfo": "application/x-texinfo",
".text": ContentTextHeaderValue,
".tgz": "application/gnutar",
".tif": "image/tiff",
".tiff": "image/tiff",
".tr": "application/x-troff",
".tsi": "audio/tsp-audio",
".tsp": "application/dsptype",
".tsv": "text/tab-separated-values",
".turbot": "image/florian",
".txt": ContentTextHeaderValue,
".uil": "text/x-uil",
".uni": "text/uri-list",
".unis": "text/uri-list",
".unv": "application/i-deas",
".uri": "text/uri-list",
".uris": "text/uri-list",
".ustar": "application/x-ustar",
".uu": "text/x-uuencode",
".uue": "text/x-uuencode",
".vcd": "application/x-cdlink",
".vcf": "text/x-vcard",
".vcard": "text/x-vcard",
".vcs": "text/x-vcalendar",
".vda": "application/vda",
".vdo": "video/vdo",
".vew": "application/groupwise",
".viv": "video/vivo",
".vivo": "video/vivo",
".vmd": "application/vocaltec-media-desc",
".vmf": "application/vocaltec-media-file",
".voc": "audio/voc",
".vos": "video/vosaic",
".vox": "audio/voxware",
".vqe": "audio/x-twinvq-plugin",
".vqf": "audio/x-twinvq",
".vql": "audio/x-twinvq-plugin",
".vrml": "application/x-vrml",
".vrt": "x-world/x-vrt",
".vsd": "application/x-visio",
".vst": "application/x-visio",
".vsw": "application/x-visio",
".w60": "application/wordperfect60",
".w61": "application/wordperfect61",
".w6w": "application/msword",
".wav": "audio/wav",
".wb1": "application/x-qpro",
".wbmp": "image/vnd.wap.wbmp",
".web": "application/vndxara",
".wiz": "application/msword",
".wk1": "application/x-123",
".wmf": "windows/metafile",
".wml": "text/vnd.wap.wml",
".wmlc": "application/vnd.wap.wmlc",
".wmls": "text/vnd.wap.wmlscript",
".wmlsc": "application/vnd.wap.wmlscriptc",
".word": "application/msword",
".wp5": "application/wordperfect",
".wp6": "application/wordperfect",
".wp": "application/wordperfect",
".wpd": "application/wordperfect",
".wq1": "application/x-lotus",
".wri": "application/mswrite",
".wrl": "application/x-world",
".wrz": "model/vrml",
".wsc": "text/scriplet",
".wsrc": "application/x-wais-source",
".wtk": "application/x-wintalk",
".x-png": "image/png",
".xbm": "image/x-xbitmap",
".xdr": "video/x-amt-demorun",
".xgz": "xgl/drawing",
".xif": "image/vndxiff",
".xl": "application/excel",
".xla": "application/excel",
".xlb": "application/excel",
".xlc": "application/excel",
".xld": "application/excel",
".xlk": "application/excel",
".xll": "application/excel",
".xlm": "application/excel",
".xls": "application/excel",
".xlt": "application/excel",
".xlv": "application/excel",
".xlw": "application/excel",
".xm": "audio/xm",
".xml": ContentXMLHeaderValue,
".xmz": "xgl/movie",
".xpix": "application/x-vndls-xpix",
".xpm": "image/x-xpixmap",
".xsr": "video/x-amt-showrun",
".xwd": "image/x-xwd",
".xyz": "chemical/x-pdb",
".z": "application/x-compress",
".zip": "application/zip",
".zoo": "application/octet-stream",
".zsh": "text/x-scriptzsh",
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
".docm": "application/vnd.ms-word.document.macroEnabled.12",
".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
".dotm": "application/vnd.ms-word.template.macroEnabled.12",
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
".xlsm": "application/vnd.ms-excel.sheet.macroEnabled.12",
".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
".xltm": "application/vnd.ms-excel.template.macroEnabled.12",
".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
".xlam": "application/vnd.ms-excel.addin.macroEnabled.12",
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
".pptm": "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
".ppsm": "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
".potx": "application/vnd.openxmlformats-officedocument.presentationml.template",
".potm": "application/vnd.ms-powerpoint.template.macroEnabled.12",
".ppam": "application/vnd.ms-powerpoint.addin.macroEnabled.12",
".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide",
".sldm": "application/vnd.ms-powerpoint.slide.macroEnabled.12",
".thmx": "application/vnd.ms-officetheme",
".onetoc": "application/onenote",
".onetoc2": "application/onenote",
".onetmp": "application/onenote",
".onepkg": "application/onenote",
".xpi": "application/x-xpinstall",
".wasm": "application/wasm",
".m4a": "audio/mp4",
".flac": "audio/x-flac",
".amr": "audio/amr",
".aac": "audio/aac",
".opus": "video/ogg",
".m4v": "video/mp4",
".mkv": "video/x-matroska",
".caf": "audio/x-caf",
".m3u8": "application/x-mpegURL",
".mpd": "application/dash+xml",
".webp": "image/webp",
".epub": "application/epub+zip",
}
//nolint:gochecknoinits
func init() {
for ext, typ := range types {
// skip errors
_ = mime.AddExtensionType(ext, typ)
}
}

View File

@ -3,6 +3,8 @@ package files
import ( import (
"os" "os"
"unicode/utf8" "unicode/utf8"
"github.com/spf13/afero"
) )
func isBinary(content []byte) bool { func isBinary(content []byte) bool {
@ -57,3 +59,16 @@ func IsNamedPipe(mode os.FileMode) bool {
func IsSymlink(mode os.FileMode) bool { func IsSymlink(mode os.FileMode) bool {
return mode&os.ModeSymlink != 0 return mode&os.ModeSymlink != 0
} }
func GetRealPath(fs afero.Fs, path string) string {
if realPathFs, ok := fs.(interface {
RealPath(name string) (fPath string, err error)
}); ok {
realPath, err := realPathFs.RealPath(path)
if err == nil {
return realPath
}
}
return path
}

View File

@ -98,7 +98,7 @@ func CommonPrefix(sep byte, paths ...string) string {
// (e.g. /home/user1, /home/user1/foo, /home/user1/bar). // (e.g. /home/user1, /home/user1/foo, /home/user1/bar).
// path.Clean will have cleaned off trailing / separators with // path.Clean will have cleaned off trailing / separators with
// the exception of the root directory, "/" (in which case we // the exception of the root directory, "/" (in which case we
// make it "//", but this will get fixed up to "/" below). // make it "//", but this will get fixed up to "/" bellow).
c = append(c, sep) c = append(c, sep)
// Ignore the first path since it's already in c // Ignore the first path since it's already in c

27
frontend/.eslintrc.json Normal file
View File

@ -0,0 +1,27 @@
{
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier"
],
"rules": {
"vue/multi-word-component-names": "off",
"vue/no-mutating-props": [
"error",
{
"shallowOnly": true
}
]
// no-undef is already included in
// @vue/eslint-config-typescript
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
}
}

View File

@ -1,3 +1,2 @@
# Ignore artifacts: # Ignore artifacts:
dist dist
pnpm-lock.yaml

View File

@ -1,38 +0,0 @@
import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import prettierConfig from "@vue/eslint-config-prettier";
export default [
{
name: "app/files-to-lint",
files: ["**/*.{ts,mts,tsx,vue}"],
},
{
name: "app/files-to-ignore",
ignores: ["**/dist/**", "**/dist-ssr/**", "**/coverage/**"],
},
...pluginVue.configs["flat/essential"],
...vueTsEslintConfig(),
prettierConfig,
{
rules: {
// Note: you must disable the base rule as it can report incorrect errors
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "off",
// TODO: theres too many of these from before ts
"@typescript-eslint/no-explicit-any": "off",
// TODO: finish the ts conversion
"vue/block-lang": "off",
"vue/multi-word-component-names": "off",
"vue/no-mutating-props": [
"error",
{
shallowOnly: true,
},
],
},
},
];

10
frontend/jsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

7714
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,74 +4,69 @@
"private": true, "private": true,
"type": "module", "type": "module",
"engines": { "engines": {
"node": ">=22.0.0", "npm": ">=7.0.0",
"pnpm": ">=9.0.0" "node": ">=18.0.0"
}, },
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
"build": "pnpm run typecheck && vite build", "build": "npm run typecheck && vite build",
"clean": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitkeep' -exec rm -r {} +", "clean": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitkeep' -exec rm -r {} +",
"typecheck": "vue-tsc -p ./tsconfig.tsc.json --noEmit", "typecheck": "vue-tsc -p ./tsconfig.json --noEmit",
"lint": "eslint src/", "lint": "npm run typecheck && eslint --ext .vue,.ts src/",
"lint:fix": "eslint --fix src/", "lint:fix": "eslint --ext .vue,.ts --fix src/",
"format": "prettier --write .", "format": "prettier --write .",
"test": "playwright test" "test": "playwright test"
}, },
"dependencies": { "dependencies": {
"@chenfengyuan/vue-number-input": "^2.0.1", "@chenfengyuan/vue-number-input": "^2.0.1",
"@vueuse/core": "^12.5.0", "@onlyoffice/document-editor-vue": "^1.4.0",
"@vueuse/integrations": "^12.5.0", "@vueuse/core": "^10.9.0",
"ace-builds": "^1.37.5", "@vueuse/integrations": "^10.9.0",
"core-js": "^3.40.0", "ace-builds": "^1.32.9",
"core-js": "^3.36.1",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"epubjs": "^0.3.93",
"filesize": "^10.1.1", "filesize": "^10.1.1",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"jwt-decode": "^4.0.0", "jwt-decode": "^4.0.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"marked": "^15.0.6", "material-icons": "^1.13.12",
"material-icons": "^1.13.13",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"pinia": "^2.3.1", "pinia": "^2.1.7",
"pretty-bytes": "^6.1.1", "pretty-bytes": "^6.1.1",
"qrcode.vue": "^3.4.1", "qrcode.vue": "^3.4.1",
"tus-js-client": "^4.3.1", "tus-js-client": "^4.1.0",
"utif": "^3.1.0", "utif": "^3.1.0",
"video.js": "^8.21.0", "video.js": "^8.10.0",
"videojs-hotkeys": "^0.2.28", "videojs-hotkeys": "^0.2.28",
"videojs-mobile-ui": "^1.1.1", "videojs-mobile-ui": "^1.1.1",
"vue": "^3.4.21", "vue": "^3.4.21",
"vue-final-modal": "^4.5.4", "vue-final-modal": "^4.5.4",
"vue-i18n": "^11.0.1", "vue-i18n": "^9.10.2",
"vue-lazyload": "^3.0.0", "vue-lazyload": "^3.0.0",
"vue-reader": "^1.2.17",
"vue-router": "^4.3.0", "vue-router": "^4.3.0",
"vue-toastification": "^2.0.0-rc.5" "vue-toastification": "^2.0.0-rc.5"
}, },
"devDependencies": { "devDependencies": {
"@intlify/unplugin-vue-i18n": "^6.0.3", "@intlify/unplugin-vue-i18n": "^4.0.0",
"@playwright/test": "^1.50.0", "@playwright/test": "^1.42.1",
"@tsconfig/node22": "^22.0.0",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^22.10.10", "@types/node": "^20.12.2",
"@typescript-eslint/eslint-plugin": "^8.21.0", "@typescript-eslint/eslint-plugin": "^7.4.0",
"@vitejs/plugin-legacy": "^6.0.0", "@vitejs/plugin-legacy": "^5.3.2",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^14.3.0", "@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.7.0",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"concurrently": "^9.1.2", "concurrently": "^8.2.2",
"eslint": "^9.19.0", "eslint": "^8.57.0",
"eslint-plugin-prettier": "^5.2.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.24.0", "eslint-plugin-vue": "^9.24.0",
"jsdom": "^26.0.0", "jsdom": "^24.0.0",
"postcss": "^8.5.1", "postcss": "^8.4.38",
"prettier": "^3.4.2", "prettier": "^3.2.5",
"terser": "^5.37.0", "terser": "^5.30.0",
"vite": "^6.0.11", "vite": "^5.2.7",
"vite-plugin-compression2": "^1.0.0", "vite-plugin-compression2": "^1.0.0",
"vue-tsc": "^2.2.0" "vue-tsc": "^2.0.7"
}, }
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
import { useAuthStore } from "@/stores/auth";
import { useLayoutStore } from "@/stores/layout";
import { baseURL } from "@/utils/constants";
import { upload as postTus, useTus } from "./tus";
import { createURL, fetchURL, removePrefix } from "./utils"; import { createURL, fetchURL, removePrefix } from "./utils";
import { baseURL } from "@/utils/constants";
import { useAuthStore } from "@/stores/auth";
import { upload as postTus, useTus } from "./tus";
export async function fetch(url: string) { export async function fetch(url: string) {
url = removePrefix(url); url = removePrefix(url);
@ -157,7 +156,6 @@ function moveCopy(
overwrite = false, overwrite = false,
rename = false rename = false
) { ) {
const layoutStore = useLayoutStore();
const promises = []; const promises = [];
for (const item of items) { for (const item of items) {
@ -168,7 +166,7 @@ function moveCopy(
}&destination=${to}&override=${overwrite}&rename=${rename}`; }&destination=${to}&override=${overwrite}&rename=${rename}`;
promises.push(resourceAction(url, "PATCH")); promises.push(resourceAction(url, "PATCH"));
} }
layoutStore.closeHovers();
return Promise.all(promises); return Promise.all(promises);
} }

View File

@ -61,7 +61,7 @@ export async function upload(
fileData.hasStarted = true; fileData.hasStarted = true;
fileData.lastProgressTimestamp = Date.now(); fileData.lastProgressTimestamp = Date.now();
fileData.interval = window.setInterval(() => { fileData.interval = setInterval(() => {
calcProgress(filePath); calcProgress(filePath);
}, SPEED_UPDATE_INTERVAL); }, SPEED_UPDATE_INTERVAL);
} }

View File

@ -25,7 +25,7 @@ export async function create(user: IUser) {
throw new StatusError(await res.text(), res.status); throw new StatusError(await res.text(), res.status);
} }
export async function update(user: Partial<IUser>, which = ["all"]) { export async function update(user: IUser, which = ["all"]) {
await fetchURL(`/api/users/${user.id}`, { await fetchURL(`/api/users/${user.id}`, {
method: "PUT", method: "PUT",
body: JSON.stringify({ body: JSON.stringify({

View File

@ -34,7 +34,7 @@ const props = defineProps<{
const items = computed(() => { const items = computed(() => {
const relativePath = route.path.replace(props.base, ""); const relativePath = route.path.replace(props.base, "");
const parts = relativePath.split("/"); let parts = relativePath.split("/");
if (parts[0] === "") { if (parts[0] === "") {
parts.shift(); parts.shift();
@ -44,7 +44,7 @@ const items = computed(() => {
parts.pop(); parts.pop();
} }
const breadcrumbs: BreadCrumb[] = []; let breadcrumbs: BreadCrumb[] = [];
for (let i = 0; i < parts.length; i++) { for (let i = 0; i < parts.length; i++) {
if (i === 0) { if (i === 0) {

View File

@ -46,7 +46,7 @@ https://raw.githubusercontent.com/dzwillia/vue-simple-progress/master/src/compon
<script> <script>
// We're leaving this untouched as you can read in the beginning // We're leaving this untouched as you can read in the beginning
const isNumber = function (n) { var isNumber = function (n) {
return !isNaN(parseFloat(n)) && isFinite(n); return !isNaN(parseFloat(n)) && isFinite(n);
}; };
@ -107,7 +107,7 @@ export default {
}, },
computed: { computed: {
pct() { pct() {
let pct = (this.val / this.max) * 100; var pct = (this.val / this.max) * 100;
pct = pct.toFixed(2); pct = pct.toFixed(2);
return Math.min(pct, this.max); return Math.min(pct, this.max);
}, },
@ -160,7 +160,7 @@ export default {
return isNumber(this.fontSize) ? this.fontSize : 13; return isNumber(this.fontSize) ? this.fontSize : 13;
}, },
progress_style() { progress_style() {
const style = { var style = {
background: this.bgColor, background: this.bgColor,
}; };
@ -177,7 +177,7 @@ export default {
return style; return style;
}, },
bar_style() { bar_style() {
const style = { var style = {
background: this.barColor, background: this.barColor,
width: this.pct + "%", width: this.pct + "%",
height: this.size_px + "px", height: this.size_px + "px",
@ -198,7 +198,7 @@ export default {
return style; return style;
}, },
text_style() { text_style() {
const style = { var style = {
color: this.textFgColor, color: this.textFgColor,
"font-size": this.text_font_size + "px", "font-size": this.text_font_size + "px",
"text-align": this.textAlign, "text-align": this.textAlign,

View File

@ -50,7 +50,7 @@ import { useFileStore } from "@/stores/file";
import { useLayoutStore } from "@/stores/layout"; import { useLayoutStore } from "@/stores/layout";
import { commands } from "@/api"; import { commands } from "@/api";
import { throttle } from "lodash-es"; import { throttle } from "lodash";
import { theme } from "@/utils/constants"; import { theme } from "@/utils/constants";
export default { export default {
@ -163,7 +163,7 @@ export default {
this.canInput = false; this.canInput = false;
event.target.innerHTML = ""; event.target.innerHTML = "";
const results = { let results = {
text: `${cmd}\n\n`, text: `${cmd}\n\n`,
}; };
@ -180,7 +180,7 @@ export default {
}, },
() => { () => {
results.text = results.text results.text = results.text
// eslint-disable-next-line no-control-regex
.replace(/\u001b\[[0-9;]+m/g, "") // Filter ANSI color for now .replace(/\u001b\[[0-9;]+m/g, "") // Filter ANSI color for now
.trimEnd(); .trimEnd();
this.canInput = true; this.canInput = true;

View File

@ -1,5 +1,4 @@
<template> <template>
<div v-show="active" @click="closeHovers" class="overlay"></div>
<nav :class="{ active }"> <nav :class="{ active }">
<template v-if="isLoggedIn"> <template v-if="isLoggedIn">
<button <button
@ -101,7 +100,7 @@
href="https://github.com/filebrowser/filebrowser" href="https://github.com/filebrowser/filebrowser"
>File Browser</a >File Browser</a
> >
<span> {{ " " }} {{ version }}</span> <span> {{ version }}</span>
</span> </span>
<span> <span>
<a @click="help">{{ $t("sidebar.help") }}</a> <a @click="help">{{ $t("sidebar.help") }}</a>
@ -158,7 +157,7 @@ export default {
methods: { methods: {
...mapActions(useLayoutStore, ["closeHovers", "showHover"]), ...mapActions(useLayoutStore, ["closeHovers", "showHover"]),
async fetchUsage() { async fetchUsage() {
const path = this.$route.path.endsWith("/") let path = this.$route.path.endsWith("/")
? this.$route.path ? this.$route.path
: this.$route.path + "/"; : this.$route.path + "/";
let usageStats = USAGE_DEFAULT; let usageStats = USAGE_DEFAULT;
@ -166,7 +165,7 @@ export default {
return Object.assign(this.usage, usageStats); return Object.assign(this.usage, usageStats);
} }
try { try {
const usage = await api.usage(path); let usage = await api.usage(path);
usageStats = { usageStats = {
used: prettyBytes(usage.used, { binary: true }), used: prettyBytes(usage.used, { binary: true }),
total: prettyBytes(usage.total, { binary: true }), total: prettyBytes(usage.total, { binary: true }),
@ -191,13 +190,8 @@ export default {
logout: auth.logout, logout: auth.logout,
}, },
watch: { watch: {
$route: { isFiles(newValue) {
handler(to) { newValue && this.fetchUsage();
if (to.path.includes("/files")) {
this.fetchUsage();
}
},
immediate: true,
}, },
}, },
}; };

View File

@ -14,15 +14,15 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { throttle } from "lodash-es"; import throttle from "lodash/throttle";
import UTIF from "utif"; import UTIF from "utif";
import { onBeforeUnmount, onMounted, ref, watch } from "vue"; import { onBeforeUnmount, onMounted, ref, watch } from "vue";
interface IProps { interface IProps {
src: string; src: string;
moveDisabledTime?: number; moveDisabledTime: number;
classList?: any[]; classList: any[];
zoomStep?: number; zoomStep: number;
} }
const props = withDefaults(defineProps<IProps>(), { const props = withDefaults(defineProps<IProps>(), {
@ -102,11 +102,10 @@ const decodeUTIF = () => {
if (document?.location?.pathname === undefined) { if (document?.location?.pathname === undefined) {
return; return;
} }
const suff = let suff = document.location.pathname.split(".")?.pop()?.toLowerCase() ?? "";
document.location.pathname.split(".")?.pop()?.toLowerCase() ?? "";
if (sufs.indexOf(suff) == -1) return false; if (sufs.indexOf(suff) == -1) return false;
const xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
UTIF._xhrs.push(xhr); UTIF._xhrs.push(xhr);
UTIF._imgs.push(imgex.value); UTIF._imgs.push(imgex.value);
xhr.open("GET", props.src); xhr.open("GET", props.src);
@ -231,7 +230,7 @@ const touchMove = (event: TouchEvent) => {
if (imgex.value === null) { if (imgex.value === null) {
return; return;
} }
const step = imgex.value.width / 5; let step = imgex.value.width / 5;
if (event.targetTouches.length === 2) { if (event.targetTouches.length === 2) {
moveDisabled.value = true; moveDisabled.value = true;
if (disabledTimer.value) clearTimeout(disabledTimer.value); if (disabledTimer.value) clearTimeout(disabledTimer.value);
@ -240,9 +239,9 @@ const touchMove = (event: TouchEvent) => {
props.moveDisabledTime props.moveDisabledTime
); );
const p1 = event.targetTouches[0]; let p1 = event.targetTouches[0];
const p2 = event.targetTouches[1]; let p2 = event.targetTouches[1];
const touchDistance = Math.sqrt( let touchDistance = Math.sqrt(
Math.pow(p2.pageX - p1.pageX, 2) + Math.pow(p2.pageY - p1.pageY, 2) Math.pow(p2.pageX - p1.pageX, 2) + Math.pow(p2.pageY - p1.pageY, 2)
); );
if (!lastTouchDistance.value) { if (!lastTouchDistance.value) {
@ -254,8 +253,8 @@ const touchMove = (event: TouchEvent) => {
setZoom(); setZoom();
} else if (event.targetTouches.length === 1) { } else if (event.targetTouches.length === 1) {
if (moveDisabled.value) return; if (moveDisabled.value) return;
const x = event.targetTouches[0].pageX - (lastX.value ?? 0); let x = event.targetTouches[0].pageX - (lastX.value ?? 0);
const y = event.targetTouches[0].pageY - (lastY.value ?? 0); let y = event.targetTouches[0].pageY - (lastY.value ?? 0);
if (Math.abs(x) >= step && Math.abs(y) >= step) return; if (Math.abs(x) >= step && Math.abs(y) >= step) return;
lastX.value = event.targetTouches[0].pageX; lastX.value = event.targetTouches[0].pageX;
lastY.value = event.targetTouches[0].pageY; lastY.value = event.targetTouches[0].pageY;
@ -269,8 +268,8 @@ const doMove = (x: number, y: number) => {
} }
const style = imgex.value.style; const style = imgex.value.style;
const posX = pxStringToNumber(style.left) + x; let posX = pxStringToNumber(style.left) + x;
const posY = pxStringToNumber(style.top) + y; let posY = pxStringToNumber(style.top) + y;
style.left = posX + "px"; style.left = posX + "px";
style.top = posY + "px"; style.top = posY + "px";

View File

@ -12,7 +12,6 @@
:data-type="type" :data-type="type"
:aria-label="name" :aria-label="name"
:aria-selected="isSelected" :aria-selected="isSelected"
:data-ext="getExtension(name).toLowerCase()"
> >
<div> <div>
<img <img
@ -82,7 +81,7 @@ const isDraggable = computed(
const canDrop = computed(() => { const canDrop = computed(() => {
if (!props.isDir || props.readOnly) return false; if (!props.isDir || props.readOnly) return false;
for (const i of fileStore.selected) { for (let i of fileStore.selected) {
if (fileStore.req?.items[i].url === props.url) { if (fileStore.req?.items[i].url === props.url) {
return false; return false;
} }
@ -156,9 +155,9 @@ const drop = async (event: Event) => {
} }
} }
const items: any[] = []; let items: any[] = [];
for (const i of fileStore.selected) { for (let i of fileStore.selected) {
if (fileStore.req) { if (fileStore.req) {
items.push({ items.push({
from: fileStore.req?.items[i].url, from: fileStore.req?.items[i].url,
@ -172,10 +171,10 @@ const drop = async (event: Event) => {
if (el === null) { if (el === null) {
return; return;
} }
const path = el.__vue__.url; let path = el.__vue__.url;
const baseItems = (await api.fetch(path)).items; let baseItems = (await api.fetch(path)).items;
const action = (overwrite: boolean, rename: boolean) => { let action = (overwrite: boolean, rename: boolean) => {
api api
.move(items, overwrite, rename) .move(items, overwrite, rename)
.then(() => { .then(() => {
@ -184,7 +183,7 @@ const drop = async (event: Event) => {
.catch($showError); .catch($showError);
}; };
const conflict = upload.checkConflict(items, baseItems); let conflict = upload.checkConflict(items, baseItems);
let overwrite = false; let overwrite = false;
let rename = false; let rename = false;
@ -210,10 +209,8 @@ const drop = async (event: Event) => {
const itemClick = (event: Event | KeyboardEvent) => { const itemClick = (event: Event | KeyboardEvent) => {
if ( if (
!((event as KeyboardEvent).ctrlKey || (event as KeyboardEvent).metaKey) &&
singleClick.value && singleClick.value &&
!(event as KeyboardEvent).ctrlKey &&
!(event as KeyboardEvent).metaKey &&
!(event as KeyboardEvent).shiftKey &&
!fileStore.multiple !fileStore.multiple
) )
open(); open();
@ -273,12 +270,4 @@ const click = (event: Event | KeyboardEvent) => {
const open = () => { const open = () => {
router.push({ path: props.url }); router.push({ path: props.url });
}; };
const getExtension = (fileName: string): string => {
const lastDotIndex = fileName.lastIndexOf(".");
if (lastDotIndex === -1) {
return fileName;
}
return fileName.substring(lastDotIndex);
};
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<video ref="videoPlayer" class="video-max video-js" controls preload="auto"> <video ref="videoPlayer" class="video-max video-js" controls>
<source /> <source :src="source" />
<track <track
kind="subtitles" kind="subtitles"
v-for="(sub, index) in subtitles" v-for="(sub, index) in subtitles"
@ -18,11 +18,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, nextTick } from "vue"; import { ref, onMounted, onBeforeUnmount } from "vue";
import videojs from "video.js"; import videojs from "video.js";
import type Player from "video.js/dist/types/player"; import type Player from "video.js/dist/types/player";
import "videojs-mobile-ui"; import "videojs-mobile-ui";
import "videojs-hotkeys"; import "videojs-hotkeys";
import "video.js/dist/video-js.min.css"; import "video.js/dist/video-js.min.css";
import "videojs-mobile-ui/dist/videojs-mobile-ui.css"; import "videojs-mobile-ui/dist/videojs-mobile-ui.css";
@ -40,64 +41,13 @@ const props = withDefaults(
} }
); );
const source = ref(props.source); onMounted(() => {
const sourceType = ref(""); player.value = videojs(
videoPlayer.value!,
nextTick(() => { {
initVideoPlayer();
});
onMounted(() => {});
onBeforeUnmount(() => {
if (player.value) {
player.value.dispose();
player.value = null;
}
});
const initVideoPlayer = async () => {
try {
const lang = document.documentElement.lang;
const languagePack = await (
languageImports[lang] || languageImports.en
)?.();
videojs.addLanguage("videoPlayerLocal", languagePack.default);
sourceType.value = "";
//
sourceType.value = getSourceType(source.value);
const srcOpt = { sources: { src: props.source, type: sourceType.value } };
//Supporting localized language display.
const langOpt = { language: "videoPlayerLocal" };
// support for playback at different speeds.
const playbackRatesOpt = { playbackRates: [0.5, 1, 1.5, 2, 2.5, 3] };
const options = getOptions(
props.options,
langOpt,
srcOpt,
playbackRatesOpt
);
player.value = videojs(videoPlayer.value!, options, () => {});
// TODO: need to test on mobile
// @ts-expect-error no ts definition for mobileUi
player.value!.mobileUi();
} catch (error) {
console.error("Error initializing video player:", error);
}
};
const getOptions = (...srcOpt: any[]) => {
const options = {
controlBar: {
skipButtons: {
forward: 5,
backward: 5,
},
},
html5: { html5: {
// needed for customizable subtitles
// TODO: add to user settings
nativeTextTracks: false, nativeTextTracks: false,
}, },
plugins: { plugins: {
@ -107,25 +57,30 @@ const getOptions = (...srcOpt: any[]) => {
enableModifiersForNumbers: false, enableModifiersForNumbers: false,
}, },
}, },
}; ...props.options,
},
return videojs.obj.merge(options, ...srcOpt); // onReady callback
}; async () => {
// player.value!.log("onPlayerReady", this);
// Attempting to fix the issue of being unable to play .MKV format video files
const getSourceType = (source: string) => {
const fileExtension = source ? source.split("?")[0].split(".").pop() : "";
if (fileExtension?.toLowerCase() === "mkv") {
return "video/mp4";
} }
return ""; );
}; // TODO: need to test on mobile
// @ts-ignore
player.value!.mobileUi();
});
onBeforeUnmount(() => {
if (player.value) {
player.value.dispose();
player.value = null;
}
});
const subLabel = (subUrl: string) => { const subLabel = (subUrl: string) => {
let url: URL; let url: URL;
try { try {
url = new URL(subUrl); url = new URL(subUrl);
} catch { } catch (_) {
// treat it as a relative url // treat it as a relative url
// we only need this for filename // we only need this for filename
url = new URL(subUrl, window.location.origin); url = new URL(subUrl, window.location.origin);
@ -140,35 +95,6 @@ const subLabel = (subUrl: string) => {
return label; return label;
}; };
interface LanguageImports {
[key: string]: () => Promise<any>;
}
const languageImports: LanguageImports = {
he: () => import("video.js/dist/lang/he.json"),
hu: () => import("video.js/dist/lang/hu.json"),
ar: () => import("video.js/dist/lang/ar.json"),
de: () => import("video.js/dist/lang/de.json"),
el: () => import("video.js/dist/lang/el.json"),
en: () => import("video.js/dist/lang/en.json"),
es: () => import("video.js/dist/lang/es.json"),
fr: () => import("video.js/dist/lang/fr.json"),
it: () => import("video.js/dist/lang/it.json"),
ja: () => import("video.js/dist/lang/ja.json"),
ko: () => import("video.js/dist/lang/ko.json"),
"nl-be": () => import("video.js/dist/lang/nl.json"),
pl: () => import("video.js/dist/lang/pl.json"),
"pt-br": () => import("video.js/dist/lang/pt-BR.json"),
pt: () => import("video.js/dist/lang/pt-PT.json"),
ro: () => import("video.js/dist/lang/ro.json"),
ru: () => import("video.js/dist/lang/ru.json"),
sk: () => import("video.js/dist/lang/sk.json"),
tr: () => import("video.js/dist/lang/tr.json"),
uk: () => import("video.js/dist/lang/uk.json"),
"zh-cn": () => import("video.js/dist/lang/zh-CN.json"),
"zh-tw": () => import("video.js/dist/lang/zh-TW.json"),
};
</script> </script>
<style scoped> <style scoped>
.video-max { .video-max {

View File

@ -1,6 +1,5 @@
<template> <template>
<VueFinalModal <VueFinalModal
class="vfm-modal"
overlay-transition="vfm-fade" overlay-transition="vfm-fade"
content-transition="vfm-fade" content-transition="vfm-fade"
@closed="layoutStore.closeHovers" @closed="layoutStore.closeHovers"
@ -8,6 +7,7 @@
initialFocus: '#focus-prompt', initialFocus: '#focus-prompt',
fallbackFocus: 'div.vfm__content', fallbackFocus: 'div.vfm__content',
}" }"
style="z-index: 9999999"
> >
<slot /> <slot />
</VueFinalModal> </VueFinalModal>

View File

@ -82,10 +82,10 @@ export default {
...mapActions(useLayoutStore, ["showHover", "closeHovers"]), ...mapActions(useLayoutStore, ["showHover", "closeHovers"]),
copy: async function (event) { copy: async function (event) {
event.preventDefault(); event.preventDefault();
const items = []; let items = [];
// Create a new promise for each file. // Create a new promise for each file.
for (const item of this.selected) { for (let item of this.selected) {
items.push({ items.push({
from: this.req.items[item].url, from: this.req.items[item].url,
to: this.dest + encodeURIComponent(this.req.items[item].name), to: this.dest + encodeURIComponent(this.req.items[item].name),
@ -93,7 +93,7 @@ export default {
}); });
} }
const action = async (overwrite, rename) => { let action = async (overwrite, rename) => {
buttons.loading("copy"); buttons.loading("copy");
await api await api
@ -122,8 +122,8 @@ export default {
return; return;
} }
const dstItems = (await api.fetch(this.dest)).items; let dstItems = (await api.fetch(this.dest)).items;
const conflict = upload.checkConflict(items, dstItems); let conflict = upload.checkConflict(items, dstItems);
let overwrite = false; let overwrite = false;
let rename = false; let rename = false;

View File

@ -74,8 +74,8 @@ export default {
return; return;
} }
const promises = []; let promises = [];
for (const index of this.selected) { for (let index of this.selected) {
promises.push(api.remove(this.req.items[index].url)); promises.push(api.remove(this.req.items[index].url));
} }

View File

@ -17,7 +17,7 @@
</button> </button>
<button <button
class="button button--flat" class="button button--flat"
@click="layoutStore.currentPrompt?.confirm" @click="layoutStore.currentPrompt?.confirm()"
tabindex="2" tabindex="2"
> >
{{ t("buttons.delete") }} {{ t("buttons.delete") }}

View File

@ -43,7 +43,7 @@ export default {
submit: async function () { submit: async function () {
this.updateRequest(null); this.updateRequest(null);
const uri = url.removeLastDir(this.$route.path) + "/"; let uri = url.removeLastDir(this.$route.path) + "/";
this.$router.push({ path: uri }); this.$router.push({ path: uri });
}, },
}, },

View File

@ -80,7 +80,7 @@ export default {
// Otherwise we add every directory to the // Otherwise we add every directory to the
// move options. // move options.
for (const item of req.items) { for (let item of req.items) {
if (!item.isDir) continue; if (!item.isDir) continue;
this.items.push({ this.items.push({
@ -93,12 +93,12 @@ export default {
// Retrieves the URL of the directory the user // Retrieves the URL of the directory the user
// just clicked in and fill the options with its // just clicked in and fill the options with its
// content. // content.
const uri = event.currentTarget.dataset.url; let uri = event.currentTarget.dataset.url;
files.fetch(uri).then(this.fillOptions).catch(this.$showError); files.fetch(uri).then(this.fillOptions).catch(this.$showError);
}, },
touchstart(event) { touchstart(event) {
const url = event.currentTarget.dataset.url; let url = event.currentTarget.dataset.url;
// In 300 milliseconds, we shall reset the count. // In 300 milliseconds, we shall reset the count.
setTimeout(() => { setTimeout(() => {

View File

@ -124,7 +124,7 @@ export default {
let sum = 0; let sum = 0;
for (const selected of this.selected) { for (let selected of this.selected) {
sum += this.req.items[selected].size; sum += this.req.items[selected].size;
} }

View File

@ -81,9 +81,9 @@ export default {
...mapActions(useLayoutStore, ["showHover", "closeHovers"]), ...mapActions(useLayoutStore, ["showHover", "closeHovers"]),
move: async function (event) { move: async function (event) {
event.preventDefault(); event.preventDefault();
const items = []; let items = [];
for (const item of this.selected) { for (let item of this.selected) {
items.push({ items.push({
from: this.req.items[item].url, from: this.req.items[item].url,
to: this.dest + encodeURIComponent(this.req.items[item].name), to: this.dest + encodeURIComponent(this.req.items[item].name),
@ -91,7 +91,7 @@ export default {
}); });
} }
const action = async (overwrite, rename) => { let action = async (overwrite, rename) => {
buttons.loading("move"); buttons.loading("move");
await api await api
@ -106,8 +106,8 @@ export default {
}); });
}; };
const dstItems = (await api.fetch(this.dest)).items; let dstItems = (await api.fetch(this.dest)).items;
const conflict = upload.checkConflict(items, dstItems); let conflict = upload.checkConflict(items, dstItems);
let overwrite = false; let overwrite = false;
let rename = false; let rename = false;

View File

@ -3,7 +3,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { watch } from "vue"; import { ref, watch } from "vue";
import { ModalsContainer, useModal } from "vue-final-modal"; import { ModalsContainer, useModal } from "vue-final-modal";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { useLayoutStore } from "@/stores/layout"; import { useLayoutStore } from "@/stores/layout";
@ -30,6 +30,8 @@ const layoutStore = useLayoutStore();
const { currentPromptName } = storeToRefs(layoutStore); const { currentPromptName } = storeToRefs(layoutStore);
const closeModal = ref<() => Promise<string>>();
const components = new Map<string, any>([ const components = new Map<string, any>([
["info", Info], ["info", Info],
["help", Help], ["help", Help],
@ -50,6 +52,11 @@ const components = new Map<string, any>([
]); ]);
watch(currentPromptName, (newValue) => { watch(currentPromptName, (newValue) => {
if (closeModal.value) {
closeModal.value();
closeModal.value = undefined;
}
const modal = components.get(newValue!); const modal = components.get(newValue!);
if (!modal) return; if (!modal) return;
@ -60,7 +67,7 @@ watch(currentPromptName, (newValue) => {
}, },
}); });
layoutStore.setCloseOnPrompt(close, newValue!); closeModal.value = close;
open(); open();
}); });

View File

@ -196,23 +196,13 @@ export default {
methods: { methods: {
...mapActions(useLayoutStore, ["closeHovers"]), ...mapActions(useLayoutStore, ["closeHovers"]),
copyToClipboard: function (text) { copyToClipboard: function (text) {
copy({ text }).then( copy(text).then(
() => { () => {
// clipboard successfully set // clipboard successfully set
this.$showSuccess(this.$t("success.linkCopied")); this.$showSuccess(this.$t("success.linkCopied"));
}, },
() => { () => {
// clipboard write failed // clipboard write failed
copy({ text }, { permission: true }).then(
() => {
// clipboard successfully set
this.$showSuccess(this.$t("success.linkCopied"));
},
(e) => {
// clipboard write failed
this.$showError(e);
}
);
} }
); );
}, },

View File

@ -48,10 +48,12 @@ const layoutStore = useLayoutStore();
// TODO: this is a copy of the same function in FileListing.vue // TODO: this is a copy of the same function in FileListing.vue
const uploadInput = (event: Event) => { const uploadInput = (event: Event) => {
const files = (event.currentTarget as HTMLInputElement)?.files; layoutStore.closeHovers();
let files = (event.currentTarget as HTMLInputElement)?.files;
if (files === null) return; if (files === null) return;
const folder_upload = !!files[0].webkitRelativePath; let folder_upload = !!files[0].webkitRelativePath;
const uploadFiles: UploadList = []; const uploadFiles: UploadList = [];
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
@ -66,8 +68,8 @@ const uploadInput = (event: Event) => {
}); });
} }
const path = route.path.endsWith("/") ? route.path : route.path + "/"; let path = route.path.endsWith("/") ? route.path : route.path + "/";
const conflict = upload.checkConflict(uploadFiles, fileStore.req!.items); let conflict = upload.checkConflict(uploadFiles, fileStore.req!.items);
if (conflict) { if (conflict) {
layoutStore.showHover({ layoutStore.showHover({

View File

@ -10,12 +10,6 @@
<div class="upload-info"> <div class="upload-info">
<div class="upload-speed">{{ uploadSpeed.toFixed(2) }} MB/s</div> <div class="upload-speed">{{ uploadSpeed.toFixed(2) }} MB/s</div>
<div class="upload-eta">{{ formattedETA }} remaining</div> <div class="upload-eta">{{ formattedETA }} remaining</div>
<div class="upload-percentage">
{{ getProgressDecimal }}% Completed
</div>
<div class="upload-fraction">
{{ getTotalProgressBytes }} / {{ getTotalSize }}
</div>
</div> </div>
<button <button
class="action" class="action"
@ -78,10 +72,6 @@ export default {
"filesInUploadCount", "filesInUploadCount",
"uploadSpeed", "uploadSpeed",
"getETA", "getETA",
"getProgress",
"getProgressDecimal",
"getTotalProgressBytes",
"getTotalSize",
]), ]),
...mapWritableState(useFileStore, ["reload"]), ...mapWritableState(useFileStore, ["reload"]),
formattedETA() { formattedETA() {
@ -117,11 +107,3 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.upload-info {
min-width: 19ch;
width: auto;
text-align: left;
}
</style>

View File

@ -13,12 +13,11 @@ export default {
name: "languages", name: "languages",
props: ["locale"], props: ["locale"],
data() { data() {
const dataObj = {}; let dataObj = {};
const locales = { const locales = {
he: "עברית", he: "עברית",
hu: "Magyar", hu: "Magyar",
ar: "العربية", ar: "العربية",
ca: "Català",
de: "Deutsch", de: "Deutsch",
el: "Ελληνικά", el: "Ελληνικά",
en: "English", en: "English",

View File

@ -39,7 +39,7 @@ export default {
methods: { methods: {
remove(event, index) { remove(event, index) {
event.preventDefault(); event.preventDefault();
const rules = [...this.rules]; let rules = [...this.rules];
rules.splice(index, 1); rules.splice(index, 1);
this.$emit("update:rules", [...rules]); this.$emit("update:rules", [...rules]);
}, },

View File

@ -7,7 +7,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import type { SelectHTMLAttributes } from "vue"; import { SelectHTMLAttributes } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
const { t } = useI18n(); const { t } = useI18n();
@ -17,6 +17,7 @@ defineProps<{
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(e: "update:theme", val: string | null): void; (e: "update:theme", val: string | null): void;
}>(); }>();

View File

@ -116,7 +116,7 @@ watch(createUserDirData, () => {
if (props.user?.scope) { if (props.user?.scope) {
props.user.scope = createUserDirData.value props.user.scope = createUserDirData.value
? "" ? ""
: (originalUserScope.value ?? ""); : originalUserScope.value ?? "";
} }
}); });
</script> </script>

View File

@ -6,22 +6,15 @@
background: var(--surfacePrimary); background: var(--surfacePrimary);
color: var(--textPrimary); color: var(--textPrimary);
z-index: 9999; z-index: 9999;
background: var(--dividerSecondary); background: rgba(127, 127, 127, 0.1);
transition: 0.2s ease background; transition: 0.2s ease background;
cursor: ns-resize; cursor: ns-resize;
touch-action: none; touch-action: none;
user-select: none; user-select: none;
width: 100%;
}
.shell__divider {
background: rgba(127, 127, 127, 0.3);
width: 100%;
height: 8px;
} }
.shell__divider:hover { .shell__divider:hover {
background: rgba(127, 127, 127, 0.9); background: rgba(127, 127, 127, 0.4);
} }
.shell__content { .shell__content {
@ -41,7 +34,7 @@
top: 0px; top: 0px;
left: 0px; left: 0px;
z-index: 9998; z-index: 9998;
background-color: var(--dividerPrimary); background-color: rgba(0, 0, 0, 0.05);
} }
body.rtl .shell-content { body.rtl .shell-content {
@ -82,5 +75,4 @@ body.rtl .shell-content {
font-family: inherit; font-family: inherit;
white-space: pre-wrap; white-space: pre-wrap;
width: 100%; width: 100%;
color: var(--textSecondary);
} }

View File

@ -31,8 +31,6 @@
--hover: rgba(0, 0, 0, 0.1); --hover: rgba(0, 0, 0, 0.1);
--borderPrimary: rgba(0, 0, 0, 0.1); --borderPrimary: rgba(0, 0, 0, 0.1);
--borderSecondary: rgba(0, 0, 0, 0.2); --borderSecondary: rgba(0, 0, 0, 0.2);
--dividerPrimary: rgba(255, 255, 255, 0.4);
--dividerSecondary: rgba(255, 255, 255, 0.9);
} }
:root.dark { :root.dark {
@ -53,6 +51,4 @@
--hover: rgba(255, 255, 255, 0.1); --hover: rgba(255, 255, 255, 0.1);
--borderPrimary: rgba(255, 255, 255, 0.05); --borderPrimary: rgba(255, 255, 255, 0.05);
--borderSecondary: rgba(255, 255, 255, 0.15); --borderSecondary: rgba(255, 255, 255, 0.15);
--dividerPrimary: rgba(30, 30, 30, 0.4);
--dividerSecondary: rgba(30, 30, 30, 0.6);
} }

View File

@ -178,7 +178,3 @@ html[dir="rtl"] .breadcrumbs a {
.vue-number-input__button::after { .vue-number-input__button::after {
background: var(--textSecondary) !important; background: var(--textSecondary) !important;
} }
.vfm-modal {
z-index: 9999999 !important;
}

View File

@ -1,78 +0,0 @@
.epub-reader {
display: flex;
align-items: flex-end;
height: 100%;
}
.epub-reader .container {
width: 100%;
max-width: 100%;
height: calc(100% - 64px);
margin: 0;
}
.epub-reader .arrow.pre {
left: 0;
}
.epub-reader .readerArea {
background-color: var(--background) !important;
}
.epub-reader .titleArea {
color: var(--text);
}
.epub-reader .tocButtonBar {
background: var(--divider);
}
.epub-reader .tocButton {
color: var(--text);
}
.epub-reader .tocButton.tocButtonExpanded {
background-color: var(--background);
}
.epub-reader .tocAreaButton.active {
color: var(--blue);
border-color: var(--dark-blue);
}
.epub-reader .tocArea {
background-color: var(--background);
}
.epub-reader .readerArea .arrow {
color: var(--text);
}
.epub-reader .readerArea .arrow:hover {
color: var(--hover);
}
.epub-reader .size {
display: flex;
gap: 5px;
align-items: center;
z-index: 111;
right: 25px;
outline: none;
position: absolute;
top: 78px;
}
.epub-reader .size span {
color: var(--textSecondary);
}
.epub-reader .size button {
background: none;
outline: none;
border: none;
width: 25px;
height: 25px;
color: var(--textPrimary);
padding: 0;
}

View File

@ -63,8 +63,8 @@
local("Roboto"), local("Roboto"),
local("Roboto-Regular"), local("Roboto-Regular"),
url(../assets/fonts/roboto/normal-latin-ext.woff2) format("woff2"); url(../assets/fonts/roboto/normal-latin-ext.woff2) format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F,
U+2C60-2C7F, U+A720-A7FF; U+A720-A7FF;
} }
@font-face { @font-face {
@ -142,8 +142,8 @@
local("Roboto Medium"), local("Roboto Medium"),
local("Roboto-Medium"), local("Roboto-Medium"),
url(../assets/fonts/roboto/medium-latin-ext.woff2) format("woff2"); url(../assets/fonts/roboto/medium-latin-ext.woff2) format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F,
U+2C60-2C7F, U+A720-A7FF; U+A720-A7FF;
} }
@font-face { @font-face {
@ -221,8 +221,8 @@
local("Roboto Bold"), local("Roboto Bold"),
local("Roboto-Bold"), local("Roboto-Bold"),
url(../assets/fonts/roboto/bold-latin-ext.woff2) format("woff2"); url(../assets/fonts/roboto/bold-latin-ext.woff2) format("woff2");
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F,
U+2C60-2C7F, U+A720-A7FF; U+A720-A7FF;
} }
@font-face { @font-face {

View File

@ -5,7 +5,7 @@
.file-icons [aria-label^="."] { .file-icons [aria-label^="."] {
opacity: 0.33; opacity: 0.33;
} }
.file-icons [data-ext=".bak"] { .file-icons [aria-label$=".bak"] {
opacity: 0.33; opacity: 0.33;
} }
@ -33,117 +33,117 @@
/* #f90 - Image */ /* #f90 - Image */
.file-icons [data-ext=".ai"] i::before, .file-icons [aria-label$=".ai"] i::before,
.file-icons [data-ext=".odg"] i::before, .file-icons [aria-label$=".odg"] i::before,
.file-icons [data-ext=".xcf"] i::before { .file-icons [aria-label$=".xcf"] i::before {
content: "image"; content: "image";
} }
/* #f90 - Presentation */ /* #f90 - Presentation */
.file-icons [data-ext=".odp"] i::before, .file-icons [aria-label$=".odp"] i::before,
.file-icons [data-ext=".ppt"] i::before, .file-icons [aria-label$=".ppt"] i::before,
.file-icons [data-ext=".pptx"] i::before { .file-icons [aria-label$=".pptx"] i::before {
content: "slideshow"; content: "slideshow";
} }
/* #0f0 - Spreadsheet/Database */ /* #0f0 - Spreadsheet/Database */
.file-icons [data-ext=".csv"] i::before, .file-icons [aria-label$=".csv"] i::before,
.file-icons [data-ext=".db"] i::before, .file-icons [aria-label$=".db"] i::before,
.file-icons [data-ext=".odb"] i::before, .file-icons [aria-label$=".odb"] i::before,
.file-icons [data-ext=".ods"] i::before, .file-icons [aria-label$=".ods"] i::before,
.file-icons [data-ext=".xls"] i::before, .file-icons [aria-label$=".xls"] i::before,
.file-icons [data-ext=".xlsx"] i::before { .file-icons [aria-label$=".xlsx"] i::before {
content: "border_all"; content: "border_all";
} }
/* #00f - Document */ /* #00f - Document */
.file-icons [data-ext=".doc"] i::before, .file-icons [aria-label$=".doc"] i::before,
.file-icons [data-ext=".docx"] i::before, .file-icons [aria-label$=".docx"] i::before,
.file-icons [data-ext=".log"] i::before, .file-icons [aria-label$=".log"] i::before,
.file-icons [data-ext=".odt"] i::before, .file-icons [aria-label$=".odt"] i::before,
.file-icons [data-ext=".rtf"] i::before { .file-icons [aria-label$=".rtf"] i::before {
content: "description"; content: "description";
} }
/* #999 - Code */ /* #999 - Code */
.file-icons [data-ext=".c"] i::before, .file-icons [aria-label$=".c"] i::before,
.file-icons [data-ext=".cpp"] i::before, .file-icons [aria-label$=".cpp"] i::before,
.file-icons [data-ext=".cs"] i::before, .file-icons [aria-label$=".cs"] i::before,
.file-icons [data-ext=".css"] i::before, .file-icons [aria-label$=".css"] i::before,
.file-icons [data-ext=".go"] i::before, .file-icons [aria-label$=".go"] i::before,
.file-icons [data-ext=".h"] i::before, .file-icons [aria-label$=".h"] i::before,
.file-icons [data-ext=".html"] i::before, .file-icons [aria-label$=".html"] i::before,
.file-icons [data-ext=".java"] i::before, .file-icons [aria-label$=".java"] i::before,
.file-icons [data-ext=".js"] i::before, .file-icons [aria-label$=".js"] i::before,
.file-icons [data-ext=".json"] i::before, .file-icons [aria-label$=".json"] i::before,
.file-icons [data-ext=".kt"] i::before, .file-icons [aria-label$=".kt"] i::before,
.file-icons [data-ext=".php"] i::before, .file-icons [aria-label$=".php"] i::before,
.file-icons [data-ext=".py"] i::before, .file-icons [aria-label$=".py"] i::before,
.file-icons [data-ext=".rb"] i::before, .file-icons [aria-label$=".rb"] i::before,
.file-icons [data-ext=".rs"] i::before, .file-icons [aria-label$=".rs"] i::before,
.file-icons [data-ext=".vue"] i::before, .file-icons [aria-label$=".vue"] i::before,
.file-icons [data-ext=".xml"] i::before, .file-icons [aria-label$=".xml"] i::before,
.file-icons [data-ext=".yml"] i::before { .file-icons [aria-label$=".yml"] i::before {
content: "code"; content: "code";
} }
/* #999 - Executable */ /* #999 - Executable */
.file-icons [data-ext=".apk"] i::before, .file-icons [aria-label$=".apk"] i::before,
.file-icons [data-ext=".bat"] i::before, .file-icons [aria-label$=".bat"] i::before,
.file-icons [data-ext=".exe"] i::before, .file-icons [aria-label$=".exe"] i::before,
.file-icons [data-ext=".jar"] i::before, .file-icons [aria-label$=".jar"] i::before,
.file-icons [data-ext=".ps1"] i::before, .file-icons [aria-label$=".ps1"] i::before,
.file-icons [data-ext=".sh"] i::before { .file-icons [aria-label$=".sh"] i::before {
content: "web_asset"; content: "web_asset";
} }
/* #999 - Installer */ /* #999 - Installer */
.file-icons [data-ext=".deb"] i::before, .file-icons [aria-label$=".deb"] i::before,
.file-icons [data-ext=".msi"] i::before, .file-icons [aria-label$=".msi"] i::before,
.file-icons [data-ext=".pkg"] i::before, .file-icons [aria-label$=".pkg"] i::before,
.file-icons [data-ext=".rpm"] i::before { .file-icons [aria-label$=".rpm"] i::before {
content: "archive"; content: "archive";
} }
/* #999 - Compressed */ /* #999 - Compressed */
.file-icons [data-ext=".7z"] i::before, .file-icons [aria-label$=".7z"] i::before,
.file-icons [data-ext=".bz2"] i::before, .file-icons [aria-label$=".bz2"] i::before,
.file-icons [data-ext=".cab"] i::before, .file-icons [aria-label$=".cab"] i::before,
.file-icons [data-ext=".gz"] i::before, .file-icons [aria-label$=".gz"] i::before,
.file-icons [data-ext=".rar"] i::before, .file-icons [aria-label$=".rar"] i::before,
.file-icons [data-ext=".tar"] i::before, .file-icons [aria-label$=".tar"] i::before,
.file-icons [data-ext=".xz"] i::before, .file-icons [aria-label$=".xz"] i::before,
.file-icons [data-ext=".zip"] i::before, .file-icons [aria-label$=".zip"] i::before,
.file-icons [data-ext=".zst"] i::before { .file-icons [aria-label$=".zst"] i::before {
content: "folder_zip"; content: "folder_zip";
} }
/* #999 - Disk */ /* #999 - Disk */
.file-icons [data-ext=".ccd"] i::before, .file-icons [aria-label$=".ccd"] i::before,
.file-icons [data-ext=".dmg"] i::before, .file-icons [aria-label$=".dmg"] i::before,
.file-icons [data-ext=".iso"] i::before, .file-icons [aria-label$=".iso"] i::before,
.file-icons [data-ext=".mdf"] i::before, .file-icons [aria-label$=".mdf"] i::before,
.file-icons [data-ext=".vdi"] i::before, .file-icons [aria-label$=".vdi"] i::before,
.file-icons [data-ext=".vhd"] i::before, .file-icons [aria-label$=".vhd"] i::before,
.file-icons [data-ext=".vmdk"] i::before, .file-icons [aria-label$=".vmdk"] i::before,
.file-icons [data-ext=".wim"] i::before { .file-icons [aria-label$=".wim"] i::before {
content: "album"; content: "album";
} }
/* #999 - Font */ /* #999 - Font */
.file-icons [data-ext=".otf"] i::before, .file-icons [aria-label$=".otf"] i::before,
.file-icons [data-ext=".ttf"] i::before, .file-icons [aria-label$=".ttf"] i::before,
.file-icons [data-ext=".woff"] i::before, .file-icons [aria-label$=".woff"] i::before,
.file-icons [data-ext=".woff2"] i::before { .file-icons [aria-label$=".woff2"] i::before {
content: "font_download"; content: "font_download";
} }
@ -166,77 +166,77 @@
/* #f00 - Adobe/Oracle */ /* #f00 - Adobe/Oracle */
.file-icons [data-ext=".ai"] i, .file-icons [aria-label$=".ai"] i,
.file-icons [data-ext=".java"] i, .file-icons [aria-label$=".java"] i,
.file-icons [data-ext=".jar"] i, .file-icons [aria-label$=".jar"] i,
.file-icons [data-ext=".psd"] i, .file-icons [aria-label$=".psd"] i,
.file-icons [data-ext=".rb"] i, .file-icons [aria-label$=".rb"] i,
.file-icons [data-ext=".pdf"] i { .file-icons [data-type="pdf"] i {
color: var(--icon-red); color: var(--icon-red);
} }
/* #f90 - Image/Presentation */ /* #f90 - Image/Presentation */
.file-icons [data-ext=".html"] i, .file-icons [aria-label$=".html"] i,
.file-icons [data-ext=".odg"] i, .file-icons [aria-label$=".odg"] i,
.file-icons [data-ext=".odp"] i, .file-icons [aria-label$=".odp"] i,
.file-icons [data-ext=".ppt"] i, .file-icons [aria-label$=".ppt"] i,
.file-icons [data-ext=".pptx"] i, .file-icons [aria-label$=".pptx"] i,
.file-icons [data-ext=".vue"] i, .file-icons [aria-label$=".vue"] i,
.file-icons [data-ext=".xcf"] i { .file-icons [aria-label$=".xcf"] i {
color: var(--icon-orange); color: var(--icon-orange);
} }
/* #ff0 - Various */ /* #ff0 - Various */
.file-icons [data-ext=".css"] i, .file-icons [aria-label$=".css"] i,
.file-icons [data-ext=".js"] i, .file-icons [aria-label$=".js"] i,
.file-icons [data-ext=".json"] i, .file-icons [aria-label$=".json"] i,
.file-icons [data-ext=".zip"] i { .file-icons [aria-label$=".zip"] i {
color: var(--icon-yellow); color: var(--icon-yellow);
} }
/* #0f0 - Spreadsheet/Google */ /* #0f0 - Spreadsheet/Google */
.file-icons [data-ext=".apk"] i, .file-icons [aria-label$=".apk"] i,
.file-icons [data-ext=".dex"] i, .file-icons [aria-label$=".dex"] i,
.file-icons [data-ext=".go"] i, .file-icons [aria-label$=".go"] i,
.file-icons [data-ext=".ods"] i, .file-icons [aria-label$=".ods"] i,
.file-icons [data-ext=".xls"] i, .file-icons [aria-label$=".xls"] i,
.file-icons [data-ext=".xlsx"] i { .file-icons [aria-label$=".xlsx"] i {
color: var(--icon-green); color: var(--icon-green);
} }
/* #00f - Document/Microsoft/Apple/Closed */ /* #00f - Document/Microsoft/Apple/Closed */
.file-icons [data-ext=".aac"] i, .file-icons [aria-label$=".aac"] i,
.file-icons [data-ext=".bat"] i, .file-icons [aria-label$=".bat"] i,
.file-icons [data-ext=".cab"] i, .file-icons [aria-label$=".cab"] i,
.file-icons [data-ext=".cs"] i, .file-icons [aria-label$=".cs"] i,
.file-icons [data-ext=".dmg"] i, .file-icons [aria-label$=".dmg"] i,
.file-icons [data-ext=".doc"] i, .file-icons [aria-label$=".doc"] i,
.file-icons [data-ext=".docx"] i, .file-icons [aria-label$=".docx"] i,
.file-icons [data-ext=".emf"] i, .file-icons [aria-label$=".emf"] i,
.file-icons [data-ext=".exe"] i, .file-icons [aria-label$=".exe"] i,
.file-icons [data-ext=".ico"] i, .file-icons [aria-label$=".ico"] i,
.file-icons [data-ext=".mp2"] i, .file-icons [aria-label$=".mp2"] i,
.file-icons [data-ext=".mp3"] i, .file-icons [aria-label$=".mp3"] i,
.file-icons [data-ext=".mp4"] i, .file-icons [aria-label$=".mp4"] i,
.file-icons [data-ext=".mpg"] i, .file-icons [aria-label$=".mpg"] i,
.file-icons [data-ext=".msi"] i, .file-icons [aria-label$=".msi"] i,
.file-icons [data-ext=".odt"] i, .file-icons [aria-label$=".odt"] i,
.file-icons [data-ext=".ps1"] i, .file-icons [aria-label$=".ps1"] i,
.file-icons [data-ext=".rtf"] i, .file-icons [aria-label$=".rtf"] i,
.file-icons [data-ext=".vob"] i, .file-icons [aria-label$=".vob"] i,
.file-icons [data-ext=".wim"] i { .file-icons [aria-label$=".wim"] i {
color: var(--icon-blue); color: var(--icon-blue);
} }
/* #60f - Various */ /* #60f - Various */
.file-icons [data-ext=".iso"] i, .file-icons [aria-label$=".iso"] i,
.file-icons [data-ext=".php"] i, .file-icons [aria-label$=".php"] i,
.file-icons [data-ext=".rar"] i { .file-icons [aria-label$=".rar"] i {
color: var(--icon-violet); color: var(--icon-violet);
} }

View File

@ -195,10 +195,6 @@ html[dir="rtl"] #listing {
align-items: center; align-items: center;
} }
#listing.list .item p.name:not(#listing.list .item.header .name) {
margin-right: -3em;
}
#listing.list .item .name { #listing.list .item .name {
width: 50%; width: 50%;
} }
@ -231,6 +227,10 @@ html[dir="rtl"] #listing {
width: 0; width: 0;
} }
#listing.list .item.header .name {
margin-right: 3em;
}
#listing.list .header a { #listing.list .header a {
color: inherit; color: inherit;
} }
@ -241,9 +241,10 @@ html[dir="rtl"] #listing {
#listing.list .name { #listing.list .name {
font-weight: normal; font-weight: normal;
word-wrap: break-word; }
word-break: break-all;
white-space: pre-wrap; #listing.list .item.header .name {
margin-right: 3em;
} }
#listing.list .header span { #listing.list .header span {

View File

@ -1,13 +0,0 @@
.md_preview {
overflow-y: auto;
max-height: 80vh;
padding: 1rem;
border: 1px solid #000;
font-size: 20px;
line-height: 1.2;
}
#preview-container {
overflow: auto;
max-height: 80vh; /* Match the max-height of md_preview for scrolling */
}

View File

@ -15,8 +15,6 @@
@import "./dashboard.css"; @import "./dashboard.css";
@import "./login.css"; @import "./login.css";
@import "./mobile.css"; @import "./mobile.css";
@import "./epubReader.css";
@import "./mdPreview.css";
/* For testing only /* For testing only
:focus { :focus {
@ -236,10 +234,6 @@ main .spinner .bounce2 {
height: 100%; height: 100%;
} }
#previewer .vjs-error-display {
margin-top: 40%;
}
#previewer .preview .info { #previewer .preview .info {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -271,7 +265,6 @@ main .spinner .bounce2 {
#previewer .pdf { #previewer .pdf {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 4em;
} }
#previewer h2.message { #previewer h2.message {

View File

@ -195,6 +195,8 @@
"newPassword": "كلمة المرور الجديدة", "newPassword": "كلمة المرور الجديدة",
"newPasswordConfirm": "تأكيد كلمة المرور", "newPasswordConfirm": "تأكيد كلمة المرور",
"newUser": "مستخدم جديد", "newUser": "مستخدم جديد",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "كلمة المرور", "password": "كلمة المرور",
"passwordUpdated": "تم تغيير كلمة المرور!", "passwordUpdated": "تم تغيير كلمة المرور!",
"path": "المسار", "path": "المسار",

View File

@ -1,264 +0,0 @@
{
"buttons": {
"cancel": "Cancel·lar",
"clear": "Netejar",
"close": "Tancar",
"continue": "Continuar",
"copy": "Copiar",
"copyFile": "Copiar fitxer",
"copyToClipboard": "Copiar al porta-retalls",
"copyDownloadLinkToClipboard": "Copiar l'enllaç de descàrrega al portapapers",
"create": "Crear",
"delete": "Esborrar",
"download": "Descarregar",
"file": "Fitxer",
"folder": "Carpeta",
"fullScreen": "Canviar a pantalla completa",
"hideDotfiles": "Ocultar fitxers que comencen per punt",
"info": "Info",
"more": "Més",
"move": "Moure",
"moveFile": "Moure fitxer",
"new": "Nou",
"next": "Següent",
"ok": "D'acord",
"permalink": "Enllaç permanent",
"previous": "Anterior",
"publish": "Publicar",
"rename": "Reanomenar",
"replace": "Substituir",
"reportIssue": "Reportar problema",
"save": "Desar",
"schedule": "Programar",
"search": "Cercar",
"select": "Seleccionar",
"selectMultiple": "Selecció múltiple",
"share": "Compartir",
"shell": "Prem Enter per cercar...",
"submit": "Enviar",
"switchView": "Canviar vista",
"toggleSidebar": "Mostrar/ocultar menú",
"update": "Actualitzar",
"upload": "Pujar",
"openFile": "Obrir fitxer",
"discardChanges": "Descartar"
},
"download": {
"downloadFile": "Descarregar fitxer",
"downloadFolder": "Descarregar directori",
"downloadSelected": "Descarregar seleccionats"
},
"upload": {
"abortUpload": "Are you sure you wish to abort?"
},
"errors": {
"forbidden": "No tens els permisos necessaris per accedir.",
"internal": "La veritat és que alguna cosa ha anat malament.",
"notFound": "No es pot accedir a aquest lloc.",
"connection": "No es pot accedir al servidor."
},
"files": {
"body": "Cos",
"closePreview": "Tancar vista prèvia",
"files": "Fitxers",
"folders": "Carpetes",
"home": "Inici",
"lastModified": "Última modificació",
"loading": "Carregant...",
"lonely": "Un se sent molt sol aquí...",
"metadata": "Metadades",
"multipleSelectionEnabled": "Selecció múltiple activada",
"name": "Nom",
"size": "Mida",
"sortByLastModified": "Ordenar per última modificació",
"sortByName": "Ordenar per nom",
"sortBySize": "Ordenar per mida",
"noPreview": "La vista prèvia no està disponible per a aquest fitxer."
},
"help": {
"click": "seleccionar fitxer o carpeta",
"ctrl": {
"click": "seleccionar múltiples fitxers o carpetes",
"f": "obre la cerca",
"s": "desa un fitxer o el descarrega a la carpeta en què estàs"
},
"del": "elimina els ítems seleccionats",
"doubleClick": "obre un fitxer o carpeta",
"esc": "neteja la selecció i/o tanca la finestra",
"f1": "aquesta informació",
"f2": "reanomenar fitxer",
"help": "Ajuda"
},
"login": {
"createAnAccount": "Crear un compte",
"loginInstead": "Usuari ja existent",
"password": "Contrasenya",
"passwordConfirm": "Confirmació de contrasenya",
"passwordsDontMatch": "Les contrasenyes no coincideixen",
"signup": "Registra't",
"submit": "Iniciar sessió",
"username": "Usuari",
"usernameTaken": "Nom d'usuari no disponible",
"wrongCredentials": "Usuari i/o contrasenya incorrectes"
},
"permanent": "Permanent",
"prompts": {
"copy": "Copiar",
"copyMessage": "Tria el lloc on vols copiar els teus fitxers:",
"currentlyNavigating": "Actualment estàs a:",
"deleteMessageMultiple": "Estàs segur que vols eliminar {count} fitxer(s)?",
"deleteMessageSingle": "Estàs segur que vols eliminar aquest fitxer/carpeta?",
"deleteMessageShare": "Estàs segur que vols eliminar aquest recurs compartit ({path})?",
"deleteUser": "Esteu segur que voleu eliminar aquest usuari?",
"deleteTitle": "Esborrar fitxers",
"displayName": "Nom:",
"download": "Descarregar fitxers",
"downloadMessage": "Tria el format de descàrrega.",
"error": "Alguna cosa ha fallat",
"fileInfo": "Informació del fitxer",
"filesSelected": "{count} fitxers seleccionats.",
"lastModified": "Última modificació",
"move": "Moure",
"moveMessage": "Tria una nova casa per als teus fitxers/carpeta(s):",
"newArchetype": "Crea un nou post basat en un arquetip. El teu fitxer serà creat a la carpeta de contingut.",
"newDir": "Nova carpeta",
"newDirMessage": "Escriu el nom de la nova carpeta.",
"newFile": "Nou fitxer",
"newFileMessage": "Escriu el nom del nou fitxer.",
"numberDirs": "Nombre de carpetes",
"numberFiles": "Nombre de fitxers",
"rename": "Reanomenar",
"renameMessage": "Escriu el nou nom per a",
"replace": "Substituir",
"replaceMessage": "Un dels fitxers que intentes pujar està creant conflicte pel seu nom. Vols canviar el nom del ja existent?\n",
"schedule": "Programar",
"scheduleMessage": "Tria una hora i data per programar la publicació d'aquest post.",
"show": "Mostrar",
"size": "Mida",
"upload": "Pujar",
"uploadFiles": "Pujant {files} fitxers...",
"uploadMessage": "Seleccioneu una opció per pujar.",
"optionalPassword": "Contrasenya opcional",
"resolution": "Resolució",
"discardEditorChanges": "Esteu segur que voleu descartar els canvis que heu fet?"
},
"search": {
"images": "Imatges",
"music": "Música",
"pdf": "PDF",
"pressToSearch": "Prem Enter per cercar...",
"search": "Cercar...",
"typeToSearch": "Escriu per fer una cerca...",
"types": "Tipus",
"video": "Vídeo"
},
"settings": {
"admin": "Admin",
"administrator": "Administrador",
"allowCommands": "Executar comandes",
"allowEdit": "Editar, reanomenar i esborrar fitxers o carpetes",
"allowNew": "Crear nous fitxers i carpetes",
"allowPublish": "Publicar nous posts i pàgines",
"allowSignup": "Permetre registre d'usuaris",
"avoidChanges": "(deixar en blanc per evitar canvis)",
"branding": "Marca",
"brandingDirectoryPath": "Ruta de la carpeta de personalització de marca",
"brandingHelp": "Pots personalitzar com es veu la teva instància de FileBrowser canviant-li el nom, reemplaçant el logotip, afegint estils personalitzats i fins i tot deshabilitant els enllaços externs que apunten cap a GitHub. \nPer a més informació sobre personalització de marca, si us plau revisa el {0}.",
"changePassword": "Canviar contrasenya",
"commandRunner": "Executor de comandes",
"commandRunnerHelp": "Aquí pots establir les comandes que s'executen en els esdeveniments anomenats. Has d'escriure'n una per línia. Les variables d'entorn {0} i {1} estaran disponibles, sent {0} relativa a {1}. Per a més informació sobre aquesta característica i les variables d'entorn disponibles, si us plau llegeix el {2}.",
"commandsUpdated": "Comandes actualitzades!",
"createUserDir": "Crea automàticament una carpeta d'inici quan s'afegeix un usuari",
"tusUploads": "Càrregues a trossos",
"tusUploadsHelp": "El File Browser suporta càrregues de fitxers a trossos, permetent la creació de càrregues de fitxers eficients, fiables, reanudables i a trossos fins i tot en xarxes poc fiables.",
"tusUploadsChunkSize": "Indica la mida màxima d'una sol·licitud (s'utilitzaran càrregues directes per a càrregues més petites). Podeu introduir un enter pla que indiqui la mida en bytes o una cadena com 10MB, 1GB, etc.",
"tusUploadsRetryCount": "Nombre de reintents a realitzar si una part falla en carregar-se.",
"userHomeBasePath": "Ruta base per als directoris personals dels usuaris",
"userScopeGenerationPlaceholder": "L'àmbit es generarà automàticament",
"createUserHomeDirectory": "Crear el directori principal de l'usuari",
"customStylesheet": "Modificar full d'estils",
"defaultUserDescription": "Aquestes són les configuracions per defecte per a nous usuaris.",
"disableExternalLinks": "Deshabilitar enllaços externs (excepte documentació)",
"disableUsedDiskPercentage": "Desactivar el gràfic de percentatge de disc utilitzat",
"documentation": "documentació",
"examples": "Exemples",
"executeOnShell": "Executar a la shell",
"executeOnShellDescription": "Per defecte, FileBrowser executa les comandes cridant directament els seus binaris. Si vols executar-los en una shell en lloc (com Bash o PowerShell), pots definir-ho aquí amb els arguments i flags necessaris. Si es defineix, la comanda que s'executa s'afegirà com a argument. Això s'aplica tant a les comandes d'usuari com als ganxos d'esdeveniments.",
"globalRules": "Es tracta d'un conjunt global de regles de permís i rebuig. S'apliquen a tots els usuaris. Pots definir regles específiques en la configuració de cada usuari per anul·lar aquestes.",
"globalSettings": "Ajustos globals",
"hideDotfiles": "Ocultar fitxers que comencen per punt",
"insertPath": "Introdueix la ruta",
"insertRegex": "Introduir expressió regular",
"instanceName": "Nom de la instància",
"language": "Idioma",
"lockPassword": "Evitar que l'usuari canviï la contrasenya",
"newPassword": "La teva nova contrasenya",
"newPasswordConfirm": "Confirma la teva contrasenya",
"newUser": "Nou usuari",
"password": "Contrasenya",
"passwordUpdated": "Contrasenya actualitzada!",
"path": "Ruta",
"perm": {
"create": "Crear fitxers i directoris",
"delete": "Eliminar fitxers i directoris",
"download": "Descarregar",
"execute": "Executar comandes",
"modify": "Editar fitxers",
"rename": "Reanomenar o moure fitxers i directoris",
"share": "Compartir fitxers"
},
"permissions": "Permisos",
"permissionsHelp": "Pots nomenar l'usuari com a administrador o triar els permisos individualment. Si selecciones \"Administrador\", totes les altres opcions s'activaran automàticament. L'administració d'usuaris és un privilegi d'administrador.\n",
"profileSettings": "Ajustos del perfil",
"ruleExample1": "prevé l'accés a una extensió de fitxer (Com .git) en cada carpeta.\n",
"ruleExample2": "bloqueja l'accés al fitxer anomenat Caddyfile a la carpeta arrel.",
"rules": "Regles",
"rulesHelp": "Aquí pots definir un conjunt de regles de permisos per a aquest usuari específic. Els fitxers bloquejats no es mostraran en les llistes i no seran accessibles per l'usuari. Pots utilitzar regex i rutes relatives a l'arrel de l'usuari.\n",
"scope": "Arrel",
"setDateFormat": "Establir el format exacte de la data",
"settingsUpdated": "Ajustos actualitzats!",
"shareDuration": "Compartir Duració",
"shareManagement": "Gestió Compartida",
"shareDeleted": "Recurs compartit eliminat!",
"singleClick": "Utilitza un sol clic per obrir fitxers i directoris",
"themes": {
"default": "Valor per defecte del sistema",
"dark": "Fosc",
"light": "Clar",
"title": "Tema"
},
"user": "Usuari",
"userCommands": "Comandes",
"userCommandsHelp": "Una llista separada per espais amb les comandes permeses per a aquest usuari. Exemple:\n",
"userCreated": "Usuari creat!",
"userDefaults": "Configuració d'usuari per defecte",
"userDeleted": "Usuari eliminat!",
"userManagement": "Administració d'usuaris",
"userUpdated": "Usuari actualitzat!",
"username": "Usuari",
"users": "Usuaris"
},
"sidebar": {
"help": "Ajuda",
"hugoNew": "Nou Hugo",
"login": "Iniciar sessió",
"logout": "Tancar sessió",
"myFiles": "Els meus fitxers",
"newFile": "Nou fitxer",
"newFolder": "Nova carpeta",
"preview": "Vista prèvia",
"settings": "Ajustos",
"signup": "Registra't",
"siteSettings": "Ajustos del lloc"
},
"success": {
"linkCopied": "Enllaç copiat!"
},
"time": {
"days": "Dies",
"hours": "Hores",
"minutes": "Minuts",
"seconds": "Segons",
"unit": "Unitat"
}
}

View File

@ -1,264 +0,0 @@
{
"buttons": {
"cancel": "Zrušit",
"clear": "Vymazat",
"close": "Zavřít",
"continue": "Pokračovat",
"copy": "Kopírovat",
"copyFile": "Kopírovat soubor",
"copyToClipboard": "Kopírovat do schránky",
"copyDownloadLinkToClipboard": "Kopírovat odkaz na stažení do schránky",
"create": "Vytvořit",
"delete": "Smazat",
"download": "Stáhnout",
"file": "Soubor",
"folder": "Složka",
"fullScreen": "Přepnout na celou obrazovku",
"hideDotfiles": "Skrýt skryté soubory",
"info": "Informace",
"more": "Více",
"move": "Přesunout",
"moveFile": "Přesunout soubor",
"new": "Nový",
"next": "Další",
"ok": "OK",
"permalink": "Získat trvalý odkaz",
"previous": "Předchozí",
"publish": "Publikovat",
"rename": "Přejmenovat",
"replace": "Nahradit",
"reportIssue": "Nahlásit problém",
"save": "Uložit",
"schedule": "Naplánovat",
"search": "Hledat",
"select": "Vybrat",
"selectMultiple": "Vybrat více",
"share": "Sdílet",
"shell": "Přepnout shell",
"submit": "Odeslat",
"switchView": "Přepnout zobrazení",
"toggleSidebar": "Přepnout postranní panel",
"update": "Aktualizovat",
"upload": "Nahrát",
"openFile": "Otevřít soubor",
"discardChanges": "Zrušit změny"
},
"download": {
"downloadFile": "Stáhnout soubor",
"downloadFolder": "Stáhnout složku",
"downloadSelected": "Stáhnout vybrané"
},
"upload": {
"abortUpload": "Opravdu chcete přerušit nahrávání?"
},
"errors": {
"forbidden": "Nemáte oprávnění k přístupu.",
"internal": "Nastala vážná chyba.",
"notFound": "Tuto lokaci nelze najít.",
"connection": "Server nelze dosáhnout."
},
"files": {
"body": "Tělo",
"closePreview": "Zavřít náhled",
"files": "Soubory",
"folders": "Složky",
"home": "Domů",
"lastModified": "Naposledy změněno",
"loading": "Načítání...",
"lonely": "Je tu osaměle...",
"metadata": "Metadata",
"multipleSelectionEnabled": "Vícenásobný výběr povolen",
"name": "Název",
"size": "Velikost",
"sortByLastModified": "Seřadit podle poslední změny",
"sortByName": "Seřadit podle názvu",
"sortBySize": "Seřadit podle velikosti",
"noPreview": "Náhled pro tento soubor není k dispozici."
},
"help": {
"click": "vyberte soubor nebo adresář",
"ctrl": {
"click": "vybrat více souborů nebo adresářů",
"f": "otevřít vyhledávání",
"s": "uložit soubor nebo stáhnout adresář, kde se nacházíte"
},
"del": "smazat vybrané položky",
"doubleClick": "otevřít soubor nebo adresář",
"esc": "zrušit výběr a/nebo zavřít výzvu",
"f1": "tato informace",
"f2": "přejmenovat soubor",
"help": "Nápověda"
},
"login": {
"createAnAccount": "Vytvořit účet",
"loginInstead": "Již máte účet",
"password": "Heslo",
"passwordConfirm": "Potvrzení hesla",
"passwordsDontMatch": "Hesla se neshodují",
"signup": "Registrace",
"submit": "Přihlásit se",
"username": "Uživatelské jméno",
"usernameTaken": "Uživatelské jméno již existuje",
"wrongCredentials": "Nesprávné přihlašovací údaje"
},
"permanent": "Trvalý",
"prompts": {
"copy": "Kopírovat",
"copyMessage": "Vyberte místo, kam chcete soubory kopírovat:",
"currentlyNavigating": "Aktuálně navigujete v:",
"deleteMessageMultiple": "Opravdu chcete smazat {count} soubor(ů)?",
"deleteMessageSingle": "Opravdu chcete smazat tento soubor/složku?",
"deleteMessageShare": "Opravdu chcete smazat toto sdílení({path})?",
"deleteUser": "Opravdu chcete smazat tohoto uživatele?",
"deleteTitle": "Smazat soubory",
"displayName": "Zobrazované jméno:",
"download": "Stáhnout soubory",
"downloadMessage": "Vyberte formát, který chcete stáhnout.",
"error": "Něco se pokazilo",
"fileInfo": "Informace o souboru",
"filesSelected": "{count} souborů vybráno.",
"lastModified": "Naposledy změněno",
"move": "Přesunout",
"moveMessage": "Vyberte nové umístění pro váš soubor(y)/složku(y):",
"newArchetype": "Vytvořit nový příspěvek na základě archetypu. Váš soubor bude vytvořen ve složce content.",
"newDir": "Nový adresář",
"newDirMessage": "Pojmenujte svůj nový adresář.",
"newFile": "Nový soubor",
"newFileMessage": "Pojmenujte svůj nový soubor.",
"numberDirs": "Počet adresářů",
"numberFiles": "Počet souborů",
"rename": "Přejmenovat",
"renameMessage": "Vložte nový název pro",
"replace": "Nahradit",
"replaceMessage": "Jeden ze souborů, které se snažíte nahrát, má konfliktní název. Chcete tento soubor přeskočit a pokračovat v nahrávání, nebo nahradit stávající?",
"schedule": "Naplánovat",
"scheduleMessage": "Vyberte datum a čas pro naplánování publikace tohoto příspěvku.",
"show": "Zobrazit",
"size": "Velikost",
"upload": "Nahrát",
"uploadFiles": "Nahrávání {files} souborů...",
"uploadMessage": "Vyberte možnost pro nahrání.",
"optionalPassword": "Volitelné heslo",
"resolution": "Rozlišení",
"discardEditorChanges": "Opravdu chcete zrušit provedené změny?"
},
"search": {
"images": "Obrázky",
"music": "Hudba",
"pdf": "PDF",
"pressToSearch": "Stiskněte enter pro hledání...",
"search": "Hledat...",
"typeToSearch": "Zadejte pro hledání...",
"types": "Typy",
"video": "Video"
},
"settings": {
"admin": "Admin",
"administrator": "Administrátor",
"allowCommands": "Povolit příkazy",
"allowEdit": "Upravit, přejmenovat a mazat soubory nebo adresáře",
"allowNew": "Vytvářet nové soubory a adresáře",
"allowPublish": "Publikovat nové příspěvky a stránky",
"allowSignup": "Povolit uživatelům registraci",
"avoidChanges": "(ponechte prázdné pro zabránění změnám)",
"branding": "Branding",
"brandingDirectoryPath": "Cesta ke složce s brandingem",
"brandingHelp": "Můžete přizpůsobit vzhled a dojem z vaší instance File Browseru změnou názvu, nahrazením loga, přidáním vlastních stylů a dokonce zakázat externí odkazy na GitHub.\nPro více informací o přizpůsobení brandingu se podívejte na {0}.",
"changePassword": "Změnit heslo",
"commandRunner": "Spouštění příkazů",
"commandRunnerHelp": "Zde můžete nastavit příkazy, které se spustí při určených událostech. Každý příkaz musí být na samostatném řádku. Budou k dispozici proměnné prostředí {0} a {1}, přičemž {0} se vztahuje na {1}. Pro více informací o této funkci a dostupných proměnných prostředí si přečtěte {2}.",
"commandsUpdated": "Příkazy aktualizovány!",
"createUserDir": "Automaticky vytvořit domovskou složku uživatele při přidání nového uživatele",
"tusUploads": "Nahrávání po částech",
"tusUploadsHelp": "File Browser podporuje nahrávání souborů po částech, což umožňuje vytváření efektivních, spolehlivých, obnovitelných a rozdělených nahrávek souborů i na nespolehlivých sítích.",
"tusUploadsChunkSize": "Maximální velikost požadavku (přímé nahrávání bude použito pro menší nahrávky). Můžete zadat prosté číslo označující velikost v bajtech nebo řetězec jako 10MB, 1GB atd.",
"tusUploadsRetryCount": "Počet pokusů o opakování, pokud se nahrání části nezdaří.",
"userHomeBasePath": "Základní cesta pro domovské adresáře uživatelů",
"userScopeGenerationPlaceholder": "Rozsah bude automaticky vygenerován",
"createUserHomeDirectory": "Vytvořit domovský adresář uživatele",
"customStylesheet": "Vlastní stylový soubor",
"defaultUserDescription": "Toto jsou výchozí nastavení pro nové uživatele.",
"disableExternalLinks": "Zakázat externí odkazy (kromě dokumentace)",
"disableUsedDiskPercentage": "Zakázat graf s procentem využitého disku",
"documentation": "dokumentace",
"examples": "Příklady",
"executeOnShell": "Spustit na shellu",
"executeOnShellDescription": "Ve výchozím nastavení File Browser spouští příkazy přímo voláním jejich binárek. Pokud je chcete spouštět na shellu (např. Bash nebo PowerShell), můžete to zde definovat s požadovanými argumenty a příznaky. Pokud je nastaveno, příkaz, který spustíte, bude přidán jako argument. To platí jak pro uživatelské příkazy, tak pro háky událostí.",
"globalRules": "Jedná se o globální sadu povolení a zakázání pravidel. Platí pro každého uživatele. Specifická pravidla můžete definovat v nastaveních každého uživatele, aby přepsala tato pravidla.",
"globalSettings": "Globální nastavení",
"hideDotfiles": "Skrýt skryté soubory",
"insertPath": "Vložte cestu",
"insertRegex": "Vložte regex výraz",
"instanceName": "Název instance",
"language": "Jazyk",
"lockPassword": "Zabránit uživateli ve změně hesla",
"newPassword": "Vaše nové heslo",
"newPasswordConfirm": "Potvrďte své nové heslo",
"newUser": "Nový uživatel",
"password": "Heslo",
"passwordUpdated": "Heslo bylo aktualizováno!",
"path": "Cesta",
"perm": {
"create": "Vytvářet soubory a adresáře",
"delete": "Mazat soubory a adresáře",
"download": "Stahovat",
"execute": "Spouštět příkazy",
"modify": "Upravit soubory",
"rename": "Přejmenovat nebo přesunout soubory a adresáře",
"share": "Sdílet soubory"
},
"permissions": "Oprávnění",
"permissionsHelp": "Můžete nastavit uživatele jako administrátora nebo zvolit jednotlivá oprávnění. Pokud vyberete \"Administrátor\", všechny ostatní možnosti budou automaticky zaškrtnuty. Správa uživatelů zůstává výsadou administrátora.\n",
"profileSettings": "Nastavení profilu",
"ruleExample1": "zabraňuje přístupu k jakémukoli skrytému souboru (např. .git, .gitignore) v každé složce.\n",
"ruleExample2": "blokuje přístup k souboru s názvem Caddyfile v kořenovém adresáři.",
"rules": "Pravidla",
"rulesHelp": "Zde můžete definovat sadu povolení a zakázání pravidel pro tohoto konkrétního uživatele. Blokované soubory se nebudou zobrazovat v seznamech a uživatel k nim nebude mít přístup. Podporujeme regex a cesty relativní k rozsahu uživatele.\n",
"scope": "Rozsah",
"setDateFormat": "Nastavit přesný formát data",
"settingsUpdated": "Nastavení aktualizována!",
"shareDuration": "Doba sdílení",
"shareManagement": "Správa sdílení",
"shareDeleted": "Sdílení bylo smazáno!",
"singleClick": "Použít jediné kliknutí pro otevření souborů a adresářů",
"themes": {
"default": "Systémové výchozí",
"dark": "Tmavý",
"light": "Světlý",
"title": "Motiv"
},
"user": "Uživatel",
"userCommands": "Příkazy",
"userCommandsHelp": "Seznam dostupných příkazů pro tohoto uživatele oddělený mezerami. Příklad:\n",
"userCreated": "Uživatel vytvořen!",
"userDefaults": "Výchozí nastavení uživatele",
"userDeleted": "Uživatel smazán!",
"userManagement": "Správa uživatelů",
"userUpdated": "Uživatel aktualizován!",
"username": "Uživatelské jméno",
"users": "Uživatelé"
},
"sidebar": {
"help": "Nápověda",
"hugoNew": "Hugo Nový",
"login": "Přihlásit se",
"logout": "Odhlásit se",
"myFiles": "Moje soubory",
"newFile": "Nový soubor",
"newFolder": "Nová složka",
"preview": "Náhled",
"settings": "Nastavení",
"signup": "Registrace",
"siteSettings": "Nastavení webu"
},
"success": {
"linkCopied": "Odkaz zkopírován!"
},
"time": {
"days": "Dny",
"hours": "Hodiny",
"minutes": "Minuty",
"seconds": "Sekundy",
"unit": "Časová jednotka"
}
}

View File

@ -46,7 +46,7 @@
}, },
"errors": { "errors": {
"forbidden": "Sie haben keine Berechtigung dies abzurufen.", "forbidden": "Sie haben keine Berechtigung dies abzurufen.",
"internal": "Etwas ist schiefgelaufen.", "internal": "Etwas ist schief gelaufen.",
"notFound": "Dieser Ort kann nicht angezeigt werden.", "notFound": "Dieser Ort kann nicht angezeigt werden.",
"connection": "Der Server ist nicht erreichbar." "connection": "Der Server ist nicht erreichbar."
}, },
@ -73,7 +73,7 @@
"ctrl": { "ctrl": {
"click": "Markiere mehrere Dateien oder Ordner", "click": "Markiere mehrere Dateien oder Ordner",
"f": "Öffnet eine neue Suche", "f": "Öffnet eine neue Suche",
"s": "Speichert eine Datei oder einen Ordner am aktuellen Ort" "s": "Speichert eine Datei oder einen Ordner am akutellen Ort"
}, },
"del": "Löscht die ausgewählten Elemente", "del": "Löscht die ausgewählten Elemente",
"doubleClick": "Öffnet eine Datei oder einen Ordner", "doubleClick": "Öffnet eine Datei oder einen Ordner",
@ -106,7 +106,7 @@
"displayName": "Anzeigename:", "displayName": "Anzeigename:",
"download": "Lade Dateien", "download": "Lade Dateien",
"downloadMessage": "Wählen Sie ein Format zum Herunterladen aus.", "downloadMessage": "Wählen Sie ein Format zum Herunterladen aus.",
"error": "Etwas ist schiefgelaufen", "error": "Etwas ist schief gelaufen",
"fileInfo": "Dateiinformation", "fileInfo": "Dateiinformation",
"filesSelected": "{count} Dateien ausgewählt.", "filesSelected": "{count} Dateien ausgewählt.",
"lastModified": "Zuletzt geändert", "lastModified": "Zuletzt geändert",
@ -150,13 +150,13 @@
"allowNew": "Erstellen neuer Dateien und Ordner", "allowNew": "Erstellen neuer Dateien und Ordner",
"allowPublish": "Veröffentlichen von neuen Beiträgen und Seiten", "allowPublish": "Veröffentlichen von neuen Beiträgen und Seiten",
"allowSignup": "Erlaube Benutzern sich zu registrieren", "allowSignup": "Erlaube Benutzern sich zu registrieren",
"avoidChanges": "(leer lassen, um Änderungen zu vermeiden)", "avoidChanges": "(leer lassen um Änderungen zu vermeiden)",
"branding": "Design", "branding": "Design",
"brandingDirectoryPath": "Designverzeichnispfad", "brandingDirectoryPath": "Designverzeichnispfad",
"brandingHelp": "Sie können das Erscheinungsbild Ihres File Browser anpassen, in dem Sie den Namen ändern, das Logo austauschen oder eigene Stile definieren und sogar externe Links zu GitHub deaktivieren.\nUm mehr Informationen zum Anpassen des Designs zu bekommen, gehen Sie bitte zu {0}.", "brandingHelp": "Sie können das Erscheinungsbild Ihres File Browser anpassen, in dem Sie den Namen ändern, das Logo austauchsen oder eigene Stile definieren und sogar externe Links zu GitHub deaktivieren.\nUm mehr Informationen zum Anpassen des Designs zu bekommen, gehen Sie bitte zu {0}.",
"changePassword": "Passwort ändern", "changePassword": "Passwort ändern",
"commandRunner": "Befehlseingabe", "commandRunner": "Befehlseingabe",
"commandRunnerHelp": "Hier könne Sie Befehle eintragen, welche bei den benannten Aktionen ausgeführt werden. Sie müssen pro Zeile jeweils einen Befehl eingeben. Die Umgebungsvariable {0} und {1} sind verfügbar, wobei {0} relative zu {1} ist. Für mehr Informationen über diese Funktion und die verfügbaren Umgebungsvariablen lesen Sie bitte die {2}.", "commandRunnerHelp": "Hier könne Sie Befehle eintragen, welche bei den benannten Aktionen ausgeführt werden. Sie müssen pro Zeile jeweils einen Befehl eingeben. Die Umgebungsvariable {0} und {1} sind verfügbar, wobei {0} relative zu {1} ist. Für mehr Informationen über diese Funktion und die verfügbaren Umgebungsvariablen, lesen Sie bitte die {2}.",
"commandsUpdated": "Befehle aktualisiert!", "commandsUpdated": "Befehle aktualisiert!",
"createUserDir": "Automatisches Erstellen des Home-Verzeichnisses beim Anlegen neuer Benutzer", "createUserDir": "Automatisches Erstellen des Home-Verzeichnisses beim Anlegen neuer Benutzer",
"tusUploads": "Gestückelter Upload", "tusUploads": "Gestückelter Upload",
@ -170,7 +170,7 @@
"documentation": "Dokumentation", "documentation": "Dokumentation",
"examples": "Beispiele", "examples": "Beispiele",
"executeOnShell": "In Shell ausführen", "executeOnShell": "In Shell ausführen",
"executeOnShellDescription": "Es ist voreingestellt, dass der File Brower Befehle ausführt, indem er die Befehlsdateien direkt aufruft. Wenn Sie wollen, dass sie über einer Kommandozeile (wie Bash oder PowerShell) laufen, könne Sie diese hier definieren mit allen benötigten Argumenten und Optionen. Wenn gesetzt, wird das Kommando das ausgeführt werden soll als Parameter angehängt. Das gilt für Benutzerkommandos sowie auch für Ereignisse.", "executeOnShellDescription": "Es ist voreingestellt das der File Brower Befehle ausführt in dem er die Befehlsdateien direkt aufruft. Wenn Sie wollen, dass sie über einer Kommandozeile (wie Bash oder PowerShell) laufen, könne Sie diese hier definieren mit allen bennötigten Argumenten und Optionen. Wenn gesetzt, wird das Kommando das ausgeführt werden soll als Parameter angehängt. Das gilt für Benuzerkommandos sowie auch für Ereignisse.",
"globalRules": "Das ist ein globales Set von Regeln die erlauben oder nicht erlauben. Die sind für alle Benutzer zutreffend. Es können spezielle Regeln in den Einstellungen der Benutzer definiert werden, die diese überschreiben.", "globalRules": "Das ist ein globales Set von Regeln die erlauben oder nicht erlauben. Die sind für alle Benutzer zutreffend. Es können spezielle Regeln in den Einstellungen der Benutzer definiert werden, die diese überschreiben.",
"globalSettings": "Globale Einstellungen", "globalSettings": "Globale Einstellungen",
"hideDotfiles": "Versteckte Dateien ausblenden", "hideDotfiles": "Versteckte Dateien ausblenden",
@ -182,6 +182,8 @@
"newPassword": "Ihr neues Passwort.", "newPassword": "Ihr neues Passwort.",
"newPasswordConfirm": "Bestätigen Sie Ihr neues Passwort", "newPasswordConfirm": "Bestätigen Sie Ihr neues Passwort",
"newUser": "Neuer Benutzer", "newUser": "Neuer Benutzer",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Passwort", "password": "Passwort",
"passwordUpdated": "Passwort aktualisiert!", "passwordUpdated": "Passwort aktualisiert!",
"path": "Pfad", "path": "Pfad",
@ -195,7 +197,7 @@
"share": "Datei teilen" "share": "Datei teilen"
}, },
"permissions": "Berechtigungen", "permissions": "Berechtigungen",
"permissionsHelp": "Sie können einem Benutzer Administratorrechte einräumen oder die Berechtigungen individuell festlegen. Wenn Sie \"Administrator\" auswählen, werden alle anderen Rechte automatisch vergeben. Die Nutzerverwaltung kann nur durch einen Administrator erfolgen.\n", "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",
"profileSettings": "Profileinstellungen", "profileSettings": "Profileinstellungen",
"ruleExample1": "Verhindert den Zugang zu versteckten Dateien (dot-Files, wie .git, .gitignore) in allen Ordnern\n", "ruleExample1": "Verhindert den Zugang zu versteckten Dateien (dot-Files, wie .git, .gitignore) in allen Ordnern\n",
"ruleExample2": "blockiert den Zugang auf Dateien mit dem Namen Caddyfile in der Wurzel/Basis des Scopes.", "ruleExample2": "blockiert den Zugang auf Dateien mit dem Namen Caddyfile in der Wurzel/Basis des Scopes.",

View File

@ -24,7 +24,6 @@
"ok": "OK", "ok": "OK",
"permalink": "Get Permanent Link", "permalink": "Get Permanent Link",
"previous": "Previous", "previous": "Previous",
"preview": "Preview",
"publish": "Publish", "publish": "Publish",
"rename": "Rename", "rename": "Rename",
"replace": "Replace", "replace": "Replace",
@ -196,6 +195,9 @@
"newPassword": "Your new password", "newPassword": "Your new password",
"newPasswordConfirm": "Confirm your new password", "newPasswordConfirm": "Confirm your new password",
"newUser": "New User", "newUser": "New User",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"onlyOfficeJwtSecret": "Only Office JWT Secret (works only with https, leave blank to disable)",
"password": "Password", "password": "Password",
"passwordUpdated": "Password updated!", "passwordUpdated": "Password updated!",
"path": "Path", "path": "Path",

View File

@ -173,7 +173,7 @@
"executeOnShellDescription": "Por defecto, FileBrowser ejecuta los comandos llamando directamente a sus binarios. Si quieres ejecutarlos en un shell en su lugar (como Bash o PowerShell), puedes definirlo aquí con los argumentos y banderas (flags) necesarios. Si se define, el comando que se ejecuta se añadirá como argumento. Esto se aplica tanto a los comandos de usuario como a los ganchos de eventos.", "executeOnShellDescription": "Por defecto, FileBrowser ejecuta los comandos llamando directamente a sus binarios. Si quieres ejecutarlos en un shell en su lugar (como Bash o PowerShell), puedes definirlo aquí con los argumentos y banderas (flags) necesarios. Si se define, el comando que se ejecuta se añadirá como argumento. Esto se aplica tanto a los comandos de usuario como a los ganchos de eventos.",
"globalRules": "Se trata de un conjunto global de reglas de permiso y rechazo. Se aplican a todos los usuarios. Puedes definir reglas específicas en la configuración de cada usuario para anular estas.", "globalRules": "Se trata de un conjunto global de reglas de permiso y rechazo. Se aplican a todos los usuarios. Puedes definir reglas específicas en la configuración de cada usuario para anular estas.",
"globalSettings": "Ajustes globales", "globalSettings": "Ajustes globales",
"hideDotfiles": "Ocultar archivos empezados por punto", "hideDotfiles": "",
"insertPath": "Introduce la ruta", "insertPath": "Introduce la ruta",
"insertRegex": "Introducir expresión regular", "insertRegex": "Introducir expresión regular",
"instanceName": "Nombre de la instancia", "instanceName": "Nombre de la instancia",
@ -182,6 +182,8 @@
"newPassword": "Tu nueva contraseña", "newPassword": "Tu nueva contraseña",
"newPasswordConfirm": "Confirma tu contraseña", "newPasswordConfirm": "Confirma tu contraseña",
"newUser": "Nuevo usuario", "newUser": "Nuevo usuario",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Contraseña", "password": "Contraseña",
"passwordUpdated": "¡Contraseña actualizada!", "passwordUpdated": "¡Contraseña actualizada!",
"path": "Ruta", "path": "Ruta",

View File

@ -181,6 +181,8 @@
"newPassword": "Votre nouveau mot de passe", "newPassword": "Votre nouveau mot de passe",
"newPasswordConfirm": "Confirmation du nouveau mot de passe", "newPasswordConfirm": "Confirmation du nouveau mot de passe",
"newUser": "Nouvel Utilisateur", "newUser": "Nouvel Utilisateur",
"onlyOffice": "Intégration Only Office",
"onlyOfficeUrl": "URL vers OnlyOffice (laisser vide pour désactiver)",
"password": "Mot de passe", "password": "Mot de passe",
"passwordUpdated": "Mot de passe mis à jour !", "passwordUpdated": "Mot de passe mis à jour !",
"path": "", "path": "",

View File

@ -142,7 +142,7 @@ export const i18n = createI18n({
export const isRtl = (locale?: string) => { export const isRtl = (locale?: string) => {
// see below // see below
// @ts-expect-error incorrect type when legacy // @ts-ignore
return rtlLanguages.includes(locale || i18n.global.locale.value); return rtlLanguages.includes(locale || i18n.global.locale.value);
}; };
@ -150,7 +150,7 @@ export function setLocale(locale: string) {
dayjs.locale(locale); dayjs.locale(locale);
// according to doc u only need .value if legacy: false but they lied // according to doc u only need .value if legacy: false but they lied
// https://vue-i18n.intlify.dev/guide/essentials/scope.html#local-scope-1 // https://vue-i18n.intlify.dev/guide/essentials/scope.html#local-scope-1
// @ts-expect-error incorrect type when legacy //@ts-ignore
i18n.global.locale.value = locale; i18n.global.locale.value = locale;
} }

View File

@ -169,6 +169,8 @@
"newPassword": "Nýja lykilorðið þitt", "newPassword": "Nýja lykilorðið þitt",
"newPasswordConfirm": "Staðfestu nýja lykilorðið", "newPasswordConfirm": "Staðfestu nýja lykilorðið",
"newUser": "Nýr notandi", "newUser": "Nýr notandi",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Lykilorð", "password": "Lykilorð",
"passwordUpdated": "Lykilorð vistað!", "passwordUpdated": "Lykilorð vistað!",
"path": "", "path": "",

View File

@ -170,6 +170,8 @@
"newPassword": "La tua nuova password", "newPassword": "La tua nuova password",
"newPasswordConfirm": "Conferma la password", "newPasswordConfirm": "Conferma la password",
"newUser": "Nuovo utente", "newUser": "Nuovo utente",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Password", "password": "Password",
"passwordUpdated": "Password aggiornata!", "passwordUpdated": "Password aggiornata!",
"path": "Percorso", "path": "Percorso",

View File

@ -191,6 +191,8 @@
"newPassword": "新しいパスワード", "newPassword": "新しいパスワード",
"newPasswordConfirm": "新しいパスワード(再入力)", "newPasswordConfirm": "新しいパスワード(再入力)",
"newUser": "新規ユーザー作成", "newUser": "新規ユーザー作成",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "パスワード", "password": "パスワード",
"passwordUpdated": "パスワードを更新しました!", "passwordUpdated": "パスワードを更新しました!",
"path": "パス", "path": "パス",

View File

@ -9,7 +9,7 @@
"create": "생성", "create": "생성",
"delete": "삭제", "delete": "삭제",
"download": "다운로드", "download": "다운로드",
"hideDotfiles": "숨김파일(dotfile)을 표시 안함", "hideDotfiles": "",
"info": "정보", "info": "정보",
"more": "더보기", "more": "더보기",
"move": "이동", "move": "이동",
@ -38,7 +38,7 @@
"download": { "download": {
"downloadFile": "파일 다운로드", "downloadFile": "파일 다운로드",
"downloadFolder": "폴더 다운로드", "downloadFolder": "폴더 다운로드",
"downloadSelected": "선택 항목 다운로드" "downloadSelected": ""
}, },
"errors": { "errors": {
"forbidden": "접근 권한이 없습니다.", "forbidden": "접근 권한이 없습니다.",
@ -120,8 +120,8 @@
"scheduleMessage": "이 글을 공개할 시간을 알려주세요.", "scheduleMessage": "이 글을 공개할 시간을 알려주세요.",
"show": "보기", "show": "보기",
"size": "크기", "size": "크기",
"upload": "업로드", "upload": "",
"uploadMessage": "업로드 옵션을 선택하세요." "uploadMessage": ""
}, },
"search": { "search": {
"images": "이미지", "images": "이미지",
@ -160,7 +160,7 @@
"executeOnShellDescription": "기본적으로 File Browser 는 바이너리를 명령어로 호출하여 실행합니다. 쉘을 통해 실행하기를 원한다면, Bash 또는 PowerShell 에 필요한 인수와 플래그를 설정하세요. 사용자 명령어와 이벤트 훅에 모두 적용됩니다.", "executeOnShellDescription": "기본적으로 File Browser 는 바이너리를 명령어로 호출하여 실행합니다. 쉘을 통해 실행하기를 원한다면, Bash 또는 PowerShell 에 필요한 인수와 플래그를 설정하세요. 사용자 명령어와 이벤트 훅에 모두 적용됩니다.",
"globalRules": "규칙에 대한 전역설정으로 모든 사용자에게 적용됩니다. 지정된 규칙은 사용자 설정을 덮어쓰기 합니다.", "globalRules": "규칙에 대한 전역설정으로 모든 사용자에게 적용됩니다. 지정된 규칙은 사용자 설정을 덮어쓰기 합니다.",
"globalSettings": "전역 설정", "globalSettings": "전역 설정",
"hideDotfiles": "숨김파일(dotfile)을 표시하지 않습니다.", "hideDotfiles": "",
"insertPath": "경로 입력", "insertPath": "경로 입력",
"insertRegex": "정규식 입력", "insertRegex": "정규식 입력",
"instanceName": "인스턴스 이름", "instanceName": "인스턴스 이름",
@ -169,9 +169,11 @@
"newPassword": "새로운 비밀번호", "newPassword": "새로운 비밀번호",
"newPasswordConfirm": "새로운 비밀번호 확인", "newPasswordConfirm": "새로운 비밀번호 확인",
"newUser": "새로운 사용자", "newUser": "새로운 사용자",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "비밀번호", "password": "비밀번호",
"passwordUpdated": "비밀번호 수정 완료!", "passwordUpdated": "비밀번호 수정 완료!",
"path": "경로", "path": "",
"perm": { "perm": {
"create": "파일이나 디렉토리 생성하기", "create": "파일이나 디렉토리 생성하기",
"delete": "화일이나 디렉토리 삭제하기", "delete": "화일이나 디렉토리 삭제하기",
@ -190,13 +192,13 @@
"rulesHelp": "사용자별로 규칙을 허용/방지를 지정할 수 있습니다. 방지된 파일은 보이지 않고 사용자들은 접근할 수 없습니다. 사용자의 접근 허용 범위와 관련해 정규표현식(regex)과 경로를 지원합니다.\n", "rulesHelp": "사용자별로 규칙을 허용/방지를 지정할 수 있습니다. 방지된 파일은 보이지 않고 사용자들은 접근할 수 없습니다. 사용자의 접근 허용 범위와 관련해 정규표현식(regex)과 경로를 지원합니다.\n",
"scope": "범위", "scope": "범위",
"settingsUpdated": "설정 수정됨!", "settingsUpdated": "설정 수정됨!",
"shareDuration": "공유 기간", "shareDuration": "",
"shareManagement": "공유 내역 관리", "shareManagement": "",
"singleClick": "한번 클릭으로 파일과 폴더를 열도록 합니다.", "singleClick": "",
"themes": { "themes": {
"dark": "다크테마", "dark": "",
"light": "라이트테마", "light": "",
"title": "테마" "title": ""
}, },
"user": "사용자", "user": "사용자",
"userCommands": "명령어", "userCommands": "명령어",

View File

@ -169,6 +169,8 @@
"newPassword": "Uw nieuw wachtwoord", "newPassword": "Uw nieuw wachtwoord",
"newPasswordConfirm": "Bevestig uw nieuw wachtwoord", "newPasswordConfirm": "Bevestig uw nieuw wachtwoord",
"newUser": "Nieuwe gebruiker", "newUser": "Nieuwe gebruiker",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Wachtwoord", "password": "Wachtwoord",
"passwordUpdated": "Wachtwoord bijgewerkt!", "passwordUpdated": "Wachtwoord bijgewerkt!",
"path": "", "path": "",

View File

@ -169,6 +169,8 @@
"newPassword": "Twoje nowe hasło", "newPassword": "Twoje nowe hasło",
"newPasswordConfirm": "Potwierdź swoje hasło", "newPasswordConfirm": "Potwierdź swoje hasło",
"newUser": "Nowy Użytkownik", "newUser": "Nowy Użytkownik",
"onlyOffice": "Integracja z Only Office",
"onlyOfficeUrl": "Link do Only Office (w celu wyłączenia usługi, pozostaw puste)",
"password": "Hasło", "password": "Hasło",
"passwordUpdated": "Hasło zostało zapisane!", "passwordUpdated": "Hasło zostało zapisane!",
"path": "Ścieżka", "path": "Ścieżka",

View File

@ -182,6 +182,8 @@
"newPassword": "Nova senha", "newPassword": "Nova senha",
"newPasswordConfirm": "Confirme a nova senha", "newPasswordConfirm": "Confirme a nova senha",
"newUser": "Novo usuário", "newUser": "Novo usuário",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Senha", "password": "Senha",
"passwordUpdated": "Senha atualizada!", "passwordUpdated": "Senha atualizada!",
"path": "", "path": "",

View File

@ -170,6 +170,8 @@
"newPassword": "Nova palavra-passe", "newPassword": "Nova palavra-passe",
"newPasswordConfirm": "Confirme a nova palavra-passe", "newPasswordConfirm": "Confirme a nova palavra-passe",
"newUser": "Novo utilizador", "newUser": "Novo utilizador",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Palavra-passe", "password": "Palavra-passe",
"passwordUpdated": "Palavra-passe atualizada!", "passwordUpdated": "Palavra-passe atualizada!",
"path": "", "path": "",

View File

@ -169,6 +169,8 @@
"newPassword": "Noua ta parolă", "newPassword": "Noua ta parolă",
"newPasswordConfirm": "Confirmă noua parolă", "newPasswordConfirm": "Confirmă noua parolă",
"newUser": "Utilizator nou", "newUser": "Utilizator nou",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Parola", "password": "Parola",
"passwordUpdated": "Parola actualizată!", "passwordUpdated": "Parola actualizată!",
"path": "", "path": "",

View File

@ -177,6 +177,8 @@
"newPassword": "Новый пароль", "newPassword": "Новый пароль",
"newPasswordConfirm": "Повтор нового пароля", "newPasswordConfirm": "Повтор нового пароля",
"newUser": "Новый пользователь", "newUser": "Новый пользователь",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Пароль", "password": "Пароль",
"passwordUpdated": "Пароль обновлен!", "passwordUpdated": "Пароль обновлен!",
"path": "Путь", "path": "Путь",

View File

@ -169,6 +169,8 @@
"newPassword": "Ditt nya lösenord", "newPassword": "Ditt nya lösenord",
"newPasswordConfirm": "Bekräfta ditt nya lösenord", "newPasswordConfirm": "Bekräfta ditt nya lösenord",
"newUser": "Ny användare", "newUser": "Ny användare",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "Lösenord", "password": "Lösenord",
"passwordUpdated": "Lösenord uppdaterat", "passwordUpdated": "Lösenord uppdaterat",
"path": "", "path": "",

View File

@ -36,7 +36,7 @@
"switchView": "Вид", "switchView": "Вид",
"toggleSidebar": "Бічна панель", "toggleSidebar": "Бічна панель",
"update": "Оновити", "update": "Оновити",
"upload": "Вивантажити", "upload": "Завантажити",
"openFile": "Відкрити файл" "openFile": "Відкрити файл"
}, },
"download": { "download": {
@ -102,9 +102,9 @@
"deleteMessageMultiple": "Видалити ці файли ({count})?", "deleteMessageMultiple": "Видалити ці файли ({count})?",
"deleteMessageSingle": "Видалити цей файл/каталог?", "deleteMessageSingle": "Видалити цей файл/каталог?",
"deleteMessageShare": "Видалити цей спільний файл/каталог ({path})?", "deleteMessageShare": "Видалити цей спільний файл/каталог ({path})?",
"deleteTitle": "Видалити файли", "deleteTitle": "Видалити файлы",
"displayName": "Відображене ім'я:", "displayName": "Відображене ім'я:",
"download": "Завантажити файли", "download": "Завантажити файлы",
"downloadMessage": "Виберіть формат, в якому хочете завантажити.", "downloadMessage": "Виберіть формат, в якому хочете завантажити.",
"error": "Помилка", "error": "Помилка",
"fileInfo": "Інформація про файл", "fileInfo": "Інформація про файл",
@ -127,8 +127,8 @@
"scheduleMessage": "Запланувати дату та час публікації.", "scheduleMessage": "Запланувати дату та час публікації.",
"show": "Показати", "show": "Показати",
"size": "Розмір", "size": "Розмір",
"upload": "Вивантажити", "upload": "Завантажити",
"uploadMessage": "Виберіть варіант для вивантаження.", "uploadMessage": "Виберіть варіант для завантаження.",
"optionalPassword": "Необов'язковий пароль" "optionalPassword": "Необов'язковий пароль"
}, },
"search": { "search": {

View File

@ -22,7 +22,6 @@
"ok": "确定", "ok": "确定",
"permalink": "获取永久链接", "permalink": "获取永久链接",
"previous": "上一个", "previous": "上一个",
"preview": "预览",
"publish": "发布", "publish": "发布",
"rename": "重命名", "rename": "重命名",
"replace": "替换", "replace": "替换",
@ -40,9 +39,7 @@
"update": "更新", "update": "更新",
"upload": "上传", "upload": "上传",
"openFile": "打开文件", "openFile": "打开文件",
"continue": "继续", "continue": "继续"
"fullScreen": "切换全屏",
"discardChanges": "放弃更改"
}, },
"download": { "download": {
"downloadFile": "下载文件", "downloadFile": "下载文件",
@ -139,9 +136,7 @@
"uploadFiles": "正在上传 {files} ...", "uploadFiles": "正在上传 {files} ...",
"uploadMessage": "选择上传选项。", "uploadMessage": "选择上传选项。",
"optionalPassword": "密码(选填,不填即无密码)", "optionalPassword": "密码(选填,不填即无密码)",
"resolution": "分辨率", "resolution": "分辨率"
"deleteUser": "你确定要删除这个用户吗?",
"discardEditorChanges": "你确定要放弃所做的更改吗?"
}, },
"search": { "search": {
"images": "图像", "images": "图像",
@ -196,6 +191,8 @@
"newPassword": "你的新密码", "newPassword": "你的新密码",
"newPasswordConfirm": "再次输入以确认你的新密码", "newPasswordConfirm": "再次输入以确认你的新密码",
"newUser": "新建用户", "newUser": "新建用户",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "密码", "password": "密码",
"passwordUpdated": "密码已更新!", "passwordUpdated": "密码已更新!",
"path": "路径", "path": "路径",
@ -223,7 +220,6 @@
"shareDeleted": "分享已删除!", "shareDeleted": "分享已删除!",
"singleClick": "使用单击来打开文件和文件夹", "singleClick": "使用单击来打开文件和文件夹",
"themes": { "themes": {
"default": "系统默认",
"dark": "深色", "dark": "深色",
"light": "浅色", "light": "浅色",
"title": "主题" "title": "主题"

View File

@ -6,13 +6,10 @@
"copy": "複製", "copy": "複製",
"copyFile": "複製檔案", "copyFile": "複製檔案",
"copyToClipboard": "複製到剪貼簿", "copyToClipboard": "複製到剪貼簿",
"copyDownloadLinkToClipboard": "複製到剪貼簿",
"create": "建立", "create": "建立",
"delete": "刪除", "delete": "刪除",
"download": "下載", "download": "下載",
"file": "檔案", "hideDotfiles": "",
"folder": "資料夾",
"hideDotfiles": "隱藏隱藏檔案",
"info": "資訊", "info": "資訊",
"more": "更多", "more": "更多",
"move": "移動", "move": "移動",
@ -33,29 +30,20 @@
"selectMultiple": "選擇多個", "selectMultiple": "選擇多個",
"share": "分享", "share": "分享",
"shell": "切換 shell", "shell": "切換 shell",
"submit": "提交",
"switchView": "切換顯示方式", "switchView": "切換顯示方式",
"toggleSidebar": "切換側邊欄", "toggleSidebar": "切換側邊欄",
"update": "更新", "update": "更新",
"upload": "上傳", "upload": "上傳"
"openFile": "開啟檔案",
"continue": "繼續",
"fullScreen": "切換全螢幕",
"discardChanges": "放棄變更"
}, },
"download": { "download": {
"downloadFile": "下載檔案", "downloadFile": "下載檔案",
"downloadFolder": "下載資料夾", "downloadFolder": "下載資料夾",
"downloadSelected": "下載已選擇" "downloadSelected": ""
},
"upload": {
"abortUpload": "你確定要中止嗎?"
}, },
"errors": { "errors": {
"forbidden": "您無權訪問。", "forbidden": "您無權訪問。",
"internal": "伺服器出了點問題。", "internal": "伺服器出了點問題。",
"notFound": "找不到檔案。", "notFound": "找不到檔案。"
"connection": "無法連接到伺服器。"
}, },
"files": { "files": {
"body": "内容", "body": "内容",
@ -72,8 +60,7 @@
"size": "大小", "size": "大小",
"sortByLastModified": "按最後修改時間排序", "sortByLastModified": "按最後修改時間排序",
"sortByName": "按名稱排序", "sortByName": "按名稱排序",
"sortBySize": "按大小排序", "sortBySize": "按大小排序"
"noPreview": "此檔案無法預覽。"
}, },
"help": { "help": {
"click": "選擇檔案或目錄", "click": "選擇檔案或目錄",
@ -108,7 +95,6 @@
"currentlyNavigating": "目前目錄:", "currentlyNavigating": "目前目錄:",
"deleteMessageMultiple": "你確定要刪除這 {count} 個檔案嗎?", "deleteMessageMultiple": "你確定要刪除這 {count} 個檔案嗎?",
"deleteMessageSingle": "你確定要刪除這個檔案/資料夾嗎?", "deleteMessageSingle": "你確定要刪除這個檔案/資料夾嗎?",
"deleteMessageShare": "你確定要刪除這個分享({path})嗎?",
"deleteTitle": "刪除檔案", "deleteTitle": "刪除檔案",
"displayName": "名稱:", "displayName": "名稱:",
"download": "下載檔案", "download": "下載檔案",
@ -131,16 +117,11 @@
"replace": "替換", "replace": "替換",
"replaceMessage": "您嘗試上傳的檔案中有一個與現有檔案的名稱存在衝突。是否取代現有的同名檔案?", "replaceMessage": "您嘗試上傳的檔案中有一個與現有檔案的名稱存在衝突。是否取代現有的同名檔案?",
"schedule": "計畫", "schedule": "計畫",
"scheduleMessage": "請選擇發佈這篇貼文的日期與時間。", "scheduleMessage": "請選擇發佈這篇貼文的日期。",
"show": "顯示", "show": "顯示",
"size": "大小", "size": "大小",
"upload": "上傳", "upload": "上傳",
"uploadFiles": "正在上傳 {files} ...", "uploadMessage": "選擇上傳項。"
"uploadMessage": "選擇上傳項。",
"optionalPassword": "密碼(選填,不填即無密碼)",
"resolution": "解析度",
"deleteUser": "你確定要刪除這個使用者嗎?",
"discardEditorChanges": "你確定要放棄所做的變更嗎?"
}, },
"search": { "search": {
"images": "影像", "images": "影像",
@ -157,10 +138,10 @@
"administrator": "管理員", "administrator": "管理員",
"allowCommands": "執行命令", "allowCommands": "執行命令",
"allowEdit": "編輯、重命名或刪除檔案/目錄", "allowEdit": "編輯、重命名或刪除檔案/目錄",
"allowNew": "新檔案和目錄", "allowNew": "建新檔案和目錄",
"allowPublish": "發佈新的貼文與頁面", "allowPublish": "發佈新的貼文與頁面",
"allowSignup": "允許使用者註冊", "allowSignup": "允許使用者註冊",
"avoidChanges": "(留空以避免更改)", "avoidChanges": "(留空以避免更改)",
"branding": "品牌", "branding": "品牌",
"brandingDirectoryPath": "品牌資訊資料夾路徑", "brandingDirectoryPath": "品牌資訊資料夾路徑",
"brandingHelp": "您可以通過改變例項名稱更換Logo加入自定義樣式甚至禁用到Github的外部連結來自定義File Browser的外觀和給人的感覺。\n想獲得更多資訊請檢視 {0} 。", "brandingHelp": "您可以通過改變例項名稱更換Logo加入自定義樣式甚至禁用到Github的外部連結來自定義File Browser的外觀和給人的感覺。\n想獲得更多資訊請檢視 {0} 。",
@ -169,24 +150,17 @@
"commandRunnerHelp": "在這裡你可以設定在下面的事件中執行的命令。每行必須寫一條命令。可以在命令中使用環境變數 {0} 和 {1}。關於此功能和可用環境變數的更多資訊,請閱讀{2}.", "commandRunnerHelp": "在這裡你可以設定在下面的事件中執行的命令。每行必須寫一條命令。可以在命令中使用環境變數 {0} 和 {1}。關於此功能和可用環境變數的更多資訊,請閱讀{2}.",
"commandsUpdated": "命令已更新!", "commandsUpdated": "命令已更新!",
"createUserDir": "在新增新使用者的同時自動建立使用者的個人目錄", "createUserDir": "在新增新使用者的同時自動建立使用者的個人目錄",
"tusUploads": "分塊上傳", "customStylesheet": "自定義樣式表",
"tusUploadsHelp": "File Browser 支援分塊上傳,在不佳的網絡環境下也可進行高效、可靠、可續的檔案上傳",
"tusUploadsChunkSize": "分塊上傳大小,例如 10MB 或 1GB",
"tusUploadsRetryCount": "分塊上傳失敗時的重試次數",
"userHomeBasePath": "使用者主目錄的路徑",
"userScopeGenerationPlaceholder": "自動生成目錄範圍",
"createUserHomeDirectory": "建立使用者主目錄",
"customStylesheet": "自定義樣式表CSS",
"defaultUserDescription": "這些是新使用者的預設設定。", "defaultUserDescription": "這些是新使用者的預設設定。",
"disableExternalLinks": "禁止外部連結(幫助文件除外)", "disableExternalLinks": "禁止外部連結(幫助文件除外)",
"disableUsedDiskPercentage": "停用已使用磁碟空間百分比圖", "disableUsedDiskPercentage": "Disable used disk percentage graph",
"documentation": "幫助文件", "documentation": "幫助文件",
"examples": "範例", "examples": "範例",
"executeOnShell": "在Shell中執行", "executeOnShell": "在Shell中執行",
"executeOnShellDescription": "預設情況下File Browser通過直接呼叫命令的二進位制包來執行命令如果想在shell中執行如Bash、PowerShell你可以在這裡定義所使用的shell和參數。如果設定了這個選項所執行的命令會作為參數追加在後面。本選項對使用者命令和事件鉤子都生效。", "executeOnShellDescription": "預設情況下File Browser通過直接呼叫命令的二進位制包來執行命令如果想在shell中執行如Bash、PowerShell你可以在這裡定義所使用的shell和參數。如果設定了這個選項所執行的命令會作為參數追加在後面。本選項對使用者命令和事件鉤子都生效。",
"globalRules": "這是全局允許與禁止規則。它們作用於所有使用者。您可以給每個使用者定義單獨的特殊規則來覆蓋全局規則。", "globalRules": "這是全局允許與禁止規則。它們作用於所有使用者。您可以給每個使用者定義單獨的特殊規則來覆蓋全局規則。",
"globalSettings": "全域設定", "globalSettings": "全域設定",
"hideDotfiles": "隱藏隱藏檔案", "hideDotfiles": "",
"insertPath": "插入路徑", "insertPath": "插入路徑",
"insertRegex": "插入正規表示式", "insertRegex": "插入正規表示式",
"instanceName": "例項名稱", "instanceName": "例項名稱",
@ -195,9 +169,11 @@
"newPassword": "您的新密碼", "newPassword": "您的新密碼",
"newPasswordConfirm": "重輸一遍新密碼", "newPasswordConfirm": "重輸一遍新密碼",
"newUser": "建立使用者", "newUser": "建立使用者",
"onlyOffice": "Only Office Integration",
"onlyOfficeUrl": "Only Office URL (leave blank to disable)",
"password": "密碼", "password": "密碼",
"passwordUpdated": "密碼已更新!", "passwordUpdated": "密碼已更新!",
"path": "路徑", "path": "",
"perm": { "perm": {
"create": "建立檔案和資料夾", "create": "建立檔案和資料夾",
"delete": "刪除檔案和資料夾", "delete": "刪除檔案和資料夾",
@ -215,21 +191,18 @@
"rules": "規則", "rules": "規則",
"rulesHelp": "您可以為該使用者製定一組黑名單或白名單式的規則,被屏蔽的檔案將不會顯示在清單中,使用者也無權限存取,支持相對於目錄範圍的路徑。", "rulesHelp": "您可以為該使用者製定一組黑名單或白名單式的規則,被屏蔽的檔案將不會顯示在清單中,使用者也無權限存取,支持相對於目錄範圍的路徑。",
"scope": "目錄範圍", "scope": "目錄範圍",
"setDateFormat": "顯示精確的日期格式",
"settingsUpdated": "設定已更新!", "settingsUpdated": "設定已更新!",
"shareDuration": "分享期限", "shareDuration": "",
"shareManagement": "分享管理", "shareManagement": "",
"shareDeleted": "分享已刪除!", "singleClick": "",
"singleClick": "使用單擊開啟檔案和目錄",
"themes": { "themes": {
"default": "系統預設",
"dark": "深色", "dark": "深色",
"light": "淺色", "light": "淺色",
"title": "主題" "title": "主題"
}, },
"user": "使用者", "user": "使用者",
"userCommands": "使用者命令Shell 命令)", "userCommands": "使用者命令",
"userCommandsHelp": "指定該使用者可以執行的命令Shell 命令),用空格分隔。例如:", "userCommandsHelp": "指定該使用者可以執行的命令,用空格分隔。例如:",
"userCreated": "使用者已建立!", "userCreated": "使用者已建立!",
"userDefaults": "使用者預設選項", "userDefaults": "使用者預設選項",
"userDeleted": "使用者已刪除!", "userDeleted": "使用者已刪除!",
@ -240,7 +213,7 @@
}, },
"sidebar": { "sidebar": {
"help": "幫助", "help": "幫助",
"hugoNew": "Hugo 新建", "hugoNew": "Hugo New",
"login": "登入", "login": "登入",
"logout": "登出", "logout": "登出",
"myFiles": "我的檔案", "myFiles": "我的檔案",

View File

@ -4,7 +4,7 @@ import VueNumberInput from "@chenfengyuan/vue-number-input";
import VueLazyload from "vue-lazyload"; import VueLazyload from "vue-lazyload";
import { createVfm } from "vue-final-modal"; import { createVfm } from "vue-final-modal";
import Toast, { POSITION, useToast } from "vue-toastification"; import Toast, { POSITION, useToast } from "vue-toastification";
import type { import {
ToastOptions, ToastOptions,
PluginOptions, PluginOptions,
} from "vue-toastification/dist/types/types"; } from "vue-toastification/dist/types/types";

View File

@ -1,5 +1,4 @@
import type { RouteLocation } from "vue-router"; import { RouteLocation, createRouter, createWebHistory } from "vue-router";
import { createRouter, createWebHistory } from "vue-router";
import Login from "@/views/Login.vue"; import Login from "@/views/Login.vue";
import Layout from "@/views/Layout.vue"; import Layout from "@/views/Layout.vue";
import Files from "@/views/Files.vue"; import Files from "@/views/Files.vue";

View File

@ -1,6 +1,6 @@
import { createPinia as _createPinia } from "pinia"; import { createPinia as _createPinia } from "pinia";
import { markRaw } from "vue"; import { markRaw } from "vue";
import type { Router } from "vue-router"; import { Router } from "vue-router";
export default function createPinia(router: Router) { export default function createPinia(router: Router) {
const pinia = _createPinia(); const pinia = _createPinia();

View File

@ -29,12 +29,6 @@ export const useLayoutStore = defineStore("layout", {
toggleShell() { toggleShell() {
this.showShell = !this.showShell; this.showShell = !this.showShell;
}, },
setCloseOnPrompt(closeFunction: () => Promise<string>, onPrompt: string) {
const prompt = this.prompts.find((prompt) => prompt.prompt === onPrompt);
if (prompt) {
prompt.close = closeFunction;
}
},
showHover(value: PopupProps | string) { showHover(value: PopupProps | string) {
if (typeof value !== "object") { if (typeof value !== "object") {
this.prompts.push({ this.prompts.push({
@ -42,7 +36,6 @@ export const useLayoutStore = defineStore("layout", {
confirm: null, confirm: null,
action: undefined, action: undefined,
props: null, props: null,
close: null,
}); });
return; return;
} }
@ -52,7 +45,6 @@ export const useLayoutStore = defineStore("layout", {
confirm: value?.confirm, confirm: value?.confirm,
action: value?.action, action: value?.action,
props: value?.props, props: value?.props,
close: value?.close,
}); });
}, },
showError() { showError() {
@ -61,7 +53,6 @@ export const useLayoutStore = defineStore("layout", {
confirm: null, confirm: null,
action: undefined, action: undefined,
props: null, props: null,
close: null,
}); });
}, },
showSuccess() { showSuccess() {
@ -70,11 +61,10 @@ export const useLayoutStore = defineStore("layout", {
confirm: null, confirm: null,
action: undefined, action: undefined,
props: null, props: null,
close: null,
}); });
}, },
closeHovers() { closeHovers() {
this.prompts.shift()?.close?.(); this.prompts.pop();
}, },
// easily reset state using `$reset` // easily reset state using `$reset`
clearLayout() { clearLayout() {

View File

@ -1,7 +1,7 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { useFileStore } from "./file"; import { useFileStore } from "./file";
import { files as api } from "@/api"; import { files as api } from "@/api";
import { throttle } from "lodash-es"; import throttle from "lodash/throttle";
import buttons from "@/utils/buttons"; import buttons from "@/utils/buttons";
// TODO: make this into a user setting // TODO: make this into a user setting
@ -13,18 +13,6 @@ const beforeUnload = (event: Event) => {
// event.returnValue = ""; // event.returnValue = "";
}; };
// Utility function to format bytes into a readable string
function formatSize(bytes: number): string {
if (bytes === 0) return "0.00 Bytes";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
const i = Math.floor(Math.log(bytes) / Math.log(k));
// Return the rounded size with two decimal places
return (bytes / k ** i).toFixed(2) + " " + sizes[i];
}
export const useUploadStore = defineStore("upload", { export const useUploadStore = defineStore("upload", {
// convert to a function // convert to a function
state: (): { state: (): {
@ -59,31 +47,6 @@ export const useUploadStore = defineStore("upload", {
const sum = state.progress.reduce((acc, val) => +acc + +val) as number; const sum = state.progress.reduce((acc, val) => +acc + +val) as number;
return Math.ceil((sum / totalSize) * 100); return Math.ceil((sum / totalSize) * 100);
}, },
getProgressDecimal: (state) => {
if (state.progress.length === 0) {
return 0;
}
const totalSize = state.sizes.reduce((a, b) => a + b, 0);
// TODO: this looks ugly but it works with ts now
const sum = state.progress.reduce((acc, val) => +acc + +val) as number;
return ((sum / totalSize) * 100).toFixed(2);
},
getTotalProgressBytes: (state) => {
if (state.progress.length === 0 || state.sizes.length === 0) {
return "0 Bytes";
}
const sum = state.progress.reduce((acc, val) => +acc + +val, 0) as number;
return formatSize(sum);
},
getTotalSize: (state) => {
if (state.sizes.length === 0) {
return "0 Bytes";
}
const totalSize = state.sizes.reduce((a, b) => a + b, 0);
return formatSize(totalSize);
},
filesInUploadCount: (state) => { filesInUploadCount: (state) => {
return Object.keys(state.uploads).length + state.queue.length; return Object.keys(state.uploads).length + state.queue.length;
}, },
@ -170,12 +133,12 @@ export const useUploadStore = defineStore("upload", {
async processUploads() { async processUploads() {
const uploadsCount = Object.keys(this.uploads).length; const uploadsCount = Object.keys(this.uploads).length;
const isBelowLimit = uploadsCount < UPLOADS_LIMIT; const isBellowLimit = uploadsCount < UPLOADS_LIMIT;
const isQueueEmpty = this.queue.length == 0; const isQueueEmpty = this.queue.length == 0;
const isUploadsEmpty = uploadsCount == 0; const isUploadsEmpty = uploadsCount == 0;
const isFinished = isQueueEmpty && isUploadsEmpty; const isFinished = isQueueEmpty && isUploadsEmpty;
const canProcess = isBelowLimit && !isQueueEmpty; const canProcess = isBellowLimit && !isQueueEmpty;
if (isFinished) { if (isFinished) {
const fileStore = useFileStore(); const fileStore = useFileStore();

View File

@ -35,7 +35,8 @@ type ResourceType =
| "pdf" | "pdf"
| "text" | "text"
| "blob" | "blob"
| "textImmutable"; | "textImmutable"
| "officedocument";
type DownloadFormat = type DownloadFormat =
| "zip" | "zip"

View File

@ -3,7 +3,6 @@ interface PopupProps {
confirm?: any; confirm?: any;
action?: PopupAction; action?: PopupAction;
props?: any; props?: any;
close?: (() => Promise<string>) | null;
} }
type PopupAction = (e: Event) => void; type PopupAction = (e: Event) => void;

View File

@ -8,6 +8,7 @@ interface ISettings {
tus: SettingsTus; tus: SettingsTus;
shell: string[]; shell: string[];
commands: SettingsCommand; commands: SettingsCommand;
onlyoffice: SettingsOnlyOffice;
} }
interface SettingsDefaults { interface SettingsDefaults {
@ -55,3 +56,8 @@ interface SettingsUnit {
GB: number; GB: number;
TB: number; TB: number;
} }
interface SettingsOnlyOffice {
url: string;
jwtSecret: string;
}

View File

@ -1,8 +1,7 @@
import { useAuthStore } from "@/stores/auth"; import { useAuthStore } from "@/stores/auth";
import router from "@/router"; import router from "@/router";
import type { JwtPayload } from "jwt-decode"; import { JwtPayload, jwtDecode } from "jwt-decode";
import { jwtDecode } from "jwt-decode"; import { baseURL } from "./constants";
import { baseURL, noAuth } from "./constants";
import { StatusError } from "@/api/utils"; import { StatusError } from "@/api/utils";
export function parseToken(token: string) { export function parseToken(token: string) {
@ -24,7 +23,7 @@ export async function validateLogin() {
await renew(<string>localStorage.getItem("jwt")); await renew(<string>localStorage.getItem("jwt"));
} }
} catch (error) { } catch (error) {
console.warn("Invalid JWT token in storage"); console.warn("Invalid JWT token in storage"); // eslint-disable-line
throw error; throw error;
} }
} }
@ -99,9 +98,5 @@ export function logout() {
authStore.clearUser(); authStore.clearUser();
localStorage.setItem("jwt", ""); localStorage.setItem("jwt", "");
if (noAuth) {
window.location.reload();
} else {
router.push({ path: "/login" }); router.push({ path: "/login" });
}
} }

View File

@ -4,7 +4,7 @@ function loading(button: string) {
); );
if (el === undefined || el === null) { if (el === undefined || el === null) {
console.log("Error getting button " + button); console.log("Error getting button " + button); // eslint-disable-line
return; return;
} }
@ -30,7 +30,7 @@ function done(button: string) {
); );
if (el === undefined || el === null) { if (el === undefined || el === null) {
console.log("Error getting button " + button); console.log("Error getting button " + button); // eslint-disable-line
return; return;
} }
@ -51,7 +51,7 @@ function success(button: string) {
); );
if (el === undefined || el === null) { if (el === undefined || el === null) {
console.log("Error getting button " + button); console.log("Error getting button " + button); // eslint-disable-line
return; return;
} }

View File

@ -1,47 +1,61 @@
// Based on code by the following links: // Based on code provided by Amir Fo
// https://stackoverflow.com/a/74528564 // https://stackoverflow.com/a/74528564
// https://web.dev/articles/async-clipboard export function copy(text: string) {
interface ClipboardArgs {
text?: string;
data?: ClipboardItems;
}
interface ClipboardOpts {
permission?: boolean;
}
export function copy(data: ClipboardArgs, opts?: ClipboardOpts) {
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
if ( if (
// Clipboard API requires secure context typeof navigator !== "undefined" &&
window.isSecureContext && typeof navigator.clipboard !== "undefined" &&
typeof navigator.clipboard !== "undefined" // @ts-ignore
navigator.permissions !== "undefined"
) { ) {
if (opts?.permission) { navigator.permissions
getPermission("clipboard-write") // @ts-ignore
.then(() => writeToClipboard(data).then(resolve).catch(reject)) .query({ name: "clipboard-write" })
.catch(reject); .then((permission) => {
if (permission.state === "granted" || permission.state === "prompt") {
const type = "text/plain";
const blob = new Blob([text], { type });
const data = [new ClipboardItem({ [type]: blob })];
navigator.clipboard.write(data).then(resolve).catch(reject);
} else { } else {
writeToClipboard(data).then(resolve).catch(reject); reject(new Error("Permission not granted!"));
} }
})
.catch((e) => {
// Firefox doesn't support clipboard-write permission
if (navigator.userAgent.indexOf("Firefox") != -1) {
navigator.clipboard.writeText(text).then(resolve).catch(reject);
} else {
reject(e);
}
});
} else if ( } else if (
document.queryCommandSupported && document.queryCommandSupported &&
document.queryCommandSupported("copy") && document.queryCommandSupported("copy")
data.text // old method only supports text
) { ) {
const textarea = createTemporaryTextarea(data.text); const textarea = document.createElement("textarea");
const body = document.activeElement || document.body; textarea.textContent = text;
try { textarea.setAttribute("readonly", "");
body.appendChild(textarea); textarea.style.fontSize = "12pt";
textarea.style.position = "fixed";
textarea.style.width = "2em";
textarea.style.height = "2em";
textarea.style.padding = "0";
textarea.style.margin = "0";
textarea.style.border = "none";
textarea.style.outline = "none";
textarea.style.boxShadow = "none";
textarea.style.background = "transparent";
document.body.appendChild(textarea);
textarea.focus(); textarea.focus();
textarea.select(); textarea.select();
try {
document.execCommand("copy"); document.execCommand("copy");
document.body.removeChild(textarea);
resolve(); resolve();
} catch (e) { } catch (e) {
document.body.removeChild(textarea);
reject(e); reject(e);
} finally {
body.removeChild(textarea);
} }
} else { } else {
reject( reject(
@ -50,55 +64,3 @@ export function copy(data: ClipboardArgs, opts?: ClipboardOpts) {
} }
}); });
} }
function getPermission(name: string) {
return new Promise<void>((resolve, reject) => {
typeof navigator.permissions !== "undefined" &&
navigator.permissions
// @ts-expect-error chrome specific api
.query({ name })
.then((permission) => {
if (permission.state === "granted" || permission.state === "prompt") {
resolve();
} else {
reject(new Error("Permission denied!"));
}
});
});
}
function writeToClipboard(data: ClipboardArgs) {
if (data.text) {
return navigator.clipboard.writeText(data.text);
}
if (data.data) {
return navigator.clipboard.write(data.data);
}
return new Promise<void>((resolve, reject) => {
reject(new Error("No data was supplied!"));
});
}
const styles = {
fontSize: "12pt",
position: "fixed",
top: 0,
left: 0,
width: "2em",
height: "2em",
padding: 0,
margin: 0,
border: "none",
outline: "none",
boxShadow: "none",
background: "transparent",
};
function createTemporaryTextarea(text: string) {
const textarea = document.createElement("textarea");
textarea.value = text;
textarea.setAttribute("readonly", "");
Object.assign(textarea.style, styles);
return textarea;
}

View File

@ -18,6 +18,7 @@ const enableExec: boolean = window.FileBrowser.EnableExec;
const tusSettings = window.FileBrowser.TusSettings; const tusSettings = window.FileBrowser.TusSettings;
const origin = window.location.origin; const origin = window.location.origin;
const tusEndpoint = `/api/tus`; const tusEndpoint = `/api/tus`;
const onlyOfficeUrl = window.FileBrowser.OnlyOfficeUrl;
export { export {
name, name,
@ -39,4 +40,5 @@ export {
tusSettings, tusSettings,
origin, origin,
tusEndpoint, tusEndpoint,
onlyOfficeUrl,
}; };

View File

@ -6,16 +6,13 @@ export default function getRule(rules: string[]) {
let result = null; let result = null;
const find = Array.prototype.find; const find = Array.prototype.find;
find.call(document.styleSheets, (styleSheet: CSSStyleSheet) => { find.call(document.styleSheets, (styleSheet) => {
result = find.call(styleSheet.cssRules, (cssRule: CSSRule) => { result = find.call(styleSheet.cssRules, (cssRule) => {
let found = false; let found = false;
// faster than checking instanceof for every element if (cssRule instanceof window.CSSStyleRule) {
if (cssRule.constructor.name === "CSSStyleRule") {
for (let i = 0; i < rules.length; i++) { for (let i = 0; i < rules.length; i++) {
if ( if (cssRule.selectorText.toLowerCase() === rules[i]) {
(cssRule as CSSStyleRule).selectorText.toLowerCase() === rules[i]
) {
found = true; found = true;
} }
} }
@ -27,5 +24,5 @@ export default function getRule(rules: string[]) {
return result != null; return result != null;
}); });
return result as CSSStyleRule | null; return result;
} }

View File

@ -1,4 +1,3 @@
import { useLayoutStore } from "@/stores/layout";
import { useUploadStore } from "@/stores/upload"; import { useUploadStore } from "@/stores/upload";
import url from "@/utils/url"; import url from "@/utils/url";
@ -127,9 +126,6 @@ export function handleFiles(
overwrite = false overwrite = false
) { ) {
const uploadStore = useUploadStore(); const uploadStore = useUploadStore();
const layoutStore = useLayoutStore();
layoutStore.closeHovers();
for (const file of files) { for (const file of files) {
const id = uploadStore.id; const id = uploadStore.id;

View File

@ -37,6 +37,7 @@ import { storeToRefs } from "pinia";
import { useFileStore } from "@/stores/file"; import { useFileStore } from "@/stores/file";
import { useLayoutStore } from "@/stores/layout"; import { useLayoutStore } from "@/stores/layout";
import { useUploadStore } from "@/stores/upload"; import { useUploadStore } from "@/stores/upload";
import { onlyOfficeUrl } from "@/utils/constants";
import HeaderBar from "@/components/header/HeaderBar.vue"; import HeaderBar from "@/components/header/HeaderBar.vue";
import Breadcrumbs from "@/components/Breadcrumbs.vue"; import Breadcrumbs from "@/components/Breadcrumbs.vue";
@ -45,10 +46,11 @@ import { useI18n } from "vue-i18n";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import FileListing from "@/views/files/FileListing.vue"; import FileListing from "@/views/files/FileListing.vue";
import { StatusError } from "@/api/utils"; import { StatusError } from "@/api/utils";
import { name } from "../utils/constants";
const Editor = defineAsyncComponent(() => import("@/views/files/Editor.vue")); const Editor = defineAsyncComponent(() => import("@/views/files/Editor.vue"));
const Preview = defineAsyncComponent(() => import("@/views/files/Preview.vue")); const Preview = defineAsyncComponent(() => import("@/views/files/Preview.vue"));
const OnlyOfficeEditor = defineAsyncComponent(
() => import("@/views/files/OnlyOfficeEditor.vue")
);
const layoutStore = useLayoutStore(); const layoutStore = useLayoutStore();
const fileStore = useFileStore(); const fileStore = useFileStore();
@ -79,6 +81,8 @@ const currentView = computed(() => {
fileStore.req.type === "textImmutable" fileStore.req.type === "textImmutable"
) { ) {
return Editor; return Editor;
} else if (fileStore.req.type === "officedocument" && onlyOfficeUrl) {
return OnlyOfficeEditor;
} else { } else {
return Preview; return Preview;
} }
@ -150,7 +154,7 @@ const fetchData = async () => {
} }
fileStore.updateRequest(res); fileStore.updateRequest(res);
document.title = `${res.name} - ${t("files.files")} - ${name}`; document.title = `${res.name} - ${document.title}`;
} catch (err) { } catch (err) {
if (err instanceof Error) { if (err instanceof Error) {
error.value = err; error.value = err;

Some files were not shown because too many files have changed in this diff Show More