diff --git a/gymboard-api/src/main/java/nl/andrewlalis/gymboard_api/config/WebConfig.java b/gymboard-api/src/main/java/nl/andrewlalis/gymboard_api/config/WebConfig.java index e1bbd40..1f9e99a 100644 --- a/gymboard-api/src/main/java/nl/andrewlalis/gymboard_api/config/WebConfig.java +++ b/gymboard-api/src/main/java/nl/andrewlalis/gymboard_api/config/WebConfig.java @@ -13,13 +13,15 @@ import java.util.Arrays; @Configuration public class WebConfig { + @Value("${app.web-origin}") + private String webOrigin; + @Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); - // Don't do this in production, use a proper list of allowed origins - config.addAllowedOriginPattern("*"); + config.addAllowedOriginPattern(webOrigin); config.setAllowedHeaders(Arrays.asList("Origin", "Content-Type", "Accept")); config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "OPTIONS", "DELETE", "PATCH")); source.registerCorsConfiguration("/**", config); diff --git a/gymboard-api/src/main/resources/application-development.properties b/gymboard-api/src/main/resources/application-development.properties index 13bdea4..c4704b4 100644 --- a/gymboard-api/src/main/resources/application-development.properties +++ b/gymboard-api/src/main/resources/application-development.properties @@ -8,3 +8,5 @@ spring.jpa.show-sql=false spring.task.execution.pool.core-size=3 spring.task.execution.pool.max-size=10 + +app.web-origin=http://localhost:9000 diff --git a/gymboard-app/src/i18n/de/index.ts b/gymboard-app/src/i18n/de/index.ts new file mode 100644 index 0000000..c607264 --- /dev/null +++ b/gymboard-app/src/i18n/de/index.ts @@ -0,0 +1,28 @@ +export default { + mainLayout: { + language: 'Sprache', + pages: 'Seiten', + }, + indexPage: { + searchHint: 'Suche nach einem Gym', + }, + gymPage: { + home: 'Home', + submit: 'Einreichen', + leaderboard: 'Bestenliste', + homePage: { + overview: 'Überblick über dieses Fitnessstudio:', + recentLifts: 'Letzten Aufzüge' + }, + submitPage: { + name: 'Dein Name', + exercise: 'Übung', + weight: 'Gewicht', + reps: 'Wiederholungen', + date: 'Datum', + upload: 'Videodatei zum Hochladen', + submit: 'Einreichen', + }, + }, + }; + \ No newline at end of file diff --git a/gymboard-app/src/i18n/index.ts b/gymboard-app/src/i18n/index.ts index 1c28ddf..00df65a 100644 --- a/gymboard-app/src/i18n/index.ts +++ b/gymboard-app/src/i18n/index.ts @@ -1,7 +1,9 @@ import enUS from './en-US'; import nlNL from './nl-NL'; +import de from './de'; export default { 'en-US': enUS, 'nl-NL': nlNL, + 'de': de, }; diff --git a/gymboard-app/src/layouts/MainLayout.vue b/gymboard-app/src/layouts/MainLayout.vue index 6864950..0c3f58c 100644 --- a/gymboard-app/src/layouts/MainLayout.vue +++ b/gymboard-app/src/layouts/MainLayout.vue @@ -41,8 +41,9 @@ {{ $t('mainLayout.pages') }} - Gyms + Gyms Global Leaderboard + About @@ -60,6 +61,7 @@ const i18n = useI18n({ useScope: 'global' }); const localeOptions = [ { value: 'en-US', label: 'English' }, { value: 'nl-NL', label: 'Nederlands' }, + { value: 'de', label: 'Deutsch' }, ]; const leftDrawerOpen = ref(false); diff --git a/gymboard-app/src/pages/AboutPage.vue b/gymboard-app/src/pages/AboutPage.vue new file mode 100644 index 0000000..4ef74c1 --- /dev/null +++ b/gymboard-app/src/pages/AboutPage.vue @@ -0,0 +1,11 @@ + + diff --git a/gymboard-app/src/pages/ErrorNotFound.vue b/gymboard-app/src/pages/ErrorNotFound.vue index e93c6a3..bf3714a 100644 --- a/gymboard-app/src/pages/ErrorNotFound.vue +++ b/gymboard-app/src/pages/ErrorNotFound.vue @@ -1,16 +1,14 @@