Client - improve semantic

This commit is contained in:
Sam 2023-07-13 16:18:03 +02:00
parent e260a1a408
commit 14e66aee04
11 changed files with 93 additions and 73 deletions

View File

@ -1,6 +1,7 @@
<template> <template>
<div id="top" /> <div id="top" />
<NavBar @menuInteraction="updateHideScrollBar" /> <NavBar @menuInteraction="updateHideScrollBar" />
<main>
<div v-if="appLoading" class="app-container"> <div v-if="appLoading" class="app-container">
<div class="app-loading"> <div class="app-loading">
<Loader /> <Loader />
@ -19,6 +20,7 @@
<i class="fa fa-chevron-up" aria-hidden="true"></i> <i class="fa fa-chevron-up" aria-hidden="true"></i>
</div> </div>
</div> </div>
</main>
<Footer <Footer
v-if="appConfig" v-if="appConfig"
:version="appConfig ? appConfig.version : ''" :version="appConfig ? appConfig.version : ''"

View File

@ -61,6 +61,7 @@
<span class="cell-heading"> <span class="cell-heading">
{{ $t('user.PROFILE.REGISTRATION_DATE') }} {{ $t('user.PROFILE.REGISTRATION_DATE') }}
</span> </span>
<time>
{{ {{
formatDate( formatDate(
user.created_at, user.created_at,
@ -68,6 +69,7 @@
authUser.date_format authUser.date_format
) )
}} }}
</time>
</td> </td>
<td class="text-center"> <td class="text-center">
<span class="cell-heading"> <span class="cell-heading">

View File

