|
|
|
@ -42,7 +42,11 @@ var AppSettingsMixin = require('./common/AppSettingsMixin.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({
@@ -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) {
@@ -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) {
@@ -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) {
@@ -264,7 +286,7 @@ if (accounts.length==0) {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
var activeAccount = localStorage.getItem("twister-react-activeAccount"); |
|
|
|
@ -297,4 +319,14 @@ window.onscroll = function(ev) {
@@ -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); |
|
|
|
|