@@ -121,9 +122,22 @@ export default {
mixins: [InlineSettingMixin],
data () {
return {
- passwordUpdates: {},
+ passwordUpdates: {
+ password: '',
+ newPassword: '',
+ confirmPassword: '',
+ },
};
},
+ computed: {
+ inputsInvalid () {
+ if (!this.passwordUpdates.password) {
+ return true;
+ }
+
+ return this.passwordUpdates.newPassword !== this.passwordUpdates.confirmPassword;
+ },
+ },
methods: {
async changePassword (updates) {
await axios.put('/api/v4/user/auth/update-password', updates);
diff --git a/website/client/src/pages/settings/inlineSettings/userNameSetting.vue b/website/client/src/pages/settings/inlineSettings/userNameSetting.vue
index 303c16096f..7c9a978c2f 100644
--- a/website/client/src/pages/settings/inlineSettings/userNameSetting.vue
+++ b/website/client/src/pages/settings/inlineSettings/userNameSetting.vue
@@ -52,6 +52,7 @@
type="text"
:placeholder="$t('newUsername')"
:class="{ 'is-invalid input-invalid': !usernameValid }"
+ @keyup="inputChanged = true"
@blur="restoreEmptyUsername()"
>
@@ -147,6 +148,7 @@ export default {
data () {
return {
inputValue: '',
+ inputChanged: false,
usernameIssues: [],
icons: Object.freeze({
checkIcon,
@@ -172,7 +174,7 @@ export default {
if (this.cleanedInputValue.length <= 1) {
return true;
}
- return !this.usernameValid;
+ return !this.usernameValid || !this.inputChanged;
},
},
watch: {