Skip to content

Commit

Permalink
Merge pull request #1689 from fdm-monster/fix/cant-change-password
Browse files Browse the repository at this point in the history
fix: Account Settings - cant change password, release: 1.6.10
  • Loading branch information
davidzwa authored Nov 11, 2024
2 parents 7174625 + 3e0d78d commit 7e05736
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
9 changes: 9 additions & 0 deletions RELEASE_NOTES.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release notes

## Client 11/11/2024 1.6.10

Fixes:

- Account settings - cant change password
- Account settings - apply user id number to string coercion

## Client 11/11/2024 1.6.9

Features:

- User settings: add user roles dropdown to change verified users from GUEST role to OPERATOR or ADMIN.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fdm-monster/client",
"version": "1.6.9",
"version": "1.6.10",
"author": "David Zwart",
"license": "AGPL-3.0-or-later",
"repository": {
Expand Down
13 changes: 6 additions & 7 deletions src/components/Settings/AccountSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<v-card>
<SettingsToolbar icon="account_circle" title="Account" />

<v-list subheader three-line>
<v-list subheader three-line v-if="!loginEnabled">
<v-list-item-content>
<v-list-item>
<v-list-item-content v-if="!loginEnabled">
<v-list-item-content>
<v-alert color="primary">
Login is currently disabled. To adjust your username and password, please enable that
setting at the Server Protection settings page. Then log in and visit this page.
Expand Down Expand Up @@ -113,16 +113,15 @@ const formData = ref<{
onMounted(async () => {
await settingsStore.loadSettings();
if (!settingsStore.settings?.server.loginRequired) {
loginEnabled.value = settingsStore.settings?.server.loginRequired;
}
loginEnabled.value = settingsStore.settings?.server.loginRequired;
await profileStore.getProfile();
formData.value.username = profileStore.username as string;
userId.value = profileStore.userId as string;
});
async function changeUsername() {
if (!userId.value?.length) {
if (!userId.value?.toString()?.length) {
snackbar.openErrorMessage({ title: "User not loaded" });
return;
}
Expand All @@ -134,7 +133,7 @@ async function changeUsername() {
}
async function changePassword() {
if (!userId.value?.length) {
if (!userId.value?.toString()?.length) {
snackbar.openErrorMessage({ title: "User not loaded" });
return;
}
Expand Down

0 comments on commit 7e05736

Please sign in to comment.