- Add global IS_DEV flag controlling API endpoint (dev vs biz.payfrit.com), dev ribbon banner, and magic OTP hints - Add diagonal orange DEV ribbon overlay (Widgets/DevRibbon.swift) - Replace app icon with properly centered dark-outline SVG on white background - Fix display name with InfoPlist.strings localization - Redesign business selection cards with initial letter, status pill, task count - Make businesses only tappable when pending tasks > 0 (dimmed otherwise) - Simplify LoginScreen and RootView to use IS_DEV directly - Fix hardcoded dev URLs to respect IS_DEV flag Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1 KiB
Swift
36 lines
1 KiB
Swift
import SwiftUI
|
|
|
|
// MARK: - DEV Ribbon Overlay
|
|
|
|
/// Diagonal orange "DEV" ribbon in the lower-left corner.
|
|
/// Only visible when IS_DEV is true.
|
|
/// Taps pass through to content below.
|
|
struct DevRibbonModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.overlay(alignment: .bottomLeading) {
|
|
if IS_DEV {
|
|
ribbon
|
|
.allowsHitTesting(false)
|
|
}
|
|
}
|
|
}
|
|
|
|
private var ribbon: some View {
|
|
Text("DEV")
|
|
.font(.system(size: 11, weight: .bold))
|
|
.tracking(2)
|
|
.foregroundColor(.white)
|
|
.frame(width: 130, height: 24)
|
|
.background(Color(red: 1.0, green: 0.596, blue: 0.0)) // #FF9800
|
|
.rotationEffect(.degrees(45))
|
|
.offset(x: -28, y: -28)
|
|
.shadow(color: .black.opacity(0.25), radius: 2, x: 0, y: 1)
|
|
}
|
|
}
|
|
|
|
extension View {
|
|
func devRibbon() -> some View {
|
|
modifier(DevRibbonModifier())
|
|
}
|
|
}
|