Watch: what changed on Recent cards and the thread screen, search in All threads, a switching complication with Allow and Deny in the Smart Stack, and question options on notifications
This commit is contained in:
1 parent
f8241e42bb
commit
bfcbb69550
29 files changed
+1100
-137
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// Mock B colors and the shared card. Amber means it needs you, teal means working, grey means done,
|
||||
// and red means broken.
|
||||
// and red means broken. Green and red also count lines added and removed.
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@@ -12,6 +12,40 @@ enum Theme {
|
||||
static let secondaryText = Color(red: 0.682, green: 0.682, blue: 0.698) // #aeaeb2
|
||||
static let bodyText = Color(red: 0.898, green: 0.898, blue: 0.918) // #e5e5ea
|
||||
static let bad = Color(red: 1.0, green: 0.420, blue: 0.369) // #ff6b5e
|
||||
static let add = Color(red: 0.353, green: 0.820, blue: 0.478) // #5ad17a
|
||||
}
|
||||
|
||||
extension Text {
|
||||
/// Text marked as inline code, which Text sets in monospace. A monospaced Font loses to the app's
|
||||
/// rounded design.
|
||||
init(code: String) {
|
||||
var attributed = AttributedString(code)
|
||||
attributed.inlinePresentationIntent = .code
|
||||
self.init(attributed)
|
||||
}
|
||||
|
||||
/// "+42 −8 · 3 files" in monospace, the additions green, the deletions red and the rest in the
|
||||
/// current style. Without `files`, just "+42 −8", as on a changed file's row.
|
||||
init(changes: ChangeTotals, files: Bool = true) {
|
||||
let parts = changes.parts
|
||||
let counts = Text("\(Text(code: parts.additions).foregroundStyle(Theme.add))\(Text(code: " "))\(Text(code: parts.deletions).foregroundStyle(Theme.bad))")
|
||||
self = files ? Text("\(counts)\(Text(code: " · \(parts.files)"))") : counts
|
||||
}
|
||||
}
|
||||
|
||||
extension Activity.Kind {
|
||||
/// The symbol in front of an activity line.
|
||||
var symbol: String {
|
||||
switch self {
|
||||
case .command: "terminal"
|
||||
case .edit: "pencil"
|
||||
case .search: "magnifyingglass"
|
||||
case .web: "globe"
|
||||
case .subagent: "arrow.triangle.branch"
|
||||
case .thinking: "ellipsis"
|
||||
default: "wrench.adjustable"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Phase {
|
||||
|
||||
Reference in new issue
Block a user