Update On Sun Nov 30 19:38:24 CET 2025

This commit is contained in:
github-action[bot]
2025-11-30 19:38:24 +01:00
parent b010c64ed2
commit f2c654a47c
98 changed files with 816 additions and 373 deletions
+10 -10
View File
@@ -28,9 +28,11 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Build and Release Docs
permissions:
contents: read
deployments: write
pull-requests: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
@@ -42,11 +44,9 @@ jobs:
uses: go-task/setup-task@v1
- name: Build site
run: task docs
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy www/public --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
path: www/public
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
+15
View File
@@ -2,6 +2,21 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
## [2.50.0](https://github.com/filebrowser/filebrowser/compare/v2.49.0...v2.50.0) (2025-11-30)
### Features
* configurable logout page URL for proxy/hook auth ([#3884](https://github.com/filebrowser/filebrowser/issues/3884)) ([b9ac45d](https://github.com/filebrowser/filebrowser/commit/b9ac45d5dac4b4eb2ba364629090fbf306cffd2b))
* render CSVs as table ([#5569](https://github.com/filebrowser/filebrowser/issues/5569)) ([982405e](https://github.com/filebrowser/filebrowser/commit/982405ec944f94baf43594b0ed2f06329ff4e9ed))
* update frontend/src/i18n/hr.json ([279a5cc](https://github.com/filebrowser/filebrowser/commit/279a5ccd1e8d7bde4568b63cb3c506af48b6c618))
* update translations ([78e0395](https://github.com/filebrowser/filebrowser/commit/78e039596070a3a9e643a693cc99960c69dcfe92))
### Bug Fixes
* do not close editor if save failed ([701522a](https://github.com/filebrowser/filebrowser/commit/701522a0600cfa542469540ed764630c0ba1a732)), closes [#5591](https://github.com/filebrowser/filebrowser/issues/5591)
## [2.49.0](https://github.com/filebrowser/filebrowser/compare/v2.48.2...v2.49.0) (2025-11-22)
+4
View File
@@ -45,6 +45,7 @@ func addConfigFlags(flags *pflag.FlagSet) {
flags.String("auth.method", string(auth.MethodJSONAuth), "authentication type")
flags.String("auth.header", "", "HTTP header for auth.method=proxy")
flags.String("auth.command", "", "command for auth.method=hook")
flags.String("auth.logoutPage", "", "url of custom logout page")
flags.String("recaptcha.host", "https://www.google.com", "use another host for ReCAPTCHA. recaptcha.net might be useful in China")
flags.String("recaptcha.key", "", "ReCaptcha site key")
@@ -201,6 +202,7 @@ func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Aut
fmt.Fprintf(w, "Sign up:\t%t\n", set.Signup)
fmt.Fprintf(w, "Hide Login Button:\t%t\n", set.HideLoginButton)
fmt.Fprintf(w, "Create User Dir:\t%t\n", set.CreateUserDir)
fmt.Fprintf(w, "Logout Page:\t%s\n", set.LogoutPage)
fmt.Fprintf(w, "Minimum Password Length:\t%d\n", set.MinimumPasswordLength)
fmt.Fprintf(w, "Auth Method:\t%s\n", set.AuthMethod)
fmt.Fprintf(w, "Shell:\t%s\t\n", strings.Join(set.Shell, " "))
@@ -328,6 +330,8 @@ func getSettings(flags *pflag.FlagSet, set *settings.Settings, ser *settings.Ser
set.DirMode, err = getAndParseFileMode(flags, flag.Name)
case "auth.method":
hasAuth = true
case "auth.logoutPage":
set.LogoutPage, err = flags.GetString(flag.Name)
case "branding.name":
set.Branding.Name, err = flags.GetString(flag.Name)
case "branding.theme":
+1
View File
@@ -39,6 +39,7 @@
DisableUsedPercentage: false,
EnableExec: true,
EnableThumbs: true,
LogoutPage: "",
LoginPage: true,
Name: "",
NoAuth: false,
+11 -11
View File
@@ -119,7 +119,7 @@ importers:
version: 6.0.2(vite@7.2.4(@types/node@24.10.1)(terser@5.44.1)(yaml@2.7.0))(vue@3.5.25(typescript@5.9.3))
'@vue/eslint-config-prettier':
specifier: ^10.2.0
version: 10.2.0(eslint@9.39.1)(prettier@3.7.2)
version: 10.2.0(eslint@9.39.1)(prettier@3.7.3)
'@vue/eslint-config-typescript':
specifier: ^14.6.0
version: 14.6.0(eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.37.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(vue-eslint-parser@10.2.0(eslint@9.39.1)))(eslint@9.39.1)(typescript@5.9.3)
@@ -137,7 +137,7 @@ importers:
version: 10.1.8(eslint@9.39.1)
eslint-plugin-prettier:
specifier: ^5.5.1
version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.2)
version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.3)
eslint-plugin-vue:
specifier: ^10.5.1
version: 10.6.2(@typescript-eslint/parser@8.37.0(eslint@9.39.1)(typescript@5.9.3))(eslint@9.39.1)(vue-eslint-parser@10.2.0(eslint@9.39.1))
@@ -146,7 +146,7 @@ importers:
version: 8.5.6
prettier:
specifier: ^3.6.2
version: 3.7.2
version: 3.7.3
terser:
specifier: ^5.43.1
version: 5.44.1
@@ -2167,8 +2167,8 @@ packages:
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
engines: {node: '>=6.0.0'}
prettier@3.7.2:
resolution: {integrity: sha512-n3HV2J6QhItCXndGa3oMWvWFAgN1ibnS7R9mt6iokScBOC0Ul9/iZORmU2IWUMcyAQaMPjTlY3uT34TqocUxMA==}
prettier@3.7.3:
resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==}
engines: {node: '>=14'}
hasBin: true
@@ -3882,12 +3882,12 @@ snapshots:
dependencies:
rfdc: 1.4.1
'@vue/eslint-config-prettier@10.2.0(eslint@9.39.1)(prettier@3.7.2)':
'@vue/eslint-config-prettier@10.2.0(eslint@9.39.1)(prettier@3.7.3)':
dependencies:
eslint: 9.39.1
eslint-config-prettier: 10.1.8(eslint@9.39.1)
eslint-plugin-prettier: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.2)
prettier: 3.7.2
eslint-plugin-prettier: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.3)
prettier: 3.7.3
transitivePeerDependencies:
- '@types/eslint'
@@ -4219,10 +4219,10 @@ snapshots:
dependencies:
eslint: 9.39.1
eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.2):
eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.1))(eslint@9.39.1)(prettier@3.7.3):
dependencies:
eslint: 9.39.1
prettier: 3.7.2
prettier: 3.7.3
prettier-linter-helpers: 1.0.0
synckit: 0.11.11
optionalDependencies:
@@ -4697,7 +4697,7 @@ snapshots:
dependencies:
fast-diff: 1.3.0
prettier@3.7.2: {}
prettier@3.7.3: {}
pretty-bytes@7.1.0: {}
@@ -129,6 +129,7 @@ import {
disableExternal,
disableUsedPercentage,
noAuth,
logoutPage,
loginPage,
} from "@/utils/constants";
import { files as api } from "@/api";
@@ -159,7 +160,7 @@ export default {
version: () => version,
disableExternal: () => disableExternal,
disableUsedPercentage: () => disableUsedPercentage,
canLogout: () => !noAuth && loginPage,
canLogout: () => !noAuth && (loginPage || logoutPage !== "/login"),
},
methods: {
...mapActions(useLayoutStore, ["closeHovers", "showHover"]),
@@ -8,12 +8,7 @@
<i class="material-icons">description</i>
<p>{{ $t("files.lonely") }}</p>
</div>
<div
v-else
class="csv-table-container"
@wheel.stop
@touchmove.stop
>
<div v-else class="csv-table-container" @wheel.stop @touchmove.stop>
<table class="csv-table">
<thead>
<tr>
@@ -66,7 +61,11 @@ const displayError = computed(() => {
return props.error;
}
// Check for parse errors
if (props.content && props.content.trim().length > 0 && data.value.headers.length === 0) {
if (
props.content &&
props.content.trim().length > 0 &&
data.value.headers.length === 0
) {
return "Failed to parse CSV file";
}
return null;
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "رفع",
"openFile": "فتح الملف",
"discardChanges": "إلغاء التغييرات",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "تحميل الملف",
@@ -75,7 +76,9 @@
"sortByLastModified": "الترتيب بآخر تعديل",
"sortByName": "الترتيب باﻹسم",
"sortBySize": "الترتيب بالحجم",
"noPreview": "لا يوجد عرض مسبق لهذا الملف."
"noPreview": "لا يوجد عرض مسبق لهذا الملف.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "حدد الملف أو المجلد",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Качи",
"openFile": "Отвори файл",
"discardChanges": "Изчисти",
"saveChanges": "Запиши промените"
"saveChanges": "Запиши промените",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Свали файл",
@@ -75,7 +76,9 @@
"sortByLastModified": "Подредба по последна промяна",
"sortByName": "Подредба по име",
"sortBySize": "Подредба по размер",
"noPreview": "За този файл не е наличен преглед."
"noPreview": "За този файл не е наличен преглед.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "избери файл или директория",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Pujar",
"openFile": "Obrir fitxer",
"discardChanges": "Descartar",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Descarregar fitxer",
@@ -75,7 +76,9 @@
"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."
"noPreview": "La vista prèvia no està disponible per a aquest fitxer.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "seleccionar fitxer o carpeta",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Nahrát",
"openFile": "Otevřít soubor",
"discardChanges": "Zrušit změny",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Stáhnout soubor",
@@ -75,7 +76,9 @@
"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."
"noPreview": "Náhled pro tento soubor není k dispozici.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "vyberte soubor nebo adresář",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Upload",
"openFile": "Datei öffnen",
"discardChanges": "Verwerfen",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Download Datei",
@@ -75,7 +76,9 @@
"sortByLastModified": "Nach Änderungsdatum sortieren",
"sortByName": "Nach Namen sortieren",
"sortBySize": "Nach Größe sortieren",
"noPreview": "Für diese Datei ist keine Vorschau verfügbar."
"noPreview": "Für diese Datei ist keine Vorschau verfügbar.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "Wähle Datei oder Ordner",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Μεταφόρτωση",
"openFile": "Άνοιγμα αρχείου",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Λήψη αρχείου",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ταξινόμηση κατά πρόσφατη τροποποίηση",
"sortByName": "Ταξινόμηση κατά όνομα",
"sortBySize": "Ταξινόμηση κατά μέγεθος",
"noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο."
"noPreview": "Η προεπισκόπηση δεν είναι διαθέσιμη για αυτό το αρχείο.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "επιλέξτε αρχείο ή φάκελο",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Subir",
"openFile": "Abrir archivo",
"discardChanges": "Discard",
"saveChanges": "Guardar cambios"
"saveChanges": "Guardar cambios",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Descargar fichero",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ordenar por última modificación",
"sortByName": "Ordenar por nombre",
"sortBySize": "Ordenar por tamaño",
"noPreview": "La vista previa no está disponible para este archivo."
"noPreview": "La vista previa no está disponible para este archivo.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "seleccionar archivo o carpeta",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "آپلود",
"openFile": "باز کردن فایل",
"discardChanges": "لغو کردن",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "دانلود فایل",
@@ -75,7 +76,9 @@
"sortByLastModified": "مرتب سازی آخرین ویرایش",
"sortByName": "مرتب سازی نام",
"sortBySize": "مرتب سازی اندازه",
"noPreview": "این فایل قابل نمایش نیست"
"noPreview": "این فایل قابل نمایش نیست",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "انتخاب فایل یا پوشه",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Importer",
"openFile": "Ouvrir le fichier",
"discardChanges": "Annuler",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Télécharger le fichier",
@@ -75,7 +76,9 @@
"sortByLastModified": "Trier par date de modification",
"sortByName": "Trier par nom",
"sortBySize": "Trier par taille",
"noPreview": "L'aperçu n'est pas disponible pour ce fichier."
"noPreview": "L'aperçu n'est pas disponible pour ce fichier.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "Sélectionner un fichier ou dossier",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "העלאה",
"openFile": "פתח קובץ",
"discardChanges": "זריקת השינויים",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "הורד קובץ",
@@ -75,7 +76,9 @@
"sortByLastModified": "מיין לפי השינוי האחרון",
"sortByName": "מיין לפי שם",
"sortBySize": "מיין לפי גודל",
"noPreview": "לא זמינה תצוגה מקדימה לקובץ זה"
"noPreview": "לא זמינה תצוגה מקדימה לקובץ זה",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "בחר קובץ או תיקייה",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Prenesi",
"openFile": "Otvori datoteku",
"discardChanges": "Odbaci",
"saveChanges": "Spremi promjene"
"saveChanges": "Spremi promjene",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Preuzmi Datoteku",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sortiraj po zadnjoj izmjeni",
"sortByName": "Sortiraj po nazivu",
"sortBySize": "Sortiraj po veličini",
"noPreview": "Pregled nije dostupan za ovu datoteku."
"noPreview": "Pregled nije dostupan za ovu datoteku.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "odaberi datoteku ili mapu",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Feltöltés",
"openFile": "Fájl megnyitása",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Fájl letöltése",
@@ -75,7 +76,9 @@
"sortByLastModified": "Rendezés utolsó módosítás szerint",
"sortByName": "Rendezés név szerint",
"sortBySize": "Rendezés méret szerint",
"noPreview": "Ehhez a fájlhoz nincs előnézet."
"noPreview": "Ehhez a fájlhoz nincs előnézet.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "mappa vagy fájl kijelölése",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Hlaða upp",
"openFile": "Open file",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Sækja skjal",
@@ -75,7 +76,9 @@
"sortByLastModified": "Flokka eftir Seinast breytt",
"sortByName": "Flokka eftir nafni",
"sortBySize": "Flokka eftir stærð",
"noPreview": "Preview is not available for this file."
"noPreview": "Preview is not available for this file.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "velja skjal eða möppu",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Carica",
"openFile": "Apri file",
"discardChanges": "Ignora",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Scarica file",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ordina per ultima modifica",
"sortByName": "Ordina per nome",
"sortBySize": "Ordina per dimensione",
"noPreview": "L'anteprima non è disponibile per questo file."
"noPreview": "L'anteprima non è disponibile per questo file.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "seleziona un file o una cartella",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "アップロード",
"openFile": "ファイルを開く",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "ファイルのダウンロード",
@@ -75,7 +76,9 @@
"sortByLastModified": "更新日時で並べ替え",
"sortByName": "名前で並べ替え",
"sortBySize": "サイズで並べ替え",
"noPreview": "プレビューはこのファイルでは利用できません"
"noPreview": "プレビューはこのファイルでは利用できません",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "ファイルやフォルダーを選択",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "업로드",
"openFile": "파일 열기",
"discardChanges": "변경 사항 취소",
"saveChanges": "변경사항 저장"
"saveChanges": "변경사항 저장",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "파일 다운로드",
@@ -75,7 +76,9 @@
"sortByLastModified": "수정시간순 정렬",
"sortByName": "이름순",
"sortBySize": "크기순",
"noPreview": "미리 보기가 지원되지 않는 파일 유형입니다."
"noPreview": "미리 보기가 지원되지 않는 파일 유형입니다.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "파일이나 디렉토리를 선택해주세요.",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Uploaden",
"openFile": "Open file",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Bestand downloaden",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sorteren op laatst bewerkt",
"sortByName": "Sorteren op naam",
"sortBySize": "Sorteren op grootte",
"noPreview": "Preview is not available for this file."
"noPreview": "Preview is not available for this file.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "selecteer bestand of map",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Last opp",
"openFile": "Open file",
"discardChanges": "Slett",
"saveChanges": "Lagre Endringane "
"saveChanges": "Lagre Endringane ",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Nedlast filen",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sorter etter sist endret",
"sortByName": "Sorter etter navn",
"sortBySize": "Sorter etter størrelse",
"noPreview": "Forhåndsvisning er ikkje tilgjengeleg for denne filen."
"noPreview": "Forhåndsvisning er ikkje tilgjengeleg for denne filen.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "velg fil eller katalog",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Wyślij",
"openFile": "Otwórz plik",
"discardChanges": "Odrzuć",
"saveChanges": "Zapisz zmiany"
"saveChanges": "Zapisz zmiany",
"editAsText": "Edytuj jako tekst"
},
"download": {
"downloadFile": "Pobierz plik",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sortuj wg ostatniej modyfikacji",
"sortByName": "Sortuj wg nazwy",
"sortBySize": "Sortuj wg rozmiaru",
"noPreview": "Podgląd tego pliku jest niedostępny."
"noPreview": "Podgląd tego pliku jest niedostępny.",
"csvTooLarge": "Plik CSV jest za duży do podglądu (>5 MB). Pobierz, aby wyświetlić.",
"csvLoadFailed": "Nie udało się załadować pliku CSV."
},
"help": {
"click": "zaznacz plik lub folder",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Enviar",
"openFile": "Abrir",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Baixar arquivo",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ordenar pela última modificação",
"sortByName": "Ordenar pelo nome",
"sortBySize": "Ordenar pelo tamanho",
"noPreview": "Pré-visualização não disponível para este arquivo."
"noPreview": "Pré-visualização não disponível para este arquivo.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "selecionar pasta ou arquivo",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Enviar",
"openFile": "Open file",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Descarregar ficheiro",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ordenar pela última alteração",
"sortByName": "Ordenar pelo nome",
"sortBySize": "Ordenar pelo tamanho",
"noPreview": "Preview is not available for this file."
"noPreview": "Preview is not available for this file.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "selecionar pasta ou ficheiro",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Încarcă",
"openFile": "Open file",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Descarcă fișier",
@@ -75,7 +76,9 @@
"sortByLastModified": "Ordonează dup ultima modificare",
"sortByName": "Ordonează după nume",
"sortBySize": "Ordonează după dimensiune",
"noPreview": "Preview is not available for this file."
"noPreview": "Preview is not available for this file.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "alege fișier sau director",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Загрузить",
"openFile": "Открыть файл",
"discardChanges": "Отказаться",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Скачать файл",
@@ -75,7 +76,9 @@
"sortByLastModified": "Сортировка по дате изменения",
"sortByName": "Сортировка по имени",
"sortBySize": "Сортировка по размеру",
"noPreview": "Предварительный просмотр для этого файла недоступен."
"noPreview": "Предварительный просмотр для этого файла недоступен.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "выбрать файл или каталог",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Nahrať",
"openFile": "Otvoriť súbor",
"discardChanges": "Zahodiť",
"saveChanges": "Uložiť zmeny"
"saveChanges": "Uložiť zmeny",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Stiahnuť súbor",
@@ -75,7 +76,9 @@
"sortByLastModified": "Zoradiť podľa dátumu",
"sortByName": "Zoradiť podľa názvu",
"sortBySize": "Zoradiť podľa veľkosti",
"noPreview": "Pre tento súbor nie je dostupný náhľad."
"noPreview": "Pre tento súbor nie je dostupný náhľad.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "vyberie súbor alebo priečinok",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Ladda upp",
"openFile": "Öppna fil",
"discardChanges": "Förkasta",
"saveChanges": "Spara ändringar"
"saveChanges": "Spara ändringar",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Ladda ner fil",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sortera på senast ändrad",
"sortByName": "Sortera på namn",
"sortBySize": "Sortera på storlek",
"noPreview": "Förhandsvisning är inte tillgänglig för denna fil."
"noPreview": "Förhandsvisning är inte tillgänglig för denna fil.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "välj fil eller mapp",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Yükle",
"openFile": "Dosyayı aç",
"discardChanges": "Discard",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Dosyayı indir",
@@ -75,7 +76,9 @@
"sortByLastModified": "Güncelleme tarihine göre sırala",
"sortByName": "İsme göre sırala",
"sortBySize": "Boyuta göre sırala",
"noPreview": "Bu dosya için önizleme aktif değil"
"noPreview": "Bu dosya için önizleme aktif değil",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "dosya veya klasör seçin",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Вивантажити",
"openFile": "Відкрити файл",
"discardChanges": "Скасувати",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Завантажити файл",
@@ -75,7 +76,9 @@
"sortByLastModified": "Сортувати за останнім зміненням",
"sortByName": "Сортувати за іменем",
"sortBySize": "Сортувати за розміром",
"noPreview": "Попередній перегляд для цього файлу недоступний."
"noPreview": "Попередній перегляд для цього файлу недоступний.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "вибрати файл чи каталог",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "Tải lên",
"openFile": "Mở tệp",
"discardChanges": "Hủy bỏ thay đổi",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "Tải xuống tệp tin",
@@ -75,7 +76,9 @@
"sortByLastModified": "Sắp xếp theo ngày sửa đổi",
"sortByName": "Sắp xếp theo tên",
"sortBySize": "Sắp xếp theo kích thước",
"noPreview": "Không có bản xem trước cho tập tin này."
"noPreview": "Không có bản xem trước cho tập tin này.",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "chọn tập tin hoặc thư mục",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "上传",
"openFile": "打开文件",
"discardChanges": "放弃更改",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "下载文件",
@@ -75,7 +76,9 @@
"sortByLastModified": "按最后修改时间排序",
"sortByName": "按名称排序",
"sortBySize": "按大小排序",
"noPreview": "此文件无法预览。"
"noPreview": "此文件无法预览。",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "选择文件或文件夹",
+5 -2
View File
@@ -43,7 +43,8 @@
"upload": "上傳",
"openFile": "開啟檔案",
"discardChanges": "放棄變更",
"saveChanges": "Save changes"
"saveChanges": "Save changes",
"editAsText": "Edit as Text"
},
"download": {
"downloadFile": "下載檔案",
@@ -75,7 +76,9 @@
"sortByLastModified": "按最後修改時間排序",
"sortByName": "按名稱排序",
"sortBySize": "按大小排序",
"noPreview": "此檔案無法預覽。"
"noPreview": "此檔案無法預覽。",
"csvTooLarge": "CSV file is too large for preview (>5MB). Please download to view.",
"csvLoadFailed": "Failed to load CSV file."
},
"help": {
"click": "選擇檔案或目錄",
+9 -1
View File
@@ -2,7 +2,7 @@ import { useAuthStore } from "@/stores/auth";
import router from "@/router";
import type { JwtPayload } from "jwt-decode";
import { jwtDecode } from "jwt-decode";
import { baseURL, noAuth } from "./constants";
import { authMethod, baseURL, noAuth, logoutPage } from "./constants";
import { StatusError } from "@/api/utils";
import { setSafeTimeout } from "@/api/utils";
@@ -18,6 +18,12 @@ export function parseToken(token: string) {
authStore.jwt = token;
authStore.setUser(data.user);
// proxy auth with custom logout subject to unknown external timeout
if (logoutPage !== "/login" && authMethod === "proxy") {
console.warn("idle timeout disabled with proxy auth and custom logout");
return;
}
if (authStore.logoutTimer) {
clearTimeout(authStore.logoutTimer);
}
@@ -118,6 +124,8 @@ export function logout(reason?: string) {
localStorage.setItem("jwt", "");
if (noAuth) {
window.location.reload();
} else if (logoutPage !== "/login") {
document.location.href = `${logoutPage}`;
} else {
if (typeof reason === "string" && reason.trim() !== "") {
router.push({
@@ -10,6 +10,7 @@ const version: string = window.FileBrowser.Version;
const logoURL = `${staticURL}/img/logo.svg`;
const noAuth: boolean = window.FileBrowser.NoAuth;
const authMethod = window.FileBrowser.AuthMethod;
const logoutPage: string = window.FileBrowser.LogoutPage;
const loginPage: boolean = window.FileBrowser.LoginPage;
const theme: UserTheme = window.FileBrowser.Theme;
const enableThumbs: boolean = window.FileBrowser.EnableThumbs;
@@ -32,6 +33,7 @@ export {
version,
noAuth,
authMethod,
logoutPage,
loginPage,
theme,
enableThumbs,
@@ -186,7 +186,7 @@ const handlePageChange = (event: BeforeUnloadEvent) => {
}
};
const save = async () => {
const save = async (throwError?: boolean) => {
const button = "save";
buttons.loading("save");
@@ -197,6 +197,7 @@ const save = async () => {
} catch (e: any) {
buttons.done(button);
$showError(e);
if (throwError) throw e;
}
};
@@ -223,8 +224,10 @@ const close = () => {
finishClose();
},
saveAction: async () => {
await save();
finishClose();
try {
await save(true);
finishClose();
} catch {}
},
});
return;
+21 -7
View File
@@ -12,7 +12,9 @@ import (
"github.com/golang-jwt/jwt/v5"
"github.com/golang-jwt/jwt/v5/request"
fbAuth "github.com/filebrowser/filebrowser/v2/auth"
fbErrors "github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users"
)
@@ -61,6 +63,22 @@ func (e extractor) ExtractToken(r *http.Request) (string, error) {
return "", request.ErrNoTokenInRequest
}
func renewableErr(err error, d *data) bool {
if d.settings.AuthMethod != fbAuth.MethodProxyAuth || err == nil {
return false
}
if d.settings.LogoutPage == settings.DefaultLogoutPage {
return false
}
if !errors.Is(err, jwt.ErrTokenExpired) {
return false
}
return true
}
func withUser(fn handleFunc) handleFunc {
return func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
keyFunc := func(_ *jwt.Token) (interface{}, error) {
@@ -68,13 +86,9 @@ func withUser(fn handleFunc) handleFunc {
}
var tk authToken
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk))
if err != nil || !token.Valid {
return http.StatusUnauthorized, nil
}
err = jwt.NewValidator(jwt.WithExpirationRequired()).Validate(tk)
if err != nil {
p := jwt.NewParser(jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Alg()}), jwt.WithExpirationRequired())
token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk), request.WithParser(p))
if (err != nil || !token.Valid) && !renewableErr(err, d) {
return http.StatusUnauthorized, nil
}
+1
View File
@@ -38,6 +38,7 @@ func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys
"Signup": d.settings.Signup,
"NoAuth": d.settings.AuthMethod == auth.MethodNoAuth,
"AuthMethod": d.settings.AuthMethod,
"LogoutPage": d.settings.LogoutPage,
"LoginPage": auther.LoginPage(),
"CSS": false,
"ReCaptcha": false,
+2
View File
@@ -11,6 +11,7 @@ import (
)
const DefaultUsersHomeBasePath = "/users"
const DefaultLogoutPage = "/login"
const DefaultMinimumPasswordLength = 12
const DefaultFileMode = 0640
const DefaultDirMode = 0750
@@ -27,6 +28,7 @@ type Settings struct {
UserHomeBasePath string `json:"userHomeBasePath"`
Defaults UserDefaults `json:"defaults"`
AuthMethod AuthMethod `json:"authMethod"`
LogoutPage string `json:"logoutPage"`
Branding Branding `json:"branding"`
Tus Tus `json:"tus"`
Commands map[string][]string `json:"commands"`
+10
View File
@@ -30,24 +30,34 @@ func (s *Storage) Get() (*Settings, error) {
if err != nil {
return nil, err
}
if set.UserHomeBasePath == "" {
set.UserHomeBasePath = DefaultUsersHomeBasePath
}
if set.LogoutPage == "" {
set.LogoutPage = DefaultLogoutPage
}
if set.MinimumPasswordLength == 0 {
set.MinimumPasswordLength = DefaultMinimumPasswordLength
}
if set.Tus == (Tus{}) {
set.Tus = Tus{
ChunkSize: DefaultTusChunkSize,
RetryCount: DefaultTusRetryCount,
}
}
if set.FileMode == 0 {
set.FileMode = DefaultFileMode
}
if set.DirMode == 0 {
set.DirMode = DefaultDirMode
}
return set, nil
}
@@ -21,6 +21,7 @@ filebrowser config init [flags]
-a, --address string address to listen on (default "127.0.0.1")
--auth.command string command for auth.method=hook
--auth.header string HTTP header for auth.method=proxy
--auth.logoutPage string url of custom logout page
--auth.method string authentication type (default "json")
-b, --baseURL string base url
--branding.color string set the theme color
@@ -18,6 +18,7 @@ filebrowser config set [flags]
-a, --address string address to listen on (default "127.0.0.1")
--auth.command string command for auth.method=hook
--auth.header string HTTP header for auth.method=proxy
--auth.logoutPage string url of custom logout page
--auth.method string authentication type (default "json")
-b, --baseURL string base url
--branding.color string set the theme color