fixes update notification not showing up

This commit is contained in:
matteo.cominetti
2020-01-28 16:20:22 +00:00
parent ea0a0da224
commit 8bf31c7784
3 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -9,9 +9,9 @@
<v-spacer></v-spacer>
<!-- NOTIFICATION -->
<v-tooltip bottom>
<v-tooltip bottom v-if="client.expired">
<template v-slot:activator="{ on }">
<v-icon class="mr-2" v-on="on" color="red" small v-if="client.expired">lens</v-icon>
<v-icon class="mr-2" v-on="on" color="red" small >lens</v-icon>
</template>
<span>This stream has updates that can be received</span>
</v-tooltip>
+2 -2
View File
@@ -20,9 +20,9 @@
<v-spacer></v-spacer>
<!-- NOTIFICATION -->
<v-tooltip bottom>
<v-tooltip bottom v-if="client.expired">
<template v-slot:activator="{ on }">
<v-icon class="mr-2" v-on="on" color="red" small v-if="client.expired">lens</v-icon>
<v-icon class="mr-2" v-on="on" color="red" small>lens</v-icon>
</template>
<span>This stream has updates that can be sent</span>
</v-tooltip>
+2 -4
View File
@@ -190,12 +190,10 @@ export default new Vuex.Store( {
// note: real update, with all the heavy object lifting, happens in .NET
let res = await Axios.get( `${client.account.RestApi}/streams/${client.streamId}?fields=name,updatedAt`, { headers: { Authorization: client.account.Token } } )
console.log( res.data.resource )
let cl = { _id: res.data.resource._id, name: res.data.resource.name, updatedAt: res.data.resource.updatedAt }
console.log( expire )
if ( expire ) cl.expired = true
let cl = { _id: res.data.resource._id, name: res.data.resource.name, updatedAt: res.data.resource.updatedAt, expired: expire }
context.commit( 'SET_CLIENT_DATA', cl )
let stateClient = context.state.clients.find( cl => cl._id === cl._id )
UiBindings.ClientUpdated( JSON.stringify( stateClient ) ); // propagate to ui, in case something can be done there
//UiBindings.ClientUpdated( JSON.stringify( stateClient ) ); // propagate to ui, in case something can be done there
} ),
flushClients: ( context ) => new Promise( async( resolve, reject ) => {