Bottom Tab Bar Visibility Adjustment
Nucleic-Session: 747527BF-AEE9-4939-BE70-A14F1F3BBBA8 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -46,9 +46,7 @@ struct ProjectsView: View {
|
||||
struct ProjectDetailView: View {
|
||||
@EnvironmentObject var store: RemoteStore
|
||||
let project: WireProject
|
||||
@State private var draft = ""
|
||||
@State private var model: String?
|
||||
@State private var effort = MobileEfforts.fallback
|
||||
@State private var showNewChat = false
|
||||
|
||||
private var sessions: [WireSessionSummary] {
|
||||
store.liveSessions
|
||||
@@ -58,27 +56,6 @@ struct ProjectDetailView: View {
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
Section {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack {
|
||||
ModelMenu(model: $model, catalog: store.modelCatalog, backend: nil)
|
||||
Spacer()
|
||||
EffortMenu(effort: $effort, catalog: store.modelCatalog, modelSKU: model,
|
||||
controlled: project.isNucleicControlled)
|
||||
}
|
||||
HStack(alignment: .bottom, spacing: 8) {
|
||||
TextField("Start a chat in \(project.name)…", text: $draft, axis: .vertical)
|
||||
.textFieldStyle(.roundedBorder).lineLimit(1...4)
|
||||
.orchestraGlow(active: MobileEfforts.isOrchestra(effort) && project.isNucleicControlled)
|
||||
.keyboardDismissable()
|
||||
Button {
|
||||
store.startChat(in: project.id, message: draft, model: model, effort: effort)
|
||||
draft = ""
|
||||
} label: { Image(systemName: "arrow.up.circle.fill").font(.title2) }
|
||||
.disabled(draft.trimmingCharacters(in: .whitespaces).isEmpty || !store.canControl)
|
||||
}
|
||||
}
|
||||
}
|
||||
Section("Sessions") {
|
||||
if sessions.isEmpty {
|
||||
Text("No sessions yet.").foregroundStyle(.secondary)
|
||||
@@ -93,12 +70,8 @@ struct ProjectDetailView: View {
|
||||
.navigationTitle(project.name)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.scrollDismissesKeyboard(.interactively)
|
||||
.onChange(of: model) { _, newModel in
|
||||
let levels = store.modelCatalog.offeredEfforts(forModel: newModel)
|
||||
let sentinel = store.modelCatalog.orchestraSentinelOrFallback
|
||||
if effort.caseInsensitiveCompare(sentinel) != .orderedSame, !levels.contains(effort) {
|
||||
effort = levels.last ?? MobileEfforts.fallback
|
||||
}
|
||||
}
|
||||
// A floating "+" scoped to this project — the glass composer sheet opens pre-locked to it,
|
||||
// replacing the old inline start-chat card at the top of the page.
|
||||
.newChatAffordance(project: project, isPresented: $showNewChat)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user