-- vim: ft=terra
local pstr = lib.mem.ptr(int8)
local pref = lib.mem.ref(int8)
local terra 
render_conf_sec(co: &lib.srv.convo, path: lib.mem.ptr(pref)): pstr
	var time: lib.store.timepoint = co.who.source:auth_sigtime_user_fetch(co.who.id)
	var tstr: int8[26]
	lib.osclock.ctime_r(&time, &tstr[0])
	var body = data.view.conf_sec {
		lastreset = pstr {
			ptr = &tstr[0], ct = lib.str.sz(&tstr[0])
		}
	}
	
	if co.srv.cfg.credmgd then
		var a: lib.str.acc a:init(768)
		body:append(&a)
		var credmgr = data.view.conf_sec_credmg {
			credlist = '<option>your password</option>'
		}
		credmgr:append(&a)
		return a:finalize()
	else return body:tostr() end
end
return render_conf_sec
