mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-03-13 09:37:28 +08:00
fix: fix DisableYellowFilter switch style
This commit is contained in:
@@ -1 +1 @@
|
|||||||
20250801131720
|
20250801133915
|
||||||
@@ -1615,54 +1615,56 @@ const SiteConfigComponent = ({ config }: { config: AdminConfig | null }) => {
|
|||||||
|
|
||||||
{/* 禁用黄色过滤器 */}
|
{/* 禁用黄色过滤器 */}
|
||||||
<div>
|
<div>
|
||||||
<label
|
<div className='flex items-center justify-between'>
|
||||||
className={`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 ${
|
<label
|
||||||
isD1Storage || isUpstashStorage ? 'opacity-50' : ''
|
className={`block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 ${
|
||||||
}`}
|
isD1Storage || isUpstashStorage ? 'opacity-50' : ''
|
||||||
>
|
}`}
|
||||||
禁用黄色过滤器
|
>
|
||||||
{isD1Storage && (
|
禁用黄色过滤器
|
||||||
<span className='ml-2 text-xs text-gray-500 dark:text-gray-400'>
|
{isD1Storage && (
|
||||||
(D1 环境下请通过环境变量修改)
|
<span className='ml-2 text-xs text-gray-500 dark:text-gray-400'>
|
||||||
</span>
|
(D1 环境下请通过环境变量修改)
|
||||||
)}
|
</span>
|
||||||
{isUpstashStorage && (
|
)}
|
||||||
<span className='ml-2 text-xs text-gray-500 dark:text-gray-400'>
|
{isUpstashStorage && (
|
||||||
(Upstash 环境下请通过环境变量修改)
|
<span className='ml-2 text-xs text-gray-500 dark:text-gray-400'>
|
||||||
</span>
|
(Upstash 环境下请通过环境变量修改)
|
||||||
)}
|
</span>
|
||||||
</label>
|
)}
|
||||||
<div className='flex items-center'>
|
</label>
|
||||||
<input
|
<button
|
||||||
type='checkbox'
|
type='button'
|
||||||
id='disableYellowFilter'
|
onClick={() =>
|
||||||
checked={siteSettings.DisableYellowFilter}
|
|
||||||
onChange={(e) =>
|
|
||||||
!isD1Storage &&
|
!isD1Storage &&
|
||||||
!isUpstashStorage &&
|
!isUpstashStorage &&
|
||||||
setSiteSettings((prev) => ({
|
setSiteSettings((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
DisableYellowFilter: e.target.checked,
|
DisableYellowFilter: !prev.DisableYellowFilter,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
disabled={isD1Storage || isUpstashStorage}
|
disabled={isD1Storage || isUpstashStorage}
|
||||||
className={`w-4 h-4 text-green-600 bg-gray-100 border-gray-300 rounded focus:ring-green-500 dark:focus:ring-green-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 ${
|
className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 ${
|
||||||
|
siteSettings.DisableYellowFilter
|
||||||
|
? 'bg-green-600'
|
||||||
|
: 'bg-gray-200 dark:bg-gray-700'
|
||||||
|
} ${
|
||||||
isD1Storage || isUpstashStorage
|
isD1Storage || isUpstashStorage
|
||||||
? 'opacity-50 cursor-not-allowed'
|
? 'opacity-50 cursor-not-allowed'
|
||||||
: ''
|
: ''
|
||||||
}`}
|
}`}
|
||||||
/>
|
|
||||||
<label
|
|
||||||
htmlFor='disableYellowFilter'
|
|
||||||
className={`ml-2 text-sm text-gray-700 dark:text-gray-300 ${
|
|
||||||
isD1Storage || isUpstashStorage ? 'opacity-50' : ''
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
启用后将禁用黄色内容过滤功能
|
<span
|
||||||
</label>
|
className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${
|
||||||
|
siteSettings.DisableYellowFilter
|
||||||
|
? 'translate-x-6'
|
||||||
|
: 'translate-x-1'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p className='mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
<p className='mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
||||||
启用此选项将禁用黄色内容的过滤功能,允许显示所有内容。
|
禁用黄色内容的过滤功能,允许显示所有内容。
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
const CURRENT_VERSION = '20250801131720';
|
const CURRENT_VERSION = '20250801133915';
|
||||||
|
|
||||||
// 版本检查结果枚举
|
// 版本检查结果枚举
|
||||||
export enum UpdateStatus {
|
export enum UpdateStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user