From dad4a059865e43bbc36c646be227c9928438e18c Mon Sep 17 00:00:00 2001 From: Janez Troha Date: Sat, 30 Jul 2022 14:05:37 +0200 Subject: [PATCH] Hide team option for SetApp --- Pareto/Info.plist | 2 +- Pareto/StatusBar/StatusBarController.swift | 16 ++++++++-------- Pareto/Views/Settings/SettingsView.swift | 12 +++++++----- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Pareto/Info.plist b/Pareto/Info.plist index 7612dc4..af865a0 100644 --- a/Pareto/Info.plist +++ b/Pareto/Info.plist @@ -26,7 +26,7 @@ CFBundleVersion - 4875 + 4877 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/Pareto/StatusBar/StatusBarController.swift b/Pareto/StatusBar/StatusBarController.swift index 9c5b449..f98a549 100644 --- a/Pareto/StatusBar/StatusBarController.swift +++ b/Pareto/StatusBar/StatusBarController.swift @@ -258,14 +258,14 @@ class StatusBarController: NSObject, NSMenuDelegate { statusItemMenu.addItem(unsnoozeItem) } } - - if (!Defaults[.teamID].isEmpty && AppInfo.Flags.dashboardMenu) || Defaults[.isTeamOwner] { - statusItemMenu.addItem(NSMenuItem.separator()) - let teamsItem = NSMenuItem(title: "Team Dashboard", action: #selector(AppDelegate.teamsDasboard), keyEquivalent: "t") - teamsItem.target = NSApp.delegate - statusItemMenu.addItem(teamsItem) - } - + #if !SETAPP_ENABLED + if (!Defaults[.teamID].isEmpty && AppInfo.Flags.dashboardMenu) || Defaults[.isTeamOwner] { + statusItemMenu.addItem(NSMenuItem.separator()) + let teamsItem = NSMenuItem(title: "Team Dashboard", action: #selector(AppDelegate.teamsDasboard), keyEquivalent: "t") + teamsItem.target = NSApp.delegate + statusItemMenu.addItem(teamsItem) + } + #endif let preferencesItem = NSMenuItem(title: "Preferences", action: #selector(AppDelegate.showPrefs), keyEquivalent: ",") preferencesItem.target = NSApp.delegate statusItemMenu.addItem(preferencesItem) diff --git a/Pareto/Views/Settings/SettingsView.swift b/Pareto/Views/Settings/SettingsView.swift index 0542e78..f52be36 100644 --- a/Pareto/Views/Settings/SettingsView.swift +++ b/Pareto/Views/Settings/SettingsView.swift @@ -24,11 +24,13 @@ struct SettingsView: View { Label("General", systemImage: "gear") } .tag(Tabs.general) - TeamSettingsView(teamSettings: AppInfo.TeamSettings) - .tabItem { - Label("Teams", systemImage: "person.3.fill") - } - .tag(Tabs.teams) + #if !SETAPP_ENABLED + TeamSettingsView(teamSettings: AppInfo.TeamSettings) + .tabItem { + Label("Teams", systemImage: "person.3.fill") + } + .tag(Tabs.teams) + #endif ChecksSettingsView() .tabItem { Label("Checks", systemImage: "checkmark.seal")