Skip to content

Commit

Permalink
Bump to b44
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatStella7922 committed Nov 16, 2023
1 parent ccae525 commit b64e265
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Once that's done, you can manually send the battery info to your configured webh
- [x] HTTP interaction with Discord webhook
- [x] Manual sending of battery info
- [x] Send battery info using Shortcuts
- [ ] Update MessageBuilder.swift to support different power events
- [x] Update MessageBuilder.swift to support different power events
- [x] Automations support with Shortcuts Automations
- [x] macOS-specific UI elements (CommandMenu and MenuBarExtra)
- [ ] Preview how the embed will show
Expand All @@ -34,17 +34,14 @@ Once that's done, you can manually send the battery info to your configured webh
- [ ] ?

## Compatibility and Dependencies
- macOS 13.0 or later
- Native (AppKit) macOS build
- iOS/iPadOS/tvOS/macCatalyst 15.0 or later
- iOS/tvOS build or Mac Catalyst build
- iOS/iPadOS 15.0 or later
- watchOS 8 or later
- visionOS 1 or later
- tvOS 15.0 or later
- macOS 13.0 or later
- visionOS 1.0 or later

Support for the Shortcuts app requires iOS/iPadOS/watchOS 16 or later.

<sub>(macCatalyst 15.0 = macOS Monterey 12.0)</sub>

## Building
Open in Xcode, change PROJECT_IDENTIFIER at the bottom of project build settings, set codesign identity, then build.

