Differences From
Artifact [60d6b764a8]:
2 2 local pstr = lib.mem.ptr(int8)
3 3 local pref = lib.mem.ref(int8)
4 4
5 5 local mappings = {
6 6 {url = 'profile', title = 'account profile', render = 'profile'};
7 7 {url = 'avi', title = 'avatar', render = 'avatar'};
8 8 {url = 'ui', title = 'user interface', render = 'ui'};
9 - {url = 'sec', title = 'security', render = 'sec'};
9 + {url = 'sec', title = 'security', render = 'sec_overlay'};
10 10 {url = 'rel', title = 'relationships', render = 'rel'};
11 11 {url = 'qnt', title = 'quarantine', render = 'quarantine'};
12 12 {url = 'acl', title = 'access control shortcuts', render = 'acl'};
13 13 {url = 'rooms', title = 'chatrooms', render = 'rooms'};
14 14 {url = 'circles', title = 'circles', render = 'circles'};
15 15
16 16 {url = 'srv', title = 'server settings', render = 'srv'};
................................................................................
29 29
30 30 for i, m in ipairs(mappings) do
31 31 if lib.render.conf[m.render] then
32 32 invoker = quote
33 33 if path(1):cmp(lib.str.lit([m.url])) then
34 34 var body = [lib.render.conf[m.render]] (co, path)
35 35 var a: lib.str.acc a:init(body.ct+48)
36 - a:lpush(['<h1>' .. m.title .. '</h1>']):ppush(body)
37 - panel = a:finalize()
38 - body:free()
36 + if not body then
37 + a:lpush(['<h1>' .. m.title .. ' :: error</h1>' ..
38 + '<p>the requested resource is not available.</p>'])
39 + panel = a:finalize()
40 + else
41 + a:lpush(['<h1>' .. m.title .. '</h1>']):ppush(body)
42 + panel = a:finalize()
43 + body:free()
44 + end
39 45 else [invoker] end
40 46 end
41 47 end
42 48 end
43 49
44 50 local terra
45 51 render_conf([co], [path], notify: pstr)