-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
152 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+4.48 KB
(100%)
...proj/project.xcworkspace/xcuserdata/ethanbills.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> | ||
<dict> | ||
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key> | ||
<array> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spks</string> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spki</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SUEnableDownloaderService</key> | ||
<true/> | ||
<key>SUEnableInstallerLauncherService</key> | ||
<true/> | ||
<key>SUFeedURL</key> | ||
<string>https://dockdoor.kepler.cafe/appcast.xml</string> | ||
<key>SUPublicEDKey</key> | ||
<string>ANSWtGdda5j5Jgr53GvK7uE4KLaVs2cNFD8nKWXWrlI=</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// UpdateView.swift | ||
// DockDoor | ||
// | ||
// Created by Ethan Bills on 6/23/24. | ||
// | ||
|
||
import SwiftUI | ||
import Sparkle | ||
|
||
// This view model class publishes when new updates can be checked by the user | ||
final class CheckForUpdatesViewModel: ObservableObject { | ||
@Published var canCheckForUpdates = false | ||
|
||
init(updater: SPUUpdater) { | ||
updater.publisher(for: \.canCheckForUpdates) | ||
.assign(to: &$canCheckForUpdates) | ||
} | ||
} | ||
|
||
// This is the view for the Check for Updates menu item | ||
// Note this intermediate view is necessary for the disabled state on the menu item to work properly before Monterey. | ||
// See https://stackoverflow.com/questions/68553092/menu-not-updating-swiftui-bug for more info | ||
struct CheckForUpdatesView: View { | ||
@ObservedObject private var checkForUpdatesViewModel: CheckForUpdatesViewModel | ||
private let updater: SPUUpdater | ||
|
||
init(updater: SPUUpdater) { | ||
self.updater = updater | ||
|
||
// Create our view model for our CheckForUpdatesView | ||
self.checkForUpdatesViewModel = CheckForUpdatesViewModel(updater: updater) | ||
} | ||
|
||
var body: some View { | ||
VStack(alignment: .leading, spacing: 20) { | ||
HStack { | ||
Image(systemName: checkForUpdatesViewModel.canCheckForUpdates ? "checkmark.circle.fill" : "xmark.circle.fill") | ||
.foregroundColor(checkForUpdatesViewModel.canCheckForUpdates ? .green : .red) | ||
.scaleEffect(checkForUpdatesViewModel.canCheckForUpdates ? 1.2 : 1.0) | ||
.padding(10) | ||
|
||
Text("Can check for updates") | ||
.font(.headline) | ||
} | ||
|
||
Button(action: updater.checkForUpdates) { | ||
HStack { | ||
Image(systemName: "arrow.triangle.2.circlepath") | ||
Text("Check for Updates…") | ||
} | ||
} | ||
.buttonStyle(.bordered) | ||
.disabled(!checkForUpdatesViewModel.canCheckForUpdates) | ||
|
||
Spacer() | ||
} | ||
.padding(20) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters