From 2d35f0ce7070b0674cda8b4d77b44117f02656c9 Mon Sep 17 00:00:00 2001 From: zhuifenghero Date: Sun, 3 May 2026 18:51:00 +0000 Subject: [PATCH] =?UTF-8?q?filebrowser=20=E5=88=9D=E5=A7=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ config.yaml | 21 +++++++++++++++++++++ custom.css | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .gitignore create mode 100644 config.yaml create mode 100644 custom.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97430d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +database.db +database.db.bak +tmp/ diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..77721ff --- /dev/null +++ b/config.yaml @@ -0,0 +1,21 @@ +server: + port: 80 + database: "/home/filebrowser/data/database.db" + cacheDir: "/home/filebrowser/data/tmp" + sources: + - path: /srv + config: + defaultEnabled: true +auth: + methods: + oidc: + enabled: true + clientId: "95a150cf-e376-4a2a-aec8-5bce1b518cb5" + clientSecret: "CEKqBc8cT2bkH814rqbjJBJgtXbmiwCE" + issuerUrl: "https://sso.140103.xyz" + scopes: "email openid profile" + userIdentifier: preferred_username + disableVerifyTLS: false + createUser: true # 首次登录自动创建用户 + password: + enabled: true # 建议保留,万一 OIDC 出问题还能登 diff --git a/custom.css b/custom.css new file mode 100644 index 0000000..8e3273d --- /dev/null +++ b/custom.css @@ -0,0 +1,12 @@ +/* 定位到那个特定的 A 标签 */ +a.button.direct-login[href*="oidc"] { + font-size: 0 !important; +} + +/* 注入“SSO 登陆”文字 */ +a.button.direct-login[href*="oidc"]::before { + content: "SSO 登陆"; + font-size: 1rem !important; /* 恢复原本的字体大小 */ + display: block; + visibility: visible; +}