Skip to content

Commit

Permalink
Merge pull request #14 from ccfreiburg/refactor/separate-backend
Browse files Browse the repository at this point in the history
Refactor/separate backend
  • Loading branch information
AlexRoehm committed Aug 11, 2024
2 parents ac917d7 + 7187844 commit 40389bc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion backend/src/controller/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async function getExternalMenu( locale: string ) : Promise<any> {
}
async function getLocalMenu( locale: string ) : Promise<any> {
const meta = JSON.parse(fs.readFileSync(DATABASE_PATH + DATAFILES_PATH + 'meta-'+locale+'.json',{encoding:'utf8', flag:'r'}));
console.log(EntityMetadata)
return meta.menu
}

Expand Down
9 changes: 4 additions & 5 deletions components/Page/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
:closeOnScroll="false"
:menuVisible="showMenu"
:showMenuButton="!loading"
:darkmode="darkmode"
:logo="logo"
:logodark="logodark"
:enable_dark_option="enableDarkMode"
@menuButtonClick="menuButtonClick"
@colorModeChanged="switchColorMode"
Expand Down Expand Up @@ -102,17 +102,16 @@ onMounted(() => {
colorMode.value = 'light'
}
})
const logo = computed( () => (darkmode.value ?
ContentFile.getMediaUrl(useRuntimeConfig().public.logoDark) :
ContentFile.getMediaUrl(useRuntimeConfig().public.logo)) )
const logodark = ContentFile.getMediaUrl(useRuntimeConfig().public.logoDark)
const logo = ContentFile.getMediaUrl(useRuntimeConfig().public.logo)
return {
menuButtonClick,
menuItemClicked,
switchColorMode,
darkmode,
enableDarkMode,
showMenu,
logo,
logodark,
menu,
loading,
user
Expand Down
8 changes: 3 additions & 5 deletions components/Page/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
</div>
<div class="content-center flex-grow text-center align-middle">
<NuxtLink :to="localePath('/')" class="inline-block">
<img :src="$props.logo" class="m-1 w-28 sm:w-48" />
<img :src="$props.logo" class="dark:hidden m-1 w-28 sm:w-48" />
<img :src="$props.logodark" class="dark:block hidden m-1 w-28 sm:w-48" />
</NuxtLink>
</div>
<div class="flex flex-row items-center w-1/6 place-content-end">
Expand Down Expand Up @@ -89,10 +90,7 @@ export default defineComponent({
default: { de: '/', en: '/en' }
},
logo: String,
darkmode: {
type: Boolean,
default: true
},
logodark: String,
enableDarkOption: {
type: Boolean,
default: true
Expand Down
1 change: 0 additions & 1 deletion components/SerieDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default defineComponent({
// Upload Image
const upload = useUploader()
var { result, link, nothingToDo } = await upload(SERVER_IMG_PATH+SERIES_IMG_PATH, imgMetadata.value.selectedFile)
console.log(JSON.stringify(result))
if (!nothingToDo) {
if ((result as any).statusCode != 201) {
errors.value.push({ field: "", text: "upload" })
Expand Down

0 comments on commit 40389bc

Please sign in to comment.