From 6d51834a9573df59d345096cc0b32b081e1d3d04 Mon Sep 17 00:00:00 2001 From: IanShaw027 Date: Wed, 22 Apr 2026 01:48:09 +0800 Subject: [PATCH] refactor(profile): simplify profile page flow --- .../user/profile/ProfileInfoCard.vue | 36 +------- frontend/src/views/user/ProfileView.vue | 86 ++++++++----------- .../views/user/__tests__/ProfileView.spec.ts | 10 +-- 3 files changed, 45 insertions(+), 87 deletions(-) diff --git a/frontend/src/components/user/profile/ProfileInfoCard.vue b/frontend/src/components/user/profile/ProfileInfoCard.vue index 175944b3..99559de5 100644 --- a/frontend/src/components/user/profile/ProfileInfoCard.vue +++ b/frontend/src/components/user/profile/ProfileInfoCard.vue @@ -98,7 +98,7 @@ -
+
-
+
- +
diff --git a/frontend/src/views/user/ProfileView.vue b/frontend/src/views/user/ProfileView.vue index 550a3d13..84055119 100644 --- a/frontend/src/views/user/ProfileView.vue +++ b/frontend/src/views/user/ProfileView.vue @@ -2,59 +2,47 @@
-
-
- -
+ - +
+

+ {{ t('common.contactSupport') }} +

+

{{ contactInfo }}

+
+
+ + + + + +
diff --git a/frontend/src/views/user/__tests__/ProfileView.spec.ts b/frontend/src/views/user/__tests__/ProfileView.spec.ts index ca37dbe9..3b187396 100644 --- a/frontend/src/views/user/__tests__/ProfileView.spec.ts +++ b/frontend/src/views/user/__tests__/ProfileView.spec.ts @@ -73,7 +73,7 @@ describe('ProfileView', () => { }) }) - it('renders the approved two-column profile shell without separate stat cards', async () => { + it('renders the simplified single-column profile shell without separate stat cards', async () => { const wrapper = mount(ProfileView, { global: { stubs: { @@ -92,10 +92,8 @@ describe('ProfileView', () => { expect(wrapper.findAll('.stat-card')).toHaveLength(0) expect(wrapper.get('[data-testid="profile-shell"]').exists()).toBe(true) - expect(wrapper.get('[data-testid="profile-primary-column"]').exists()).toBe(true) - expect(wrapper.get('[data-testid="profile-secondary-column"]').exists()).toBe(true) - expect(wrapper.get('[data-testid="profile-primary-column"]').html()).toContain('profile-info-card') - expect(wrapper.get('[data-testid="profile-secondary-column"]').html()).toContain('profile-password-form') - expect(wrapper.get('[data-testid="profile-secondary-column"]').html()).toContain('profile-totp-card') + expect(wrapper.get('[data-testid="profile-shell"]').html()).toContain('profile-info-card') + expect(wrapper.get('[data-testid="profile-shell"]').html()).toContain('profile-password-form') + expect(wrapper.get('[data-testid="profile-shell"]').html()).toContain('profile-totp-card') }) })