mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-13 07:57:29 +08:00
feat: add yellow filter
This commit is contained in:
@@ -6,6 +6,7 @@ export interface AdminConfig {
|
||||
SiteInterfaceCacheTime: number;
|
||||
ImageProxy: string;
|
||||
DoubanProxy: string;
|
||||
DisableYellowFilter: boolean;
|
||||
};
|
||||
UserConfig: {
|
||||
AllowRegister: boolean;
|
||||
|
||||
@@ -201,6 +201,8 @@ async function initConfig() {
|
||||
SiteInterfaceCacheTime: fileConfig.cache_time || 7200,
|
||||
ImageProxy: process.env.NEXT_PUBLIC_IMAGE_PROXY || '',
|
||||
DoubanProxy: process.env.NEXT_PUBLIC_DOUBAN_PROXY || '',
|
||||
DisableYellowFilter:
|
||||
process.env.NEXT_PUBLIC_DISABLE_YELLOW_FILTER === 'true',
|
||||
},
|
||||
UserConfig: {
|
||||
AllowRegister: process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true',
|
||||
@@ -247,6 +249,8 @@ async function initConfig() {
|
||||
SiteInterfaceCacheTime: fileConfig.cache_time || 7200,
|
||||
ImageProxy: process.env.NEXT_PUBLIC_IMAGE_PROXY || '',
|
||||
DoubanProxy: process.env.NEXT_PUBLIC_DOUBAN_PROXY || '',
|
||||
DisableYellowFilter:
|
||||
process.env.NEXT_PUBLIC_DISABLE_YELLOW_FILTER === 'true',
|
||||
},
|
||||
UserConfig: {
|
||||
AllowRegister: process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true',
|
||||
@@ -301,6 +305,8 @@ export async function getConfig(): Promise<AdminConfig> {
|
||||
process.env.NEXT_PUBLIC_IMAGE_PROXY || '';
|
||||
adminConfig.SiteConfig.DoubanProxy =
|
||||
process.env.NEXT_PUBLIC_DOUBAN_PROXY || '';
|
||||
adminConfig.SiteConfig.DisableYellowFilter =
|
||||
process.env.NEXT_PUBLIC_DISABLE_YELLOW_FILTER === 'true';
|
||||
|
||||
// 合并文件中的源信息
|
||||
fileConfig = runtimeConfig as unknown as ConfigFileStruct;
|
||||
@@ -441,6 +447,8 @@ export async function resetConfig() {
|
||||
SiteInterfaceCacheTime: fileConfig.cache_time || 7200,
|
||||
ImageProxy: process.env.NEXT_PUBLIC_IMAGE_PROXY || '',
|
||||
DoubanProxy: process.env.NEXT_PUBLIC_DOUBAN_PROXY || '',
|
||||
DisableYellowFilter:
|
||||
process.env.NEXT_PUBLIC_DISABLE_YELLOW_FILTER === 'true',
|
||||
},
|
||||
UserConfig: {
|
||||
AllowRegister: process.env.NEXT_PUBLIC_ENABLE_REGISTER === 'true',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
'use client';
|
||||
|
||||
const CURRENT_VERSION = '20250801003950';
|
||||
const CURRENT_VERSION = '20250801131720';
|
||||
|
||||
// 版本检查结果枚举
|
||||
export enum UpdateStatus {
|
||||
|
||||
22
src/lib/yellow.ts
Normal file
22
src/lib/yellow.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
export const yellowWords = [
|
||||
'伦理片',
|
||||
'福利',
|
||||
'里番动漫',
|
||||
'门事件',
|
||||
'萝莉少女',
|
||||
'制服诱惑',
|
||||
'国产传媒',
|
||||
'cosplay',
|
||||
'黑丝诱惑',
|
||||
'无码',
|
||||
'日本无码',
|
||||
'有码',
|
||||
'日本有码',
|
||||
'SWAG',
|
||||
'网红主播',
|
||||
'色情片',
|
||||
'同性片',
|
||||
'福利视频',
|
||||
'福利片',
|
||||
'写真热舞',
|
||||
];
|
||||
Reference in New Issue
Block a user