You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I completed most of the UI part, I noticed there was already an old (nearly two years) account-settings branch and accompanying PR(#717). I was able to combine my changes and the ones made in the old PR to accommodate for code changes that have been done the last two years.
I have two problems though:
I would expect the updateUserPassword to NOT work if you pass on an incorrect "Current Password". Turns out you can change your password even if you supply the wrong current password to the jellyfin-client-axios API. I use a text field for current password. I should either remove it or find a way to validate the current password and only then update the user's password
When updating the user's account image, I used the "Key Changing Technique" (described here) to reload the user-image component without a full reload of the page. Two sub-problems occur here which can both be solved by just automatically refreshing the whole page after image is updated, although that's less elegant:
Only when adding an image when originally there was no image, this works. When updating an the image when there originally is another image uploaded, you can see the component reloading (quick switch from the default avatar to the image), but the image is not actually changing until the page is refreshed. Also removing the image does not update it to the default avatar. I think this is because of the way the user-image component works with the "loading" boolean. Not sure though.
The small avatar on the top right is not updated when doing this, because it is outside of the component / page that is being refreshed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I started working on an Account Settings page.
After I completed most of the UI part, I noticed there was already an old (nearly two years) account-settings branch and accompanying PR(#717). I was able to combine my changes and the ones made in the old PR to accommodate for code changes that have been done the last two years.
I have two problems though:
I would expect the updateUserPassword to NOT work if you pass on an incorrect "Current Password". Turns out you can change your password even if you supply the wrong current password to the jellyfin-client-axios API. I use a text field for current password. I should either remove it or find a way to validate the current password and only then update the user's password
When updating the user's account image, I used the "Key Changing Technique" (described here) to reload the user-image component without a full reload of the page. Two sub-problems occur here which can both be solved by just automatically refreshing the whole page after image is updated, although that's less elegant:
You can find the code in the fork I created on my account (https://github.com/Janbong/jellyfin-vue/tree/account)
I created this discussion first instead of a PR because that is what the contributing guidelines ask.
Beta Was this translation helpful? Give feedback.
All reactions