Skip to content

Commit 57fccdd

Browse files
authored
Merge pull request #66 from macadmins/MDview
v2.2.0
2 parents 4112684 + bf3467a commit 57fccdd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2765
-359
lines changed

CHANGELOG.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,107 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.0] - 2025-01-07
8+
### Changed
9+
- A slight background has been added increasing visaibility of the text.
10+
- Main window is now slightly resizeable to allow for window to be resized to a smaller size.
11+
- Last reboot time is now monitored and updated every 5 minutes. Displaying in minutes, hours or days depending on the time since last reboot.
12+
- Battery temperature will adapt to the configured measurement system in macOS and show temp in either Celsius or Fahrenheit.
13+
- Storage API has been changed for a more accurate reading of actual storage used.
14+
- "Is Admin" will now display "yes" or "no" localized instead of enabled or disabled.
15+
- In addition to only checking if Company Portal exists when dynamically setting the `Mode` to use, the server url will now also be checked. If the server url contains "i.manage.microsoft.com", the MDM will be set to Intune. This is because Company Portal can validly exist on a device without the device being managed by Intune.
16+
- Button labels on actions can now be set to a custom value. This allows for admins to set custom labels for actions that are displayed in the `Self Service` page. Example configuration:
17+
```xml
18+
<dict>
19+
<key>Command</key>
20+
<string>open https://github.com/macadmins/supportcompanion</string>
21+
<key>Description</key>
22+
<string/>
23+
<key>Icon</key>
24+
<string>heart.fill</string>
25+
<key>Name</key>
26+
<string>Open Intranet</string>
27+
<key>ButtonLabel</key>
28+
<string>Open</string>
29+
</dict>
30+
```
31+
32+
### Fixed
33+
- Artifacts were being left behind on the desktop window when IP address was updated.
34+
35+
### Added
36+
- The configured logo will now be displayed in the tray menu as well. Can be hidden by setting `ShowLogoInTrayMenu` to `false` in the configuration.
37+
- A new option to show the desktop information window "frosted". This allows for a frosted glass effect on the desktop information window. Example configuration:
38+
```xml
39+
<key>DesktopInfoBackgroundFrosted</key>
40+
<true/>
41+
```
42+
- A new option to show a custom view in the navigation bar based on a Markdown file. This allows for creating a custom view with custom information relevant to your organization. Example configuration:
43+
```xml
44+
<key>MarkdownFilePath</key>
45+
<string>/path/to/custom/view.md</string>
46+
<key>MarkdownMenuLabel</key>
47+
<string>Custom View</string>
48+
<key>MarkdownMenuIcon</key>
49+
<string>doc.text</string>
50+
```
51+
- A new option to show custom cards in the navigation bar. This allows for displaying large numbers of cards without cluttering the home view, by moving them to their own view. Example configuration:
52+
```xml
53+
<key>CustomCardsMenuLabel</key>
54+
<string>Custom Cards</string>
55+
<key>CustomCardsMenuIcon</key>
56+
<string>doc.text</string>
57+
<key>CustomCardPath</key>
58+
<string>/path/to/custom/cards.json</string>
59+
```
60+
- A new option to trigger actions using the CLI. This allows for triggering actions using the CLI instead of the UI. This can be useful for automating actions or triggering actions from a script. By default, actions configured as privileged will require authentication. This can be disabled by setting `RequirePrivilegedActionAuthentication` to `false`. Example usage:
61+
```bash
62+
/Applications/SupportCompanion.app/Contents/Resources/SupportCompanionCLI action "Restart clipboard"
63+
```
64+
- Additional arguments to the CLI to allow for getting additional information that is displayed in the app. Example usage:
65+
```bash
66+
/Applications/SupportCompanion.app/Contents/Resources/SupportCompanionCLI battery
67+
```
68+
Example output:
69+
```plaintext
70+
🔋 Battery Information
71+
-----------------------
72+
Health: 93% 🔋
73+
Cycle Count: 37
74+
Temperature: 36.7°C 🌡️
75+
Charging Status: Not Charging
76+
Time Remaining: N/A
77+
```
78+
- A new feature that allows for user elevation of standard users to admin users. This feature is useful for instances where a user needs to perform an action that requires admin rights. The user can request elevation by clicking the `Elevate` button in the tray menu or Identity menu. The admin can configure wether a reason is required, how long the reason must be and if the reason should be sent via a webhook to a specified URL or saved to disk. Example configuration:
79+
```xml
80+
<key>EnableElevation</key>
81+
<true/>
82+
<key>RequireResonForElevation</key>
83+
<true/>
84+
<key>ReasonMinLength</key>
85+
<integer>20</integer>
86+
<key>MaxElevationTime</key>
87+
<integer>60</integer>
88+
<key>ElevationWebhookUrl</key>
89+
<string>https://webhook.url</string>
90+
<key>ShowElevateTrayCard</key>
91+
<true/>
92+
<key>ElevationSeverity</key>
93+
<integer>6</integer>
94+
```
95+
96+
Example of JSON payload sent to webhook:
97+
```json
98+
{
99+
"severity" : 6,
100+
"date" : "2024-12-16T11:21:01Z",
101+
"host" : "Tobias's MacBook",
102+
"user" : "tobias",
103+
"serial" : "H123456789",
104+
"reason" : "Awesome dev stuff"
105+
}
106+
```
107+
7108
## [2.1.0] - 2024-12-11
8109
### Changed
9110
- The tray menu has been changed to a custom menu that is an extension of the apps main UI. This allows for a more consistent look and feel between the tray menu and the main app. The tray menu now displays the same information as the main app, including device information, storage information and patching progress as well as actions. If you have custom actions configured using `Actions`, the first 6 actions will be displayed in the tray menu. If you have more than 6 actions, the rest can be run from the Self Service section in the main app.

