From 1c7d932e31c7f0bba6c9bc46f6f5b728f45a333d Mon Sep 17 00:00:00 2001 From: MangoFanFanw Date: Wed, 27 May 2026 14:18:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(NyaHome=E8=AE=BE=E7=BD=AE):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20NyaHome=20=E8=AE=BE=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 允许上传的文件拓展名、四处默认图片 --- src/nyahome/config/config.py | 6 ++++ webui/src/pages/admin/AdminNyahome.vue | 44 +++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/nyahome/config/config.py b/src/nyahome/config/config.py index 9788bb2..9e7b09c 100644 --- a/src/nyahome/config/config.py +++ b/src/nyahome/config/config.py @@ -4,7 +4,13 @@ class Config: self.site_url = "http://localhost:5173" self.backend_url = "http://localhost:9000" + self.default_user_avatar_url = "/nyahome/normal-avatar.png" + self.default_user_background_url = "/nyahome/normal-background.png" + self.default_chatroom_script_cover_url = "/nyahome/normal-thumbnail.png" + self.default_page_cover_url = "/nyahome/normal-header.png" + self.jwt_secret_key = "see you tomorrow" + self.allow_upload_file_extensions = [".jpg", ".jpeg", ".png"] self.smtp_enable = False self.smtp_sender = "" diff --git a/webui/src/pages/admin/AdminNyahome.vue b/webui/src/pages/admin/AdminNyahome.vue index 7666c0a..c1ac26c 100644 --- a/webui/src/pages/admin/AdminNyahome.vue +++ b/webui/src/pages/admin/AdminNyahome.vue @@ -12,7 +12,13 @@ interface SiteConfig { site_url: string backend_url: string + default_user_avatar_url: string + default_user_background_url: string + default_chatroom_script_cover_url: string + default_page_cover_url: string + jwt_secret_key: string + allow_upload_file_extensions: string[] smtp_enable: boolean smtp_sender: string @@ -101,6 +107,11 @@ function sendTestMail() { + + 您在浏览器中访问本站点时使用的地址(主机名/域名)。 + 如果需要前后端分开部署,则是前端所在地址。
+ 就默认而言,这两个地址应当一致。 +
@@ -120,6 +131,25 @@ function sendTestMail() { + + + + + + + + + + + + + + + + + + + @@ -135,7 +165,19 @@ function sendTestMail() { 修改此密钥会导致所有用户的登录状态丢失(你也会),请一次性设置一个足够安全的。 - + + + + + + + + +