mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
lint
This commit is contained in:
parent
2fb4e9f3d4
commit
d806f99c61
@ -2,9 +2,13 @@
|
||||
<div class="navbar-small">
|
||||
<BNavbar class="navi">
|
||||
<BNavbarNav>
|
||||
<NavItem :to="routeWithParamsAndQuery('Register')" class="auth-navbar">{{ $t('signup') }}</NavItem>
|
||||
<NavItem :to="routeWithParamsAndQuery('Register')" class="auth-navbar">
|
||||
{{ $t('signup') }}
|
||||
</NavItem>
|
||||
<span class="mt-1">{{ $t('|') }}</span>
|
||||
<NavItem :to="routeWithParamsAndQuery('Login')" class="auth-navbar">{{ $t('signin') }}</NavItem>
|
||||
<NavItem :to="routeWithParamsAndQuery('Login')" class="auth-navbar">
|
||||
{{ $t('signin') }}
|
||||
</NavItem>
|
||||
</BNavbarNav>
|
||||
</BNavbar>
|
||||
</div>
|
||||
|
||||
@ -16,7 +16,9 @@
|
||||
</BCol>
|
||||
<BCol sm="12" md="6" class="mt-4 mt-lg-0">
|
||||
<p>{{ $t('gdd_per_link.has-account') }}</p>
|
||||
<BButton variant="gradido" :to="routeWithParamsAndQuery('Login')">{{ $t('gdd_per_link.to-login') }}</BButton>
|
||||
<BButton variant="gradido" :to="routeWithParamsAndQuery('Login')">
|
||||
{{ $t('gdd_per_link.to-login') }}
|
||||
</BButton>
|
||||
</BCol>
|
||||
</BRow>
|
||||
</BCard>
|
||||
|
||||
@ -17,13 +17,21 @@
|
||||
<BRow>
|
||||
<BCol sm="12" md="6">
|
||||
<p>{{ $t('gdd_per_link.no-account') }}</p>
|
||||
<BButton variant="primary" :disabled="isForeignCommunitySelected" :to="routeWithParamsAndQuery('Register')">
|
||||
<BButton
|
||||
variant="primary"
|
||||
:disabled="isForeignCommunitySelected"
|
||||
:to="routeWithParamsAndQuery('Register')"
|
||||
>
|
||||
{{ $t('gdd_per_link.to-register') }}
|
||||
</BButton>
|
||||
</BCol>
|
||||
<BCol sm="12" md="6" class="mt-4 mt-lg-0">
|
||||
<p>{{ $t('gdd_per_link.has-account') }}</p>
|
||||
<BButton variant="gradido" :disabled="isForeignCommunitySelected" :to="routeWithParamsAndQuery('Login')">
|
||||
<BButton
|
||||
variant="gradido"
|
||||
:disabled="isForeignCommunitySelected"
|
||||
:to="routeWithParamsAndQuery('Login')"
|
||||
>
|
||||
{{ $t('gdd_per_link.to-login') }}
|
||||
</BButton>
|
||||
</BCol>
|
||||
|
||||
@ -4,15 +4,15 @@ export function useAuthLinks() {
|
||||
const route = useRoute()
|
||||
/**
|
||||
* Combine current route params and query with given params and query
|
||||
* @param {string} name
|
||||
* @param {{ params: {}, query: {} }} options
|
||||
* @param {string} name
|
||||
* @param {{ params: {}, query: {} }} options
|
||||
* @returns {{ name: string, params: {}, query: {} }} a vue3 routing object for :to
|
||||
*/
|
||||
const routeWithParamsAndQuery = (name, options = { params: {}, query: {} }) => {
|
||||
return {
|
||||
name,
|
||||
params: { ...route.params, ...options.params },
|
||||
query: { ...route.query, ...options.query }
|
||||
return {
|
||||
name,
|
||||
params: { ...route.params, ...options.params },
|
||||
query: { ...route.query, ...options.query },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,10 @@
|
||||
</BRow>
|
||||
<BRow>
|
||||
<BCol class="d-flex justify-content-end mb-4 mb-lg-0">
|
||||
<router-link :to="routeWithParamsAndQuery('ForgotPassword')" data-test="forgot-password-link">
|
||||
<router-link
|
||||
:to="routeWithParamsAndQuery('ForgotPassword')"
|
||||
data-test="forgot-password-link"
|
||||
>
|
||||
{{ $t('settings.password.forgot_pwd') }}
|
||||
</router-link>
|
||||
</BCol>
|
||||
|
||||
@ -362,7 +362,6 @@ describe('ResetPassword', () => {
|
||||
})
|
||||
|
||||
it('redirects to /forgot-password/resetPassword', () => {
|
||||
console.log(router.currentRoute.value)
|
||||
expect(router.currentRoute.value.path).toBe('/forgot-password/resetPassword')
|
||||
})
|
||||
})
|
||||
@ -418,7 +417,10 @@ describe('ResetPassword', () => {
|
||||
'...email was sent more than 23 hours and 10 minutes ago',
|
||||
)
|
||||
expect(message.props('buttonText')).toBe('settings.password.reset')
|
||||
expect(message.props('linkTo')).toMatchObject({ name: 'ForgotPassword', params: { comingFrom: 'reset-password' } })
|
||||
expect(message.props('linkTo')).toMatchObject({
|
||||
name: 'ForgotPassword',
|
||||
params: { comingFrom: 'reset-password' },
|
||||
})
|
||||
expect(mockToastError).toHaveBeenCalledWith(
|
||||
'...email was sent more than 23 hours and 10 minutes ago',
|
||||
)
|
||||
|
||||
@ -85,7 +85,6 @@ const { load: queryOptInQuery } = useLazyQuery(queryOptIn)
|
||||
|
||||
const { toastError } = useAppToast()
|
||||
|
||||
|
||||
const { meta: formMeta, values: formValues, setFieldValue } = useForm()
|
||||
|
||||
const onSubmit = async () => {
|
||||
@ -116,7 +115,9 @@ const onSubmit = async () => {
|
||||
messageHeadline.value = t('message.errorTitle')
|
||||
messageSubtitle.value = errorMessage
|
||||
messageButtonText.value = t('settings.password.reset')
|
||||
messageButtonLinkTo.value = routeWithParamsAndQuery('ForgotPassword', { params: { comingFrom: 'reset-password' } })
|
||||
messageButtonLinkTo.value = routeWithParamsAndQuery('ForgotPassword', {
|
||||
params: { comingFrom: 'reset-password' },
|
||||
})
|
||||
toastError(errorMessage)
|
||||
}
|
||||
}
|
||||
@ -128,7 +129,9 @@ const checkOptInCode = async () => {
|
||||
})
|
||||
} catch (error) {
|
||||
toastError(error.message)
|
||||
await router.push(routeWithParamsAndQuery('ForgotPassword', { params: { comingFrom: 'reset-password' } }))
|
||||
await router.push(
|
||||
routeWithParamsAndQuery('ForgotPassword', { params: { comingFrom: 'reset-password' } }),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user