diff --git a/software/backend/scripts/databaseHelper.ts b/software/backend/scripts/databaseHelper.ts index 25a6379..f574c57 100644 --- a/software/backend/scripts/databaseHelper.ts +++ b/software/backend/scripts/databaseHelper.ts @@ -90,12 +90,12 @@ export async function prepopulateDatabase() { { await City.create(city) .then(async cityDataset => { - for (let location of city.locations) + for (let { ...location } of city.locations) { location["cityId"] = cityDataset.id location["urlName"] = location.name.replaceAll(" ", "-").toLowerCase() - location["imageIndoor"] = "http://localhost:3000/static/" + location["imageIndoor"] - location["imageOutdoor"] = "http://localhost:3000/static/" + location["imageOutdoor"] + location.imageIndoor = "http://localhost:3000/static/" + location["imageIndoor"] + location.imageOutdoor = "http://localhost:3000/static/" + location["imageOutdoor"] await Location.create(location) .then(async locationDataset => { @@ -240,7 +240,7 @@ export async function prepopulateDatabase() { let concerts = [] let ratings = [] - for(let band of bandsConcerts.bands) { + for(let { ...band } of bandsConcerts.bands) { band.imageMembers = "http://localhost:3000/static/" + band.imageMembers band.images = band.images.map(image => "http://localhost:3000/static/" + image) band.logo = "http://localhost:3000/static/" + band.logo @@ -282,11 +282,9 @@ export async function prepopulateDatabase() { } for (let member of band.members) { - member.image = "http://localhost:3000/static/" + member.image - bandMembers.push({ name: member.name, - image: member.image, + image: "http://localhost:3000/static/" + member.image, bandId: dataset.dataValues.id }) } diff --git a/software/src/App.vue b/software/src/App.vue index aa1e54e..9bb00f2 100644 --- a/software/src/App.vue +++ b/software/src/App.vue @@ -9,8 +9,6 @@ import { useFeedbackStore } from './stores/feedback.store'; import companyFooter from './components/navigation/companyFooter.vue'; import urlBar from './components/navigation/urlBar.vue'; import { useRouter } from 'vue-router'; -import actionDialog from './components/basics/actionDialog.vue'; -import CircularProgressIndeterminate from './components/basics/circularProgressIndeterminate.vue'; const preferencesStore = usePreferencesStore() const feedbackStore = useFeedbackStore() @@ -19,18 +17,18 @@ const router = useRouter() theme.global.name.value = preferencesStore.theme - -// First startup -if (preferencesStore.firstStartup) { - preferencesStore.firstStartupRoutine() -} - - // Global watcher +// Watch for language change watch(() => preferencesStore.language, () => { i18n.global.locale = preferencesStore.language }, { immediate: true }) +// Watch for theme change +watch(() => preferencesStore.theme, () => { + theme.global.name.value = preferencesStore.theme +}) + +// Watch for 404 page directions watch(() => feedbackStore.notFound, () => { if (feedbackStore.notFound) { feedbackStore.notFound = false @@ -92,23 +90,4 @@ watch(() => feedbackStore.notFound, () => { - - - - - {{ $t('misc.firstStartup.description') }} - - - - - - - - - \ No newline at end of file diff --git a/software/src/components/basics/actionDialog.vue b/software/src/components/basics/actionDialog.vue index b483a71..6ff8171 100644 --- a/software/src/components/basics/actionDialog.vue +++ b/software/src/components/basics/actionDialog.vue @@ -23,9 +23,11 @@ defineProps({ :icon="icon" :tonal="false" > - + -