2024-05-15 07:27:35 +00:00
|
|
|
import AppIntents
|
|
|
|
import WidgetKit
|
|
|
|
|
|
|
|
struct ListsWidgetConfiguration: WidgetConfigurationIntent {
|
2024-09-10 04:53:19 +00:00
|
|
|
static let title: LocalizedStringResource = "List Widget Configuration"
|
2024-05-15 07:27:35 +00:00
|
|
|
static let description = IntentDescription("Choose the account and list for this widget")
|
|
|
|
|
|
|
|
@Parameter(title: "Account")
|
2024-09-10 04:53:19 +00:00
|
|
|
var account: AppAccountEntity?
|
2024-05-15 07:27:35 +00:00
|
|
|
|
|
|
|
@Parameter(title: "List")
|
2024-09-10 04:53:19 +00:00
|
|
|
var timeline: ListEntity?
|
2024-05-15 07:27:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extension ListsWidgetConfiguration {
|
|
|
|
static var previewAccount: LatestPostsWidgetConfiguration {
|
|
|
|
let intent = LatestPostsWidgetConfiguration()
|
|
|
|
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
|
|
|
|
return intent
|
|
|
|
}
|
|
|
|
}
|