{"format_version":1,"id":"database","setup":true,"name":"Database","plural":"Databases","picture":{"link_object":"cap"},"builtin":true,"engine":"databases","role":"database","columns":[{"key":"name","name":"Name","type":"text","required":true},{ "key": "colour", "name": "Cap colour", "type": "choice", "choices": [ "cream", "red", "navy", "yellow", "green", "silver", "orange", "burgundy", "sky", "pink", "black", "teal" ], "labels": { "cream": "Cream", "red": "Red", "navy": "Navy", "yellow": "Yellow", "green": "Green", "silver": "Silver", "orange": "Orange", "burgundy": "Burgundy", "sky": "Sky", "pink": "Pink", "black": "Black", "teal": "Teal" } },{ "key": "family", "name": "Look", "type": "choice", "required": true, "choices": [ "paper", "plain" ], "labels": { "paper": "Paper", "plain": "Plain" } },{"key":"accent","name":"Accent","type":"text"},{"key":"paper","name":"Paper","type":"text"},{ "key": "cap_texture", "name": "Cap", "type": "choice", "required": true, "choices": [ "enamel", "flat" ], "labels": { "enamel": "Enamel", "flat": "Flat" } },{"key":"kind","name":"Kind","type":"choice","readonly":true,"choices":["personal","shared"]},{"key":"people","name":"Members","type":"text","readonly":true},{ "key": "rights", "name": "You may", "type": "text", "readonly": true, "labels": { "owner": "Owner", "admin": "Can manage sharing", "member": "Can read and write", "owner_only": "Only you" } },{"key":"reached_at","name":"Reached at","type":"text","readonly":true},{"key":"kept_here","name":"Kept here","type":"text","readonly":true},{"key":"kept_elsewhere","name":"Kept on your other devices","type":"longtext","readonly":true},{"key":"notifications","name":"Notifications here","type":"text","readonly":true},{"key":"can_leave","name":"Can be left here","type":"bool","readonly":true},{"key":"brand_slug","name":"Project","type":"text","readonly":true},{"key":"brand_project","name":"Project name","type":"text","readonly":true},{"key":"tagline","name":"Tagline","type":"text"},{"key":"brand_colours","name":"Colours","type":"longtext"},{"key":"brand_fonts","name":"Fonts","type":"longtext"},{"key":"brand_voice","name":"Voice","type":"longtext"},{"key":"brand_links","name":"Links","type":"longtext"},{"key":"logo","name":"Logo","type":"link","link_to":"document"},{"key":"logo_dark","name":"Logo on dark","type":"link","link_to":"document"},{"key":"wordmark","name":"Wordmark","type":"link","link_to":"document"},{"key":"icon","name":"Icon","type":"link","link_to":"document"},{"key":"members_route","name":"Members","type":"url","readonly":true,"fact":false},{"key":"storage_route","name":"Storage","type":"url","readonly":true,"fact":false},{"key":"device_route","name":"This device","type":"url","readonly":true,"fact":false},{"key":"copies_route","name":"Sync","type":"url","readonly":true,"fact":false},{"key":"can_delete","name":"Creator","type":"bool","readonly":true},{"key":"member_count","name":"Members to remove","type":"number","readonly":true,"reading":"Remove the {value} members first"},{"key":"delete_refusal","name":"Deletion","type":"choice","readonly":true,"choices":["personal","not_creator","unknown","not_deleted","expired","failed","members_one"],"labels":{"personal":"Personal cannot be deleted.","not_creator":"Only the person who created this database can delete it.","unknown":"This database is not served here.","not_deleted":"This database is not in the Bin.","expired":"This database has reached the end of its 30 days in the Bin.","failed":"The database could not be moved. Try again; its retained file has not been erased.","members_one":"Remove the member first"}}],"title":"name","date":null,"project":null,"order":null,"slip":{"title":"name","subtitle":"people","trailing":null,"photo":null,"toggle":null},"tile":{"face":"slip-list"},"page":[{"heading":null,"columns":["name","people","reached_at"]},{"heading":"Theme","columns":["family","accent","paper","colour","cap_texture"]},{"heading":"On your devices","columns":["kept_here","kept_elsewhere","notifications"]}],"add":false,"group":{"column":"kind","sections":[{"heading":null,"values":["personal"]},{"heading":"Shared","values":["shared"]}]},"delete":false,"instructions":"A database is one the owner holds on this device: the personal one, made at first run and entered by nobody else, or a shared one admitting other people. Its name and its theme — the look (paper or plain), the accent and paper colours as #RRGGBB, the cap's colour and finish — are the owner's to change, each written as the database's own theme row, which syncs; who is in it, where it is reached and what each device keeps of it are read, never written. Its brand is its project's kit — the tagline, the colours (one a line, a name then #RRGGBB), the fonts (one a line, Display: Family (source)), the voice and the links (one a line, a label then the address) — and the four logo files, each a document of the database linked as that slot; writing them writes the project's brand and its document links. Sync (every device holding a copy and how far behind each is), Members, Storage and leaving are the page's acts; never leave a database without the owner.","parts":{"shape":"sheet","head":{"facts":["people","reached_at"]},"links":[],"lists":[],"acts":{"main":"open_copies","more":["use_brand","open_members","open_storage","open_device","delete"],"away":"leave"},"cards":[{"column":"family","object":"picture"},{"column":"colour","link_to":"database"},{"column":"cap_texture","link_to":"database"},{"column":"kept_here"},{"column":"notifications"},{"column":"tagline"},{"column":"brand_colours"},{"column":"brand_fonts"},{"column":"brand_voice"},{"column":"brand_links"},{"column":"logo","object":"picture"},{"column":"logo_dark","object":"picture"},{"column":"wordmark","object":"picture"},{"column":"icon","object":"picture"}],"strip":[{"column":"accent"},{"column":"paper"},{"column":"rights"},{"column":"kept_elsewhere"}]},"tables":[],"commands":[{"id":"use_brand","label":"Use brand","object":"picture","kind":"update","method":"definitions.applyProjectBrand","bindings":{"id":"$id"},"pick":{"argument":"project","kind":"record","table":"project","database_by":"$id"},"receipt":"Used brand"},{"id":"open_copies","label":"Open sync","object":"repeat","kind":"open","opens":"copies_route"},{"id":"open_members","label":"Open members","object":"group","kind":"open","opens":"members_route"},{"id":"open_storage","label":"Open storage","object":"archive","kind":"open","opens":"storage_route"},{"id":"open_device","label":"Open device","object":"open","kind":"open","opens":"device_route"},{"id":"leave","label":"Leave","object":"unlink","kind":"update","method":"settings.openFlow","data":{"flow":"leaveDatabase","origin_table":"database"},"bindings":{"origin_id":"$id","target_database":"$id"},"when":{"can_leave":true},"destructive":true,"does":"puts-away","confirm":"This device stops syncing and forgets this database. People sharing it see that you left. Your other devices keep their copies.","receipt":"Opening leave sheet"},{"id":"delete","label":"Delete database","kind":"delete","method":"databases.delete","bindings":{"databaseId":"$id"},"when":{"can_delete":true},"destructive":true,"does":"puts-away","confirm":"This database leaves every device and waits in the Bin for 30 days. You can restore it during that time. After 30 days its file and media are erased.","receipt":"Moved to the Bin"}]}