implement user preference for elevation plots starting at zero;
add docker make command to downgrade db; add (google-powered) translations for the new labels
This commit is contained in:
@ -19,6 +19,8 @@
|
||||
</dd>
|
||||
<dt>{{ $t('user.PROFILE.ASCENT_DATA') }}:</dt>
|
||||
<dd>{{ $t(`common.${display_ascent}`) }}</dd>
|
||||
<dt>{{ $t('user.PROFILE.START_ELEVATION_AT_ZERO') }}:</dt>
|
||||
<dd>{{ $t(`common.${startElevationAtZero}`) }}</dd>
|
||||
</dl>
|
||||
<div class="profile-buttons">
|
||||
<button @click="$router.push('/profile/edit/preferences')">
|
||||
@ -54,6 +56,7 @@
|
||||
: languageLabels['en']
|
||||
)
|
||||
const fistDayOfWeek = computed(() => (props.user.weekm ? 'MONDAY' : 'SUNDAY'))
|
||||
const startElevationAtZero = computed(() => (props.user.start_elevation_at_zero ? 'TRUE' : 'FALSE'))
|
||||
const timezone = computed(() =>
|
||||
props.user.timezone ? props.user.timezone : 'Europe/Paris'
|
||||
)
|
||||
|
@ -99,6 +99,26 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-items form-checkboxes">
|
||||
<span class="checkboxes-label">
|
||||
{{ $t('user.PROFILE.START_ELEVATION_AT_ZERO') }}
|
||||
</span>
|
||||
<div class="checkboxes">
|
||||
<label v-for="status in startElevationAtZeroData" :key="status.label">
|
||||
<input
|
||||
type="radio"
|
||||
:id="status.label"
|
||||
:name="status.label"
|
||||
:checked="status.value === userForm.start_elevation_at_zero"
|
||||
:disabled="loading"
|
||||
@input="updateStartElevationAtZero(status.value)"
|
||||
/>
|
||||
<span class="checkbox-label">
|
||||
{{ $t(`common.${status.label}`) }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-buttons">
|
||||
<button class="confirm" type="submit">
|
||||
{{ $t('buttons.SUBMIT') }}
|
||||
@ -170,6 +190,16 @@
|
||||
value: false,
|
||||
},
|
||||
]
|
||||
const startElevationAtZeroData = [
|
||||
{
|
||||
label: 'TRUE',
|
||||
value: true
|
||||
},
|
||||
{
|
||||
label: 'FALSE',
|
||||
value: false
|
||||
}
|
||||
]
|
||||
const loading = computed(
|
||||
() => store.getters[AUTH_USER_STORE.GETTERS.USER_LOADING]
|
||||
)
|
||||
@ -192,6 +222,7 @@
|
||||
|
||||
function updateUserForm(user: IAuthUserProfile) {
|
||||
userForm.display_ascent = user.display_ascent
|
||||
userForm.start_elevation_at_zero = user.start_elevation_at_zero ? user.start_elevation_at_zero : false
|
||||
userForm.imperial_units = user.imperial_units ? user.imperial_units : false
|
||||
userForm.language = user.language ? user.language : 'en'
|
||||
userForm.timezone = user.timezone ? user.timezone : 'Europe/Paris'
|
||||
@ -204,6 +235,9 @@
|
||||
function updateTZ(value: string) {
|
||||
userForm.timezone = value
|
||||
}
|
||||
function updateStartElevationAtZero(value: boolean) {
|
||||
userForm.start_elevation_at_zero = value
|
||||
}
|
||||
function updateAscentDisplay(value: boolean) {
|
||||
userForm.display_ascent = value
|
||||
}
|
||||
|
@ -78,7 +78,7 @@
|
||||
const { t } = useI18n()
|
||||
|
||||
const displayDistance = ref(true)
|
||||
const beginElevationAtZero = ref(true)
|
||||
const beginElevationAtZero = ref(props.authUser.start_elevation_at_zero)
|
||||
const datasets: ComputedRef<IWorkoutChartData> = computed(() =>
|
||||
getDatasets(props.workoutData.chartData, t, props.authUser.imperial_units)
|
||||
)
|
||||
|
@ -5,6 +5,7 @@
|
||||
"DAY": "Tag | Tage",
|
||||
"DISPLAYED": "Angezeigt",
|
||||
"DOCUMENTATION": "Dokumentation (en)",
|
||||
"FALSE": "Falsch",
|
||||
"HERE": "hier",
|
||||
"HIDDEN": "Versteckt",
|
||||
"HOME": "Startseite",
|
||||
@ -21,5 +22,6 @@
|
||||
"LABEL": "pro Seite"
|
||||
}
|
||||
},
|
||||
"TOTAL": "Insgesamt"
|
||||
"TOTAL": "Insgesamt",
|
||||
"TRUE": "Wahr"
|
||||
}
|
||||
|
@ -92,6 +92,7 @@
|
||||
"STOPPED_SPEED_THRESHOLD": "Geschwindigkeitsschwellenwert für Stopp"
|
||||
},
|
||||
"SPORTS_EDITION": "Sportarten-Einstellungsausgabe",
|
||||
"START_ELEVATION_AT_ZERO": "Starten Sie das Höhendiagramm bei null",
|
||||
"SUCCESSFUL_EMAIL_UPDATE": "Dein Konto wurde erfolgreich aktualisiert. Bitte prüfe Deine E-Mail um die neue E-Mail Adresse zu bestätigen.",
|
||||
"SUCCESSFUL_REGISTRATION": "Dein Konto wurde erfolgreich erstellt.",
|
||||
"SUCCESSFUL_REGISTRATION_WITH_EMAIL": "Ein Aktivierungslink für Dein Konto wurde an die angegebene E-Mail Adresse geschickt.",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"DAY": "day | days",
|
||||
"DISPLAYED": "Displayed",
|
||||
"DOCUMENTATION": "documentation",
|
||||
"FALSE": "False",
|
||||
"HERE": "here",
|
||||
"HIDDEN": "Hidden",
|
||||
"HOME": "Home",
|
||||
@ -21,5 +22,6 @@
|
||||
"LABEL": "par page"
|
||||
}
|
||||
},
|
||||
"TOTAL": "Total"
|
||||
"TOTAL": "Total",
|
||||
"TRUE": "True"
|
||||
}
|
@ -92,6 +92,7 @@
|
||||
"STOPPED_SPEED_THRESHOLD": "stopped speed threshold"
|
||||
},
|
||||
"SPORTS_EDITION": "Sports preferences edition",
|
||||
"START_ELEVATION_AT_ZERO": "Start elevation plots at zero",
|
||||
"SUCCESSFUL_EMAIL_UPDATE": "Your account has been updated successfully. Please check your email to confirm your new email address.",
|
||||
"SUCCESSFUL_REGISTRATION": "Your account has been created successfully.",
|
||||
"SUCCESSFUL_REGISTRATION_WITH_EMAIL": "A link to activate your account has been emailed to the address provided.",
|
||||
|
@ -1,2 +1,4 @@
|
||||
{
|
||||
"FALSE": "Falso",
|
||||
"TRUE": "Verdadero"
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
"DAY": "jour | jours",
|
||||
"DISPLAYED": "Affiché",
|
||||
"DOCUMENTATION": "documentation (en)",
|
||||
"FALSE": "Faux",
|
||||
"HERE": "ici",
|
||||
"HIDDEN": "Masqué",
|
||||
"HOME": "Accueil",
|
||||
@ -21,5 +22,6 @@
|
||||
"LABEL": "par page"
|
||||
}
|
||||
},
|
||||
"TOTAL": "Total"
|
||||
"TOTAL": "Total",
|
||||
"TRUE": "Vrai"
|
||||
}
|
@ -92,6 +92,7 @@
|
||||
"STOPPED_SPEED_THRESHOLD": "seuil de vitesse arrêtée"
|
||||
},
|
||||
"SPORTS_EDITION": "Mise à jour des préférences des sports",
|
||||
"START_ELEVATION_AT_ZERO": "Démarrer le tracé d'altitude à zéro",
|
||||
"SUCCESSFUL_EMAIL_UPDATE": "Votre compte a été modifié avec succès. Veuillez vérifier votre boîte de réception pour valider votre nouvelle adresse électronique.",
|
||||
"SUCCESSFUL_REGISTRATION": "Votre compte a été créé avec succès.",
|
||||
"SUCCESSFUL_REGISTRATION_WITH_EMAIL": "Un lien pour activer votre compte a été envoyé à l'adresse électronique fournie.",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"DAY": "giorno | giorni",
|
||||
"DISPLAYED": "Mostrato",
|
||||
"DOCUMENTATION": "documentazione",
|
||||
"FALSE": "Falso",
|
||||
"HERE": "qui",
|
||||
"HIDDEN": "Nascosto",
|
||||
"HOME": "Home",
|
||||
@ -21,5 +22,6 @@
|
||||
"LABEL": "per pagina"
|
||||
}
|
||||
},
|
||||
"TOTAL": "Totale"
|
||||
"TOTAL": "Totale",
|
||||
"TRUE": "Vero"
|
||||
}
|
||||
|
@ -79,6 +79,7 @@
|
||||
"STOPPED_SPEED_THRESHOLD": "Limite minimo di velocità"
|
||||
},
|
||||
"SPORTS_EDITION": "Preferenze sport",
|
||||
"START_ELEVATION_AT_ZERO": "Inizia il grafico dell'elevazione a 0",
|
||||
"SUCCESSFUL_EMAIL_UPDATE": "Il tuo account è stato aggiornato con successo. Per favore controlla la tua email per confermare il tuo indirizzo email.",
|
||||
"SUCCESSFUL_REGISTRATION": "Il tuo account è stato creato con successo.",
|
||||
"SUCCESSFUL_REGISTRATION_WITH_EMAIL": "Un link per attivare il tuo account è stato inviato all'indirizzo specificato.",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"DAY": "dag | dagen",
|
||||
"DISPLAYED": "Weergegeven",
|
||||
"DOCUMENTATION": "documentatie",
|
||||
"FALSE": "Waar",
|
||||
"HERE": "hier",
|
||||
"HIDDEN": "Verborgen",
|
||||
"HOME": "Startscherm",
|
||||
@ -21,5 +22,6 @@
|
||||
"LABEL": "per pagina"
|
||||
}
|
||||
},
|
||||
"TOTAL": "Totaal"
|
||||
"TOTAL": "Totaal",
|
||||
"TRUE": "Onwaar"
|
||||
}
|
||||
|
@ -92,6 +92,7 @@
|
||||
"STOPPED_SPEED_THRESHOLD": "snelheidsgrens voor stilstand"
|
||||
},
|
||||
"SPORTS_EDITION": "Sport voorkeuren aanpassen",
|
||||
"START_ELEVATION_AT_ZERO": "Begin hoogtegrafiek op nul",
|
||||
"SUCCESSFUL_EMAIL_UPDATE": "Uw account werd succesvol bijgewerkt. Controleer uw inbox om uw nieuw email adres te bevestigen.",
|
||||
"SUCCESSFUL_REGISTRATION": "Uw account werd succesvol aangemaakt.",
|
||||
"SUCCESSFUL_REGISTRATION_WITH_EMAIL": "Een link om uw account te activeren werd doorgestuurd naar opgegeven email adres.",
|
||||
|
@ -28,6 +28,7 @@ export interface IAuthUserProfile extends IUserProfile {
|
||||
accepted_privacy_policy: boolean
|
||||
display_ascent: boolean
|
||||
imperial_units: boolean
|
||||
start_elevation_at_zero: boolean
|
||||
language: string | null
|
||||
timezone: string
|
||||
date_format: string
|
||||
@ -63,6 +64,7 @@ export interface IAdminUserPayload {
|
||||
|
||||
export interface IUserPreferencesPayload {
|
||||
display_ascent: boolean
|
||||
start_elevation_at_zero: boolean
|
||||
imperial_units: boolean
|
||||
language: string
|
||||
timezone: string
|
||||
|
Reference in New Issue
Block a user