Expand Down
8 changes: 7 additions & 1 deletion dcbattwebhook-swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
55B272012B03114800BD8A36 /* DiscordPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */; };
55B4E8E829316C0600492C77 /* MessageBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B4E8E729316C0600492C77 /* MessageBuilder.swift */; };
55B4E8EA2931742300492C77 /* EmbedStructs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B4E8E92931742300492C77 /* EmbedStructs.swift */; };
55CE77562B0586390094B98D /* SettingsViewmacOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CE77552B0586390094B98D /* SettingsViewmacOS.swift */; };
55CE77572B0586390094B98D /* SettingsViewmacOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CE77552B0586390094B98D /* SettingsViewmacOS.swift */; };
55E7AEAD29257AF1002E6869 /* SettingsUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E7AEAC29257AF1002E6869 /* SettingsUtils.swift */; };
55ED8938291F628700CB170C /* SettingsValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55ED8937291F628700CB170C /* SettingsValidator.swift */; };
55F26F3C2AF6F56E00AB8E1C /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 55F26F3B2AF6F56E00AB8E1C /* Credits.rtf */; };
Expand Down Expand Up @@ -102,6 +104,7 @@
55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscordPreviewView.swift; sourceTree = "<group>"; };
55B4E8E729316C0600492C77 /* MessageBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageBuilder.swift; sourceTree = "<group>"; };
55B4E8E92931742300492C77 /* EmbedStructs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmbedStructs.swift; sourceTree = "<group>"; };
55CE77552B0586390094B98D /* SettingsViewmacOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewmacOS.swift; sourceTree = "<group>"; };
55E7AEA929253E8F002E6869 /* DefaultsUsed.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = DefaultsUsed.md; sourceTree = "<group>"; };
55E7AEAC29257AF1002E6869 /* SettingsUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsUtils.swift; sourceTree = "<group>"; };
55ED8937291F628700CB170C /* SettingsValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsValidator.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -160,13 +163,14 @@
children = (
55F26F3B2AF6F56E00AB8E1C /* Credits.rtf */,
550348C7291D7FB9006551B0 /* dcbattwebhook_swiftApp.swift */,
553CD2B32AF65288006D3402 /* MenuBarExtraView.swift */,
55F26F3F2AF740E600AB8E1C /* WelcomeView.swift */,
550348C9291D7FB9006551B0 /* ContentView.swift */,
550348DC291DA3BC006551B0 /* HomeUIView.swift */,
55B271FF2B03114800BD8A36 /* DiscordPreviewView.swift */,
55E7AEAC29257AF1002E6869 /* SettingsUtils.swift */,
550348D6291D84E1006551B0 /* SettingsView.swift */,
55CE77552B0586390094B98D /* SettingsViewmacOS.swift */,
553CD2B32AF65288006D3402 /* MenuBarExtraView.swift */,
55A9E5322AF7669F0091D1A6 /* HelpView.swift */,
55A9E5352AF772E80091D1A6 /* HelpViews */,
55950C5B291DDCDF00F1CAD8 /* AboutView.swift */,
Expand Down Expand Up @@ -316,6 +320,7 @@
buildActionMask = 2147483647;
files = (
5173E4162A78EE980076663F /* dcbattwebhook_swiftApp.swift in Sources */,
55CE77572B0586390094B98D /* SettingsViewmacOS.swift in Sources */,
55A9E53B2AF7739D0091D1A6 /* WhatIsAWebhook.swift in Sources */,
5173E4172A78EE980076663F /* AboutView.swift in Sources */,
5173E4182A78EE980076663F /* SettingsUtils.swift in Sources */,
Expand Down Expand Up @@ -354,6 +359,7 @@
55950C5A291DAC8400F1CAD8 /* SendBatteryInfo.swift in Sources */,
55B4E8EA2931742300492C77 /* EmbedStructs.swift in Sources */,
553CD2B42AF65288006D3402 /* MenuBarExtraView.swift in Sources */,
55CE77562B0586390094B98D /* SettingsViewmacOS.swift in Sources */,
550348DD291DA3BC006551B0 /* HomeUIView.swift in Sources */,
55A9E5332AF7669F0091D1A6 /* HelpView.swift in Sources */,
55A9E53A2AF7739D0091D1A6 /* WhatIsAWebhook.swift in Sources */,
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions dcbattwebhook-swift/DefaultsUsed.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ selectedServiceType + "WebhookUserPfpUrl"
- Date, stores a date to be used for other stuff
- AutomationSavedDate
- Date, stores a date for use with automation actions (comparisons and etc)
- showMenuBarExtra
- Bool, stores whether the user has chosen to show or hide the menu bar extra (true by default)
- hideMainWindow
- Bool, stores whether the user has chosen to hide or show the main window and dock icon (false by default)
- IsFirstLaunch
- Bool, set to true after the first time the app is launched.
- Will be reset to false if UserDefaults are cleared
16 changes: 7 additions & 9 deletions dcbattwebhook-swift/dcbattwebhook_swiftApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import WatchConnectivity
/// Name of the app
public let prodName = "Battery Webhook"
/// Base version of the app, use `version` if you want the running OS as well
public let versionBase = "1.0b43"
public let versionBase = "1.0b44"

#if os(macOS)
public let version = "\(versionBase) on macOS"
Expand Down Expand Up @@ -51,16 +51,14 @@ struct dcbattwebhook_swiftApp: App {
var body: some Scene {
WindowGroup {
ContentView()
#if os(macOS)
.frame(minWidth: 600, maxWidth: 1000, minHeight: 300, maxHeight: 500)
#endif
.onAppear {
#if os(macOS)
NSWindow.allowsAutomaticWindowTabbing = false
if (!hideMainWindow) {let _ = NSApplication.shared.setActivationPolicy(.regular)}
else {let _ = NSApplication.shared.setActivationPolicy(.accessory)}
.frame(minWidth: 600, maxWidth: 1000, minHeight: 300, maxHeight: 500)
.onAppear {
NSWindow.allowsAutomaticWindowTabbing = false
if (!hideMainWindow) {let _ = NSApplication.shared.setActivationPolicy(.regular)}
else {let _ = NSApplication.shared.setActivationPolicy(.accessory)}
}
#endif
}
}
#if os(macOS)
.windowResizability(.contentSize)
Expand Down

0 comments on commit b64e265

Please sign in to comment.