mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
feat(mobile): the touch shell laid out for iPad and unfolded foldables
The app shows the touch shell at every size now, an iPad's and an unfolded foldable's included, instead of switching to the desktop pages from 768px. One route tree survives rotation, Split View, Stage Manager and folding, and the app's own features (Wallet, sharing into a trip, the edge swipe back) are there on the big screen too. Two size classes drive the layout (hooks/sizeClass.ts, Tailwind variants wide: and split:): - wide (600pt and taller than a phone on its side): a glass navigation rail on the leading edge replaces the dock and holds every destination with its name; sheets become centred form sheets; the trip's More menu is a popover beside the rail; lists keep a readable measure; dashboard, journey and vacay get columns; full-bleed maps run under the floating rail. - split (900pt): the trip's plan, places or road trip chain sit in a pane beside the map, which follows the plan's day; the list/map switch hides and shows the pane like a sidebar; on a foldable that reports its fold the pane ends at the fold. Settings show their sections beside the page and the dashboard keeps its widgets in a column of their own. A hardware keyboard gets the shortcuts an iPad app has (⌘1 to ⌘9 for the sections, ⌘N, ⌘, , ⌥←/⌥→ through the days, ⌃⌘S for the pane, ⌘[ back), answered by the page or, with a binary that has the keyCommands feature, handed to it as native key commands. The day strip fades at an edge that runs on, journey cards grow on a wide window and a card without a photo takes the day's colour, and the Leaflet map measures itself again when its box changes size.
This commit is contained in:
@@ -123,6 +123,18 @@ export interface TrekShellPlugin {
|
||||
event: 'storeTransaction',
|
||||
listener: (payload: StoreRestoreResult) => void
|
||||
): Promise<{ remove: () => Promise<void> }>;
|
||||
/**
|
||||
* Feature keyCommands (iOS, Android): the shortcuts a hardware keyboard has right now,
|
||||
* with their names in the UI's language. The app lists them in the overlay a
|
||||
* held Command key shows and in the iPadOS menu bar, Android in its
|
||||
* keyboard shortcuts list.
|
||||
*/
|
||||
setKeyCommands(options: { commands: NativeKeyCommand[] }): Promise<void>;
|
||||
/** Feature keyCommands: one of those shortcuts was pressed. */
|
||||
addListener(
|
||||
event: 'keyCommand',
|
||||
listener: (payload: { id: string }) => void
|
||||
): Promise<{ remove: () => Promise<void> }>;
|
||||
}
|
||||
|
||||
/** What Google Play Billing answers a restore with (Android, feature playBilling), beside iOS's `jws`. */
|
||||
@@ -133,6 +145,16 @@ export interface StoreRestoreResult {
|
||||
transactionId?: string;
|
||||
}
|
||||
|
||||
/** A keyboard shortcut as the app registers it (UIKeyCommand on iOS, a KeyboardShortcutInfo on Android). */
|
||||
export interface NativeKeyCommand {
|
||||
id: string;
|
||||
title: string;
|
||||
/** The key: a character, or one of 'left', 'right', 'up', 'down', 'escape'. */
|
||||
input: string;
|
||||
/** Any of 'command', 'shift', 'option', 'control'. */
|
||||
modifiers: string[];
|
||||
}
|
||||
|
||||
/** A document shared to TREK, as the native side reads it. */
|
||||
export interface SharedFilePayload {
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user