mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-13 11:31:41 +00:00
changed authentication method
This commit is contained in:
parent
0889a08ee1
commit
4017bd4085
4 changed files with 23 additions and 13 deletions
|
|
@ -29,8 +29,9 @@ export default {
|
|||
const keys = Object.keys(json);
|
||||
let result = [];
|
||||
keys.forEach(function(key){
|
||||
if (json[key].recipients.length > 0 && !json[key].servers)
|
||||
result.push(json[key]);
|
||||
console.log(json[key])
|
||||
if (json[key].recipients && json[key].recipients.length > 0 && !json[key].servers)
|
||||
result.push(json[key]);
|
||||
});
|
||||
|
||||
result.sort(function(a, b){
|
||||
|
|
|
|||
|
|
@ -63,15 +63,7 @@ export const router = new VueRouter({
|
|||
|
||||
Vue.use(
|
||||
VueSocketio,
|
||||
io(config.socketIP, {
|
||||
transportOptions: {
|
||||
polling: {
|
||||
extraHeaders: {
|
||||
authorization: localStorage.getItem("hauthid")
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
io(config.socketIP),
|
||||
{ store }
|
||||
);
|
||||
Vue.use(VueMq, {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,17 @@ const state = {
|
|||
}
|
||||
|
||||
const actions = {
|
||||
socket_authErr(context){
|
||||
context.dispatch('logout')
|
||||
router.push({ path: '/' })
|
||||
},
|
||||
socket_connect() {
|
||||
this._vm.$socket.emit('authentication', {token: localStorage.getItem("hauthid")})
|
||||
},
|
||||
socket_error(context, error) {
|
||||
// if the token is invalid.
|
||||
if (error === "Authentication error") {
|
||||
context.commit('logout')
|
||||
context.dispatch('logout')
|
||||
router.push({ path: '/' })
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,12 +14,22 @@
|
|||
|
||||
const config = [
|
||||
|
||||
{
|
||||
version: 6.6,
|
||||
title: "Performance improvements",
|
||||
shortTitle: "",
|
||||
date: "29/08/2019",
|
||||
headColor: "rgba(25, 130, 255, 0.77)",
|
||||
new: ['Sneak peak of the new "Explore" tab :D (Unfinished)'],
|
||||
fix: [
|
||||
'Improved backend code. This should improve performance.',
|
||||
],
|
||||
},
|
||||
{
|
||||
version: 6.5,
|
||||
title: "Bug fixes",
|
||||
shortTitle: "",
|
||||
date: "22/08/2019",
|
||||
headColor: "rgba(25, 130, 255, 0.77)",
|
||||
fix: [
|
||||
'Fixed a bug where when being scrolled up, new messages would cause it to not load more.',
|
||||
'Fixed a bug where scroll to bottom button wouldnt work'
|
||||
|
|
|
|||
Loading…
Reference in a new issue