SupportCompanion.xcodeproj/project.pbxproj

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
F60FAB742CE8D40A00ECAC53 /* AlertToast in Frameworks */ = {isa = PBXBuildFile; productRef = F60FAB732CE8D40A00ECAC53 /* AlertToast */; };
1111
F60FAB872CEA108A00ECAC53 /* SidebarConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F60FAB862CEA108A00ECAC53 /* SidebarConfig.swift */; };
1212
F64927372CF9EA8D00C34D90 /* com.github.macadmins.SupportCompanion.helper in CopyFiles */ = {isa = PBXBuildFile; fileRef = F6F8AE7D2CE345A8009B0A1F /* com.github.macadmins.SupportCompanion.helper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
13+
F6575A992D117108007DBC83 /* ExecutionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6F8AE9C2CE34E54009B0A1F /* ExecutionService.swift */; };
14+
F6575A9A2D117114007DBC83 /* HelperRemoteProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6F8AE9E2CE34E72009B0A1F /* HelperRemoteProvider.swift */; };
15+
F6575A9D2D117141007DBC83 /* SupportCompanionErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6F8AE952CE34B81009B0A1F /* SupportCompanionErrors.swift */; };
16+
F6575AA72D11827D007DBC83 /* MarkdownUI in Frameworks */ = {isa = PBXBuildFile; productRef = F6575AA62D11827D007DBC83 /* MarkdownUI */; };
1317
F6890EEB2CFF326D00244985 /* SupportCompanionCLI in CopyFiles */ = {isa = PBXBuildFile; fileRef = F6890EE22CFF308F00244985 /* SupportCompanionCLI */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
1418
F6890EEC2CFF330D00244985 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E4D1D42CE4CE1E003EB8C0 /* Preferences.swift */; };
1519
F6890EED2CFF331400244985 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A4E0F62CEC9DFC002B4D74 /* Constants.swift */; };
@@ -92,6 +96,13 @@
9296
/* End PBXFileReference section */
9397

