Fix danmaku auto-load default toggle
This commit is contained in:
@@ -8557,10 +8557,10 @@ const SiteConfigComponent = ({
|
|||||||
type='checkbox'
|
type='checkbox'
|
||||||
className='sr-only peer'
|
className='sr-only peer'
|
||||||
checked={siteSettings.DanmakuAutoLoadDefault !== false}
|
checked={siteSettings.DanmakuAutoLoadDefault !== false}
|
||||||
onChange={() =>
|
onChange={(e) =>
|
||||||
setSiteSettings((prev) => ({
|
setSiteSettings((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
DanmakuAutoLoadDefault: prev.DanmakuAutoLoadDefault === false,
|
DanmakuAutoLoadDefault: e.target.checked,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export async function POST(request: NextRequest) {
|
|||||||
DanmakuSourceType,
|
DanmakuSourceType,
|
||||||
DanmakuApiBase,
|
DanmakuApiBase,
|
||||||
DanmakuApiToken,
|
DanmakuApiToken,
|
||||||
|
DanmakuAutoLoadDefault,
|
||||||
TMDBApiKey,
|
TMDBApiKey,
|
||||||
TMDBProxy,
|
TMDBProxy,
|
||||||
TMDBReverseProxy,
|
TMDBReverseProxy,
|
||||||
@@ -90,6 +91,7 @@ export async function POST(request: NextRequest) {
|
|||||||
DanmakuSourceType?: 'builtin' | 'custom';
|
DanmakuSourceType?: 'builtin' | 'custom';
|
||||||
DanmakuApiBase: string;
|
DanmakuApiBase: string;
|
||||||
DanmakuApiToken: string;
|
DanmakuApiToken: string;
|
||||||
|
DanmakuAutoLoadDefault?: boolean;
|
||||||
TMDBApiKey?: string;
|
TMDBApiKey?: string;
|
||||||
TMDBProxy?: string;
|
TMDBProxy?: string;
|
||||||
TMDBReverseProxy?: string;
|
TMDBReverseProxy?: string;
|
||||||
@@ -143,6 +145,8 @@ export async function POST(request: NextRequest) {
|
|||||||
DanmakuSourceType !== 'custom') ||
|
DanmakuSourceType !== 'custom') ||
|
||||||
typeof DanmakuApiBase !== 'string' ||
|
typeof DanmakuApiBase !== 'string' ||
|
||||||
typeof DanmakuApiToken !== 'string' ||
|
typeof DanmakuApiToken !== 'string' ||
|
||||||
|
(DanmakuAutoLoadDefault !== undefined &&
|
||||||
|
typeof DanmakuAutoLoadDefault !== 'boolean') ||
|
||||||
(TMDBApiKey !== undefined && typeof TMDBApiKey !== 'string') ||
|
(TMDBApiKey !== undefined && typeof TMDBApiKey !== 'string') ||
|
||||||
(TMDBProxy !== undefined && typeof TMDBProxy !== 'string') ||
|
(TMDBProxy !== undefined && typeof TMDBProxy !== 'string') ||
|
||||||
(TMDBReverseProxy !== undefined && typeof TMDBReverseProxy !== 'string') ||
|
(TMDBReverseProxy !== undefined && typeof TMDBReverseProxy !== 'string') ||
|
||||||
@@ -203,6 +207,7 @@ export async function POST(request: NextRequest) {
|
|||||||
DanmakuSourceType,
|
DanmakuSourceType,
|
||||||
DanmakuApiBase,
|
DanmakuApiBase,
|
||||||
DanmakuApiToken,
|
DanmakuApiToken,
|
||||||
|
DanmakuAutoLoadDefault,
|
||||||
TMDBApiKey,
|
TMDBApiKey,
|
||||||
TMDBProxy,
|
TMDBProxy,
|
||||||
TMDBReverseProxy,
|
TMDBReverseProxy,
|
||||||
|
|||||||
Reference in New Issue
Block a user