Skip to content

Commit

Permalink
Hide team option for SetApp
Browse files Browse the repository at this point in the history
  • Loading branch information
dz0ny committed Jul 30, 2022
1 parent b8558e6 commit dad4a05
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Pareto/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>4875</string>
<string>4877</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
16 changes: 8 additions & 8 deletions Pareto/StatusBar/StatusBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 7 additions & 5 deletions Pareto/Views/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit dad4a05

Please sign in to comment.