diff --git a/src/Mobile.vue b/src/Mobile.vue index f6ca381d..e5d2f575 100644 --- a/src/Mobile.vue +++ b/src/Mobile.vue @@ -97,10 +97,6 @@ i.icon.la, i.icon.las, i.icon.lab { box-shadow: 0 0 3px rgba(0,0,0,.5) !important; } -.list-item-pincode-input .item-inner { - justify-content: center; -} - .work-break-all { word-break: break-all; } diff --git a/src/components/mobile/InformationSheet.vue b/src/components/mobile/InformationSheet.vue new file mode 100644 index 00000000..73b43012 --- /dev/null +++ b/src/components/mobile/InformationSheet.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/components/mobile/PasscodeInputSheet.vue b/src/components/mobile/PasscodeInputSheet.vue new file mode 100644 index 00000000..c220341a --- /dev/null +++ b/src/components/mobile/PasscodeInputSheet.vue @@ -0,0 +1,71 @@ + + + diff --git a/src/components/mobile/PasswordInputSheet.vue b/src/components/mobile/PasswordInputSheet.vue new file mode 100644 index 00000000..1eb5fe88 --- /dev/null +++ b/src/components/mobile/PasswordInputSheet.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/components/mobile/PinCodeInputSheet.vue b/src/components/mobile/PinCodeInputSheet.vue new file mode 100644 index 00000000..124a6b67 --- /dev/null +++ b/src/components/mobile/PinCodeInputSheet.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/mobile-main.js b/src/mobile-main.js index d1f8d84e..68029d3c 100644 --- a/src/mobile-main.js +++ b/src/mobile-main.js @@ -37,8 +37,12 @@ import categoryIconFilter from './filters/categoryIcon.js'; import tokenDeviceFilter from './filters/tokenDevice.js'; import tokenIconFilter from './filters/tokenIcon.js'; +import PasswordInputSheet from "./components/mobile/PasswordInputSheet.vue"; +import PasscodeInputSheet from "./components/mobile/PasscodeInputSheet.vue"; +import PinCodeInputSheet from "./components/mobile/PinCodeInputSheet.vue"; import IconSelectionSheet from "./components/mobile/IconSelectionSheet.vue"; import ColorSelectionSheet from "./components/mobile/ColorSelectionSheet.vue"; +import InformationSheet from "./components/mobile/InformationSheet.vue"; import NumberPadSheet from "./components/mobile/NumberPadSheet.vue"; import App from './Mobile.vue'; @@ -47,8 +51,12 @@ Vue.use(VueI18nFilter); Vue.use(VueMoment, { moment }); Vue.use(VueClipboard); Vue.component('PincodeInput', PincodeInput); +Vue.component('PasswordInputSheet', PasswordInputSheet); +Vue.component('PasscodeInputSheet', PasscodeInputSheet); +Vue.component('PinCodeInputSheet', PinCodeInputSheet); Vue.component('IconSelectionSheet', IconSelectionSheet); Vue.component('ColorSelectionSheet', ColorSelectionSheet); +Vue.component('InformationSheet', InformationSheet); Vue.component('NumberPadSheet', NumberPadSheet); Framework7.use(Framework7Vue); diff --git a/src/views/mobile/ApplicationLock.vue b/src/views/mobile/ApplicationLock.vue index ec552458..4c55ff59 100644 --- a/src/views/mobile/ApplicationLock.vue +++ b/src/views/mobile/ApplicationLock.vue @@ -27,51 +27,19 @@ - - -
-
{{ $t('PIN Code') }}
-
-
-

{{ $t('Please input a new PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.') }}

- - - - - - -
- -
-
-
-
+ + - - -
-
{{ $t('PIN Code') }}
-
-
-

{{ $t('Please enter your current PIN code when disable application lock') }}

- - - - - - -
- -
-
-
-
+ + @@ -88,14 +56,6 @@ export default { showInputPinCodeSheetForDisable: false }; }, - computed: { - currentPinCodeForEnableValid() { - return this.currentPinCodeForEnable && this.currentPinCodeForEnable.length === 6; - }, - currentPinCodeForDisableValid() { - return this.currentPinCodeForDisable && this.currentPinCodeForDisable.length === 6; - }, - }, watch: { isEnableApplicationLockWebAuthn: function (newValue) { const self = this; @@ -155,7 +115,7 @@ export default { return; } - if (!this.currentPinCodeForEnableValid) { + if (!this.currentPinCodeForEnable || this.currentPinCodeForEnable.length !== 6) { this.$alert('PIN code is invalid'); return; } diff --git a/src/views/mobile/users/TwoFactorAuth.vue b/src/views/mobile/users/TwoFactorAuth.vue index 0fb827cb..9d0bdb92 100644 --- a/src/views/mobile/users/TwoFactorAuth.vue +++ b/src/views/mobile/users/TwoFactorAuth.vue @@ -30,119 +30,47 @@ - - -
-
{{ $t('Passcode') }}
+ +
+
+ qrcode
-
-

{{ $t('Please use two factor authentication app scan the below qrcode and input current passcode') }}

-
-
- qrcode -
-
- - - - -
- -
-
- - +
+
- - -
-
{{ $t('Current Password') }}
-
-
-

{{ $t('Please enter your current password when disable two factor authentication') }}

- - - - -
- -
-
-
-
+ + - - -
-
{{ $t('Current Password') }}
-
-
-

{{ $t('Please enter your current password when regenerate two factor authentication backup codes. If you regenerate backup codes, the old codes will be invalidated.') }}

- - - - -
- -
-
-
-
+ + - - -
-
{{ $t('Backup Code') }}
-
-
-

- {{ $t('Please copy these backup codes to safe place, the below codes can only be shown once. If these codes were lost, you can regenerate backup codes at any time.') }} - -

- -
- -
-
-
-
+ + @@ -365,3 +293,9 @@ export default { } }; + + diff --git a/src/views/mobile/users/UserProfile.vue b/src/views/mobile/users/UserProfile.vue index 5db99e78..01ef6a09 100644 --- a/src/views/mobile/users/UserProfile.vue +++ b/src/views/mobile/users/UserProfile.vue @@ -78,31 +78,14 @@ - - -
-
{{ $t('Current Password') }}
-
-
-

{{ $t('Please enter your current password when modifying your password') }}

- - - - -
-
-
+ +