Skip to content

Commit c825e32

Browse files
committed
refactor(settings): migrate ProfilePanel to SettingsPanel module
Rename components/profile → components/settings with flattened structure: - ProfileContent → ProfileSection - DocumentsContent → DocumentsSection - NotificationsContent → NotificationsSection - SecurityContent → SecuritySection Update all 5 consumer imports (PadTitle, MobilePadTitle, ToolbarDesktop, HomePage, UserProfileDialog). Replace ILinkItem with LinkItem. Use rounded-box instead of hardcoded rounded-2xl in modal consumers.
1 parent 1579d28 commit c825e32

20 files changed

Lines changed: 738 additions & 703 deletions

packages/webapp/src/components/TipTap/pad-title-section/MobilePadTitle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import SignInForm from '@components/auth/SignInForm'
2-
import ProfilePanel from '@components/profile/ProfilePanel'
2+
import SettingsPanel from '@components/settings/SettingsPanel'
33
import ToolbarButton from '@components/TipTap/toolbar/ToolbarButton'
44
import { Avatar } from '@components/ui/Avatar'
55
import Button from '@components/ui/Button'
@@ -167,9 +167,9 @@ const MobilePadTitle = () => {
167167

168168
{/* Profile Modal */}
169169
<Modal open={isProfileModalOpen} onOpenChange={setProfileModalOpen}>
170-
<ModalContent size={user ? '4xl' : 'md'} className="overflow-hidden rounded-2xl p-0">
170+
<ModalContent size={user ? '4xl' : 'md'} className="rounded-box overflow-hidden p-0">
171171
{user ? (
172-
<ProfilePanel onClose={() => setProfileModalOpen(false)} />
172+
<SettingsPanel onClose={() => setProfileModalOpen(false)} />
173173
) : (
174174
<div className="w-full p-6 sm:p-8">
175175
<SignInForm variant="inline" />

packages/webapp/src/components/TipTap/pad-title-section/PadTitle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import SignInForm from '@components/auth/SignInForm'
2-
import ProfilePanel from '@components/profile/ProfilePanel'
2+
import SettingsPanel from '@components/settings/SettingsPanel'
33
import { Avatar } from '@components/ui/Avatar'
44
import Button from '@components/ui/Button'
55
import { Modal, ModalContent } from '@components/ui/Dialog'
@@ -148,9 +148,9 @@ const PadTitle = () => {
148148

149149
{/* Profile Modal */}
150150
<Modal open={isProfileModalOpen} onOpenChange={setProfileModalOpen}>
151-
<ModalContent size={user ? '5xl' : 'md'} className="overflow-hidden rounded-2xl p-0">
151+
<ModalContent size={user ? '5xl' : 'md'} className="rounded-box overflow-hidden p-0">
152152
{user ? (
153-
<ProfilePanel onClose={() => setProfileModalOpen(false)} />
153+
<SettingsPanel onClose={() => setProfileModalOpen(false)} />
154154
) : (
155155
<div className="w-full p-6 sm:p-8">
156156
<SignInForm variant="inline" />

packages/webapp/src/components/TipTap/toolbar/ToolbarDesktop.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const InsertMultimediaForm = dynamic(() => import('./InsertMultimediaForm'), {
2929
loading: () => <Loading />
3030
})
3131

32-
const ProfilePanel = dynamic(() => import('@components/profile/ProfilePanel'), {
32+
const SettingsPanel = dynamic(() => import('@components/settings/SettingsPanel'), {
3333
loading: () => <Loading />
3434
})
3535

@@ -283,8 +283,8 @@ const ToolbarDesktop = () => {
283283
</div>
284284
</div>
285285
<Modal open={isModalOpen} onOpenChange={setModalOpen}>
286-
<ModalContent size="4xl" className="overflow-hidden rounded-2xl p-0">
287-
<ProfilePanel defaultTab="documents" onClose={() => setModalOpen(false)} />
286+
<ModalContent size="4xl" className="rounded-box overflow-hidden p-0">
287+
<SettingsPanel defaultTab="documents" onClose={() => setModalOpen(false)} />
288288
</ModalContent>
289289
</Modal>
290290
</>

packages/webapp/src/components/pages/home/HomePage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import slugify from 'slugify'
2828
const SignInForm = dynamic(() => import('@components/auth/SignInForm'), {
2929
loading: () => <Loading />
3030
})
31-
const ProfilePanel = dynamic(() => import('@components/profile/ProfilePanel'), {
31+
const SettingsPanel = dynamic(() => import('@components/settings/SettingsPanel'), {
3232
loading: () => <Loading />
3333
})
3434

@@ -290,8 +290,8 @@ const HomePage = ({ hostname }: HomePageProps) => {
290290
{/* Profile Modal */}
291291
{user && (
292292
<Modal open={isProfileOpen} onOpenChange={setIsProfileOpen}>
293-
<ModalContent size="4xl" className="overflow-hidden rounded-2xl p-0">
294-
<ProfilePanel onClose={() => setIsProfileOpen(false)} />
293+
<ModalContent size="4xl" className="rounded-box overflow-hidden p-0">
294+
<SettingsPanel onClose={() => setIsProfileOpen(false)} />
295295
</ModalContent>
296296
</Modal>
297297
)}

packages/webapp/src/components/profile/ProfilePanel.tsx

Lines changed: 0 additions & 279 deletions
This file was deleted.

packages/webapp/src/components/profile/index.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/webapp/src/components/profile/types.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)