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
+1 -10
View File
@@ -47,16 +47,13 @@
<v-col cols="12">
<v-text-field
autocomplete="current-password"
clearable
ref="passwordInput"
:type="isPasswordVisible ? 'text' : 'password'"
type="password"
:disabled="show2faInput || logining || verifying"
:label="$t('Password')"
:placeholder="$t('Your password')"
:append-inner-icon="isPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="password"
@input="tempToken = ''"
@click:append-inner="isPasswordVisible = !isPasswordVisible"
@keyup.enter="login"
/>
</v-col>
@@ -189,8 +186,6 @@ import {
import { setExpenseAndIncomeAmountColor } from '@/lib/ui.js';
import {
mdiEyeOutline,
mdiEyeOffOutline,
mdiOnepassword,
mdiHelpCircleOutline
} from '@mdi/js';
@@ -203,15 +198,12 @@ export default {
passcode: '',
backupCode: '',
tempToken: '',
isPasswordVisible: false,
logining: false,
verifying: false,
show2faInput: false,
twoFAVerifyType: 'passcode',
showMobileQrCode: false,
icons: {
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline,
passcode: mdiOnepassword,
backupCode: mdiHelpCircleOutline
}
@@ -284,7 +276,6 @@ export default {
return;
}
self.isPasswordVisible = false;
self.logining = true;
self.rootStore.authorize({
+4 -16
View File
@@ -46,30 +46,24 @@
<v-col cols="12">
<v-text-field
autocomplete="new-password"
clearable
ref="passwordInput"
:type="isNewPasswordVisible ? 'text' : 'password'"
type="password"
:disabled="updating"
:label="$t('Password')"
:placeholder="$t('Your password')"
:append-inner-icon="isNewPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="newPassword"
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
@keyup.enter="$refs.confirmPasswordInput.focus()"
/>
</v-col>
<v-col cols="12">
<v-text-field
clearable
ref="confirmPasswordInput"
:type="isConfirmPasswordVisible ? 'text' : 'password'"
type="password"
:disabled="updating"
: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="resetPassword"
/>
</v-col>
@@ -147,9 +141,7 @@ import { useSettingsStore } from '@/stores/setting.js';
import assetConstants from '@/consts/asset.js';
import {
mdiChevronLeft,
mdiEyeOffOutline,
mdiEyeOutline
mdiChevronLeft
} from '@mdi/js';
export default {
@@ -161,14 +153,10 @@ export default {
email: '',
newPassword: '',
confirmPassword: '',
isNewPasswordVisible: false,
isConfirmPasswordVisible: false,
updating: false,
passwordChanged: false,
icons: {
left: mdiChevronLeft,
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline
left: mdiChevronLeft
}
};
},
+4 -16
View File
@@ -72,27 +72,21 @@
<v-col cols="12" md="6">
<v-text-field
autocomplete="new-password"
clearable
type="password"
:disabled="submitting || navigateToHomePage"
:label="$t('Password')"
:placeholder="$t('Your password, at least 6 characters')"
:type="isPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="user.password"
@click:append-inner="isPasswordVisible = !isPasswordVisible"
/>
</v-col>
<v-col cols="12" md="6">
<v-text-field
autocomplete="new-password"
clearable
type="password"
:disabled="submitting || navigateToHomePage"
:label="$t('Confirm Password')"
:placeholder="$t('Re-enter the password')"
:type="isConfirmPasswordVisible ? 'text' : 'password'"
:append-inner-icon="isConfirmPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="user.confirmPassword"
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
/>
</v-col>
</v-row>
@@ -261,9 +255,7 @@ import { setExpenseAndIncomeAmountColor } from '@/lib/ui.js';
import {
mdiArrowLeft,
mdiArrowRight,
mdiCheck,
mdiEyeOffOutline,
mdiEyeOutline
mdiCheck
} from '@mdi/js';
export default {
@@ -274,8 +266,6 @@ export default {
return {
user: newUser,
currentStep: 'basicSetting',
isPasswordVisible: false,
isConfirmPasswordVisible: false,
submitting: false,
usePresetCategories: false,
finalResultMessage: null,
@@ -283,9 +273,7 @@ export default {
icons: {
previous: mdiArrowLeft,
next: mdiArrowRight,
submit: mdiCheck,
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline
submit: mdiCheck
}
};
},
+3 -11
View File
@@ -36,14 +36,11 @@
<v-col cols="12" v-if="!loading && !token && email && isUserVerifyEmailEnabled">
<v-text-field
autocomplete="password"
clearable
:type="isPasswordVisible ? 'text' : 'password'"
type="password"
:disabled="loading || resending"
:label="$t('Password')"
:placeholder="$t('Your password')"
:append-inner-icon="isPasswordVisible ? icons.eyeSlash : icons.eye"
v-model="password"
@click:append-inner="isPasswordVisible = !isPasswordVisible"
@keyup.enter="resendEmail"
/>
</v-col>
@@ -123,9 +120,7 @@ import assetConstants from '@/consts/asset.js';
import { isUserVerifyEmailEnabled } from '@/lib/server_settings.js';
import {
mdiChevronLeft,
mdiEyeOffOutline,
mdiEyeOutline
mdiChevronLeft
} from '@mdi/js';
export default {
@@ -137,15 +132,12 @@ export default {
data() {
return {
password: '',
isPasswordVisible: false,
loading: true,
resending: false,
verified: false,
errorMessage: '',
icons: {
left: mdiChevronLeft,
eye: mdiEyeOutline,
eyeSlash: mdiEyeOffOutline
left: mdiChevronLeft
}
};
},
@@ -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;