-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
25 changed files
with
680 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.2 | ||
1.0.3 |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,41 @@ | ||
// | ||
// | ||
// Raivo OTP | ||
// | ||
// Copyright (c) 2019 Tijme Gommers. All rights reserved. Raivo OTP | ||
// is provided 'as-is', without any express or implied warranty. | ||
// | ||
// Modification, duplication or distribution of this software (in | ||
// source and binary forms) for any purpose is strictly prohibited. | ||
// | ||
// https://github.com/raivo-otp/macos-receiver/blob/master/LICENSE.md | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
/// Extending the view class with extra helper functionality | ||
extension View { | ||
|
||
/// Open the current view in a new window | ||
/// | ||
/// - Parameter title: The title to assign to the new window | ||
/// - Parameter sender: The sending object | ||
/// - Returns: The window handle | ||
@discardableResult | ||
func openInWindow(title: String, sender: Any?) -> NSWindow { | ||
let controller = NSHostingController(rootView: self) | ||
|
||
let window = NSWindow(contentViewController: controller) | ||
window.contentViewController = controller | ||
window.title = title | ||
window.orderFrontRegardless() | ||
window.makeKey() | ||
|
||
window.standardWindowButton(.zoomButton)?.isEnabled = false | ||
window.standardWindowButton(.miniaturizeButton)?.isEnabled = false | ||
|
||
return window | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// | ||
// Raivo OTP | ||
// | ||
// Copyright (c) 2019 Tijme Gommers. All rights reserved. Raivo OTP | ||
// is provided 'as-is', without any express or implied warranty. | ||
// | ||
// Modification, duplication or distribution of this software (in | ||
// source and binary forms) for any purpose is strictly prohibited. | ||
// | ||
// https://github.com/raivo-otp/macos-receiver/blob/master/LICENSE.md | ||
// | ||
|
||
import Foundation | ||
import SwiftyStoreKit | ||
import StoreKit | ||
|
||
/// An Apple Push Notification Token that can be observed | ||
class ObservableProducts: ObservableObject { | ||
|
||
/// The purchases | ||
@Published var tips: [SKProduct] = [] | ||
|
||
/// Fetch all products on initialize | ||
init() { | ||
fetchTips() | ||
} | ||
|
||
/// Fetch all available tips | ||
func fetchTips() { | ||
SwiftyStoreKit.retrieveProductsInfo(["tip.small"]) { result in | ||
guard result.error == nil else { | ||
return | ||
} | ||
|
||
self.tips = Array(result.retrievedProducts) | ||
} | ||
} | ||
|
||
} |
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,29 @@ | ||
// | ||
// | ||
// Raivo OTP | ||
// | ||
// Copyright (c) 2019 Tijme Gommers. All rights reserved. Raivo OTP | ||
// is provided 'as-is', without any express or implied warranty. | ||
// | ||
// Modification, duplication or distribution of this software (in | ||
// source and binary forms) for any purpose is strictly prohibited. | ||
// | ||
// https://github.com/raivo-otp/macos-receiver/blob/master/LICENSE.md | ||
// | ||
|
||
import Foundation | ||
|
||
/// An Apple Push Notification Token that can be observed | ||
class ObservablePushToken: ObservableObject { | ||
|
||
/// The data that can be set (containing the push token) | ||
@Published var data: Data? { | ||
didSet { | ||
text = data?.toHexString() | ||
} | ||
} | ||
|
||
/// The textual HEX representation of the data | ||
@Published var text: String? | ||
|
||
} |
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,6 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Raivo MacOS/Supporting/Assets.xcassets/color-tint-red.colorset/Contents.json
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,38 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "51", | ||
"green" : "13", | ||
"red" : "232" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "53", | ||
"green" : "15", | ||
"red" : "234" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Raivo MacOS/Supporting/Assets.xcassets/image-gift.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "undraw_Gifts_re_97j6.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "undraw_Gifts_re_97j6-1.svg", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "undraw_Gifts_re_97j6-2.svg", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Oops, something went wrong.