No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Trying to implement Vue PWA Install

    Help
    3
    8
    639
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zeppelinexpress last edited by

      All I want is have a button to call pwa installer on browsers, but how I am new using quasar/vue, so I’m having some difficulty.
      https://github.com/Bartozzz/vue-pwa-install <- here is clear documentation… but I don’t know how I do in quasar, what is this line deferredPrompt: BeforeInstallPromptEvent | void;

      I need a button <q-btn @click=“install()”> Install pwa </q-btn>
      and a method install() like the documentation

      1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel last edited by dobbel

        @zeppelinexpress

        1. installation instructions( use yarn for Quasar local dependencies, use npm for global libraries, for now use node v12.x):

        yarn add vue-pwa-install

        1. then read the Quasar doc about boot files.

        https://quasar.dev/quasar-cli/boot-files#When-to-use-boot-files

        1. create a boot file to register the pwa install component:
        // src/boot/vuePwaInstall.js
        import VuePwaInstallPlugin from "vue-pwa-install";
        Vue.use(VuePwaInstallPlugin);
        
        1. add the boot file to quasar.conf in the boot section:
        // quasar.conf.js
        boot: [
               'vuePwaInstall'
            ],
        
        1. Now you can use the pwa install component inside a Quasar app. I would use this code inside a Quasar page/component to get going.

        https://github.com/Bartozzz/vue-pwa-install#inside-a-component

        Tip 1: read the entire Quasar doc at least once.

        Tip 2: Also this is semi-advanced quasar/pwa/web-api stuff. Not an ideal starting point for new Vue/Quasar devs.

        Tip 3: Here’s a Quasar Pwa Udemy course that will help a lot when creating a pwa app in Quasar:
        https://www.udemy.com/course/pwa-with-vuejs-quasar-firebase/

        1 Reply Last reply Reply Quote 1
        • Z
          zeppelinexpress last edited by

          thanks @dobbel

          1 Reply Last reply Reply Quote 0
          • Z
            zeppelinexpress last edited by zeppelinexpress

            @dobbel
            I tried to copy from docs, but this line:
            deferredPrompt: BeforeInstallPromptEvent | void;
            and this line:
            this.$on(“canInstall”, (event: BeforeInstallPromptEvent) => {
            shows syntax error…
            where I paste “deferredPrompt: BeforeInstallPromptEvent | void;”?

            dobbel 1 Reply Last reply Reply Quote 0
            • dobbel
              dobbel @zeppelinexpress last edited by

              @zeppelinexpress

              It’s a typescript example. Convert it to normal ES6 JS.

              1 Reply Last reply Reply Quote 1
              • C
                charlieknoll last edited by

                I have a site using Quasar/PWA, here’s the source code:

                https://github.com/charlieknoll/photo-frame-pwa

                and here are some dev tips:

                https://github.com/charlieknoll/photo-frame-pwa/blob/master/src/markdown/readme-dev.md

                1 Reply Last reply Reply Quote 2
                • Z
                  zeppelinexpress last edited by zeppelinexpress

                  thank you guys! @dobbel @charlieknoll I have not seen that was typescript, I don’t know typescript, so I was not able to mirror the docs… and another problem it was because I was using firefox, don’t know why in chrome works perfectly! thanks anyway, sorry for the beginners questions, that code was weird to me and I don’t pay attention to see that was typescript 😕 … @charlieknoll I’m reading your source code! thank you… your tips are awesome

                  dobbel 1 Reply Last reply Reply Quote 0
                  • dobbel
                    dobbel @zeppelinexpress last edited by

                    @zeppelinexpress

                    pwa’s are not installable on firefox

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post