mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
fixed missing user_id & fix fadeclock
This commit is contained in:
parent
fe6dd9258b
commit
9a123ae190
@ -13,7 +13,7 @@ import cookie from 'cookie_js'
|
||||
export default {
|
||||
namespace: 'app',
|
||||
state: {
|
||||
fadeclock: 1000,
|
||||
fadeclock: 500,
|
||||
splash: {
|
||||
render: true,
|
||||
fadeout: false
|
||||
@ -109,9 +109,21 @@ export default {
|
||||
window.location = callback
|
||||
})
|
||||
|
||||
state.dispatcher({ type: "updateState", payload: { queryDone: true, splash: { render: true, fadeout: state.fadeclock } } })
|
||||
if (state.session_valid) {
|
||||
if (state.session_authframe && state.session_data) {
|
||||
state.dispatcher({ type: "closeSplash" })
|
||||
} else {
|
||||
setTimeout(() => location.reload(), 5000)
|
||||
}
|
||||
} else {
|
||||
state.dispatcher({ type: "closeSplash" })
|
||||
}
|
||||
},
|
||||
*closeSplash({ }, { select }) {
|
||||
const state = yield select(state => state.app)
|
||||
state.dispatcher({ type: "updateState", payload: { queryDone: true, splash: { render: true, fadeout: state.fadeclock } } })
|
||||
setTimeout(() => {
|
||||
state.dispatcher({ type: "updateState", payload: { splash: { render: false, fadeout: false } } })
|
||||
state.dispatcher({ type: "updateState", payload: { splash: { render: false, fadeout: false } } })
|
||||
}, state.fadeclock)
|
||||
},
|
||||
*initHeaderSocket({ callback }, { call, put, select }) {
|
||||
@ -245,6 +257,7 @@ export default {
|
||||
from: "data"
|
||||
},
|
||||
callback: (callbackResponse) => {
|
||||
verbosity([callbackResponse])
|
||||
if (callbackResponse.code == 115) {
|
||||
verbosity(`Cannot update userdata due an data is missing`)
|
||||
return false
|
||||
|
@ -30,6 +30,7 @@ export default {
|
||||
query: {
|
||||
payload: {
|
||||
from: payload.from,
|
||||
user_id: payload.user_id ?? state.app.session_uuid,
|
||||
username: payload.username ?? state.app.session_authframe["username"],
|
||||
userToken: state.app.session_token
|
||||
},
|
||||
|
@ -90,7 +90,7 @@ export default class UserIndexer extends React.Component {
|
||||
promiseState = async state => new Promise(resolve => this.setState(state, resolve));
|
||||
|
||||
componentDidMount(){
|
||||
if (matchRegexp) {
|
||||
if (matchRegexp && this.props.app.session_valid) {
|
||||
this.props.dispatch({
|
||||
type: "user/get",
|
||||
payload: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user