feat: 优化代码

This commit is contained in:
liuyonghe0111 2026-01-07 15:00:39 +08:00
parent c2084c4a4f
commit 273371f23e
4 changed files with 8 additions and 5 deletions

View File

@ -67,7 +67,10 @@ export default function SettingDialog({ open, onOpenChange }: SettingProps) {
return ( return (
<AlertDialog open={open} onOpenChange={handleChange}> <AlertDialog open={open} onOpenChange={handleChange}>
<AlertDialogContent className="max-w-[500px]" showCloseButton={activeTab === 'profile'}> <AlertDialogContent
className="max-w-[768px] sm:max-h-[calc(100vh-100px)] h-screen"
showCloseButton={activeTab === 'profile'}
>
<AlertDialogTitle className="flex justify-between"> <AlertDialogTitle className="flex justify-between">
{activeTab === 'profile' ? ( {activeTab === 'profile' ? (
<LikedButton objectId={characterId} objectType={LikeTargetType.Character} /> <LikedButton objectId={characterId} objectType={LikeTargetType.Character} />
@ -80,7 +83,7 @@ export default function SettingDialog({ open, onOpenChange }: SettingProps) {
</IconButton> </IconButton>
)} )}
</AlertDialogTitle> </AlertDialogTitle>
<div className="w-full h-[calc(100vh-160px)] pr-1 mt-4"> <div className="w-full h-[calc(100%-50px)] pr-1 mt-4">
{activeTab === 'profile' && <Profile onActiveTab={setActiveTab} />} {activeTab === 'profile' && <Profile onActiveTab={setActiveTab} />}
{activeTab === 'mask_list' && <MaskList onActiveTab={setActiveTab} />} {activeTab === 'mask_list' && <MaskList onActiveTab={setActiveTab} />}
{activeTab === 'mask_create' && <MaskCreate onActiveTab={setActiveTab} />} {activeTab === 'mask_create' && <MaskCreate onActiveTab={setActiveTab} />}

View File

@ -12,7 +12,7 @@ import { useLogout } from '@/hooks/auth';
import Link from 'next/link'; import Link from 'next/link';
import { useState } from 'react'; import { useState } from 'react';
import { useLayoutStore } from '@/stores'; import { useLayoutStore } from '@/stores';
import { useStreamChatStore } from '../../chat/[id]/stream-chat'; import { useStreamChatStore } from '../../chat/stream-chat';
import { useAsyncFn } from '@/hooks/tools'; import { useAsyncFn } from '@/hooks/tools';
import IconFont from '@/components/ui/iconFont'; import IconFont from '@/components/ui/iconFont';
import { useTranslations } from 'next-intl'; import { useTranslations } from 'next-intl';

View File

@ -36,7 +36,7 @@ export default function StoryDialog({ open, onOpenChange }: StoryDialogProps) {
return ( return (
<AlertDialog open={open} onOpenChange={onOpenChange}> <AlertDialog open={open} onOpenChange={onOpenChange}>
<AlertDialogContent className="max-w-[760px]"> <AlertDialogContent className="max-w-[760px] sm:max-h-[calc(100vh-100px)] h-screen">
<AlertDialogTitle></AlertDialogTitle> <AlertDialogTitle></AlertDialogTitle>
<div className="txt-title-l my-6 text-txt-primary-normal text-center"> <div className="txt-title-l my-6 text-txt-primary-normal text-center">
The Bossy CEOs Contract Lover The Bossy CEOs Contract Lover

View File

@ -48,7 +48,7 @@ export default function BottomBar() {
return ( return (
<div <div
ref={containerRef} ref={containerRef}
className="h-20 border-outline-normal bg-[rgba(10,14,43,1)] z-100 flex border-t items-center justify-between" className="h-20 border-outline-normal bg-[rgba(10,14,43,1)] flex border-t items-center justify-between"
> >
{items.map((item) => { {items.map((item) => {
const isSelected = pathname === item.path; const isSelected = pathname === item.path;