Terms of Use Page Reference

Table of Contents


Introduction

The Terms of Use page (page ID tou) displays the POH Performance End User License Agreement and Privacy Policy and records that the user accepted them. It is defined in common/page/termsOfUse.js. Every app except the Example1 and Testapp apps imports it for its side effect, and lists tou in its nav layout (usually under "More") and in its help table of contents:

import './common/page/termsOfUse.js';

The app does not need to supply anything else. The app's startup text can show the agreement version with {{|tou_version|}}.

Locking until accepted

While the current terms version has not been accepted, the page calls nav.lockPage('tou'), which opens the page as the base page and prevents navigating to any other base page. The "I Accept" button records acceptance, after which the page calls nav.unlockPage() to release the lock and return to the previous page or the app's start page. After acceptance the page stays available from the menu as an ordinary page, without the accept button.

Remembering acceptance

The user can check "I am the only user of this device" (tou_singleUser). Acceptance is remembered only in that case. The accepted version is stored in tou_acceptedVersion, saved on the device only (save:'local'), and is not sent to the cloud. When the app starts:

The current version is the constant touVersion in termsOfUse.js (currently '6'), published as the tou_version output. Changing the constant forces every user to accept the new terms.

Help and tips

The page's help topic (title "Terms of use") explains the lock. It has a first-time tip that is deferred until ctl.appTitle is set, because the tip text includes the app title.


Page state variables

All the state variables have the prefix tou_.

State variable Type Description
tou_singleUser booleanInput True if the device has a single user. Saved on the device only.
tou_version textOutput The current terms version.
tou_hasAccepted modelValue True once the current version is accepted. Drives the page lock.
tou_acceptedVersion modelValue The accepted terms version, or ''. Saved on the device only.