Skip to content

Commit

Permalink
Remove background from app response when countdown is enforced
Browse files Browse the repository at this point in the history
  • Loading branch information
Isti01 committed Sep 1, 2024
1 parent f83c944 commit 75ee9d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ class ApplicationApiController(
if (countdownComponent.isPresent) {
val countdown = countdownComponent.orElseThrow()
if (countdown.isBlockedAt(clock.getTimeInSeconds(), role)) {
val countdownSettings = countdown.attachConstants().toMutableMap().also { it["showOnly"] = true }

// Remove any image urls from the styles, because it might be a spoiler
val styleSettings = stylingComponent.attachConstants().filter { !it.key.lowercase().contains("url") }
val components = mapOf(
applicationComponent.component to appComponentFields(),
countdown.component to countdown.attachConstants().toMutableMap().also {
it["showOnly"] = true
},
stylingComponent.component to stylingComponent.attachConstants()
countdown.component to countdownSettings,
stylingComponent.component to styleSettings
)
return ApplicationConfigDto(
role = role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class StylingComponent(

val mainFontCdn = SettingProxy(componentSettingService, component,
"mainFontCdn", "https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&display=swap", type = SettingType.TEXT,
fieldName = "Általános betűtípus CDN", description = "Az általános betűtípus CDN URL-je"
fieldName = "Általános betűtípus CDN", description = "Az általános betűtípus CDN URL-je", serverSideOnly = true
)

val mainFontWeight = SettingProxy(componentSettingService, component,
Expand All @@ -211,7 +211,7 @@ class StylingComponent(

val displayFontCdn = SettingProxy(componentSettingService, component,
"displayFontCdn", "https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap", type = SettingType.TEXT,
fieldName = "Kiemelt betűtípus CDN", description = "A kiemelt betűtípus CDN URL-je"
fieldName = "Kiemelt betűtípus CDN", description = "A kiemelt betűtípus CDN URL-je", serverSideOnly = true
)

val displayFontWeight = SettingProxy(componentSettingService, component,
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/api/contexts/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,8 @@ export interface Style {
darkMobileBackgroundUrl: string
darkLogoUrl: string
mainFontName: string
mainFontCdn: string
mainFontWeight: number
displayFontName: string
displayFontCdn: string
displayFontWeight: number
lightFooterTransparent: boolean
lightNavbarTransparent: boolean
Expand Down

0 comments on commit 75ee9d9

Please sign in to comment.