Login and Home

This commit is contained in:
Daniel Arantes Loverde
2026-02-04 16:55:29 -03:00
parent 78daaf1927
commit 33fc111459
90 changed files with 1707 additions and 303 deletions

View File

@@ -0,0 +1,74 @@
import SwiftUI
struct ProfileView: View {
@Binding var root: RootFlow
@Binding var selectedTab: MainTab
let tokenStore: TokenStore
var body: some View {
VStack(spacing: 20) {
header
VStack(spacing: 12) {
NavigationLink("Pedidos") {
OrdersView()
}
NavigationLink("Enderecos") {
Text("Enderecos")
}
NavigationLink("Ajuda") {
Text("Ajuda")
}
}
.font(AppTypography.body)
.foregroundStyle(AppColors.textPrimary)
Spacer()
SecondaryButton(title: "Sair") {
tokenStore.clear()
root = .auth
}
.padding(.horizontal, 20)
}
.padding(.top, 24)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(AppColors.backgroundLight)
}
private var header: some View {
VStack(spacing: 8) {
Circle()
.fill(AppColors.primary)
.frame(width: 72, height: 72)
.overlay(
Text("DL")
.font(.headline)
.foregroundStyle(AppColors.textInverse)
)
Text("Daniel Loverde")
.font(AppTypography.heading2)
.foregroundStyle(AppColors.textPrimary)
Text("daniel@pedifoods.com.br")
.font(.caption)
.foregroundStyle(AppColors.secondary)
}
}
}
struct OrdersView: View {
var body: some View {
VStack(spacing: 16) {
Text("Pedidos")
.font(AppTypography.heading1)
Text("Historico vazio")
.foregroundStyle(AppColors.secondary)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(AppColors.backgroundLight)
}
}