mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-06 03:30:25 -05:00
🐛 fix: Remove unnecessary comments to simplify code readability
This commit is contained in:
parent
f9a7ece9bf
commit
a988cb3c50
@ -14,15 +14,10 @@ import TelegramForm from './forms/telegram-form';
|
||||
export default function Page() {
|
||||
const t = useTranslations('auth-control');
|
||||
|
||||
// 定义表单配置
|
||||
const formSections = [
|
||||
{
|
||||
title: t('communicationMethods'),
|
||||
forms: [
|
||||
{ component: EmailSettingsForm },
|
||||
{ component: PhoneSettingsForm },
|
||||
// Removed EmailLogsTable and PhoneLogsTable modules
|
||||
],
|
||||
forms: [{ component: EmailSettingsForm }, { component: PhoneSettingsForm }],
|
||||
},
|
||||
{
|
||||
title: t('socialAuthMethods'),
|
||||
|
||||
@ -14,7 +14,6 @@ export default function GiftLogPage() {
|
||||
const t = useTranslations('log');
|
||||
const sp = useSearchParams();
|
||||
|
||||
// 获取今日日期作为默认值
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
|
||||
const getGiftTypeText = (type: number) => {
|
||||
|
||||
@ -13,7 +13,6 @@ export default function SubscribeTrafficLogPage() {
|
||||
const t = useTranslations('log');
|
||||
const sp = useSearchParams();
|
||||
|
||||
// 获取今日日期作为默认值
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
|
||||
const initialFilters = {
|
||||
|
||||
@ -14,7 +14,6 @@ export const protocols = [
|
||||
'meru',
|
||||
] as const;
|
||||
|
||||
// 字段配置类型
|
||||
export type FieldConfig = {
|
||||
name: string;
|
||||
type: 'input' | 'select' | 'switch' | 'number' | 'textarea';
|
||||
@ -337,7 +336,6 @@ export function getProtocolDefaultConfig(proto: ProtocolType) {
|
||||
}
|
||||
}
|
||||
|
||||
// 协议字段配置
|
||||
export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
||||
shadowsocks: [
|
||||
{
|
||||
|
||||
@ -68,7 +68,6 @@ function DynamicField({
|
||||
}) {
|
||||
const fieldName = `protocols.${protocolIndex}.${field.name}` as const;
|
||||
|
||||
// 检查字段是否应该显示
|
||||
if (field.condition && !field.condition(protocolData, {})) {
|
||||
return null;
|
||||
}
|
||||
@ -131,7 +130,6 @@ function DynamicField({
|
||||
);
|
||||
|
||||
case 'select':
|
||||
// 如果选项只有一个,直接隐藏该字段
|
||||
if (!field.options || field.options.length <= 1) {
|
||||
return null;
|
||||
}
|
||||
@ -259,7 +257,6 @@ function renderGroupCard(
|
||||
const groupFields = fields.filter((field) => field.group === group);
|
||||
if (groupFields.length === 0) return null;
|
||||
|
||||
// 检查是否有字段需要显示
|
||||
const visibleFields = groupFields.filter(
|
||||
(field) => !field.condition || field.condition(protocolData, {}),
|
||||
);
|
||||
|
||||
@ -284,7 +284,6 @@ export function UserStatisticsCard() {
|
||||
tickLine={false}
|
||||
axisLine={false}
|
||||
tickFormatter={(value) => {
|
||||
// value format: "YYYY-MM"
|
||||
const [year, month] = value.split('-');
|
||||
return new Date(year, month - 1).toLocaleDateString(locale, {
|
||||
month: 'short',
|
||||
|
||||
@ -81,7 +81,6 @@ export const navs = [
|
||||
],
|
||||
},
|
||||
|
||||
// 日志与分析
|
||||
{
|
||||
title: 'Logs & Analytics',
|
||||
icon: 'flat-color-icons:statistics',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user