spb/zyquo-cloud Public MIT
Native macOS AI chat client for 12 cloud providers — your keys, every cloud model, one beautiful chat.
Swift 97.4%
Shell 1.7%
Makefile 1%
1//2// EmptyStateView.swift3// Zyquo Cloud4//5// Author: Simon-Pierre Boucher6// Mail: contact@spboucher.ai7//8// Empty chat state: brand glyph, greeting, four suggested prompt cards, and9// the model chip — intentional and beautiful, never blank.10//1112import SwiftUI1314struct EmptyStateView: View {15 let model: AIModel?16 var onSelectModel: (AIModel) -> Void17 var onSuggestion: (String) -> Void1819 private static let suggestions: [(symbol: String, title: String, prompt: String)] = [20 ("lightbulb", "Explain something",21 "Explain how transformer attention works, with a concrete example."),22 ("chevron.left.forwardslash.chevron.right", "Review my code",23 "Review this code for bugs and suggest improvements:\n\n"),24 ("doc.text", "Summarize a document",25 "Summarize the key points of the following document:\n\n"),26 ("globe", "Translate",27 "Translate the following text to French, keeping the tone natural:\n\n"),28 ]2930 var body: some View {31 VStack(spacing: ZyquoSpacing.lg) {32 Spacer()33 CloudZGlyph(size: 88)34 VStack(spacing: ZyquoSpacing.xxs) {35 Text("Welcome to Zyquo Cloud")36 .font(ZyquoFont.title)37 .foregroundStyle(ZyquoColor.textPrimary)38 Text("Your keys, every cloud model, one beautiful chat.")39 .font(ZyquoFont.body())40 .foregroundStyle(ZyquoColor.textSecondary)41 }42 ModelChipView(model: model, onSelect: onSelectModel)43 LazyVGrid(44 columns: [GridItem(.flexible()), GridItem(.flexible())],45 spacing: ZyquoSpacing.sm46 ) {47 ForEach(Self.suggestions, id: \.title) { suggestion in48 Button {49 onSuggestion(suggestion.prompt)50 } label: {51 HStack(spacing: ZyquoSpacing.xs) {52 Image(systemName: suggestion.symbol)53 .font(.system(size: 14))54 .foregroundStyle(ZyquoColor.accent)55 .frame(width: 20)56 Text(suggestion.title)57 .font(ZyquoFont.body(size: 13))58 .foregroundStyle(ZyquoColor.textPrimary)59 Spacer(minLength: 0)60 }61 .padding(ZyquoSpacing.sm)62 .background(63 RoundedRectangle(cornerRadius: ZyquoRadius.medium, style: .continuous)64 .fill(ZyquoColor.surface)65 .overlay(66 RoundedRectangle(cornerRadius: ZyquoRadius.medium, style: .continuous)67 .strokeBorder(ZyquoColor.border, lineWidth: ZyquoMetrics.hairline)68 )69 )70 .contentShape(Rectangle())71 }72 .buttonStyle(PressableButtonStyle())73 }74 }75 .frame(maxWidth: 460)76 Spacer()77 Spacer()78 }79 .frame(maxWidth: .infinity, maxHeight: .infinity)80 .background(ZyquoColor.background)81 }82}83