Skip to content

Commit

Permalink
make the header title configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef-Harby committed Nov 29, 2024
1 parent 5d191ff commit 05e5c8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions public/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
"name": "English",
"direction": "ltr",
"queryParam": null,
"flag": "🇺🇸"
"flag": "🇺🇸",
"headerTitle": "pygeoapi-map"
},
{
"code": "ar-EG",
"name": "العربية",
"direction": "rtl",
"queryParam": "?lang=ar-EG",
"flag": "🇪🇬"
"flag": "🇪🇬",
"headerTitle": "خريطة pygeoapi"
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion src/components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<header class="header">
<h1 class="title">{{ $t('app.title') }}</h1>
<h1 class="title">{{ headerTitle }}</h1>

<div class="server-selector">
<div class="server-display" @click="showServerInput = !showServerInput">
Expand Down Expand Up @@ -63,6 +63,10 @@ export default {
},
locale() {
return this.currentLocale
},
headerTitle() {
const currentLocaleObj = this.supportedLocales.find(locale => locale.code === this.currentLocale)
return currentLocaleObj?.headerTitle || 'pygeoapi-map'
}
},
methods: {
Expand Down

0 comments on commit 05e5c8f

Please sign in to comment.