Client - display weather data source in About page
This commit is contained in:
parent
cd66952db9
commit
895592fbb1
@ -40,6 +40,12 @@
|
|||||||
{{ $t('about.CONTACT_ADMIN') }}
|
{{ $t('about.CONTACT_ADMIN') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="weather_provider && weather_provider.name">
|
||||||
|
{{ $t('about.WEATHER_DATA_FROM') }}
|
||||||
|
<a :href="weather_provider.url" target="_blank" rel="nofollow noopener">
|
||||||
|
{{ weather_provider.name }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -55,6 +61,22 @@
|
|||||||
const appConfig: ComputedRef<TAppConfig> = computed(
|
const appConfig: ComputedRef<TAppConfig> = computed(
|
||||||
() => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]
|
() => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]
|
||||||
)
|
)
|
||||||
|
const weather_provider: ComputedRef<Record<string, string>> = computed(() =>
|
||||||
|
get_weather_provider()
|
||||||
|
)
|
||||||
|
|
||||||
|
function get_weather_provider() {
|
||||||
|
const weather_provider: Record<string, string> = {}
|
||||||
|
if (appConfig.value.weather_provider === 'darksky') {
|
||||||
|
weather_provider['name'] = 'Dark Sky'
|
||||||
|
weather_provider['url'] = 'https://darksky.net'
|
||||||
|
}
|
||||||
|
if (appConfig.value.weather_provider === 'visualcrossing') {
|
||||||
|
weather_provider['name'] = 'Visual Crossing'
|
||||||
|
weather_provider['url'] = 'https://www.visualcrossing.com'
|
||||||
|
}
|
||||||
|
return weather_provider
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
"CONTACT_ADMIN": "Contact the administrator",
|
"CONTACT_ADMIN": "Contact the administrator",
|
||||||
"FITTRACKEE_DESCRIPTION": "<strong>FitTrackee</strong> is a self-hosted outdoor activity tracker.",
|
"FITTRACKEE_DESCRIPTION": "<strong>FitTrackee</strong> is a self-hosted outdoor activity tracker.",
|
||||||
"FITTRACKEE_LICENSE": "under {0} license ",
|
"FITTRACKEE_LICENSE": "under {0} license ",
|
||||||
"SOURCE_CODE": "Source code"
|
"SOURCE_CODE": "Source code",
|
||||||
|
"WEATHER_DATA_FROM": "Weather data from:"
|
||||||
}
|
}
|
@ -2,5 +2,6 @@
|
|||||||
"CONTACT_ADMIN": "Contacter l'administrateur",
|
"CONTACT_ADMIN": "Contacter l'administrateur",
|
||||||
"FITTRACKEE_DESCRIPTION": "<strong>FitTrackee</strong> est un <em>tracker</em> d'activités sportives (en extérieur).",
|
"FITTRACKEE_DESCRIPTION": "<strong>FitTrackee</strong> est un <em>tracker</em> d'activités sportives (en extérieur).",
|
||||||
"FITTRACKEE_LICENSE": "sous licence {0} (en) ",
|
"FITTRACKEE_LICENSE": "sous licence {0} (en) ",
|
||||||
"SOURCE_CODE": "Code source (en)"
|
"SOURCE_CODE": "Code source (en)",
|
||||||
|
"WEATHER_DATA_FROM": "Source des données météo :"
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ export interface IAppStatistics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type TAppConfig = {
|
export type TAppConfig = {
|
||||||
[key: string]: number | boolean | string
|
[key: string]: number | boolean | string | null
|
||||||
admin_contact: string
|
admin_contact: string
|
||||||
gpx_limit_import: number
|
gpx_limit_import: number
|
||||||
is_email_sending_enabled: boolean
|
is_email_sending_enabled: boolean
|
||||||
@ -16,6 +16,7 @@ export type TAppConfig = {
|
|||||||
max_users: number
|
max_users: number
|
||||||
max_zip_file_size: number
|
max_zip_file_size: number
|
||||||
version: string
|
version: string
|
||||||
|
weather_provider: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IApplication {
|
export interface IApplication {
|
||||||
|
Loading…
Reference in New Issue
Block a user