mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 16:15:23 -04:00
webui: adding and listing identities
This commit is contained in:
parent
94b02943e6
commit
57d1d0868a
7 changed files with 113 additions and 10 deletions
51
libresapi/src/webui-src/app/addidentity.js
Normal file
51
libresapi/src/webui-src/app/addidentity.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
"use strict";
|
||||
|
||||
var m = require("mithril");
|
||||
var rs = require("retroshare");
|
||||
|
||||
function createidentity(){
|
||||
var data = {
|
||||
name: document.getElementById("txtname").value,
|
||||
pgp_linked: document.getElementById("chklinked").checked,
|
||||
};
|
||||
m.route("/waiting");
|
||||
rs.request("identity/create_identity",data, function(){
|
||||
m.route("/identities");
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {view: function(){
|
||||
m.initControl = "txtname";
|
||||
return m("div",
|
||||
m("h2","create identity"),
|
||||
m("hr"),
|
||||
m("h3","name"),
|
||||
m("input", {
|
||||
type: "text",
|
||||
id: "txtname",
|
||||
/*
|
||||
onkeydown: function(event){
|
||||
if (event.keyCode == 13){
|
||||
setPasswd(this.value);
|
||||
sendPassword(needpasswd);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}),
|
||||
m("b","linked with pgp-id: "),
|
||||
m("input", {
|
||||
type: "checkbox",
|
||||
id: "chklinked",
|
||||
style: {
|
||||
fontweight:"bold",
|
||||
width: "0%",
|
||||
}
|
||||
}),
|
||||
m("p"," "),
|
||||
m("input.btn2", {
|
||||
onclick: createidentity,
|
||||
type: "button",
|
||||
value: "create new identity",
|
||||
})
|
||||
)
|
||||
}}
|
Loading…
Add table
Add a link
Reference in a new issue