mirror of
https://github.com/twisterarmy/twister-react.git
synced 2025-02-04 11:04:19 +00:00
import user key
This commit is contained in:
parent
be6eb038b0
commit
ce025b1b47
File diff suppressed because it is too large
Load Diff
@ -32531,7 +32531,7 @@ Twister.importClientSideAccount = function (name,key,cbfunc) {
|
||||
Twister._wallet[name]._privkey.setKey(key)
|
||||
Twister._wallet[name]._privkey.verifyKey(function(){
|
||||
|
||||
cbfunc(Twister._wallet[name])
|
||||
if(cbfunc) cbfunc(Twister._wallet[name])
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<script src="build/jquery.min.js"></script>
|
||||
<script src="build/jquery.json-2.4.js"></script>
|
||||
<script src="build/jquery.jsonrpcclient.js"></script>
|
||||
@ -11,6 +11,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/paper-theme.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
<meta name="viewport" content="width=548" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
42
jsx/App.js
42
jsx/App.js
@ -42,7 +42,11 @@ var AppSettingsMixin = require('./common/AppSettingsMixin.js');
|
||||
|
||||
App = React.createClass({
|
||||
|
||||
mixins: [AppSettingsMixin,SetIntervalMixin,SafeStateChangeMixin],
|
||||
mixins: [
|
||||
AppSettingsMixin,
|
||||
SetIntervalMixin,
|
||||
SafeStateChangeMixin,
|
||||
EventListenerMixin('newaccountbyuser')],
|
||||
|
||||
contextTypes: {
|
||||
router: React.PropTypes.func
|
||||
@ -86,6 +90,18 @@ App = React.createClass({
|
||||
|
||||
},
|
||||
|
||||
onnewaccountbyuser: function(event) {
|
||||
|
||||
this.saveCache();
|
||||
|
||||
if(!this.activeAccount){
|
||||
|
||||
this.switchAccount(event.detail.getUsername());
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getInitialState: function () {
|
||||
|
||||
var state={};
|
||||
@ -212,9 +228,13 @@ if (accounts.length==0) {
|
||||
pollInterval:60,
|
||||
pollIntervalProfile: 3600,
|
||||
ignoredUsers: "nobody",
|
||||
host: "http://user:pwd@localhost:28332"
|
||||
host: "http://tschaul.com:8080"
|
||||
|
||||
};
|
||||
|
||||
console.log(appSettings)
|
||||
|
||||
localStorage.setItem("twister-react-settings",JSON.stringify(appSettings));
|
||||
|
||||
} else {
|
||||
|
||||
@ -240,7 +260,9 @@ if (accounts.length==0) {
|
||||
}
|
||||
});
|
||||
|
||||
Twister.importClientSideAccount("pampalulu","L12kz6tabDN6VmPes1rfEpiznztPF6vgkHp8UZVBgZadxzebHhAp",function(){
|
||||
initializeApp();
|
||||
|
||||
/*Twister.importClientSideAccount("pampalulu","L12kz6tabDN6VmPes1rfEpiznztPF6vgkHp8UZVBgZadxzebHhAp",function(){
|
||||
|
||||
var activeAccount = localStorage.getItem("twister-react-activeAccount");
|
||||
|
||||
@ -264,7 +286,7 @@ if (accounts.length==0) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
*/
|
||||
} else {
|
||||
|
||||
var activeAccount = localStorage.getItem("twister-react-activeAccount");
|
||||
@ -297,4 +319,14 @@ window.onscroll = function(ev) {
|
||||
//alert("scrolled to bottom")
|
||||
window.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
if($("#content").height()<window.innerHeight){
|
||||
var event = new Event('scrolledtobottom');
|
||||
//alert("scrolled to bottom")
|
||||
window.dispatchEvent(event);
|
||||
}
|
||||
|
||||
},1000);
|
||||
|
@ -165,14 +165,14 @@ module.exports = Post = React.createClass({
|
||||
</a>
|
||||
</Col>
|
||||
<Col xs={9} md={9}>
|
||||
<strong>{this.state.fullname}</strong>
|
||||
<strong>{this.state.fullname}</strong>
|
||||
<PostContent content={post.getContent()}/>
|
||||
</Col>
|
||||
<Col xs={1} md={1} className="fullytight text-align-right">{this.state.timeAgo}</Col>
|
||||
</Row>
|
||||
<Row className="nomargin">
|
||||
<Col xs={6} md={6} className="fullytight">
|
||||
{retwist && <small><em> retwisted by {this.state.retwistingUserFullname}</em></small>
|
||||
{retwist && <small><em>retwisted by {this.state.retwistingUserFullname}</em></small>
|
||||
}
|
||||
</Col>
|
||||
<Col xs={4} md={4} className="fullytight text-align-right">
|
||||
|
@ -151,7 +151,10 @@ module.exports = Home = React.createClass({
|
||||
|
||||
this.setInterval(this.updatePosts, this.state.appSettings.pollInterval*1000);
|
||||
|
||||
} else {console.log("active account is null")}
|
||||
} else {
|
||||
window.location.hash="#/settings";
|
||||
console.log("active account is null")
|
||||
}
|
||||
|
||||
},
|
||||
onscrolledtobottom: function () {
|
||||
|
@ -4,6 +4,7 @@ var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
||||
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
||||
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
|
||||
|
||||
var ImportAccountModalButton = require('../other/ImportAccountModalButton.js');
|
||||
|
||||
var ReactBootstrap = require('react-bootstrap')
|
||||
, NavItem = ReactBootstrap.NavItem
|
||||
@ -65,6 +66,7 @@ module.exports = Home = React.createClass({
|
||||
wrapperClassName='col-xs-8' className="settings-host"/>
|
||||
<Input type='submit' value='Save' wrapperClassName='col-xs-offset-10 col-xs-2'/>
|
||||
</form>
|
||||
<ImportAccountModalButton/>
|
||||
</ListGroupItem>
|
||||
</ListGroup>
|
||||
);
|
||||
|
@ -68,7 +68,7 @@ module.exports = Post = React.createClass({
|
||||
<FollowButton activeAccount={this.props.activeAccount} username={this.state.username}/>
|
||||
</Col>
|
||||
<Col xs={8} md={8}>
|
||||
<h4 className="nomargin-top">{this.state.fullname}<small> {'@'+this.state.username}</small></h4>
|
||||
<h4 className="nomargin-top">{this.state.fullname}<small> {'@'+this.state.username}</small></h4>
|
||||
<p className="text-center">{this.state.location}</p>
|
||||
<p className="text-center">{this.state.bio}</p>
|
||||
<p className="text-center"><a href={this.state.url}>{this.state.url}</a></p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user