feat(site): Added localization support for custom HTML and keyword fields

This commit is contained in:
web@ppanel
2025-02-22 12:33:09 +07:00
parent 5b64389544
commit f9d7736e48
33 changed files with 147 additions and 17 deletions
+5
View File
@@ -43,6 +43,7 @@ export async function generateMetadata(): Promise<Metadata> {
template: `%s | ${site?.site_name || 'PPanel'}`,
},
description: site?.site_desc || '',
keywords: site?.keywords || '',
icons: {
icon: site?.site_logo
? [
@@ -114,6 +115,10 @@ export default async function RootLayout({
{children}
</Providers>
</NextIntlClientProvider>
<div
id='custom_html'
dangerouslySetInnerHTML={{ __html: config?.site.custom_html || '' }}
/>
</body>
</html>
);
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';
+3 -1
View File
@@ -35,7 +35,7 @@ declare namespace API {
type ApplicationPlatform = {
ios?: ApplicationVersion[];
mac?: ApplicationVersion[];
macos?: ApplicationVersion[];
linux?: ApplicationVersion[];
android?: ApplicationVersion[];
windows?: ApplicationVersion[];
@@ -431,6 +431,8 @@ declare namespace API {
site_name: string;
site_desc: string;
site_logo: string;
keywords: string;
custom_html: string;
};
type SortItem = {
+3 -1
View File
@@ -29,7 +29,7 @@ declare namespace API {
type ApplicationPlatform = {
ios?: ApplicationVersion[];
mac?: ApplicationVersion[];
macos?: ApplicationVersion[];
linux?: ApplicationVersion[];
android?: ApplicationVersion[];
windows?: ApplicationVersion[];
@@ -625,6 +625,8 @@ declare namespace API {
site_name: string;
site_desc: string;
site_logo: string;
keywords: string;
custom_html: string;
};
type SortItem = {