9498
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
99+
F6298A4D2D14517E00D2EC6D /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
100+
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
101+
membershipExceptions = (
102+
InfoValue.swift,
103+
);
104+
target = F6890EE12CFF308F00244985 /* SupportCompanionCLI */;
105+
};
95106
F64927362CF9D3FE00C34D90 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
96107
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
97108
membershipExceptions = (
@@ -118,17 +129,37 @@
118129
);
119130
target = F6F8AE7C2CE345A8009B0A1F /* com.github.macadmins.SupportCompanion.helper */;
120131
};
132+
F6575A9C2D117133007DBC83 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
133+
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
134+
membershipExceptions = (
135+
HelperConstans.swift,
136+
HelperProtocol.swift,
137+
"OSStatus+Extensions.swift",
138+
RemoteApplicationProtocol.swift,
139+
);
140+
target = F6890EE12CFF308F00244985 /* SupportCompanionCLI */;
141+
};
121142
F6890EEF2CFF332200244985 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
122143
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
123144
membershipExceptions = (
124145
Action.swift,
146+
KerberosSSO.swift,
147+
PlatformSSO.swift,
148+
UserInfo.swift,
125149
);
126150
target = F6890EE12CFF308F00244985 /* SupportCompanionCLI */;
127151
};
128152
F6890EF12CFF333C00244985 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
129153
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
130154
membershipExceptions = (
155+
BatteryHelpers.swift,
156+
DeviceInfoHelpers.swift,
157+
IOKit.swift,
131158
Logger.swift,
159+
MDMHelpers.swift,
160+
SSOInfoHelpers.swift,
161+
StorageHelpers.swift,
162+
UserHelpers.swift,
132163
);
133164
target = F6890EE12CFF308F00244985 /* SupportCompanionCLI */;
134165
};
@@ -164,12 +195,14 @@
164195
BatteryInfoManager.swift,
165196
CardGridViewModel.swift,
166197
DeviceInfoManager.swift,
198+
ElevationManager.swift,
167199
EvergreenInfoManager.swift,
168200
IdentityViewModel.swift,
169201
JsonCardManager.swift,
170202
MDMInfoManager.swift,
171203
PendingIntuneUpdatesManager.swift,
172204
PendingMunkiUpdatesManager.swift,
205+
ReasonInputManager.swift,
173206
SSOInfoManager.swift,
174207
StorageInfoManager.swift,
175208
SystemUpdatesManager.swift,
@@ -202,11 +235,11 @@
202235
F6E4D2032CE5DF67003EB8C0 /* Extensions */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Extensions; sourceTree = "<group>"; };
203236
F6E4D2662CE64E62003EB8C0 /* Controllers */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Controllers; sourceTree = "<group>"; };
204237
F6E4D26B2CE6576B003EB8C0 /* Helpers */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6A4E0E32CEBD770002B4D74 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, F6890EF12CFF333C00244985 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Helpers; sourceTree = "<group>"; };
205-
F6E4D2812CE78164003EB8C0 /* Utilities */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Utilities; sourceTree = "<group>"; };
238+
F6E4D2812CE78164003EB8C0 /* Utilities */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6298A4D2D14517E00D2EC6D /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Utilities; sourceTree = "<group>"; };
206239
F6E4D2842CE781B9003EB8C0 /* Components */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Components; sourceTree = "<group>"; };
207240
F6E72E642CE3DEC300D78336 /* Models */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6890EEF2CFF332200244985 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Models; sourceTree = "<group>"; };
208241
F6EB39E72CE1EE2800517FCD /* ViewModels */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6A4E0E52CEBD7D8002B4D74 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = ViewModels; sourceTree = "<group>"; };
209-
F6F8AE7E2CE345A8009B0A1F /* Helper */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6A4E0E82CEBD7F8002B4D74 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, F649281C2CFA02C000C34D90 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Helper; sourceTree = "<group>"; };
242+
F6F8AE7E2CE345A8009B0A1F /* Helper */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (F6A4E0E82CEBD7F8002B4D74 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, F649281C2CFA02C000C34D90 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, F6575A9C2D117133007DBC83 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = Helper; sourceTree = "<group>"; };
210243
/* End PBXFileSystemSynchronizedRootGroup section */
211244

