before delete 3software

This commit is contained in:
2025-06-29 18:55:59 +03:00
parent ebd77a3e66
commit b51a472738
147 changed files with 257326 additions and 3151 deletions

View File

@@ -23,6 +23,7 @@
no-error-icon
@focus="($refs.emailInput as typeof QInput)?.resetValidation()"
ref="emailInput"
:disable="type === 'changePwd'"
/>
<q-stepper-navigation>
<q-btn
@@ -54,6 +55,7 @@
@click="handleSubmit"
color="primary"
:label="$t('continue')"
:disable="code.length === 0"
/>
<q-btn
flat
@@ -73,6 +75,7 @@
v-model="password"
dense
filled
autofocus
:label = "$t('account_helper__password')"
:type="isPwd ? 'password' : 'text'"
hide-hint
@@ -114,15 +117,14 @@
<pn-magic-overlay
v-if="showSuccessOverlay"
icon="mdi-check-circle-outline"
message1="account_helper__ok_message1"
message2="account_helper__ok_message2"
:message1="getHelperMessage1()"
:message2="getHelperMessage2()"
route-name="projects"
/>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { useRouter } from 'vue-router'
import type { AxiosError } from 'axios'
import { useQuasar } from 'quasar'
import { useI18n } from "vue-i18n"
@@ -134,7 +136,9 @@
? 'register'
: props.type === 'forgotPwd'
? 'forgot'
: 'change'
: props.type === 'changePwd'
? 'changePwd'
: 'changeMethod'
})
const $q = useQuasar()
@@ -142,7 +146,7 @@
const authStore = useAuthStore()
const props = defineProps<{
type: 'register' | 'forgotPwd' | 'changePwd'
type: 'register' | 'forgotPwd' | 'changePwd' | 'changeMethod'
email?: string
}>()
@@ -182,7 +186,7 @@
},
3: async () => {
await authStore.setPassword(flowType.value, login.value, code.value, password.value)
if (flowType.value === 'register') {
if (flowType.value === 'register' || flowType.value === 'changeMethod') {
await authStore.loginWithCredentials(login.value, password.value)
}
}
@@ -217,6 +221,28 @@
handleError(error as AxiosError)
}
}
const getHelperMessage1 = () => {
switch (flowType.value) {
case 'register': return 'account_helper__register_message1'
case 'forgot': return 'account_helper__forgot_password_message1'
case 'changePwd': return 'account_helper__change_password_message1'
case 'changeMethod': return 'account_helper__change_method_message1'
default: return ''
}
}
const getHelperMessage2 = () => {
switch (flowType.value) {
case 'register': return 'slogan'
case 'forgot':
case 'changePwd':
case 'changeMethod':
return 'account_helper__go_projects'
default: return ''
}
}
</script>
<style>