Add user preference UI bits for raw gpx speed processing
This commit is contained in:
parent
7e00e79386
commit
cef28c52a2
@ -21,6 +21,8 @@
|
||||
<dd>{{ $t(`common.${display_ascent}`) }}</dd>
|
||||
<dt>{{ $t('user.PROFILE.ELEVATION_CHART_START.LABEL') }}:</dt>
|
||||
<dd>{{ $t(`user.PROFILE.ELEVATION_CHART_START.${user.start_elevation_at_zero ? 'ZERO' : 'MIN_ALT'}`) }}</dd>
|
||||
<dt>{{ $t('user.PROFILE.USE_RAW_GPX_SPEED.LABEL') }}:</dt>
|
||||
<dd>{{ $t(`user.PROFILE.USE_RAW_GPX_SPEED.${user.use_raw_gpx_speed ? 'RAW_SPEED' : 'FILTERED_SPEED'}`) }}</dd>
|
||||
</dl>
|
||||
<div class="profile-buttons">
|
||||
<button @click="$router.push('/profile/edit/preferences')">
|
||||
|
@ -119,6 +119,26 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-items form-checkboxes">
|
||||
<span class="checkboxes-label">
|
||||
{{ $t('user.PROFILE.USE_RAW_GPX_SPEED.LABEL') }}
|
||||
</span>
|
||||
<div class="checkboxes">
|
||||
<label v-for="status in useRawGpxSpeed" :key="status.label">
|
||||
<input
|
||||
type="radio"
|
||||
:id="status.label"
|
||||
:name="status.label"
|
||||
:checked="status.value === userForm.use_raw_gpx_speed"
|
||||
:disabled="loading"
|
||||
@input="updateUseRawGpxSpeed(status.value)"
|
||||
/>
|
||||
<span class="checkbox-label">
|
||||
{{ $t(`user.PROFILE.USE_RAW_GPX_SPEED.${status.label}`) }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-buttons">
|
||||
<button class="confirm" type="submit">
|
||||
{{ $t('buttons.SUBMIT') }}
|
||||
@ -200,6 +220,16 @@
|
||||
value: false
|
||||
}
|
||||
]
|
||||
const useRawGpxSpeed = [
|
||||
{
|
||||
label: 'RAW_SPEED',
|
||||
value: true
|
||||
},
|
||||
{
|
||||
label: 'FILTERED_SPEED',
|
||||
value: false
|
||||
}
|
||||
]
|
||||
const loading = computed(
|
||||
() => store.getters[AUTH_USER_STORE.GETTERS.USER_LOADING]
|
||||
)
|
||||
@ -223,6 +253,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.use_raw_gpx_speed = user.use_raw_gpx_speed ? user.use_raw_gpx_speed : 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'
|
||||
@ -238,6 +269,9 @@
|
||||
function updateStartElevationAtZero(value: boolean) {
|
||||
userForm.start_elevation_at_zero = value
|
||||
}
|
||||
function updateUseRawGpxSpeed(value: boolean) {
|
||||
userForm.use_raw_gpx_speed = value
|
||||
}
|
||||
function updateAscentDisplay(value: boolean) {
|
||||
userForm.display_ascent = value
|
||||
}
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Imperiales System (ft, mi, mph, °F)",
|
||||
"LABEL": "Einheiten für die Distanz",
|
||||
"METRIC": "Metrisches System (m, km, m/s, °C)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Höchstgeschwindigkeitsstrategie",
|
||||
"RAW_SPEED": "Rau",
|
||||
"FILTERED_SPEED": "Gefiltert"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "Ich habe die {0} gelesen und stimme ihr zu.",
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Imperial system (ft, mi, mph, °F)",
|
||||
"LABEL": "Units for distance",
|
||||
"METRIC": "Metric system (m, km, m/s, °C)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "GPX max speed strategy",
|
||||
"RAW_SPEED": "Raw",
|
||||
"FILTERED_SPEED": "Filtered"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "I have read and agree to the {0}.",
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Sistema Imperial (ft, mi, mph, ºF)",
|
||||
"LABEL": "Unidades de distancia",
|
||||
"METRIC": "Sistema Métrico (m, km, m/s, ºC)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Estrategia de velocidad máxima",
|
||||
"RAW_SPEED": "Crudo",
|
||||
"FILTERED_SPEED": "Filtrado"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "He leído y aceptado la {0}.",
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Système impérial (ft, mi, mph, °F)",
|
||||
"LABEL": "Unités pour les distances",
|
||||
"METRIC": "Système métrique (m, km, m/s, °C)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Stratégie de vitesse maximale",
|
||||
"RAW_SPEED": "Brut",
|
||||
"FILTERED_SPEED": "Filtré"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "J'ai lu et accepte la {0}.",
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Sistema Imperial (ft, mi, mph, ºF)",
|
||||
"LABEL": "Unidades de distancia",
|
||||
"METRIC": "Sistema Métrico (m, km, m/s, ºC)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Estratexia de velocidade máxima",
|
||||
"RAW_SPEED": "Cru",
|
||||
"FILTERED_SPEED": "Filtrado"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "Lin e acepto a {0}.",
|
||||
|
@ -97,6 +97,11 @@
|
||||
"IMPERIAL": "Sistema imperiale (ft, mi, mph, °F)",
|
||||
"LABEL": "Unità per la distanza",
|
||||
"METRIC": "Sistema metrico (m, km, m/s, °C)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Strategia di massima velocità",
|
||||
"RAW_SPEED": "Greggio",
|
||||
"FILTERED_SPEED": "Filtrato"
|
||||
}
|
||||
},
|
||||
"REGISTER": "Registra",
|
||||
|
@ -47,7 +47,12 @@
|
||||
"TABS": {
|
||||
"PROFILE": "profil"
|
||||
},
|
||||
"TIMEZONE": "Tidssone"
|
||||
"TIMEZONE": "Tidssone",
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Maks hastighet strategi",
|
||||
"RAW_SPEED": "Rå",
|
||||
"FILTERED_SPEED": "Filtrert"
|
||||
}
|
||||
},
|
||||
"RESET_PASSWORD": "Tilbakestill passordet ditt",
|
||||
"SHOW_PASSWORD": "vis passord",
|
||||
|
@ -116,6 +116,11 @@
|
||||
"IMPERIAL": "Imperialistisch systeem (ft, mi, mph, °F)",
|
||||
"LABEL": "Eenheid voor afstand",
|
||||
"METRIC": "Metrisch systeem (m, km, m/s, °C)"
|
||||
},
|
||||
"USE_RAW_GPX_SPEED": {
|
||||
"LABEL": "Strategie voor maximale snelheid",
|
||||
"RAW_SPEED": "Rauw",
|
||||
"FILTERED_SPEED": "Gefilterd"
|
||||
}
|
||||
},
|
||||
"READ_AND_ACCEPT_PRIVACY_POLICY": "Ik heb het {0} gelezen en goedgekeurd.",
|
||||
|
@ -29,6 +29,7 @@ export interface IAuthUserProfile extends IUserProfile {
|
||||
display_ascent: boolean
|
||||
imperial_units: boolean
|
||||
start_elevation_at_zero: boolean
|
||||
use_raw_gpx_speed: boolean
|
||||
language: string | null
|
||||
timezone: string
|
||||
date_format: string
|
||||
@ -65,6 +66,7 @@ export interface IAdminUserPayload {
|
||||
export interface IUserPreferencesPayload {
|
||||
display_ascent: boolean
|
||||
start_elevation_at_zero: boolean
|
||||
use_raw_gpx_speed: boolean
|
||||
imperial_units: boolean
|
||||
language: string
|
||||
timezone: string
|
||||
|
Loading…
Reference in New Issue
Block a user