Commit 0ebd240
authored
Update username update logic (#978)
* feat(navbar): add alerts for username update
- Add alert for username change requirement
- Update navbar translations for alerts
- Remove unused UpdateUsername component
- Adjust styles for alert components
* feat(navbar): enable username change conditionally
- Show alert for username change based on login
- Remove hardcoded alert in ProfileEdit
- Update localization files to remove username hint
* feat(navbar, user_settings): restrict links based on username change permission
- Updated navbar links to check if user can change username
- Restricted access to settings links in user menu
- Added computed property for username change permission
* feat(RepoClone): enhance user access controls
- Add canChangeUsername check
- Introduce hasEmail computed property
- Update button visibility conditions
* feat(navbar): enhance user feedback for email and username
- Add alert for missing email and username
- Update English and Chinese translations
- Adjust conditions for existing alerts
* feat(prompts): enhance user login checks
- Add computed property for login status
- Implement check for username change permission
- Add computed property for email presence
* feat(profile): add username update functionality
- Add UpdateUsername component
- Add success message for profile update
- Add confirmation message for username update
- Add internal username fields in locales
* feat(popup): update username field labels
- Remove confirmation message from popup
- Update English username labels
- Update Chinese username labels
* feat(components): refactor username logic
- Change canChangeUsername to computed
- Simplify hasEmail computed property
* feat(popup): update username handling logic
- Change profile update endpoint format
- Refresh JWT after successful update
- Set cookie to prevent username change
* feat(user_settings): improve username change logic
- Update username input to use boolean
- Refactor canChangeUsername to computed
- Use profileData for username in updates
- Remove unnecessary watch on username
* feat(user-settings): update username handling
- Refactor username change logic
- Use store for canChangeUsername state
- Update dialog binding for username change
- Adjust username input disabled state
- Refresh cookie state after username update
* feat(navbar): add UpdateUsername component
- Include UpdateUsername in Navbar.vue
- Remove UpdateUsername from RepoCards.vue
* fix(navbar): update isLoggedInBoolean usage
- Replace isLoggedInBoolean with isLoggedIn
- Simplify conditional checks for actions
- Remove unnecessary props from Navbar component
* feat(user-settings): update visibility conditions
- Added initialization checks for alerts
- Refactored visibility logic for buttons
- Replaced cookie checks with store references
- Simplified computed properties in UserStore
* feat(tests): update Menu component tests
- Add actionLimited property to user data
- Mock storeToRefs from pinia
- Change test description for clarity
* feat(popup): update validation messages in UpdateUsername.vue
- Translated comments to English
- Clarified validation rules descriptions
* Remove chinese1 parent d61956f commit 0ebd240
File tree
14 files changed
+193
-159
lines changed- frontend/src
- components
- __tests__/user_settings
- popup
- prompts
- user_settings
- locales
- en_js
- zh_js
- stores
- views/layouts
14 files changed
+193
-159
lines changedLines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | | - | |
| 46 | + | |
42 | 47 | | |
43 | | - | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
158 | | - | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
167 | | - | |
| 169 | + | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | | - | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | | - | |
| 196 | + | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| |||
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| 226 | + | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
| |||
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| 256 | + | |
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
| |||
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
276 | | - | |
| 280 | + | |
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
284 | | - | |
| 288 | + | |
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
288 | 292 | | |
289 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
290 | 316 | | |
291 | 317 | | |
292 | 318 | | |
| |||
300 | 326 | | |
301 | 327 | | |
302 | 328 | | |
| 329 | + | |
303 | 330 | | |
304 | 331 | | |
305 | 332 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 333 | + | |
309 | 334 | | |
310 | 335 | | |
311 | 336 | | |
| |||
316 | 341 | | |
317 | 342 | | |
318 | 343 | | |
319 | | - | |
320 | 344 | | |
321 | 345 | | |
322 | 346 | | |
| |||
325 | 349 | | |
326 | 350 | | |
327 | 351 | | |
328 | | - | |
329 | 352 | | |
330 | 353 | | |
331 | 354 | | |
332 | 355 | | |
333 | | - | |
| 356 | + | |
| 357 | + | |
334 | 358 | | |
335 | 359 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
| 360 | + | |
345 | 361 | | |
346 | 362 | | |
347 | 363 | | |
| |||
411 | 427 | | |
412 | 428 | | |
413 | 429 | | |
414 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
0 commit comments