Skip to content

Commit

Permalink
feat: add error flag on menubar
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2E committed Apr 20, 2024
1 parent b728981 commit 8592018
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions GitStatus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.rook1e.GitStatus;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -331,7 +331,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.rook1e.GitStatus;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
7 changes: 3 additions & 4 deletions GitStatus/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ struct ContentView: View {

var body: some View {
if runtimeData.lastPull != nil {
Text("Updated \(formatDate(runtimeData.lastPull))")
Text("Updated at \(formatDate(runtimeData.lastPull))")
}

if runtimeData.message != "" {
if !runtimeData.message.isEmpty {
Text(runtimeData.message)
}
else if runtimeData.notifications.count == 0 {
} else if runtimeData.notifications.count == 0 {
Text("All caught up!")
} else {
ForEach(runtimeData.notifications.prefix(runtimeData.listLength)){ notification in
Expand Down
4 changes: 4 additions & 0 deletions GitStatus/GitStatusApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ struct GitStatusApp: App {
if runtimeData.notifications.count > 0 {
Text(runtimeData.notifications.count, format: .number)
}

if !runtimeData.message.isEmpty {
Text("!")
}
}
}
}

0 comments on commit 8592018

Please sign in to comment.