diff --git a/client/public/locales/en/translation.json b/client/public/locales/en/translation.json index 33a9ff8d..d9dc107a 100644 --- a/client/public/locales/en/translation.json +++ b/client/public/locales/en/translation.json @@ -135,6 +135,10 @@ "desc": "Set the icon (Favicon) displayed in the browser's address bar", "title": "Favicon" }, + "footer": { + "desc": "Set the footer content of the site (HTML)", + "title": "Footer" + }, "friend": { "apply": { "desc": "Allow other users to apply for friend links (requires review)", diff --git a/client/public/locales/ja/translation.json b/client/public/locales/ja/translation.json index 79b31657..e395ece5 100644 --- a/client/public/locales/ja/translation.json +++ b/client/public/locales/ja/translation.json @@ -135,6 +135,10 @@ "desc": "ブラウザのアドレスバーに表示されるアイコン(ファビコン)を設定します。", "title": "ファビコン" }, + "footer": { + "desc": "サイトのフッターコンテンツを設定する(HTML)", + "title": "フッター" + }, "friend": { "apply": { "desc": "他のユーザーが友人リンクを申請できるようにする(審査が必要)", diff --git a/client/public/locales/zh/translation.json b/client/public/locales/zh/translation.json index 8542b018..e3f8e9dd 100644 --- a/client/public/locales/zh/translation.json +++ b/client/public/locales/zh/translation.json @@ -135,6 +135,10 @@ "desc": "设置显示于浏览器的地址栏的图标(Favicon)", "title": "网站图标" }, + "footer": { + "desc": "设置显示于站点底部的内容(HTML)", + "title": "站点底部内容" + }, "friend": { "apply": { "desc": "允许其他用户申请友链(需审核)", diff --git a/client/src/components/footer.tsx b/client/src/components/footer.tsx index a157204b..4d5982f5 100644 --- a/client/src/components/footer.tsx +++ b/client/src/components/footer.tsx @@ -10,6 +10,7 @@ function Footer() { const { t } = useTranslation() const [modeState, setModeState] = useState('system'); const config = useContext(ClientConfigContext); + const footerHtml = config.get('footer'); useEffect(() => { const mode = localStorage.getItem('theme') as ThemeMode || 'system'; setModeState(mode); @@ -42,6 +43,7 @@ function Footer() {
+ {footerHtml &&
}

© 2024 Powered by Rin diff --git a/client/src/page/settings.tsx b/client/src/page/settings.tsx index 4ce198d2..825a3e51 100644 --- a/client/src/page/settings.tsx +++ b/client/src/page/settings.tsx @@ -97,6 +97,7 @@ export function Settings() { + { await client.config.cache.delete(undefined, { headers: headersWithAuth()