Info
- The app's Terms of Service and Privacy policy from ServiceHub: read in the app, accepted after sign-in
- Code in
ServiceHub/Legal, kit prefabs and dialogs in App/Legal
- Texts per language on the hub, the app asks in its current language. Endpoints: API
Usage
LegalApi
GetAsync() - /legal: both documents (Version, PublishedAt, public Url, Markdown, missing when the document lives on another site) and what the player still has to answer (Pending). Signed in with the player's token, before sign-in by the app secret, without the pending part
SendAnswersAsync(termsVersion, privacyVersion) - accepted terms and a seen privacy policy, with the language they were shown in
TermsPrompt - sign-in prompt (order 0, see Auth): changed terms and a changed privacy policy as notices, continuing accepts them. With both pending, e.g. a new player, one dialog covers both (Both Dialog, Terms Dialog, Privacy Dialog). The sign-in answer says what's pending (LoginResponse.Legal), a start already signed in asks the hub. Closed without an answer or not recorded: asked again next time
LegalDocumentWindow - one document to read (LegalDocumentKind: Terms, Privacy), loaded from the hub when it opens: the Markdown as rich text (MarkdownRichText), the date in the player's language, the public address as a link for the browser. States Loading, Content, Error. LegalDocumentWindow.Open(from, window, kind) brings the window it was opened from back when it closes, e.g. Settings
LegalLinks - on a text with TextLinks: links with the ids terms and privacy open the documents, web addresses open in the browser, e.g. the log-in notice in the account window
- Close Window - the dialog closes with the link id instead.
LegalLinks.ShowDialogAsync(screen, dialogWindow, documentWindow, dialog) shows such a dialog, opens the document and brings the dialog back, and returns the pressed button's result. Null when the player signed out or another one signed in meanwhile. The usage data and study prompts use it too, see Analytics
LegalDocumentButton - opens a document, e.g. in Settings
- Kit (
App/Legal): LegalDialogWindow, LegalDocumentWindow, dialogs TermsDialog, PrivacyDialog, TermsAndPrivacyDialog. The prompt is on the main menu