Extension icon indicating copy to clipboard operation
Extension copied to clipboard

Hidden Setting by Default

Open Slowftw opened this issue 3 years ago • 0 comments

Feature Description

Hide settings by default – before the code (presence.ts) loads – and show them later with the presence.showSetting(id) function.

Why?

Because I would like to create activity for the site staff. e.g. I would like to show that I am in a specific area of the control panel but not show in the settings the name of this area. I know it doesn't make sense to have all this anonymity because it is an open source project but I don't think it is a useless function

metadata.json

{
  "...",
  "settings": [
    {
      "id": "staff",
      "title": "Staff",
      "icon": "fas fa-hammer",
      "value": false,
      "hidden": true
    },
    {
      "if": { "staff": true },
      "id": "s_cpanel",
      "title": "└─ Control Panel",
      "value": true
    }
  ]
}

Slowftw avatar Jan 11 '22 01:01 Slowftw