From a6f7fe547bf39274d132215e062b296ca62e953b Mon Sep 17 00:00:00 2001 From: "Alex.Petrov" Date: Fri, 15 May 2026 18:02:32 +0500 Subject: [PATCH] feat: add favicon upload functionality to settings panel - Introduced a new `webFavicon` property in the AllSetting model to store the favicon data URL. - Implemented upload and delete functionality for the favicon in the GeneralTab component, including validation for file type and size. - Updated the backend to serve the favicon in the HTML head if set. - Added translations for favicon-related messages across multiple languages. --- frontend/src/models/setting.js | 1 + frontend/src/pages/settings/GeneralTab.vue | 90 ++++++++++++++++++++++ web/controller/dist.go | 9 +++ web/entity/entity.go | 1 + web/service/setting.go | 43 ++++++++++- web/translation/ar-EG.json | 9 ++- web/translation/en-US.json | 9 ++- web/translation/es-ES.json | 9 ++- web/translation/fa-IR.json | 9 ++- web/translation/id-ID.json | 9 ++- web/translation/ja-JP.json | 9 ++- web/translation/pt-BR.json | 9 ++- web/translation/ru-RU.json | 9 ++- web/translation/tr-TR.json | 9 ++- web/translation/uk-UA.json | 9 ++- web/translation/vi-VN.json | 9 ++- web/translation/zh-CN.json | 9 ++- web/translation/zh-TW.json | 9 ++- 18 files changed, 246 insertions(+), 15 deletions(-) diff --git a/frontend/src/models/setting.js b/frontend/src/models/setting.js index 4bcbcefb..51cfdd71 100644 --- a/frontend/src/models/setting.js +++ b/frontend/src/models/setting.js @@ -14,6 +14,7 @@ export class AllSetting { this.webCertFile = ""; this.webKeyFile = ""; this.webBasePath = "/"; + this.webFavicon = ""; this.sessionMaxAge = 360; this.trustedProxyCIDRs = "127.0.0.1/32,::1/128"; this.pageSize = 25; diff --git a/frontend/src/pages/settings/GeneralTab.vue b/frontend/src/pages/settings/GeneralTab.vue index 75957277..35d6cfa1 100644 --- a/frontend/src/pages/settings/GeneralTab.vue +++ b/frontend/src/pages/settings/GeneralTab.vue @@ -1,6 +1,8 @@ @@ -145,6 +202,33 @@ onMounted(loadInboundTags); + + + + + + @@ -429,6 +513,12 @@ onMounted(loadInboundTags);