remove display password button

This commit is contained in:
MaysWind
2024-07-25 01:03:25 +08:00
parent cc55b98e80
commit a8484cfcaf
7 changed files with 25 additions and 101 deletions
@@ -129,16 +129,14 @@
<v-row class="mb-3">
<v-col cols="12" md="6">
<v-text-field
ref="currentPasswordInput"
autocomplete="current-password"
clearable variant="underlined"
ref="currentPasswordInput"
type="password"
variant="underlined"
color="error"
:disabled="loadingDataStatistics || clearingData"
:placeholder="$t('Current Password')"
:type="isCurrentPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isCurrentPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="currentPasswordForClearData"
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
@keyup.enter="clearData"
/>
</v-col>
@@ -176,9 +174,7 @@ import {
mdiCreditCardOutline,
mdiViewDashboardOutline,
mdiTagOutline,
mdiAlert,
mdiEyeOutline,
mdiEyeOffOutline
mdiAlert
} from '@mdi/js';
export default {
@@ -188,7 +184,6 @@ export default {
dataStatistics: null,
exportingData: false,
currentPasswordForClearData: '',
isCurrentPasswordVisible: false,
clearingData: false,
icons: {
refresh: mdiRefresh,
@@ -196,9 +191,7 @@ export default {
accounts: mdiCreditCardOutline,
categories: mdiViewDashboardOutline,
tags: mdiTagOutline,
alert: mdiAlert,
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline
alert: mdiAlert
}
}
},
@@ -284,7 +277,6 @@ export default {
self.$refs.confirmDialog.open('Are you sure you want to clear all data?', { color: 'error' }).then(() => {
self.clearingData = true;
self.isCurrentPasswordVisible = false;
self.rootStore.clearUserData({
password: self.currentPasswordForClearData
@@ -11,16 +11,13 @@
<v-row>
<v-col cols="12" md="6">
<v-text-field
ref="currentPasswordInput"
autocomplete="current-password"
clearable
ref="currentPasswordInput"
type="password"
:disabled="updatingPassword"
:label="$t('Current Password')"
:placeholder="$t('Current Password')"
:type="isCurrentPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isCurrentPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="currentPassword"
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
@keyup.enter="$refs.newPasswordInput.focus()"
/>
</v-col>
@@ -29,16 +26,13 @@
<v-row>
<v-col cols="12" md="6">
<v-text-field
ref="newPasswordInput"
autocomplete="new-password"
clearable
ref="newPasswordInput"
type="password"
:disabled="updatingPassword"
:label="$t('New Password')"
:placeholder="$t('New Password')"
:type="isNewPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isNewPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="newPassword"
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
@keyup.enter="$refs.confirmPasswordInput.focus()"
/>
</v-col>
@@ -48,14 +42,11 @@
<v-col cols="12" md="6">
<v-text-field
ref="confirmPasswordInput"
clearable
type="password"
:disabled="updatingPassword"
:type="isConfirmPasswordVisible ? 'text' : 'password'"
:label="$t('Confirm Password')"
:placeholder="$t('Re-enter the password')"
:append-inner-icon="isConfirmPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="confirmPassword"
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
@keyup.enter="updatePassword"
/>
</v-col>
@@ -149,8 +140,6 @@ import { parseDeviceInfo, parseUserAgent } from '@/lib/misc.js';
import {
mdiRefresh,
mdiEyeOffOutline,
mdiEyeOutline,
mdiCellphone,
mdiTablet,
mdiWatch,
@@ -165,15 +154,10 @@ export default {
currentPassword: '',
newPassword: '',
confirmPassword: '',
isCurrentPasswordVisible: false,
isNewPasswordVisible: false,
isConfirmPasswordVisible: false,
updatingPassword: false,
loadingSession: true,
icons: {
refresh: mdiRefresh,
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline
refresh: mdiRefresh
}
};
},
@@ -245,9 +229,6 @@ export default {
}
self.updatingPassword = true;
self.isCurrentPasswordVisible = false;
self.isNewPasswordVisible = false;
self.isConfirmPasswordVisible = false;
self.rootStore.updateUserProfile({
profile: {
@@ -42,13 +42,11 @@
<v-col cols="12" md="6">
<v-text-field
autocomplete="current-password"
clearable variant="underlined"
type="password"
variant="underlined"
:disabled="loading || enabling || enableConfirming || disabling"
:placeholder="$t('Current Password')"
:type="isCurrentPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isCurrentPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="currentPassword"
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
/>
</v-col>
</v-row>
@@ -111,8 +109,6 @@ import { useTwoFactorAuthStore } from '@/stores/twoFactorAuth.js';
import { makeButtonCopyToClipboard, changeClipboardObjectText } from '@/lib/misc.js';
import {
mdiEyeOutline,
mdiEyeOffOutline,
mdiContentCopy
} from '@mdi/js';
@@ -127,7 +123,6 @@ export default {
new2FASecret: '',
new2FAQRCode: '',
currentPassword: '',
isCurrentPasswordVisible: false,
currentPasscode: '',
currentBackupCode: '',
enabling: false,
@@ -136,8 +131,6 @@ export default {
regenerating: false,
clipboardHolder: null,
icons: {
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline,
copy: mdiContentCopy
}
};
@@ -173,7 +166,6 @@ export default {
this.new2FASecret = '';
this.new2FAQRCode = '';
this.currentPassword = '';
this.isCurrentPasswordVisible = false;
this.currentPasscode = '';
this.currentBackupCode = '';
this.enabling = false;