From bca97caa8bc2b5fbf89075f290989fb4b707e7e4 Mon Sep 17 00:00:00 2001 From: leits Date: Mon, 31 Aug 2020 17:41:54 +0300 Subject: [PATCH] Prepare app to 1.4 release candidate --- MeetingBar.xcodeproj/project.pbxproj | 8 ++++---- MeetingBar/AppDelegate.swift | 4 ---- MeetingBar/Constants.swift | 3 ++- MeetingBar/DefaultsKeys.swift | 2 +- MeetingBar/Helpers.swift | 4 ++-- MeetingBar/OnboardingView.swift | 18 +++++++++++------- MeetingBar/PreferencesView.swift | 18 +++++++++++++++--- 7 files changed, 35 insertions(+), 22 deletions(-) diff --git a/MeetingBar.xcodeproj/project.pbxproj b/MeetingBar.xcodeproj/project.pbxproj index 9c903fbf..96761c52 100644 --- a/MeetingBar.xcodeproj/project.pbxproj +++ b/MeetingBar.xcodeproj/project.pbxproj @@ -346,7 +346,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = "1.4-rc1"; DEVELOPMENT_ASSET_PATHS = "\"MeetingBar/Preview Content\""; DEVELOPMENT_TEAM = KGH289N6T8; ENABLE_HARDENED_RUNTIME = YES; @@ -357,7 +357,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.2; + MARKETING_VERSION = 1.4; PRODUCT_BUNDLE_IDENTIFIER = leits.MeetingBar; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -373,7 +373,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = "1.4-rc1"; DEVELOPMENT_ASSET_PATHS = "\"MeetingBar/Preview Content\""; DEVELOPMENT_TEAM = KGH289N6T8; ENABLE_HARDENED_RUNTIME = YES; @@ -384,7 +384,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.2; + MARKETING_VERSION = 1.4; PRODUCT_BUNDLE_IDENTIFIER = leits.MeetingBar; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/MeetingBar/AppDelegate.swift b/MeetingBar/AppDelegate.swift index 6a6391c9..1363a3ab 100644 --- a/MeetingBar/AppDelegate.swift +++ b/MeetingBar/AppDelegate.swift @@ -53,10 +53,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele Defaults[.selectedCalendarIDs].append(calendar.calendarIdentifier) } } - - if Defaults[.selectedCalendarIDs].count > 0 && !Defaults[.onboardingCompleted] { - Defaults[.onboardingCompleted] = true - } // if Defaults[.onboardingCompleted] { diff --git a/MeetingBar/Constants.swift b/MeetingBar/Constants.swift index d2c81345..b434d656 100644 --- a/MeetingBar/Constants.swift +++ b/MeetingBar/Constants.swift @@ -51,6 +51,7 @@ struct CreateMeetingLinks { struct Links { static var supportTheCreator = URL(string: "https://www.patreon.com/meetingbar")! static var aboutThisApp = URL(string: "https://meetingbar.onrender.com")! + static var emailMe = URL(string: "mailto:leits.dev@gmail.com?subject=MeetingBar")! } enum MeetingServices: String, Codable, CaseIterable { @@ -76,7 +77,7 @@ enum MeetingServices: String, Codable, CaseIterable { case voov = "Tencent VooV" case skype = "Skype" case skype4biz = "Skype For Business" - case skype4biz_selfhosted = "Skype For Business Self-Hosted" + case skype4biz_selfhosted = "Skype For Business (SH)" } enum TimeFormat: String, Codable, CaseIterable { diff --git a/MeetingBar/DefaultsKeys.swift b/MeetingBar/DefaultsKeys.swift index c49f1a38..a27864b1 100644 --- a/MeetingBar/DefaultsKeys.swift +++ b/MeetingBar/DefaultsKeys.swift @@ -31,7 +31,7 @@ extension Defaults.Keys { static let timeFormat = Key("timeFormat", default: .military) // Integrations - static let createMeetingService = Key("createMeetingService", default: .meet) + static let createMeetingService = Key("createMeetingService", default: .zoom) static let useChromeForMeetLinks = Key("useChromeForMeetLinks", default: false) static let useChromeForHangoutsLinks = Key("useChromeForHangoutsLinks", default: false) static let useAppForZoomLinks = Key("useAppForZoomLinks", default: false) diff --git a/MeetingBar/Helpers.swift b/MeetingBar/Helpers.swift index c3ce2862..76656b48 100644 --- a/MeetingBar/Helpers.swift +++ b/MeetingBar/Helpers.swift @@ -53,10 +53,10 @@ func generateTitleSample(_ titleFormat: EventTitleFormat, _ offset: Int) -> Stri var title: String switch titleFormat { case .show: - title = "Event with long title may not be displayed in your status bar" + title = "An event with an excessively sizeable 55-character title" let index = title.index(title.startIndex, offsetBy: offset, limitedBy: title.endIndex) title = String(title[...(index ?? title.endIndex)]) - if offset < Int(TitleLengthLimits.max) { + if offset < (title.count - 1) { title += "..." } case .dot: diff --git a/MeetingBar/OnboardingView.swift b/MeetingBar/OnboardingView.swift index 5b1e8287..a5a3b315 100644 --- a/MeetingBar/OnboardingView.swift +++ b/MeetingBar/OnboardingView.swift @@ -100,18 +100,22 @@ struct AccessScreenView: View { let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() var body: some View { - VStack { + VStack(alignment: .center) { + Spacer() if accessDenied { Text("Oops! It looks like you denied access to calendars.") - Text("") + Spacer() Text("Go to") - Text("System Preferences > Security & Privacy > Privacy > Calendars.") + Text("System Preferences > Security & Privacy > Privacy > Calendars") Text("and select a checkbox near MeetingBar.") - Text("") - Text("Then you will need to launch the app manually to continue setting up.") + Spacer() + Text("Then you need to launch the app manually to continue setting up.") } else { - Text("Requesting your access to calendars") + Text("Requesting your access to calendars.") + Text("") + Text("Click \"OK\" in popup window from MacOS.") } + Spacer() }.padding() .onAppear { self.requestAccess() @@ -154,7 +158,7 @@ struct CalendarsScreenView: View { HStack { Spacer() if self.selectedCalendarIDs.count == 0 { - Text("Select at least one calendar") + Text("Select at least one calendar").foregroundColor(Color.gray) } Button(action: self.close) { Text("Start using app") diff --git a/MeetingBar/PreferencesView.swift b/MeetingBar/PreferencesView.swift index 66dd6741..aac5008b 100644 --- a/MeetingBar/PreferencesView.swift +++ b/MeetingBar/PreferencesView.swift @@ -201,7 +201,7 @@ struct Appearance: View { var body: some View { VStack(alignment: .leading, spacing: 15) { - Text("Status Bar").font(.headline).bold() + Text("Status bar").font(.headline).bold() Section { Section { HStack { @@ -220,7 +220,7 @@ struct Appearance: View { Slider(value: $titleLength, in: TitleLengthLimits.min...TitleLengthLimits.max, step: 1) Text("55") }.disabled(eventTitleFormat != EventTitleFormat.show) - Text("Tip:").disabled(true) + Text("Tip: If the app disappears from the status bar, make the length shorter").foregroundColor(Color.gray) }.padding(.horizontal, 10) } Divider() @@ -274,8 +274,15 @@ struct Configuration: View { Text("Default Browser").tag(false) Text("Teams app").tag(true) } - Spacer() }.padding(.horizontal, 10) + Spacer() + Section { + Text("Supported links for services:\n\(MeetingServices.allCases.map { $0.rawValue }.joined(separator: ", "))") + HStack { + Text("If the service you use isn't supported, email me") + Button("✉️", action: emailMe) + } + }.foregroundColor(.gray).font(.system(size: 12)).padding(.horizontal, 10) Divider() HStack { Text("Create meetings in").frame(width: 150, alignment: .leading) @@ -297,3 +304,8 @@ struct CreateMeetingServicePicker: View { }.labelsHidden() } } + +func emailMe() { + NSLog("Click email me") + _ = openLinkInDefaultBrowser(Links.emailMe) +}