mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-24 19:51:29 +01:00
23 lines
701 B
Swift
23 lines
701 B
Swift
import AppIntents
|
|
import WidgetKit
|
|
|
|
struct HashtagPostsWidgetConfiguration: WidgetConfigurationIntent {
|
|
static let title: LocalizedStringResource = "Hashtag Widget Configuration"
|
|
static let description = IntentDescription("Choose the account and hashtag for this widget")
|
|
|
|
@Parameter(title: "Account")
|
|
var account: AppAccountEntity
|
|
|
|
@Parameter(title: "Hashtag")
|
|
var hashgtag: String
|
|
}
|
|
|
|
extension HashtagPostsWidgetConfiguration {
|
|
static var previewAccount: HashtagPostsWidgetConfiguration {
|
|
let intent = HashtagPostsWidgetConfiguration()
|
|
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
|
|
intent.hashgtag = "Mastodon"
|
|
return intent
|
|
}
|
|
}
|