mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
40 lines
1.0 KiB
Swift
40 lines
1.0 KiB
Swift
//
|
|
// TerminalLiveActivityAttributes.swift
|
|
// Runner
|
|
//
|
|
// Mirror of the ActivityKit attributes used in the extension.
|
|
//
|
|
|
|
import Foundation
|
|
import ActivityKit
|
|
|
|
@available(iOS 16.1, *)
|
|
public struct TerminalAttributes: ActivityAttributes {
|
|
public struct ContentState: Codable, Hashable {
|
|
public var id: String
|
|
public var title: String
|
|
public var subtitle: String
|
|
public var status: String
|
|
public var startTime: Date
|
|
public var hasTerminal: Bool
|
|
public var connectionCount: Int
|
|
|
|
public init(id: String, title: String, subtitle: String, status: String, startTime: Date, hasTerminal: Bool, connectionCount: Int = 1) {
|
|
self.id = id
|
|
self.title = title
|
|
self.subtitle = subtitle
|
|
self.status = status
|
|
self.startTime = startTime
|
|
self.hasTerminal = hasTerminal
|
|
self.connectionCount = connectionCount
|
|
}
|
|
}
|
|
|
|
public var id: String
|
|
|
|
public init(id: String) {
|
|
self.id = id
|
|
}
|
|
}
|
|
|