Files
vnidrop/apple/VniDrop/UI/Navigation/AppDestination.swift
cdricms 1563bf80d6 feat(apple): type-safe SF Symbols via SFSafeSymbols
Replaces every stringly-typed SF Symbol name with a compile-time-checked
SFSymbol case, mirroring the L10n accessor approach. A mistyped or
OS-unavailable symbol is now a build error instead of a silently blank
glyph at runtime.

Adds the SFSafeSymbols SPM package (project.yml) and migrates all call
sites: Image(systemName:)/Label(systemImage:) -> systemSymbol, and the
five symbol-carrying view properties (AppDestination.systemSymbol,
SettingsRow.icon, AboutPoint.symbol, MethodRow.icon, PolicyOption.icon)
flipped from String to SFSymbol end to end.
2026-07-23 17:40:07 +02:00

29 lines
647 B
Swift

import Foundation
import SFSafeSymbols
/// Top-level destinations, ported from `ui/navigation/AppDestination.kt`.
enum AppDestination: String, CaseIterable, Identifiable {
case send
case receive
case settings
var id: String { rawValue }
var labelKey: String.LocalizationValue {
switch self {
case .send: return L10n.Nav.send
case .receive: return L10n.Nav.receive
case .settings: return L10n.Nav.settings
}
}
/// SF Symbol approximating the Compose line icon.
var systemSymbol: SFSymbol {
switch self {
case .send: return .paperplane
case .receive: return .trayAndArrowDown
case .settings: return .gearshape
}
}
}