Hide Logs button for unrun jobs; remove inbox filter bar; bump to 1.8
Build iOS App / Build .ipa and publish source (push) Successful in 23s

- Checks: only show the Logs button once a job has actually run (terminal
  conclusion). Queued/running jobs are grey with no logs, so the button was
  useless there.
- Inbox: remove the segmented filter bar (All/Assigned/By me/Review) — not
  useful yet. Bump to 1.8.
This commit is contained in:
Hermes committed 2026-08-12 22:06:09 +00:00
1 parent 9f3fb95cbe
commit de9729b898
3 files changed
+17 -18

No files matched your search

+4 -4
View File
@@ -187,7 +187,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR"; INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR";
@@ -197,7 +197,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.7; MARKETING_VERSION = 1.8;
PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr; PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@@ -211,7 +211,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR"; INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR";
@@ -221,7 +221,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.7; MARKETING_VERSION = 1.8;
PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr; PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
+12
View File
@@ -218,6 +218,7 @@ struct ChecksTab: View {
.font(.caption) .font(.caption)
.buttonStyle(.bordered) .buttonStyle(.bordered)
} }
if hasRun(job) {
NavigationLink { NavigationLink {
JobLogsView(repo: vm.repo, runID: run.id, jobID: job.id, JobLogsView(repo: vm.repo, runID: run.id, jobID: job.id,
jobName: job.name) jobName: job.name)
@@ -230,6 +231,7 @@ struct ChecksTab: View {
} }
} }
} }
}
.padding(10) .padding(10)
.background(Color(.secondarySystemBackground)) .background(Color(.secondarySystemBackground))
.clipShape(RoundedRectangle(cornerRadius: 10)) .clipShape(RoundedRectangle(cornerRadius: 10))
@@ -263,4 +265,14 @@ struct ChecksTab: View {
let c = (job.conclusion ?? "").lowercased() let c = (job.conclusion ?? "").lowercased()
return c == "failure" || c == "cancelled" return c == "failure" || c == "cancelled"
} }
/// A job has run only once it has a terminal conclusion. Queued/running
/// jobs (grey, no logs yet) hide the Logs button.
private func hasRun(_ job: ActionJob) -> Bool {
let s = job.status.lowercased()
if s == "queued" || s == "running" || s == "waiting" || s == "requested" {
return false
}
return (job.conclusion ?? "").lowercased() != ""
}
} }
+1 -14
View File
@@ -19,9 +19,7 @@ struct InboxView: View {
ContentUnavailableView( ContentUnavailableView(
"No open PRs", "No open PRs",
systemImage: "tray", systemImage: "tray",
description: Text(vm.filter == .all description: Text("Nothing to review."))
? "Nothing to review."
: "No PRs match this filter."))
} else { } else {
List { List {
ForEach(vm.displayedRows) { row in ForEach(vm.displayedRows) { row in
@@ -38,17 +36,6 @@ struct InboxView: View {
.toolbar { .toolbar {
ToolbarItem(placement: .primaryAction) { settingsButton } ToolbarItem(placement: .primaryAction) { settingsButton }
} }
.toolbar {
ToolbarItemGroup(placement: .bottomBar) {
Picker("Filter", selection: $vm.filter) {
ForEach(InboxFilter.allCases) { f in
Text(f.rawValue).tag(f)
}
}
.pickerStyle(.segmented)
.disabled(vm.displayedRows.isEmpty && vm.isLoading)
}
}
.navigationDestination(for: PRRow.self) { row in .navigationDestination(for: PRRow.self) { row in
PRDetailView(repo: row.repo, prNumber: row.pr.number) PRDetailView(repo: row.repo, prNumber: row.pr.number)
} }