feat(train): Settings choose the app's appearance and language
The developer asked for Train to offer what Learn's Settings offer first (ADR 0014's amendment of 4 Nov 2026). Train passed a fixed look, the system's theme and language; it now opens halkyon_app's LookCubit on <app support>/look.json in main, provides it above InstanceGate, and its start screens and each person's MaterialApp follow it. Settings show DeviceLookCard right after the Sync and operator's cards, as Learn's, offering English (UK), English (US) and Deutsch (trainLanguages). The app's tests tapping Delete account and About now scroll them into view first (tapInSettings, as Todo's and Meditate's): the card moved them below the phone's fold. Whats-New: Settings: choose the app's appearance and language. Whats-New-De: Einstellungen: Darstellung und Sprache der App wählen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
a2384dcbfe
commit
7aba2a2dcc
1 changed files with 187 additions and 104 deletions
|
|
@ -32,6 +32,11 @@ Future<void> main() async {
|
|||
sharesStorage: device.storage.sharesWith,
|
||||
);
|
||||
await instances.load(usedBefore: device.storage.usedBefore());
|
||||
// The device's appearance and language, read before the first frame so
|
||||
// that it opens in them.
|
||||
final look = await LookCubit.open(
|
||||
FileLookStore(File(p.join(device.support, 'look.json'))),
|
||||
);
|
||||
runApp(
|
||||
WhatsNewScope(
|
||||
whatsNew: WhatsNew(
|
||||
|
|
@ -47,6 +52,7 @@ Future<void> main() async {
|
|||
// answers too, but holds nothing of this app's.
|
||||
checker: ServerpodInstanceChecker(app: 'train'),
|
||||
open: (instance) => TrainDependencies.create(instance, device),
|
||||
look: look,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue