Cotton code
96 lines · 2.6 KB · JSONRaw
{  "format_version": 1,  "id": "theme",  "name": "Theme",  "plural": "Themes",  "picture": null,  "builtin": true,  "engine": "themes",  "columns": [    {      "key": "name",      "name": "Theme",      "type": "text",      "required": true,      "readonly": true    },    {      "key": "definition",      "name": "Definition",      "type": "longtext",      "required": true    },    {      "key": "drawn",      "name": "Drawn from",      "type": "choice",      "choices": [        "yours",        "default"      ],      "labels": {        "yours": "This database's own theme",        "default": "The theme this build ships"      },      "readonly": true    },    {      "key": "worn",      "name": "Worn",      "type": "bool",      "readonly": true    }  ],  "title": "name",  "voice_words": [],  "date": null,  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": "drawn",    "trailing": null,    "photo": null,    "toggle": null  },  "tile": {    "face": "slip-list"  },  "empty": {    "title": "No themes"  },  "page": [    {      "heading": null,      "columns": [        "name",        "worn",        "drawn",        "definition"      ]    }  ],  "deletion": {    "label": "Put back the default",    "confirm": "Put back the default",    "undo": false  },  "delete_when": {    "column": "drawn",    "values": [      "yours"    ]  },  "instructions": "A theme is how the app looks in this database: its family (paper or plain), the cap's colour and what it lays over the family. The records are the themes this database can hold — paper and plain as this build ships them, and database, its own theme, the one the cap's colour is written on — each with its definition as JSON, exactly the shape get_record_by_table answers, and worn on the one the database wears now. To change how the database looks, update a theme's definition with the whole theme (its id the record's id); the newest theme this database wrote is the one it wears, from the next sync, with no new build. A definition this build cannot draw (a family it does not ship, an unknown key, a colour that is not one) is refused and nothing is saved; no theme is created beyond these. delete_record on a theme that is this database's own puts the default back (the theme it replaced stays in the change's before); a theme that is already the default is never deleted.",  "add": false,  "tables": [],  "card": {    "face": "plain",    "fields": [      { "slot": "title", "column": "name" },      { "slot": "subtitle", "column": "drawn" },      { "slot": "facts", "column": "worn" }    ]  }}