mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-11 17:56:29 +00:00
19 lines
566 B
Swift
19 lines
566 B
Swift
|
import AppIntents
|
||
|
import WidgetKit
|
||
|
|
||
|
struct AccountWidgetConfiguration: WidgetConfigurationIntent {
|
||
|
static let title: LocalizedStringResource = "Configuration"
|
||
|
static let description = IntentDescription("Choose the account for this widget")
|
||
|
|
||
|
@Parameter(title: "Account")
|
||
|
var account: AppAccountEntity
|
||
|
}
|
||
|
|
||
|
extension AccountWidgetConfiguration {
|
||
|
static var previewAccount: AccountWidgetConfiguration {
|
||
|
let intent = AccountWidgetConfiguration()
|
||
|
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
|
||
|
return intent
|
||
|
}
|
||
|
}
|