Notabenda · Form permissions
Choose whether to
receive updates
Keep the ordinary task and the optional permission separate. A saved choice carries its purpose, channel and policy version with it.
// @requirements REQ-PRODUCT-FORM-PERMISSIONS REQ-PRODUCT-MOBILE REQ-PRODUCT-DEMO-WORKSPACE import {reactPermissionFiles} from './react-build.mjs'; import {readFile} from 'node:fs/promises'; import {formPermissionExample} from './example.mjs'; import {renderLegalLinks} from 'notabenda'; const attribute=value=>value.replaceAll('&','&').replaceAll('"','"').replaceAll('<','<').replaceAll('>','>'); export async function formPermissionFiles(base){ const {build,offer,retained}=formPermissionExample(base); const files={...retained,...build.files,'form-permissions/offer.json':JSON.stringify(offer),'assets/form-permissions.mjs':await readFile(new URL('./client.mjs',import.meta.url),'utf8'),'assets/form-permissions.css':await readFile(new URL('./style.css',import.meta.url),'utf8')}; for(const dark of [false,true]){ const route=dark?'dark/form-permissions':'form-permissions'; files[route+'/index.html']=`
Notabenda · Form permissions
Keep the ordinary task and the optional permission separate. A saved choice carries its purpose, channel and policy version with it.