mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -04:00
webui: added display of own cert
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8219 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
744f340746
commit
df253e65c6
7 changed files with 74 additions and 6 deletions
|
@ -100,6 +100,12 @@ void PeersHandler::handleWildcard(Request &req, Response &resp)
|
||||||
req.mPath.pop();
|
req.mPath.pop();
|
||||||
if(str != "")
|
if(str != "")
|
||||||
{
|
{
|
||||||
|
if(str == "self" && !req.mPath.empty() && req.mPath.top() == "certificate")
|
||||||
|
{
|
||||||
|
resp.mDataStream << makeKeyValue("cert_string", mRsPeers->GetRetroshareInvite(false));
|
||||||
|
resp.setOk();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// assume the path element is a peer id
|
// assume the path element is a peer id
|
||||||
// sometimes it is a peer id for location info
|
// sometimes it is a peer id for location info
|
||||||
// another time it is a pgp id
|
// another time it is a pgp id
|
||||||
|
|
|
@ -8,6 +8,20 @@ body {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#overlay{
|
||||||
|
z-index: 10;
|
||||||
|
position: fixed;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.paddingbox{
|
||||||
|
padding:2mm;
|
||||||
|
}
|
||||||
|
|
||||||
.nav{
|
.nav{
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0em;
|
padding: 0em;
|
||||||
|
|
|
@ -245,7 +245,6 @@ var Peers2 = React.createClass({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var Peers3 = React.createClass({
|
var Peers3 = React.createClass({
|
||||||
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
||||||
getPath: function(){return "peers";},
|
getPath: function(){return "peers";},
|
||||||
|
@ -320,6 +319,21 @@ var Peers3 = React.createClass({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var OwnCert = React.createClass({
|
||||||
|
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
||||||
|
getPath: function(){return "peers/self/certificate";},
|
||||||
|
getInitialState: function(){
|
||||||
|
return {data: {cert_string: ""}};
|
||||||
|
},
|
||||||
|
render: function(){
|
||||||
|
// use <pre> tag for correct new line behavior!
|
||||||
|
return (
|
||||||
|
<pre>
|
||||||
|
{this.state.data.cert_string}
|
||||||
|
</pre>);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
var AddPeerWidget = React.createClass({
|
var AddPeerWidget = React.createClass({
|
||||||
getInitialState: function(){
|
getInitialState: function(){
|
||||||
return {page: "start"};
|
return {page: "start"};
|
||||||
|
@ -344,6 +358,8 @@ var AddPeerWidget = React.createClass({
|
||||||
if(this.state.page === "start")
|
if(this.state.page === "start")
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
|
<p>Your own key, give it to your friends</p>
|
||||||
|
<OwnCert/>
|
||||||
<p>paste your friends key below</p>
|
<p>paste your friends key below</p>
|
||||||
<textarea ref="cert" cols="70" rows="16"></textarea><br/>
|
<textarea ref="cert" cols="70" rows="16"></textarea><br/>
|
||||||
<input
|
<input
|
||||||
|
@ -850,6 +866,7 @@ var MainWidget = React.createClass({
|
||||||
menubutton = <div>Retroshare webinterface</div>;
|
menubutton = <div>Retroshare webinterface</div>;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{/*<div id="overlay"><div className="paddingbox"><div className="btn2">test</div></div></div>*/}
|
||||||
<PasswordWidget/>
|
<PasswordWidget/>
|
||||||
<AudioPlayerWidget/>
|
<AudioPlayerWidget/>
|
||||||
{menubutton}
|
{menubutton}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>loading lots of stuff...</p>
|
<p>loading lots of stuff...</p>
|
||||||
<div id="logo_splash">
|
<!--<div id="logo_splash">
|
||||||
<img src="img/logo_splash.png"></img>
|
<img src="img/logo_splash.png"></img>
|
||||||
</div>
|
</div>-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -8,6 +8,20 @@ body {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#overlay{
|
||||||
|
z-index: 10;
|
||||||
|
position: fixed;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.paddingbox{
|
||||||
|
padding:2mm;
|
||||||
|
}
|
||||||
|
|
||||||
.nav{
|
.nav{
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0em;
|
padding: 0em;
|
||||||
|
|
|
@ -245,7 +245,6 @@ var Peers2 = React.createClass({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var Peers3 = React.createClass({
|
var Peers3 = React.createClass({
|
||||||
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
||||||
getPath: function(){return "peers";},
|
getPath: function(){return "peers";},
|
||||||
|
@ -320,6 +319,21 @@ var Peers3 = React.createClass({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var OwnCert = React.createClass({
|
||||||
|
mixins: [AutoUpdateMixin, SignalSlotMixin],
|
||||||
|
getPath: function(){return "peers/self/certificate";},
|
||||||
|
getInitialState: function(){
|
||||||
|
return {data: {cert_string: ""}};
|
||||||
|
},
|
||||||
|
render: function(){
|
||||||
|
// use <pre> tag for correct new line behavior!
|
||||||
|
return (
|
||||||
|
<pre>
|
||||||
|
{this.state.data.cert_string}
|
||||||
|
</pre>);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
var AddPeerWidget = React.createClass({
|
var AddPeerWidget = React.createClass({
|
||||||
getInitialState: function(){
|
getInitialState: function(){
|
||||||
return {page: "start"};
|
return {page: "start"};
|
||||||
|
@ -344,6 +358,8 @@ var AddPeerWidget = React.createClass({
|
||||||
if(this.state.page === "start")
|
if(this.state.page === "start")
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
|
<p>Your own key, give it to your friends</p>
|
||||||
|
<OwnCert/>
|
||||||
<p>paste your friends key below</p>
|
<p>paste your friends key below</p>
|
||||||
<textarea ref="cert" cols="70" rows="16"></textarea><br/>
|
<textarea ref="cert" cols="70" rows="16"></textarea><br/>
|
||||||
<input
|
<input
|
||||||
|
@ -850,6 +866,7 @@ var MainWidget = React.createClass({
|
||||||
menubutton = <div>Retroshare webinterface</div>;
|
menubutton = <div>Retroshare webinterface</div>;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{/*<div id="overlay"><div className="paddingbox"><div className="btn2">test</div></div></div>*/}
|
||||||
<PasswordWidget/>
|
<PasswordWidget/>
|
||||||
<AudioPlayerWidget/>
|
<AudioPlayerWidget/>
|
||||||
{menubutton}
|
{menubutton}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>loading lots of stuff...</p>
|
<p>loading lots of stuff...</p>
|
||||||
<div id="logo_splash">
|
<!--<div id="logo_splash">
|
||||||
<img src="img/logo_splash.png"></img>
|
<img src="img/logo_splash.png"></img>
|
||||||
</div>
|
</div>-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue