Commit a0f74c5c52
Unsigned
Layout: unified · split
Hutch.xcodeproj/project.pbxproj +12 −12
| @@ -597,7 +597,7 @@ | ||
| 597 | 597 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 598 | 598 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 599 | 599 | CODE_SIGN_STYLE = Automatic; |
| 600 | CURRENT_PROJECT_VERSION = 85; | |
| 600 | CURRENT_PROJECT_VERSION = 86; | |
| 601 | 601 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 602 | 602 | ENABLE_PREVIEWS = YES; |
| 603 | 603 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -614,7 +614,7 @@ | ||
| 614 | 614 | "$(inherited)", |
| 615 | 615 | "@executable_path/Frameworks", |
| 616 | 616 | ); |
| 617 | MARKETING_VERSION = 3.4.0; | |
| 617 | MARKETING_VERSION = 3.4.1; | |
| 618 | 618 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 619 | 619 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 620 | 620 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -634,7 +634,7 @@ | ||
| 634 | 634 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 635 | 635 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 636 | 636 | CODE_SIGN_STYLE = Automatic; |
| 637 | CURRENT_PROJECT_VERSION = 85; | |
| 637 | CURRENT_PROJECT_VERSION = 86; | |
| 638 | 638 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 639 | 639 | ENABLE_PREVIEWS = YES; |
| 640 | 640 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -651,7 +651,7 @@ | ||
| 651 | 651 | "$(inherited)", |
| 652 | 652 | "@executable_path/Frameworks", |
| 653 | 653 | ); |
| 654 | MARKETING_VERSION = 3.4.0; | |
| 654 | MARKETING_VERSION = 3.4.1; | |
| 655 | 655 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 656 | 656 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 657 | 657 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -714,7 +714,7 @@ | ||
| 714 | 714 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 715 | 715 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 716 | 716 | CODE_SIGN_STYLE = Automatic; |
| 717 | CURRENT_PROJECT_VERSION = 85; | |
| 717 | CURRENT_PROJECT_VERSION = 86; | |
| 718 | 718 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 719 | 719 | GENERATE_INFOPLIST_FILE = NO; |
| 720 | 720 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -724,7 +724,7 @@ | ||
| 724 | 724 | "@executable_path/Frameworks", |
| 725 | 725 | "@executable_path/../../Frameworks", |
| 726 | 726 | ); |
| 727 | MARKETING_VERSION = 3.4.0; | |
| 727 | MARKETING_VERSION = 3.4.1; | |
| 728 | 728 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 729 | 729 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 730 | 730 | SKIP_INSTALL = YES; |
| @@ -743,7 +743,7 @@ | ||
| 743 | 743 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 744 | 744 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 745 | 745 | CODE_SIGN_STYLE = Automatic; |
| 746 | CURRENT_PROJECT_VERSION = 85; | |
| 746 | CURRENT_PROJECT_VERSION = 86; | |
| 747 | 747 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 748 | 748 | GENERATE_INFOPLIST_FILE = NO; |
| 749 | 749 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -753,7 +753,7 @@ | ||
| 753 | 753 | "@executable_path/Frameworks", |
| 754 | 754 | "@executable_path/../../Frameworks", |
| 755 | 755 | ); |
| 756 | MARKETING_VERSION = 3.4.0; | |
| 756 | MARKETING_VERSION = 3.4.1; | |
| 757 | 757 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 758 | 758 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 759 | 759 | SKIP_INSTALL = YES; |
| @@ -772,7 +772,7 @@ | ||
| 772 | 772 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 773 | 773 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 774 | 774 | CODE_SIGN_STYLE = Automatic; |
| 775 | CURRENT_PROJECT_VERSION = 84; | |
| 775 | CURRENT_PROJECT_VERSION = 86; | |
| 776 | 776 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 777 | 777 | GENERATE_INFOPLIST_FILE = NO; |
| 778 | 778 | INFOPLIST_FILE = HutchSafariExtension/Info.plist; |
| @@ -782,7 +782,7 @@ | ||
| 782 | 782 | "@executable_path/Frameworks", |
| 783 | 783 | "@executable_path/../../Frameworks", |
| 784 | 784 | ); |
| 785 | MARKETING_VERSION = 3.3.1; | |
| 785 | MARKETING_VERSION = 3.4.1; | |
| 786 | 786 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchSafariExtension; |
| 787 | 787 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 788 | 788 | SKIP_INSTALL = YES; |
| @@ -801,7 +801,7 @@ | ||
| 801 | 801 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 802 | 802 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 803 | 803 | CODE_SIGN_STYLE = Automatic; |
| 804 | CURRENT_PROJECT_VERSION = 84; | |
| 804 | CURRENT_PROJECT_VERSION = 86; | |
| 805 | 805 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 806 | 806 | GENERATE_INFOPLIST_FILE = NO; |
| 807 | 807 | INFOPLIST_FILE = HutchSafariExtension/Info.plist; |
| @@ -811,7 +811,7 @@ | ||
| 811 | 811 | "@executable_path/Frameworks", |
| 812 | 812 | "@executable_path/../../Frameworks", |
| 813 | 813 | ); |
| 814 | MARKETING_VERSION = 3.3.1; | |
| 814 | MARKETING_VERSION = 3.4.1; | |
| 815 | 815 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchSafariExtension; |
| 816 | 816 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 817 | 817 | SKIP_INSTALL = YES; |
HutchWidgetExtension/NeedsAttentionWidget.swift +29 −33
| @@ -99,37 +99,34 @@ private struct NeedsAttentionWidgetView: View { | ||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | private func mediumView(snapshot: NeedsAttentionSnapshot) -> some View { |
| 102 | VStack(alignment: .leading, spacing: 0) { | |
| 103 | HStack(alignment: .top, spacing: 12) { | |
| 104 | Link(destination: HutchDeepLinkURL.home) { | |
| 105 | metricColumn( | |
| 106 | count: snapshot.unreadInboxThreads, | |
| 107 | label: "Unread", | |
| 108 | systemImage: "tray", | |
| 109 | tint: unreadTint(for: snapshot.unreadInboxThreads) | |
| 110 | ) | |
| 111 | } | |
| 112 | Link(destination: HutchDeepLinkURL.trackers) { | |
| 113 | metricColumn( | |
| 114 | count: snapshot.assignedOpenTickets, | |
| 115 | label: "Assigned", | |
| 116 | systemImage: "ticket" | |
| 117 | ) | |
| 118 | } | |
| 119 | Link(destination: HutchDeepLinkURL.builds) { | |
| 120 | metricColumn( | |
| 121 | count: snapshot.failedBuilds, | |
| 122 | label: "Failed", | |
| 123 | systemImage: "hammer", | |
| 124 | tint: failedTint(for: snapshot.failedBuilds) | |
| 125 | ) | |
| 126 | } | |
| 102 | HStack(alignment: .center, spacing: 12) { | |
| 103 | Link(destination: HutchDeepLinkURL.home) { | |
| 104 | metricColumn( | |
| 105 | count: snapshot.unreadInboxThreads, | |
| 106 | label: "Unread", | |
| 107 | systemImage: "tray", | |
| 108 | tint: unreadTint(for: snapshot.unreadInboxThreads) | |
| 109 | ) | |
| 110 | } | |
| 111 | Link(destination: HutchDeepLinkURL.trackers) { | |
| 112 | metricColumn( | |
| 113 | count: snapshot.assignedOpenTickets, | |
| 114 | label: "Assigned", | |
| 115 | systemImage: "ticket" | |
| 116 | ) | |
| 117 | } | |
| 118 | Link(destination: HutchDeepLinkURL.builds) { | |
| 119 | metricColumn( | |
| 120 | count: snapshot.failedBuilds, | |
| 121 | label: "Failed", | |
| 122 | systemImage: "hammer", | |
| 123 | tint: failedTint(for: snapshot.failedBuilds) | |
| 124 | ) | |
| 127 | 125 | } |
| 128 | Spacer(minLength: 0) | |
| 129 | 126 | } |
| 127 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center) | |
| 130 | 128 | .padding(.horizontal, 16) |
| 131 | .padding(.top, 18) | |
| 132 | .padding(.bottom, 16) | |
| 129 | .padding(.vertical, 16) | |
| 133 | 130 | } |
| 134 | 131 | |
| 135 | 132 | private func largeView(snapshot: NeedsAttentionSnapshot) -> some View { |
| @@ -203,13 +200,12 @@ private struct NeedsAttentionWidgetView: View { | ||
| 203 | 200 | } |
| 204 | 201 | |
| 205 | 202 | private func metricColumn(count: Int?, label: String, systemImage: String, tint: Color = .primary) -> some View { |
| 206 | VStack(alignment: .leading, spacing: 8) { | |
| 203 | VStack(alignment: .center, spacing: 8) { | |
| 207 | 204 | HStack(alignment: .center, spacing: 10) { |
| 208 | 205 | Image(systemName: systemImage) |
| 209 | 206 | .font(.title3.weight(.semibold)) |
| 210 | 207 | .foregroundStyle(tint) |
| 211 | .frame(width: 24, alignment: .leading) | |
| 212 | .padding(.trailing, 4) | |
| 208 | .frame(width: 24, alignment: .center) | |
| 213 | 209 | Text(displayCount(count)) |
| 214 | 210 | .font(.system(size: 28, weight: .semibold, design: .rounded)) |
| 215 | 211 | .monospacedDigit() |
| @@ -222,9 +218,9 @@ private struct NeedsAttentionWidgetView: View { | ||
| 222 | 218 | .foregroundStyle(.secondary) |
| 223 | 219 | .lineLimit(1) |
| 224 | 220 | .minimumScaleFactor(0.85) |
| 225 | .frame(height: 16, alignment: .topLeading) | |
| 221 | .frame(height: 16, alignment: .center) | |
| 226 | 222 | } |
| 227 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) | |
| 223 | .frame(maxWidth: .infinity, alignment: .center) | |
| 228 | 224 | } |
| 229 | 225 | |
| 230 | 226 | private func metricRow(count: Int?, label: String, systemImage: String, tint: Color = .primary) -> some View { |