Repository Public
1// SP Wallet iOS2// File: Features/Explore/ExploreView.swift3// Description: The iPhone's hub for the specialised sections (swap, bridge, NFT, markets, futures, agents, research, alerts, risk,4// security). The tab bar stays at five destinations; everything else is one tap from here.5//6// Author: Simon-Pierre Boucher7// Contact: contact@spboucher.ai8import SwiftUI910struct ExploreView: View {11 @Environment(AppModel.self) private var model12 private let groups: [(String, [(AppSection, String)])] = [13 (String(localized: "Opérations"), [(.swap, String(localized: "Échanger un actif contre un autre, avec cotation et minimum garanti")),14 (.bridge, String(localized: "Déplacer des USDC ou échanger entre réseaux")),15 (.nfts, String(localized: "Collections, pièces détenues, transferts"))]),16 (String(localized: "Marchés"), [(.markets, String(localized: "Explorateur des marchés au comptant et à terme")),17 (.futures, String(localized: "Perpétuels : marchés, positions, ordres")),18 (.agents, String(localized: "Agents de trading : simulation, papier, réel sous mandat")),19 (.research, String(localized: "Travaux de recherche et rapports"))]),20 (String(localized: "Surveillance"), [(.alerts, String(localized: "Événements confirmés du portefeuille et des agents")),21 (.risk, String(localized: "Limites de risque et interrupteur général")),22 (.security, String(localized: "Signataire, clés d’accès, arrêt d’urgence"))]),23 ]24 var body: some View {25 List {26 Section { FreshnessBanner().listRowInsets(.init()).listRowBackground(Color.clear) }27 ForEach(groups, id: \.0) { g in28 Section(g.0) {29 ForEach(g.1, id: \.0) { s, sub in30 NavigationLink { SectionContent(section: s).wallet(model) } label: {31 HStack(spacing: 12) {32 Image(systemName: s.icon).font(.system(size: 16, weight: .semibold)).frame(width: 38, height: 38).foregroundStyle(Theme.ink).background(Theme.elev, in: RoundedRectangle(cornerRadius: 11))33 VStack(alignment: .leading, spacing: 2) { Text(s.title).font(.system(size: 15.5, weight: .semibold)); Text(sub).font(.spFootnote).foregroundStyle(Theme.mute).lineLimit(2) }34 }.frame(minHeight: 52)35 }.accessibilityIdentifier("explore.\(s.rawValue)")36 }37 }38 }39 }40 .listStyle(.insetGrouped).scrollContentBackground(.hidden).spPage()41 .navigationTitle(AppSection.explore.title)42 }43}44