|
|
@ -42,7 +42,11 @@ var AppSettingsMixin = require('./common/AppSettingsMixin.js'); |
|
|
|
|
|
|
|
|
|
|
|
App = React.createClass({ |
|
|
|
App = React.createClass({ |
|
|
|
|
|
|
|
|
|
|
|
mixins: [AppSettingsMixin,SetIntervalMixin,SafeStateChangeMixin], |
|
|
|
mixins: [ |
|
|
|
|
|
|
|
AppSettingsMixin, |
|
|
|
|
|
|
|
SetIntervalMixin, |
|
|
|
|
|
|
|
SafeStateChangeMixin, |
|
|
|
|
|
|
|
EventListenerMixin('newaccountbyuser')], |
|
|
|
|
|
|
|
|
|
|
|
contextTypes: { |
|
|
|
contextTypes: { |
|
|
|
router: React.PropTypes.func |
|
|
|
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 () { |
|
|
|
getInitialState: function () { |
|
|
|
|
|
|
|
|
|
|
|
var state={}; |
|
|
|
var state={}; |
|
|
@ -212,9 +228,13 @@ if (accounts.length==0) { |
|
|
|
pollInterval:60, |
|
|
|
pollInterval:60, |
|
|
|
pollIntervalProfile: 3600, |
|
|
|
pollIntervalProfile: 3600, |
|
|
|
ignoredUsers: "nobody", |
|
|
|
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 { |
|
|
|
} 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"); |
|
|
|
var activeAccount = localStorage.getItem("twister-react-activeAccount"); |
|
|
|
|
|
|
|
|
|
|
@ -264,7 +286,7 @@ if (accounts.length==0) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
*/ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
var activeAccount = localStorage.getItem("twister-react-activeAccount"); |
|
|
|
var activeAccount = localStorage.getItem("twister-react-activeAccount"); |
|
|
@ -297,4 +319,14 @@ window.onscroll = function(ev) { |
|
|
|
//alert("scrolled to bottom")
|
|
|
|
//alert("scrolled to bottom")
|
|
|
|
window.dispatchEvent(event); |
|
|
|
window.dispatchEvent(event); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setInterval(function(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($("#content").height()<window.innerHeight){ |
|
|
|
|
|
|
|
var event = new Event('scrolledtobottom'); |
|
|
|
|
|
|
|
//alert("scrolled to bottom")
|
|
|
|
|
|
|
|
window.dispatchEvent(event); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},1000); |
|
|
|