forked from Blendman974/faceclaw
<details> <summary>Prompts Used</summary> Let's add two links to the footer of the "Before you continue" page: A link to the license (GPLv3, contained in LICENSE), and a link to the privacy policy (PRIVACY). <hr> Continue > Done — the build passes. The "Before You Continue" page (step 2 of onboarding) now has a footer with two tappable links, "License (GPLv3)" and "Privacy Policy", centered between the disclaimer text and the Back/Agree buttons. They're only visible on that step, so the splash and firmware steps are unchanged. > > What I added: > > - **`app/phone-ui/document-page.xml` / `.ts`** — a new phone-side viewer page with an ActionBar (title + back button) and a scrollable label. It reads the doc from `about/<fileName>` in the app bundle; webpack already copies LICENSE and PRIVACY there (webpack.config.js:12), since the glasses-side Settings About section uses them too. > - **`onboarding-page.xml`** — a third grid row with the two links, bound to `footerVisibility` so it collapses on steps 1 and 3. > - **`onboarding-view-model.ts`** — `onLicenseTap`/`onPrivacyTap` handlers that navigate to the document page, and the `footerVisibility` getter wired into `publish()`. > - **`app.css`** — link styling (blue, underlined, padded for a comfortable tap target, lighter blue in dark mode) and a modest 13pt size for the doc text since both files are hard-wrapped plain text. > > Untested on hardware: worth a quick visual check that the links look right in dark mode and that the LICENSE text (which is 80-column preformatted) reads acceptably in the proportional font. </details>
28 lines
1.6 KiB
XML
28 lines
1.6 KiB
XML
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" actionBarHidden="true">
|
|
<GridLayout rows="*,auto,auto" class="p-20">
|
|
<StackLayout row="0" verticalAlignment="middle" visibility="{{ splashVisibility }}">
|
|
<Label text="{{ headline }}" class="h1 text-center" textWrap="true" />
|
|
<Label text="{{ tagline }}" class="body-text text-center m-t-8" textWrap="true" />
|
|
<Image src="~/images/faceclaw-logo.png" stretch="aspectFit" height="{{ logoHeight }}" horizontalAlignment="center" class="onboarding-logo m-t-24" />
|
|
</StackLayout>
|
|
|
|
<ScrollView row="0" visibility="{{ contentVisibility }}">
|
|
<StackLayout>
|
|
<Label text="{{ headline }}" class="h1 text-center m-t-24" textWrap="true" />
|
|
<Label text="{{ body }}" class="body-text m-t-24" textWrap="true" />
|
|
</StackLayout>
|
|
</ScrollView>
|
|
|
|
<StackLayout row="1" orientation="horizontal" horizontalAlignment="center" class="m-t-16" visibility="{{ footerVisibility }}">
|
|
<Label text="License (GPLv3)" class="footer-link" tap="{{ onLicenseTap }}" />
|
|
<Label text="·" class="footer-link-separator" />
|
|
<Label text="Privacy Policy" class="footer-link" tap="{{ onPrivacyTap }}" />
|
|
</StackLayout>
|
|
|
|
<GridLayout row="2" columns="*,*" class="m-t-20">
|
|
<Button col="0" text="{{ secondaryLabel }}" tap="{{ onSecondaryTap }}" visibility="{{ secondaryVisibility }}" />
|
|
<Button col="1" text="{{ primaryLabel }}" tap="{{ onPrimaryTap }}" class="-primary" />
|
|
</GridLayout>
|
|
</GridLayout>
|
|
</Page>
|