mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-12 23:31:02 +00:00
b1037dec62
Four widgets instead of one plain text block, drawn in the phone tokens (warm paper by day, near black by night) with contour lines and a route arc as the travel motif: - Trip (small, medium, large, lock screen): the cover photo, a countdown ring and a plane on its arc before the trip; the day of the trip as segments, the weather and the next stops on frosted glass while it runs - Today (medium, large): the day as a timeline in its category colours, with a now line, the day's progress and the weather - Bookings (small, medium, large, lock screen): flights, trains, hotels and tables ahead as coloured tiles, the next one featured, status dots - To-dos (small, medium, large, lock screen): to-dos and packing as nested rings, the most pressing open to-dos with priority and due dates The app now sends the destination, a small cover JPEG, the weather where the trip is, the bookings ahead, the open to-dos and the packing count; every new field is optional on both sides, so older binaries and servers keep working. Timelines step every quarter hour so the now line moves without the app. client/ios/WidgetPreviews renders every widget in every size, light and dark, on the CI's Mac, uploaded as the widget-previews artifact.
15 lines
528 B
Swift
15 lines
528 B
Swift
// swift-tools-version:5.9
|
|
import PackageDescription
|
|
|
|
// Renders the widget views (client/ios/App/TREKWidgets/*Content.swift and the
|
|
// files they use) to PNGs on a Mac, so a change to a widget can be looked at
|
|
// without a phone: .github/workflows/native.yml copies them into Sources/ and
|
|
// uploads what this writes. Not part of the app.
|
|
let package = Package(
|
|
name: "WidgetPreviews",
|
|
platforms: [.macOS(.v14)],
|
|
targets: [
|
|
.executableTarget(name: "WidgetPreviews", path: "Sources/WidgetPreviews"),
|
|
]
|
|
)
|