mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-19 04:17:29 +08:00
feat: roughly admin info struct and interface
This commit is contained in:
@@ -4,14 +4,18 @@ import '../lib/cron';
|
||||
|
||||
import './globals.css';
|
||||
|
||||
import { getConfig } from '@/lib/config';
|
||||
|
||||
import AuthProvider from '../components/AuthProvider';
|
||||
import { SiteProvider } from '../components/SiteProvider';
|
||||
import { ThemeProvider } from '../components/ThemeProvider';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] });
|
||||
|
||||
const config = getConfig();
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: process.env.SITE_NAME || 'MoonTV',
|
||||
title: config.SiteConfig.SiteName,
|
||||
description: '影视聚合',
|
||||
manifest: '/manifest.json',
|
||||
};
|
||||
@@ -29,15 +33,14 @@ export default function RootLayout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const siteName = process.env.SITE_NAME || 'MoonTV';
|
||||
const announcement =
|
||||
process.env.ANNOUNCEMENT ||
|
||||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。';
|
||||
const siteName = config.SiteConfig.SiteName;
|
||||
const announcement = config.SiteConfig.Announcement;
|
||||
|
||||
// 将运行时配置注入到全局 window 对象,供客户端在运行时读取
|
||||
const runtimeConfig = {
|
||||
STORAGE_TYPE: process.env.NEXT_PUBLIC_STORAGE_TYPE || 'localstorage',
|
||||
ENABLE_REGISTER: process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true',
|
||||
ENABLE_REGISTER: config.UserConfig.AllowRegister,
|
||||
AGGREGATE_SEARCH_RESULT: config.SiteConfig.SearchResultDefaultAggregate,
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user