@ -22,7 +22,7 @@
params: { workoutId: record.workout_id }, params: { workoutId: record.workout_id },
}" }"
> >
{{ record.workout_date }} <time>{{ record.workout_date }}</time>
</router-link> </router-link>
</span> </span>
</div> </div>

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="footer"> <footer id="footer">
<div class="footer-items"> <div class="footer-items">
<div class="footer-item"> <div class="footer-item">
<strong>FitTrackee</strong> <strong>FitTrackee</strong>
@ -22,7 +22,7 @@
</router-link> </router-link>
</div> </div>
</div> </div>
</div> </footer>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="nav"> <header id="nav">
<Modal <Modal
v-show="displayModal" v-show="displayModal"
:title="$t('common.CONFIRMATION')" :title="$t('common.CONFIRMATION')"
@ -89,7 +89,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </header>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@ -4,19 +4,20 @@
{{ capitalize($t('privacy_policy.TITLE')) }} {{ capitalize($t('privacy_policy.TITLE')) }}
</h1> </h1>
<p class="last-update"> <p class="last-update">
{{ $t('privacy_policy.LAST_UPDATE')}}: {{ private_policy_date }} {{ $t('privacy_policy.LAST_UPDATE') }}:
<time>{{ privatePolicyDate }}</time>
</p> </p>
<template v-if="appConfig.privacy_policy"> <template v-if="appConfig.privacy_policy">
<div <div v-html="snarkdown(linkifyAndClean(appConfig.privacy_policy))" />
v-html="snarkdown(linkifyAndClean(appConfig.privacy_policy))"
/>
</template> </template>
<template v-else> <template v-else>
<template v-for="paragraph in paragraphs" :key="paragraph"> <template v-for="paragraph in paragraphs" :key="paragraph">
<h2> <h2>
{{ $t(`privacy_policy.CONTENT.${paragraph}.TITLE`)}} {{ $t(`privacy_policy.CONTENT.${paragraph}.TITLE`) }}
</h2> </h2>
<p v-html="snarkdown($t(`privacy_policy.CONTENT.${paragraph}.CONTENT`))" /> <p
v-html="snarkdown($t(`privacy_policy.CONTENT.${paragraph}.CONTENT`))"
/>
</template> </template>
</template> </template>
</div> </div>
@ -34,7 +35,7 @@
import { linkifyAndClean } from '@/utils/inputs' import { linkifyAndClean } from '@/utils/inputs'
const store = useStore() const store = useStore()
const fittrackee_private_policy_date = 'Sun, 26 Feb 2023 17:00:00 GMT' const fittrackeePrivatePolicyDate = 'Sun, 26 Feb 2023 17:00:00 GMT'
const appConfig: ComputedRef<TAppConfig> = computed( const appConfig: ComputedRef<TAppConfig> = computed(
() => store.getters[ROOT_STORE.GETTERS.APP_CONFIG] () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]
) )
@ -46,11 +47,16 @@
) )
const dateFormat = computed(() => getDateFormat()) const dateFormat = computed(() => getDateFormat())
const timezone = computed(() => getTimezone()) const timezone = computed(() => getTimezone())
const private_policy_date = computed(() => getPolicyDate()) const privatePolicyDate = computed(() => getPolicyDate())
const paragraphs = [ const paragraphs = [
'DATA_COLLECTED', 'INFORMATION_USAGE', 'INFORMATION_PROTECTION', 'DATA_COLLECTED',
'INFORMATION_DISCLOSURE', 'SITE_USAGE_BY_CHILDREN', 'YOUR_CONSENT', 'INFORMATION_USAGE',
'ACCOUNT_DELETION', 'CHANGES_TO_OUR_PRIVACY_POLICY' 'INFORMATION_PROTECTION',
'INFORMATION_DISCLOSURE',
'SITE_USAGE_BY_CHILDREN',
'YOUR_CONSENT',
'ACCOUNT_DELETION',
'CHANGES_TO_OUR_PRIVACY_POLICY',
] ]
function getTimezone() { function getTimezone() {
@ -67,13 +73,12 @@
return formatDate( return formatDate(
appConfig.value.privacy_policy && appConfig.value.privacy_policy_date appConfig.value.privacy_policy && appConfig.value.privacy_policy_date
? `${appConfig.value.privacy_policy_date}` ? `${appConfig.value.privacy_policy_date}`
: fittrackee_private_policy_date, : fittrackeePrivatePolicyDate,
timezone.value, timezone.value,
dateFormat.value, dateFormat.value,
false, false
) )
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -58,13 +58,17 @@
<div v-else> <div v-else>
<dl> <dl>
<dt>{{ $t('user.PROFILE.REGISTRATION_DATE') }}:</dt> <dt>{{ $t('user.PROFILE.REGISTRATION_DATE') }}:</dt>
<dd>{{ registrationDate }}</dd> <dd>
<time>{{ registrationDate }}</time>
</dd>
<dt>{{ $t('user.PROFILE.FIRST_NAME') }}:</dt> <dt>{{ $t('user.PROFILE.FIRST_NAME') }}:</dt>
<dd>{{ user.first_name }}</dd> <dd>{{ user.first_name }}</dd>
<dt>{{ $t('user.PROFILE.LAST_NAME') }}:</dt> <dt>{{ $t('user.PROFILE.LAST_NAME') }}:</dt>
<dd>{{ user.last_name }}</dd> <dd>{{ user.last_name }}</dd>
<dt>{{ $t('user.PROFILE.BIRTH_DATE') }}:</dt> <dt>{{ $t('user.PROFILE.BIRTH_DATE') }}:</dt>
<dd>{{ birthDate }}</dd> <dd>
<time v-if="birthDate">{{ birthDate }}</time>
</dd>
<dt>{{ $t('user.PROFILE.LOCATION') }}:</dt> <dt>{{ $t('user.PROFILE.LOCATION') }}:</dt>
<dd>{{ user.location }}</dd> <dd>{{ user.location }}</dd>
<dt>{{ $t('user.PROFILE.BIO') }}:</dt> <dt>{{ $t('user.PROFILE.BIO') }}:</dt>

View File

@ -49,6 +49,7 @@
</dd> </dd>
<dt>{{ capitalize($t('oauth2.APP.ISSUE_AT')) }}:</dt> <dt>{{ capitalize($t('oauth2.APP.ISSUE_AT')) }}:</dt>
<dd> <dd>
<time>
{{ {{
formatDate( formatDate(
client.issued_at, client.issued_at,
@ -56,6 +57,7 @@
authUser.date_format authUser.date_format
) )
}} }}
</time>
</dd> </dd>
<dt>{{ $t('oauth2.APP.NAME') }}:</dt> <dt>{{ $t('oauth2.APP.NAME') }}:</dt>
<dd>{{ client.name }}</dd> <dd>{{ client.name }}</dd>

View File

@ -8,6 +8,7 @@
</router-link> </router-link>
<span class="app-issued-at"> <span class="app-issued-at">
{{ $t('oauth2.APP.ISSUE_AT') }} {{ $t('oauth2.APP.ISSUE_AT') }}
<time>
{{ {{
formatDate( formatDate(
client.issued_at, client.issued_at,
@ -15,6 +16,7 @@
authUser.date_format authUser.date_format
) )
}} }}
</time>
</span> </span>
</li> </li>
</ul> </ul>

View File

@ -61,8 +61,9 @@
</span> </span>
</div> </div>
<div class="workout-date"> <div class="workout-date">
{{ workoutObject.workoutDate }} - <time>
{{ workoutObject.workoutTime }} {{ workoutObject.workoutDate }} - {{ workoutObject.workoutTime }}
</time>
<span class="workout-link"> <span class="workout-link">
<router-link <router-link
v-if="workoutObject.type === 'SEGMENT'" v-if="workoutObject.type === 'SEGMENT'"

View File

@ -83,6 +83,7 @@
<span class="cell-heading"> <span class="cell-heading">
{{ $t('workouts.DATE') }} {{ $t('workouts.DATE') }}
</span> </span>
<time>
{{ {{
formatDate( formatDate(
workout.workout_date, workout.workout_date,
@ -90,6 +91,7 @@
user.date_format user.date_format
) )
}} }}
</time>
</td> </td>
<td class="text-right"> <td class="text-right">
<span class="cell-heading"> <span class="cell-heading">