diff --git a/PagerCall.xcodeproj/project.pbxproj b/PagerCall.xcodeproj/project.pbxproj index d55c0a3..9411ae7 100644 --- a/PagerCall.xcodeproj/project.pbxproj +++ b/PagerCall.xcodeproj/project.pbxproj @@ -293,7 +293,7 @@ CODE_SIGN_ENTITLEMENTS = PagerCall/PagerCall.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = 97A8B2WE2P; @@ -308,7 +308,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = jp.winebarrel.PagerCall; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -324,7 +324,7 @@ CODE_SIGN_ENTITLEMENTS = PagerCall/PagerCall.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = 97A8B2WE2P; @@ -339,7 +339,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = jp.winebarrel.PagerCall; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/PagerCall/ContentView.swift b/PagerCall/ContentView.swift index b85676a..99d101e 100644 --- a/PagerCall/ContentView.swift +++ b/PagerCall/ContentView.swift @@ -48,6 +48,7 @@ struct ContentView: View { .onHover { hovering in hoverId = hovering ? incident.id : "" } + .effectHoverCursor() } Text("(\(incident.createdAt.relative()))").font(.caption2) } @@ -61,7 +62,7 @@ struct ContentView: View { } } label: { Image(systemName: "arrow.triangle.2.circlepath") - } + }.effectHoverCursor() let label = if let updatedAt = pagerDuty.updatedAt { updatedAt.shortTime() diff --git a/PagerCall/HoverEffect.swift b/PagerCall/HoverEffect.swift new file mode 100644 index 0000000..829f6dd --- /dev/null +++ b/PagerCall/HoverEffect.swift @@ -0,0 +1,13 @@ +import SwiftUI + +extension View { + func effectHoverCursor() -> some View { + onHover { hovering in + if hovering { + NSCursor.pointingHand.push() + } else { + NSCursor.pop() + } + } + } +} diff --git a/PagerCall/SettingsView.swift b/PagerCall/SettingsView.swift index 225f518..bf97982 100644 --- a/PagerCall/SettingsView.swift +++ b/PagerCall/SettingsView.swift @@ -12,6 +12,7 @@ struct SettingView: View { Form { SecureField(text: $apiKey) { Link("API Key", destination: URL(string: "https://support.pagerduty.com/main/docs/api-access-keys")!) + .effectHoverCursor() }.onChange(of: apiKey) { Vault.apiKey = apiKey } @@ -44,6 +45,7 @@ struct SettingView: View { // swiftlint:enable force_cast Text("Ver. \(appVer).\(buildVer)") } + .effectHoverCursor() .frame(maxWidth: .infinity, alignment: .trailing) } .padding(20)