diff --git a/fittrackee_client/.env b/fittrackee_client/.env
deleted file mode 100644
index f256c63d..00000000
--- a/fittrackee_client/.env
+++ /dev/null
@@ -1,2 +0,0 @@
-VUE_APP_I18N_LOCALE=en
-VUE_APP_I18N_FALLBACK_LOCALE=en
diff --git a/fittrackee_client/src/components/Common/Dropdown.vue b/fittrackee_client/src/components/Common/Dropdown.vue
new file mode 100644
index 00000000..e6a17c82
--- /dev/null
+++ b/fittrackee_client/src/components/Common/Dropdown.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+ -
+ {{ option.label }}
+
+
+
+
+
+
+
+
diff --git a/fittrackee_client/src/components/NavBar.vue b/fittrackee_client/src/components/NavBar.vue
index 7e5b1222..7c6f12c7 100644
--- a/fittrackee_client/src/components/NavBar.vue
+++ b/fittrackee_client/src/components/NavBar.vue
@@ -2,14 +2,14 @@
-
FitTrackee
+
FitTrackee
-
FitTrackee
+
FitTrackee
{{
t('dashboard.DASHBOARD')
}}
- {{ t('workouts.WORKOUTS') }}
- {{ t('statistics.STATISTICS') }}
- {{ t('administration.ADMIN') }}
- {{ t('workouts.ADD_WORKOUT') }}
+ {{ t('workouts.WORKOUTS') }}
+ {{ t('statistics.STATISTICS') }}
+ {{ t('administration.ADMIN') }}
+ {{ t('workouts.ADD_WORKOUT') }}
@@ -37,21 +46,45 @@
@@ -74,7 +107,6 @@
font-size: 1.2em;
font-weight: bold;
margin-right: 10px;
- line-height: 12px;
}
.fa {
@@ -84,6 +116,7 @@
.nav-icon-open {
display: none;
}
+
.hamburger-icon,
.close-icon {
display: none;
@@ -99,8 +132,25 @@
display: none;
}
+ .nav-items-app-menu,
+ .nav-items-user-menu {
+ display: flex;
+ margin: 0;
+ padding: 0;
+ }
+
.nav-item {
- padding: 10px 10px;
+ padding: 0 10px;
+
+ &.dropdown-wrapper {
+ width: 60px;
+ }
+
+ ::v-deep(.dropdown-list) {
+ margin-left: -10px;
+ padding-left: 10px;
+ width: 75px;
+ }
}
}
@@ -155,9 +205,13 @@
justify-content: space-between;
.app-name {
- padding: 19px 25px;
+ padding: 15px 25px;
}
}
+
+ .nav-item {
+ padding: 7px 25px;
+ }
}
}
}
diff --git a/fittrackee_client/src/i18n.ts b/fittrackee_client/src/i18n.ts
index 37f4ad56..70e91ec4 100644
--- a/fittrackee_client/src/i18n.ts
+++ b/fittrackee_client/src/i18n.ts
@@ -21,7 +21,8 @@ function loadLocaleMessages(): LocaleMessages
{
export default createI18n({
legacy: false,
- locale: process.env.VUE_APP_I18N_LOCALE || 'en',
- fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
+ locale: 'en',
+ fallbackLocale: 'en',
+ globalInjection: true,
messages: loadLocaleMessages(),
})
diff --git a/fittrackee_client/src/locales/en/user.json b/fittrackee_client/src/locales/en/user.json
index 2b8381d2..566c86bd 100644
--- a/fittrackee_client/src/locales/en/user.json
+++ b/fittrackee_client/src/locales/en/user.json
@@ -1,4 +1,5 @@
{
+ "LANGUAGE": "Language",
"LOGIN": "Login",
"LOGOUT": "Logout",
"REGISTER": "Register"
diff --git a/fittrackee_client/src/locales/fr/user.json b/fittrackee_client/src/locales/fr/user.json
index 9996d2a8..9ba10b98 100644
--- a/fittrackee_client/src/locales/fr/user.json
+++ b/fittrackee_client/src/locales/fr/user.json
@@ -1,4 +1,5 @@
{
+ "LANGUAGE": "Langue",
"LOGIN": "Se connecter",
"LOGOUT": "Se déconnecter",
"REGISTER": "S'inscrire"
diff --git a/fittrackee_client/src/store/index.ts b/fittrackee_client/src/store/index.ts
index 7d3d8eaf..d59f769b 100644
--- a/fittrackee_client/src/store/index.ts
+++ b/fittrackee_client/src/store/index.ts
@@ -1,8 +1,14 @@
import { createStore } from 'vuex'
export default createStore({
- state: {},
- mutations: {},
+ state: {
+ language: 'en',
+ },
+ mutations: {
+ setLanguage(state, language: string) {
+ state.language = language
+ },
+ },
actions: {},
modules: {},
})
diff --git a/fittrackee_client/src/types/index.ts b/fittrackee_client/src/types/index.ts
new file mode 100644
index 00000000..928590a9
--- /dev/null
+++ b/fittrackee_client/src/types/index.ts
@@ -0,0 +1,6 @@
+export interface IDropdownOption {
+ value: string | number
+ label: string
+}
+
+export type TDropdownOptions = IDropdownOption[]