Solel//dev docs

Pages in Settings

Your app can add up to 12 pages to Settings, so people find its settings where they find everything else. Each page is part of your app's front end, shown inside Settings.

Listing them

Add settings to your manifest. This is how Browser adds its page:

"settings": [
  {
    "id": "browser",
    "label": "Browser",
    "path": "/settings",
    "words": "web search trackers ads cookies history passwords children parents"
  }
]
Field What it is
id Names the page among your app's own: lower-case letters, digits and -, up to 32 characters, starting with a letter
label What Settings calls it, 1 to 40 characters
path Where the page is in your front end, like /settings, with no query or fragment
admin true shows it only to the owner and admins. Your app still has to check who's asking
words Up to 200 characters of more words Settings search finds it by. It finds your app's name too

Where they show

Your pages appear in Settings under your app's name, after the server's settings and before About. They're there for each person the app is installed for, while it's turned on and made for the layout they're using.

Drawing the page

Settings opens your front end at the page's path, in the same sandboxed frame as your app's window. Call solel.ready() as usual: path in the answer says which page to show, and the theme and layout follow the person's.

const { path } = await solel.ready();
if (path.startsWith('/settings')) showSettings();

A few things differ from a window:

  • No title bar. The page sits inside Settings, so setTitle changes nothing.
  • Closing. solel.close() takes the person back to their own account page in Settings.

Use Daybreak's settings components so your page looks like the ones around it.