Use consistent snapshot and loading labels
This commit is contained in:
@@ -19,7 +19,7 @@ enum ChangeMode {
|
|||||||
private let emptyText: [ChangeMode: String] = [
|
private let emptyText: [ChangeMode: String] = [
|
||||||
.main: "No changes from the default branch.",
|
.main: "No changes from the default branch.",
|
||||||
.turn: "No changes this turn.",
|
.turn: "No changes this turn.",
|
||||||
.step: "This step changed nothing.",
|
.step: "This snapshot changed nothing.",
|
||||||
]
|
]
|
||||||
|
|
||||||
struct ChangesMemory {
|
struct ChangesMemory {
|
||||||
@@ -321,7 +321,7 @@ private struct ChangesHead: View {
|
|||||||
RangeTabButton(label: "Since default branch", active: model.pinRange == .main) {
|
RangeTabButton(label: "Since default branch", active: model.pinRange == .main) {
|
||||||
model.setPinRange(.main)
|
model.setPinRange(.main)
|
||||||
}
|
}
|
||||||
RangeTabButton(label: "This step", active: model.pinRange == .step) {
|
RangeTabButton(label: "This snapshot", active: model.pinRange == .step) {
|
||||||
model.setPinRange(.step)
|
model.setPinRange(.step)
|
||||||
}
|
}
|
||||||
RangeTabButton(label: "Live", active: false, help: "Back to the live worktree") {
|
RangeTabButton(label: "Live", active: false, help: "Back to the live worktree") {
|
||||||
@@ -472,7 +472,7 @@ private struct FileRow: View {
|
|||||||
Group {
|
Group {
|
||||||
switch model.diffs[file.path] {
|
switch model.diffs[file.path] {
|
||||||
case .none:
|
case .none:
|
||||||
Text("loading…").foregroundStyle(Palette.muted).padding(.horizontal, 10).padding(.vertical, 6)
|
Text("Loading…").foregroundStyle(Palette.muted).padding(.horizontal, 10).padding(.vertical, 6)
|
||||||
case .failure(let e):
|
case .failure(let e):
|
||||||
Text(e.message).foregroundStyle(Palette.danger).padding(.horizontal, 10).padding(.vertical, 6)
|
Text(e.message).foregroundStyle(Palette.danger).padding(.horizontal, 10).padding(.vertical, 6)
|
||||||
case .success(let patch):
|
case .success(let patch):
|
||||||
|
|||||||
@@ -788,11 +788,11 @@ private struct TranscriptScroll: View {
|
|||||||
.padding(.top, 12)
|
.padding(.top, 12)
|
||||||
} else {
|
} else {
|
||||||
if model.loading {
|
if model.loading {
|
||||||
Muted(text: "loading…")
|
Muted(text: "Loading…")
|
||||||
.padding(.top, 12)
|
.padding(.top, 12)
|
||||||
}
|
}
|
||||||
if model.hasOlder || model.older != nil {
|
if model.hasOlder || model.older != nil {
|
||||||
Muted(text: "loading earlier…")
|
Muted(text: "Loading earlier…")
|
||||||
.opacity(model.fetching || model.older != nil ? 1 : 0)
|
.opacity(model.fetching || model.older != nil ? 1 : 0)
|
||||||
.padding(.top, 12)
|
.padding(.top, 12)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user