feat: 完善官网配置、预约管理与文章编辑
This commit is contained in:
@@ -82,19 +82,21 @@ const LanguageSelector = ({ currentLang, onLanguageChange, t }) => {
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
>
|
||||
<Button
|
||||
icon={<Globe size={20} />}
|
||||
aria-label={t('common.changeLanguage')}
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='!w-8 !h-8 sm:!w-9 sm:!h-9 !flex !items-center !justify-center hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !rounded-full !transition-all !duration-200 hover:!scale-[1.08] active:!scale-95'
|
||||
style={{
|
||||
color:
|
||||
actualTheme === 'dark'
|
||||
? 'rgba(243,244,246,0.9)'
|
||||
: 'rgba(75,85,99,1)',
|
||||
}}
|
||||
/>
|
||||
<span className='inline-flex'>
|
||||
<Button
|
||||
icon={<Globe size={20} />}
|
||||
aria-label={t('common.changeLanguage')}
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='!w-8 !h-8 sm:!w-9 sm:!h-9 !flex !items-center !justify-center hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !rounded-full !transition-all !duration-200 hover:!scale-[1.08] active:!scale-95'
|
||||
style={{
|
||||
color:
|
||||
actualTheme === 'dark'
|
||||
? 'rgba(243,244,246,0.9)'
|
||||
: 'rgba(75,85,99,1)',
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
</Dropdown>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -133,19 +133,21 @@ const MobileNavMenu = ({ mainNavLinks, userState, t }) => {
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
>
|
||||
<Button
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
aria-label={t('主导航')}
|
||||
aria-haspopup='menu'
|
||||
aria-expanded={visible}
|
||||
icon={<Compass size={16} />}
|
||||
className='!ml-1 !px-2 !h-8 max-w-[9rem] !rounded-xl !text-current hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !transition-all !duration-200 active:!scale-95 [&_.semi-button-content]:min-w-0'
|
||||
>
|
||||
<span className='ml-1 text-[13px] font-semibold truncate'>
|
||||
{activeItem ? activeItem.text : t('导航')}
|
||||
</span>
|
||||
</Button>
|
||||
<span className='inline-flex'>
|
||||
<Button
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
aria-label={t('主导航')}
|
||||
aria-haspopup='menu'
|
||||
aria-expanded={visible}
|
||||
icon={<Compass size={16} />}
|
||||
className='!ml-1 !px-2 !h-8 max-w-[9rem] !rounded-xl !text-current hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !transition-all !duration-200 active:!scale-95 [&_.semi-button-content]:min-w-0'
|
||||
>
|
||||
<span className='ml-1 text-[13px] font-semibold truncate'>
|
||||
{activeItem ? activeItem.text : t('导航')}
|
||||
</span>
|
||||
</Button>
|
||||
</span>
|
||||
</Dropdown>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -251,19 +251,22 @@ const ThemeToggle = ({ theme, onThemeToggle, t }) => {
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
>
|
||||
<Button
|
||||
icon={currentButtonIcon}
|
||||
aria-label={t('切换主题')}
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='!w-8 !h-8 sm:!w-9 sm:!h-9 !flex !items-center !justify-center hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !rounded-full !transition-all !duration-200 hover:!scale-[1.08] active:!scale-95'
|
||||
style={{
|
||||
color:
|
||||
actualTheme === 'dark'
|
||||
? 'rgba(243,244,246,0.9)'
|
||||
: 'rgba(75,85,99,1)',
|
||||
}}
|
||||
/>
|
||||
{/* Semi can resolve a DOM trigger directly without findDOMNode. */}
|
||||
<span className='inline-flex'>
|
||||
<Button
|
||||
icon={currentButtonIcon}
|
||||
aria-label={t('切换主题')}
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='!w-8 !h-8 sm:!w-9 sm:!h-9 !flex !items-center !justify-center hover:!bg-brand/10 dark:hover:!bg-brand/15 hover:!text-brand-deep dark:hover:!text-brand-from !rounded-full !transition-all !duration-200 hover:!scale-[1.08] active:!scale-95'
|
||||
style={{
|
||||
color:
|
||||
actualTheme === 'dark'
|
||||
? 'rgba(243,244,246,0.9)'
|
||||
: 'rgba(75,85,99,1)',
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
</Dropdown>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -300,41 +300,43 @@ const UserArea = ({
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
>
|
||||
<Button
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='flex items-center gap-2 !pl-1.5 !pr-2.5 !py-1.5 !h-10 !rounded-full hover:!bg-brand/10 dark:hover:!bg-brand/15 !bg-transparent !transition-all !duration-200 hover:!-translate-y-0.5 group'
|
||||
>
|
||||
<div className='relative'>
|
||||
<Avatar
|
||||
size='small'
|
||||
src={avatarUrl}
|
||||
color={stringToColor(displayName)}
|
||||
className='!w-7 !h-7 !text-xs ring-2 ring-white dark:ring-gray-800 group-hover:!ring-brand/40 dark:group-hover:!ring-brand/50 transition-all'
|
||||
>
|
||||
{displayName[0].toUpperCase()}
|
||||
</Avatar>
|
||||
{/* 在线状态点 */}
|
||||
<span className='absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 bg-emerald-500 border-2 border-white dark:border-gray-800 rounded-full' />
|
||||
</div>
|
||||
<span className='hidden md:flex flex-col items-start'>
|
||||
<Typography.Text
|
||||
className='!text-sm !font-medium !leading-none'
|
||||
<span className='inline-flex'>
|
||||
<Button
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
className='flex items-center gap-2 !pl-1.5 !pr-2.5 !py-1.5 !h-10 !rounded-full hover:!bg-brand/10 dark:hover:!bg-brand/15 !bg-transparent !transition-all !duration-200 hover:!-translate-y-0.5 group'
|
||||
>
|
||||
<div className='relative'>
|
||||
<Avatar
|
||||
size='small'
|
||||
src={avatarUrl}
|
||||
color={stringToColor(displayName)}
|
||||
className='!w-7 !h-7 !text-xs ring-2 ring-white dark:ring-gray-800 group-hover:!ring-brand/40 dark:group-hover:!ring-brand/50 transition-all'
|
||||
>
|
||||
{displayName[0].toUpperCase()}
|
||||
</Avatar>
|
||||
{/* 在线状态点 */}
|
||||
<span className='absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 bg-emerald-500 border-2 border-white dark:border-gray-800 rounded-full' />
|
||||
</div>
|
||||
<span className='hidden md:flex flex-col items-start'>
|
||||
<Typography.Text
|
||||
className='!text-sm !font-medium !leading-none'
|
||||
style={{
|
||||
color: isDark ? 'rgba(243,244,246,0.9)' : 'rgba(55,65,81,1)',
|
||||
}}
|
||||
>
|
||||
{displayName}
|
||||
</Typography.Text>
|
||||
</span>
|
||||
<ChevronDown
|
||||
size={14}
|
||||
style={{
|
||||
color: isDark ? 'rgba(243,244,246,0.9)' : 'rgba(55,65,81,1)',
|
||||
color: isDark ? 'rgba(209,213,219,1)' : 'rgba(156,163,175,1)',
|
||||
}}
|
||||
>
|
||||
{displayName}
|
||||
</Typography.Text>
|
||||
</span>
|
||||
<ChevronDown
|
||||
size={14}
|
||||
style={{
|
||||
color: isDark ? 'rgba(209,213,219,1)' : 'rgba(156,163,175,1)',
|
||||
}}
|
||||
className='group-hover:!opacity-80 transition-colors'
|
||||
/>
|
||||
</Button>
|
||||
className='group-hover:!opacity-80 transition-colors'
|
||||
/>
|
||||
</Button>
|
||||
</span>
|
||||
</Dropdown>
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user