212245
/* Begin PBXFrameworksBuildPhase section */
@@ -222,6 +255,7 @@
222255
buildActionMask = 2147483647;
223256
files = (
224257
F60FAB742CE8D40A00ECAC53 /* AlertToast in Frameworks */,
258+
F6575AA72D11827D007DBC83 /* MarkdownUI in Frameworks */,
225259
);
226260
runOnlyForDeploymentPostprocessing = 0;
227261
};
@@ -430,6 +464,7 @@
430464
mainGroup = F6F3BEB02CE1E7BA0036ADB9;
431465
packageReferences = (
432466
F60FAB722CE8D40A00ECAC53 /* XCRemoteSwiftPackageReference "AlertToast" */,
467+
F6575AA12D117F91007DBC83 /* XCRemoteSwiftPackageReference "swift-markdown-ui" */,
433468
);
434469
productRefGroup = F6F3BEBA2CE1E7BA0036ADB9 /* Products */;
435470
projectDirPath = "";
@@ -467,6 +502,9 @@
467502
buildActionMask = 2147483647;
468503
files = (
469504
F6890EEC2CFF330D00244985 /* Preferences.swift in Sources */,
505+
F6575A9D2D117141007DBC83 /* SupportCompanionErrors.swift in Sources */,
506+
F6575A992D117108007DBC83 /* ExecutionService.swift in Sources */,
507+
F6575A9A2D117114007DBC83 /* HelperRemoteProvider.swift in Sources */,
470508
F6890EED2CFF331400244985 /* Constants.swift in Sources */,
471509
);
472510
runOnlyForDeploymentPostprocessing = 0;
@@ -506,7 +544,7 @@
506544
CODE_SIGN_STYLE = Manual;
507545
DEVELOPMENT_TEAM = "";
508546
"DEVELOPMENT_TEAM[sdk=macosx*]" = H92SB6Z7S4;
509-
MACOSX_DEPLOYMENT_TARGET = 15.1;
547+
MACOSX_DEPLOYMENT_TARGET = 14.0;
510548
PRODUCT_BUNDLE_IDENTIFIER = com.github.macadmins.SupportCompanion.CLI;
511549
PRODUCT_NAME = "$(TARGET_NAME)";
512550
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -521,7 +559,7 @@
521559
CODE_SIGN_STYLE = Manual;
522560
DEVELOPMENT_TEAM = "";
523561
"DEVELOPMENT_TEAM[sdk=macosx*]" = H92SB6Z7S4;
524-
MACOSX_DEPLOYMENT_TARGET = 15.1;
562+
MACOSX_DEPLOYMENT_TARGET = 14.0;
525563
PRODUCT_BUNDLE_IDENTIFIER = com.github.macadmins.SupportCompanion.CLI;
526564
PRODUCT_NAME = "$(TARGET_NAME)";
527565
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -837,6 +875,14 @@
837875
kind = branch;
838876
};
839877
};
878+
F6575AA12D117F91007DBC83 /* XCRemoteSwiftPackageReference "swift-markdown-ui" */ = {
879+
isa = XCRemoteSwiftPackageReference;
880+
repositoryURL = "https://github.com/gonzalezreal/swift-markdown-ui";
881+
requirement = {
882+
kind = upToNextMajorVersion;
883+
minimumVersion = 2.4.1;
884+
};
885+
};
840886
/* End XCRemoteSwiftPackageReference section */
841887

842888
/* Begin XCSwiftPackageProductDependency section */
@@ -845,6 +891,11 @@
845891
package = F60FAB722CE8D40A00ECAC53 /* XCRemoteSwiftPackageReference "AlertToast" */;
846892
productName = AlertToast;
847893
};
894+
F6575AA62D11827D007DBC83 /* MarkdownUI */ = {
895+
isa = XCSwiftPackageProductDependency;
896+
package = F6575AA12D117F91007DBC83 /* XCRemoteSwiftPackageReference "swift-markdown-ui" */;
897+
productName = MarkdownUI;
898+
};
848899
/* End XCSwiftPackageProductDependency section */
849900
};
850901
rootObject = F6F3BEB12CE1E7BA0036ADB9 /* Project object */;

SupportCompanion.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)