Right after posting the question, I found the answer.
this.$router.push('/xxxxx')
did the trick.
Thank you for reading.
Right after posting the question, I found the answer.
this.$router.push('/xxxxx')
did the trick.
Thank you for reading.
@benoitranque So, I took a look now. This is exactly what I was looking for. Thank you so much.
Hi Quasar-Community,
I know, this is primarily a Cordova
related problem, but I just don’t know, what to do on the Quasar
side.
Currently I try to integrate markmarijnissen/cordova-file-cache plugin
into my app. Is anyone here, who used this already and has a primitive working example for me, just to see how to use it inside my app?
Or is there a better way to cache files on my device?
Is this generally possible?
Would be great if anyone could share his experience with me.
Thanks for your time.
@rafaelbtz said in Push-notification with Quasar and FCM:
Edit .eslintrc.js file and add ‘FCMPlugin’: true, in global list, result:
globals: {
‘cordova’: true,
‘FCMPlugin’: true,
‘DEV’: true,
‘PROD’: true,
‘__THEME’: true
},
Hi,
I’ve got the same problem as @felixis. This one did not work for me.
I only find information about how to get the cordova-plugin-fcm
installed, but there is no information about how to import the FCMPlugin
into the Quasar
-App.
Of course, there are information about the pure usage. But somehow, I need to get the plugin inside my app code.
I see, the problem was, that I put the Event-Listener into the mounted()
function. I put it into created()
and unsubscribed the event in beforeDestroy()
.
Everything works fine now.
created () {
Events.$on('logout', response => {
this.showLogoutAlert()
})
},
beforeDestroy () {
Events.$off('logout')
}
This does the trick for me.
Hi @benoitranque,
I use a component called Sidelinks.vue
. The function logout()
is called here.
Part of the template (also from Sidelinks.vue
)
<q-item @click="logout">
<q-item-side icon="lock"/>
<q-item-main label="Abmelden" sublabel=""/>
</q-item>
Script from Sidelinks.vue
import {
QList,
QSideLink,
QItemSide,
QItemMain,
QListHeader,
QItemSeparator,
QItem,
Events
} from 'quasar'
import Helpers from '../Helpers.vue'
export default {
mixins: [Helpers],
components: {
QList,
QSideLink,
QItemSide,
QItemMain,
QListHeader,
QItemSeparator,
QItem
},
data () {
return {
loggedIn: false
}
},
mounted () {
this.loggedIn = this.isUserLoggedIn()
Events.$on('logout', response => {
this.loggedIn = response.loggedIn
})
}
}
logout()
is imported from Helpers.vue
which is used as mixin
logout: function () {
LocalStorage.remove('private_access_token')
Events.$emit('logout', {
loggedIn: false
})
}
This is from Layout.vue
(the parent layout)
mounted () {
this.changeColors()
Events.$on('logout', response => {
this.showLogoutAlert()
})
}
When I click on logout, the alert is shown multiple times and one above the other. So the one is hiding the other and when I tab the cross, it disappears and others are still visible until is dismiss them all.
Hi,
somehow I’ve got some problems with Alerts
.
A user is logged in to a server. When he’s going to logout, an event is gone to be fired:
LocalStorage.remove('private_access_token')
Events.$emit('logout', {
loggedIn: false
})
So far so good. Everthing works fine.
In my Layout.vue
file the event handler does its work:
Events.$on('logout', response => {
// some logic
this.showLogoutAlert()
})
The function showLogoutAlert()
does the following:
showLogoutAlert () {
Alert.create({
enter: 'bounceInRight',
leave: 'bounceOutRight',
color: 'positive',
icon: 'lock',
html: `Sie wurden erfolgreich abgemeldet`,
position: 'top-right'
})
}
In another part of the code, another event is fired, when a user changes the password:
Events.$emit('passwordChange', {
showModal: false
})
The event handler does following:
Events.$on('passwordChange', response => {
this.showPasswordModal = response.showModal
this.showPassChangedAlert()
})
And the function showPassChangedAlert()
contains the following code:
showPassChangedAlert () {
Alert.create({
enter: 'bounceInRight',
leave: 'bounceOutRight',
color: 'positive',
icon: 'update',
html: `Das Passwort wurde geändert`,
position: 'top-right'
})
}
When the user is logged out. The alert appears. The little cross is tabbed and the alert disappears. Great!
But when the user does another login and goes to change the password, then the alert for the password change and the previous logout-alert show.
I really have no idea, why this is happening. May someone can help me please?
Thank you for your time.
Michael
Hi,
I’m new in building Electron Apps. So I made my first steps and a test build for Windows. Everything works fine so far.
I changed the icons within the icons folder. The icon that I see in the title bar changes. But the icon of the .exe-file
does not.
Is anyone here, who had the same issue?
Thank you very much.
Michael
@benoitranque So, I took a look now. This is exactly what I was looking for. Thank you so much.
@benoitranque thank you for your answer and time. I will try this solution this evening and revert after that.
Hi,
I’ve got the following problem:
I intend to use the side menu as the primary navigation and want to use tabs inside the navigation slot for sub routes (sub pages). So some pages with sub routes shall contain tabs and those without shall not.
I could load different layouts, but I guess it’s not really best practice.
Is there a proper way to realize this?
Thank you very much.
And Merry Christmas!