Skip to content

Commit 9d81d0c

Browse files
youngbeom-shin申永范-UX
andauthored
feat(user_settings): enhance profile edit functionality (#1346)
* feat(user_settings): enhance profile edit functionality * feat(user_settings): enhance profile edit functionality --------- Co-authored-by: 申永范-UX <[email protected]>
1 parent f29ab35 commit 9d81d0c

File tree

13 files changed

+274
-84
lines changed

13 files changed

+274
-84
lines changed

frontend/src/assets/stylesheets/element-plus/button.css

Lines changed: 122 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,127 @@
120120
box-shadow: var(--shadow-xs);
121121
}
122122

123+
/* btn-outline */
124+
.btn-outline {
125+
background-color: var(--Base-White);
126+
border: 1px solid var(--Gray-300);
127+
color: var(--Gray-700);
128+
}
129+
130+
.btn-outline:hover {
131+
background-color: var(--Gray-50);
132+
border: 1px solid var(--Gray-300);
133+
color: var(--Gray-800);
134+
}
135+
136+
.btn-outline:focus {
137+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(152, 162, 179, 0.14);
138+
}
139+
140+
.btn-outline[disabled] {
141+
background-color: var(--Base-White);
142+
color: var(--Gray-400);
143+
border: 1px solid var(--Gray-200);
144+
}
145+
146+
/* btn-outline-primary */
147+
.btn-outline-primary {
148+
background-color: var(--Base-White);
149+
border: 1px solid var(--Brand-300);
150+
color: var(--Brand-700);
151+
}
152+
153+
.btn-outline-primary:hover {
154+
background-color: var(--Brand-50);
155+
border: 1px solid var(--Brand-300);
156+
color: var(--Brand-800);
157+
}
158+
159+
.btn-outline-primary:focus {
160+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(77, 106, 214, 0.24);
161+
}
162+
163+
.btn-outline-primary[disabled] {
164+
background-color: var(--Base-White);
165+
color: var(--Gray-400);
166+
border: 1px solid var(--Gray-200);
167+
}
168+
169+
/* btn-outline-danger */
170+
.btn-outline-danger {
171+
background-color: var(--Base-White);
172+
border: 1px solid var(--Error-300);
173+
color: var(--Error-700);
174+
}
175+
176+
.btn-outline-danger:hover {
177+
background-color: var(--Error-50);
178+
border: 1px solid var(--Error-300);
179+
color: var(--Error-800);
180+
}
181+
182+
.btn-outline-danger:focus {
183+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(240, 68, 56, 0.24);
184+
}
185+
186+
.btn-outline-danger[disabled] {
187+
background-color: var(--Base-White);
188+
color: var(--Gray-400);
189+
border: 1px solid var(--Gray-200);
190+
}
191+
192+
/* btn-ghost */
193+
.btn-ghost {
194+
background-color: transparent;
195+
border: 1px solid transparent;
196+
color: var(--Gray-600);
197+
box-shadow: none;
198+
}
199+
200+
.btn-ghost:hover {
201+
background-color: var(--Gray-50);
202+
border: 1px solid transparent;
203+
color: var(--Gray-700);
204+
}
205+
206+
.btn-ghost[disabled] {
207+
color: var(--Gray-400);
208+
}
209+
210+
/* btn-ghost-primary */
211+
.btn-ghost-primary {
212+
background-color: transparent;
213+
border: 1px solid transparent;
214+
color: var(--Brand-700);
215+
}
216+
217+
.btn-ghost-primary:hover {
218+
background-color: var(--Brand-50);
219+
border: 1px solid transparent;
220+
color: var(--Brand-800);
221+
}
222+
223+
.btn-ghost-primary[disabled] {
224+
color: var(--Gray-400);
225+
}
226+
227+
/* btn-ghost-danger */
228+
.btn-ghost-danger {
229+
background-color: transparent;
230+
border: 1px solid transparent;
231+
color: var(--Error-700);
232+
}
233+
234+
.btn-ghost-danger:hover {
235+
background-color: var(--Error-50);
236+
border: 1px solid transparent;
237+
color: var(--Error-800);
238+
}
239+
240+
.btn-ghost-danger[disabled] {
241+
color: var(--Gray-400);
242+
}
243+
123244
/* btn-tertiary-gray */
124245
.btn-tertiary-gray {
125246
color: var(--Gray-600);
@@ -193,6 +314,7 @@
193314
/* sm size button */
194315
.btn-primary.btn-sm,
195316
.btn-danger.btn-sm,
317+
.btn-outline-danger.btn-sm,
196318
.btn-secondary-gray.btn-sm,
197319
.btn-secondary-color.btn-sm,
198320
.btn-tertiary-gray.btn-sm,
@@ -356,4 +478,3 @@
356478
text-align: center;
357479
justify-content: center;
358480
}
359-

frontend/src/components/__tests__/user_settings/ProfileEdit.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describe('ProfileEdit.vue', () => {
158158
const clickSpy = vi.spyOn(wrapper.vm.fileInput, 'click')
159159

160160
// Find and click the upload avatar button
161-
await wrapper.find('.btn.btn-primary.btn-sm').trigger('click')
161+
await wrapper.find('.btn.btn-secondary-gray.btn-sm').trigger('click')
162162

163163
expect(clickSpy).toHaveBeenCalled()
164164
})
@@ -168,7 +168,7 @@ describe('ProfileEdit.vue', () => {
168168

169169
wrapper.vm.profileData.avatar.value = 'https://example.com/avatar.jpg'
170170

171-
await wrapper.find('.btn-secondary-gray.btn-sm').trigger('click')
171+
await wrapper.find('.btn.btn-outline-danger.btn-sm').trigger('click')
172172

173173
await wrapper.vm.$nextTick()
174174

frontend/src/components/user_settings/Menu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="z-20 bg-white border-b border-gray-100">
2+
<div class="z-20 bg-white border-gray-100">
33
<div class="sticky top-14 pt-6 w-72 rounded-md mx-6 md:w-full md:mx-0">
44
<div
55
@click="clickProfile"

0 commit comments

Comments
 (0)