Skip to content

Commit

Permalink
feat: pull atrium video from settings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
robb-j committed Feb 2, 2023
1 parent 915cd36 commit 08c0b12
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions client/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export interface MozConferenceConfig {
familyResources: boolean
mozfestBook: boolean
}

content: {
atriumVideo: string
}
}

export type ScheduleRecord = Omit<DeconfScheduleRecord, 'settings'> & {
Expand Down
17 changes: 11 additions & 6 deletions client/src/views/AtriumView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
<ApiContent :slug="contentSlug">
<PrimaryEmbed
slot="feature_video"
link="https://vimeo.com/687248853"
v-if="featuredVideoLink"
:link="featuredVideoLink"
/>
<ApiContent slot="conference_over_message" slug="conference-over" />
<AnchorFmEmbed
slot="feature_audio_a"
src="https://anchor.fm/letsgetlitical/embed/episodes/Google-tell-me-about-gender--AI--Do-the-gender-stereotypes-offline-replicate-themselves-online-featuring-Sapni-GK--Garnett-Achieng-Mozfest-e1d2ivd"
/>
</ApiContent>
</div>
</BoxContent>
Expand Down Expand Up @@ -180,7 +177,6 @@ export default Vue.extend({
ColorWidget,
SponsorGrid,
FeaturedSessions,
AnchorFmEmbed,
},
data(): Data {
return {
Expand Down Expand Up @@ -229,6 +225,15 @@ export default Vue.extend({
.map((entry) => entry[0])
)
},
featuredVideoLink(): string | undefined {
try {
const raw = this.settings?.content.atriumVideo
if (!raw) return undefined
return new URL(raw).toString()
} catch {
return undefined
}
},
},
})
</script>
Expand Down
4 changes: 4 additions & 0 deletions content/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,9 @@
"linkedin": true,
"submissions": false,
"calendarHelp": false
},

"content": {
"atriumVideo": "https://vimeo.com/687248853"
}
}
4 changes: 4 additions & 0 deletions server/src/lib/structs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export const ConferenceConfigStruct = object({
submissions: boolean(),
calendarHelp: boolean(),
}),

content: object({
atriumVideo: string(),
}),
})

export type BlockList = Infer<typeof BlockedStruct>
Expand Down

0 comments on commit 08c0b12

Please sign in to comment.