Brain Service: - Playwright stealth crawler replacing browserless (og:image, Readability, Reddit JSON API) - AI classification with tag definitions and folder assignment - YouTube video download via yt-dlp - Karakeep migration complete (96 items) - Taxonomy management (folders with icons/colors, tags) - Discovery shuffle, sort options, search (Meilisearch + pgvector) - Item tag/folder editing, card color accents RSS Reader Service: - Custom FastAPI reader replacing Miniflux - Feed management (add/delete/refresh), category support - Full article extraction via Readability - Background content fetching for new entries - Mark all read with confirmation - Infinite scroll, retention cleanup (30/60 day) - 17 feeds migrated from Miniflux iOS App (SwiftUI): - Native iOS 17+ app with @Observable architecture - Cookie-based auth, configurable gateway URL - Dashboard with custom background photo + frosted glass widgets - Full fitness module (today/templates/goals/food library) - AI assistant chat (fitness + brain, raw JSON state management) - 120fps ProMotion support AI Assistants (Gateway): - Unified dispatcher with fitness/brain domain detection - Fitness: natural language food logging, photo analysis, multi-item splitting - Brain: save/append/update/delete notes, search & answer, undo support - Madiha user gets fitness-only (brain disabled) Firefox Extension: - One-click save to Brain from any page - Login with platform credentials - Right-click context menu (save page/link/image) - Notes field for URL saves - Signed and published on AMO Other: - Reader bookmark button routes to Brain (was Karakeep) - Fitness food library with "Add" button + add-to-meal popup - Kindle send file size check (25MB SMTP2GO limit) - Atelier UI as default (useAtelierShell=true) - Mobile upload box in nav drawer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.4 KiB
Swift
45 lines
1.4 KiB
Swift
import SwiftUI
|
|
|
|
struct MacroBar: View {
|
|
let label: String
|
|
let value: Double
|
|
let goal: Double
|
|
let color: Color
|
|
var compact: Bool = false
|
|
|
|
private var progress: Double {
|
|
guard goal > 0 else { return 0 }
|
|
return min(max(value / goal, 0), 1)
|
|
}
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: compact ? 2 : 4) {
|
|
HStack {
|
|
Text(label)
|
|
.font(compact ? .caption2 : .caption)
|
|
.fontWeight(.medium)
|
|
.foregroundStyle(Color.textSecondary)
|
|
Spacer()
|
|
Text("\(Int(value))/\(Int(goal))g")
|
|
.font(compact ? .caption2 : .caption)
|
|
.fontWeight(.semibold)
|
|
.foregroundStyle(Color.textPrimary)
|
|
}
|
|
|
|
GeometryReader { geo in
|
|
ZStack(alignment: .leading) {
|
|
RoundedRectangle(cornerRadius: compact ? 2 : 3)
|
|
.fill(color.opacity(0.15))
|
|
.frame(height: compact ? 4 : 6)
|
|
|
|
RoundedRectangle(cornerRadius: compact ? 2 : 3)
|
|
.fill(color)
|
|
.frame(width: max(0, geo.size.width * progress), height: compact ? 4 : 6)
|
|
.animation(.easeInOut(duration: 0.5), value: progress)
|
|
}
|
|
}
|
|
.frame(height: compact ? 4 : 6)
|
|
}
|
|
}
|
|
}
|