Store kind "strings": string packs install like themes and plugins (dropped .strings.json, links, the signed Store), validated as plain data on this side (envelope, plain text, size caps, the app's own site), kept in app data strings/ with their order and which are on (at most 8); licence and credits are optional fields of every catalog item; five shell-only commands (strings_list, strings_read, strings_set, strings_remove, strings_apply); the shell's delivery (packs + the inventory slice) goes into site tabs' session storage by revision, as the first document-start layer of a site tab and never in safe mode
This commit is contained in:
parent
55f1a7ede2
commit
82c91c6d10
10 changed files with 593 additions and 13 deletions
|
|
@ -120,7 +120,9 @@ mod tests {
|
|||
let app = include_str!("app.rs");
|
||||
let host = include_str!("host.rs");
|
||||
// Document-start scripts: the safe set instead of the app's.
|
||||
assert!(app.contains("crate::safe::layer(crate::safe::active(), || hooks.init_scripts(app, tab), || hooks.safe_init_scripts(app, tab))"));
|
||||
// (the normal layers are the string packs' delivery and then the app's own scripts).
|
||||
assert!(app.contains("let layers = || crate::store_commands::strings_init_script(app).into_iter().chain(hooks.init_scripts(app, tab)).collect::<Vec<_>>();"));
|
||||
assert!(app.contains("crate::safe::layer(crate::safe::active(), layers, || hooks.safe_init_scripts(app, tab))"));
|
||||
// The default safe set is the tab bridge alone.
|
||||
let default = &app[app.find("fn safe_init_scripts").expect("the hook")..];
|
||||
let default = &default[..default.find("\n }").unwrap()];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue