Skip to content

Commit

Permalink
add overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jul 18, 2024
1 parent 8457edb commit ad77193
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Nudge/UI/Common/CompanyLogo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct CompanyLogo: View {
Group {
if shouldShowCompanyLogo() {
companyImage
.overlay(companyImageOverlay, alignment: .topTrailing)
} else if UIUtilities().showEasterEgg() {
easterEggView
} else {
Expand Down Expand Up @@ -49,6 +50,16 @@ struct CompanyLogo: View {
}
}

private var companyImageOverlay: some View {
guard !appState.deviceSupportedByOSVersion else { return AnyView(EmptyView()) }
return AnyView(
Image(systemName: "exclamationmark.triangle")
.symbolRenderingMode(.hierarchical)
.foregroundStyle(Color.red)
.font(.title)
)
}

private var defaultImage: some View {
Image(systemName: "applelogo")
.customResizable(width: uiConstants.logoWidth, height: uiConstants.logoHeight)
Expand Down

0 comments on commit ad77193

Please sign in to comment.