Merge pull request #427 from SamR1/minor-fix

Minor fix
This commit is contained in:
Sam 2023-09-20 09:17:49 +02:00 committed by GitHub
commit 32724464c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 29 additions and 31 deletions

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/static/css/fork-awesome.min.css"/><link rel="stylesheet" href="/static/css/leaflet.css"/><title>FitTrackee</title><script defer="defer" src="/static/js/chunk-vendors.a53c2257.js"></script><script defer="defer" src="/static/js/app.9b093906.js"></script><link href="/static/css/app.a587cef2.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="fittrackee_client"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but FitTrackee doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/static/css/fork-awesome.min.css"/><link rel="stylesheet" href="/static/css/leaflet.css"/><title>FitTrackee</title><script defer="defer" src="/static/js/chunk-vendors.a53c2257.js"></script><script defer="defer" src="/static/js/app.2b040ac6.js"></script><link href="/static/css/app.a587cef2.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="fittrackee_client"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but FitTrackee doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,8 +19,8 @@
"invalid credentials": "Identifiants invalides.",
"invalid payload": "Données fournies incorrectes.",
"invalid token, please log in again": "Jeton de connexion invalide, merci de vous reconnecter.",
"invalid token, please request a new token": "Jeton de connexion, merci de vous reconnecter.",
"new email must be different than current email": "La nouvelle addresse électronique doit être differente de l'adresse actuelle",
"invalid token, please request a new token": "Jeton de connexion invalide, veuillez demander un nouveau jeton.",
"new email must be different than current email": "La nouvelle adresse électronique doit être différente de l'adresse actuelle",
"no file part": "Pas de fichier fourni.",
"no selected file": "Pas de fichier sélectionné.",
"no tracks in gpx file": "Pas de trace (<trk>) dans le fichier .gpx.",

View File

@ -53,6 +53,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'login' },
meta: {
title: 'user.LOGIN',
withoutAuth: true,
},
},
{
@ -62,6 +63,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'register' },
meta: {
title: 'user.REGISTER',
withoutAuth: true,
},
},
{
@ -73,6 +75,7 @@ const routes: Array<RouteRecordRaw> = [
),
meta: {
title: 'user.ACCOUNT_CONFIRMATION',
withoutAuth: true,
},
},
{
@ -85,6 +88,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'account-confirmation-resend' },
meta: {
title: 'buttons.ACCOUNT-CONFIRMATION-RESEND',
withoutAuth: true,
},
},
{
@ -97,6 +101,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'email-sent' },
meta: {
title: 'buttons.ACCOUNT-CONFIRMATION-RESEND',
withoutAuth: true,
},
},
{
@ -109,6 +114,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'request-sent' },
meta: {
title: 'user.PASSWORD_RESET',
withoutAuth: true,
},
},
{
@ -121,6 +127,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'reset-request' },
meta: {
title: 'user.PASSWORD_RESET',
withoutAuth: true,
},
},
{
@ -133,6 +140,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'password-updated' },
meta: {
title: 'user.PASSWORD_RESET',
withoutAuth: true,
},
},
{
@ -145,6 +153,7 @@ const routes: Array<RouteRecordRaw> = [
props: { action: 'reset' },
meta: {
title: 'user.PASSWORD_RESET',
withoutAuth: true,
},
},
{
@ -156,6 +165,7 @@ const routes: Array<RouteRecordRaw> = [
),
meta: {
title: 'user.EMAIL_UPDATE',
withoutChecks: true,
},
},
{
@ -447,6 +457,7 @@ const routes: Array<RouteRecordRaw> = [
component: AboutView,
meta: {
title: 'common.ABOUT',
withoutChecks: true,
},
},
{
@ -455,6 +466,7 @@ const routes: Array<RouteRecordRaw> = [
component: PrivacyPolicyView,
meta: {
title: 'privacy_policy.TITLE',
withoutChecks: true,
},
},
{
@ -472,20 +484,6 @@ const router = createRouter({
routes,
})
const pathsWithoutAuthentication = [
'/login',
'/password-reset',
'/password-reset/password-updated',
'/password-reset/request',
'/password-reset/sent',
'/register',
'/account-confirmation',
'/account-confirmation/resend',
'/account-confirmation/email-sent',
]
const pathsWithoutChecks = ['/email-update', '/about', '/privacy-policy']
router.beforeEach((to, from, next) => {
if ('title' in to.meta) {
const title = typeof to.meta.title === 'string' ? to.meta.title : ''
@ -501,18 +499,18 @@ router.beforeEach((to, from, next) => {
store
.dispatch(AUTH_USER_STORE.ACTIONS.CHECK_AUTH_USER)
.then(() => {
if (pathsWithoutChecks.includes(to.path)) {
if (to.meta.withoutChecks) {
return next()
}
if (
store.getters[AUTH_USER_STORE.GETTERS.IS_AUTHENTICATED] &&
pathsWithoutAuthentication.includes(to.path)
to.meta.withoutAuth
) {
return next('/')
}
if (
!store.getters[AUTH_USER_STORE.GETTERS.IS_AUTHENTICATED] &&
!pathsWithoutAuthentication.includes(to.path)
!to.meta.withoutAuth
) {
const path =
to.path === '/'