mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-07-03 01:50:39 +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);
|
const keys = Object.keys(json);
|
||||||
let result = [];
|
let result = [];
|
||||||
keys.forEach(function(key){
|
keys.forEach(function(key){
|
||||||
if (json[key].recipients.length > 0 && !json[key].servers)
|
console.log(json[key])
|
||||||
result.push(json[key]);
|
if (json[key].recipients && json[key].recipients.length > 0 && !json[key].servers)
|
||||||
|
result.push(json[key]);
|
||||||
});
|
});
|
||||||
|
|
||||||
result.sort(function(a, b){
|
result.sort(function(a, b){
|
||||||
|
|
|
||||||
|
|
@ -63,15 +63,7 @@ export const router = new VueRouter({
|
||||||
|
|
||||||
Vue.use(
|
Vue.use(
|
||||||
VueSocketio,
|
VueSocketio,
|
||||||
io(config.socketIP, {
|
io(config.socketIP),
|
||||||
transportOptions: {
|
|
||||||
polling: {
|
|
||||||
extraHeaders: {
|
|
||||||
authorization: localStorage.getItem("hauthid")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
{ store }
|
{ store }
|
||||||
);
|
);
|
||||||
Vue.use(VueMq, {
|
Vue.use(VueMq, {
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,17 @@ const state = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
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) {
|
socket_error(context, error) {
|
||||||
// if the token is invalid.
|
// if the token is invalid.
|
||||||
if (error === "Authentication error") {
|
if (error === "Authentication error") {
|
||||||
context.commit('logout')
|
context.dispatch('logout')
|
||||||
router.push({ path: '/' })
|
router.push({ path: '/' })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,22 @@
|
||||||
|
|
||||||
const config = [
|
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,
|
version: 6.5,
|
||||||
title: "Bug fixes",
|
title: "Bug fixes",
|
||||||
shortTitle: "",
|
shortTitle: "",
|
||||||
date: "22/08/2019",
|
date: "22/08/2019",
|
||||||
headColor: "rgba(25, 130, 255, 0.77)",
|
|
||||||
fix: [
|
fix: [
|
||||||
'Fixed a bug where when being scrolled up, new messages would cause it to not load more.',
|
'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'
|
'Fixed a bug where scroll to bottom button wouldnt work'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue