Navigation

    Quasar Framework

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jonathan_on
    3. Topics
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 8
    • Best 0
    • Groups 0

    Topics created by jonathan_on

    • jonathan_on

      How listener for Permissions change with capacitor
      Framework • • jonathan_on

      2
      0
      Votes
      2
      Posts
      21
      Views

      metalsadman

      @jonathan_on you cant listen to it if the user did it manually in the settings afaik (for security reasons), but you can check it within your app if you’re missing a permission, the way permission works now differently and it varies on the api lvl of your os. New ones now are shown on demand within the app and i think that’s how capacitor’s permission api works. So what you could do is just check it in your app and show a permission dialog for the ones that are not permitted yet, or check it on demand when the user goes to the page where your app needs permission.

    • jonathan_on

      Prevent Android backbutton using Capacitor not working
      Framework • • jonathan_on

      4
      0
      Votes
      4
      Posts
      146
      Views

      metalsadman

      @jonathan_on before destroy I believe, can’t check atm in mobile, but see Vue lifecycle hook diagram, it’s one of the befores iirc. also see this guide https://quasar.dev/vue-directives/go-back#Introduction. just checked now I meant vue router navigation guard beforeRouteLeave particularly https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards.

      I answered you this in discord: example of what I’ve done on a component that I pop up a dialog when user are leaving the current route (pressing back button, or clicking another route from the drawer).

      beforeRouteLeave (to, from, next) { // okToLeave is just a flag i've set somewhere in this component when a form field has changed etc.. if (this.okToLeave) { // route accordingly next() } else { this.$q.dialog({ title: 'Leaving', message: 'Warning! Changes made in this page cannot be recovered. Are you sure you want to leave?', ok: { flat: true, color: 'warning' }, cancel: { color: 'secondary', flat: true }, persistent: true }).onOk(() => { // route accordingly next() }).onCancel(() => { // cancel route and stay in the same page. next(false) }) } }
    • jonathan_on

      Q-toggle does not accept custom color
      Framework • • jonathan_on

      1
      0
      Votes
      1
      Posts
      13
      Views

      No one has replied

    • jonathan_on

      Setting dark mode does not save, always returns to automatic when reopening the app
      Framework • • jonathan_on

      6
      0
      Votes
      6
      Posts
      73
      Views

      jonathan_on

      @metalsadman Sorry! In any way, both in the browser when refreshing and in the device, closing and opening again. But I followed your tip, thanks.