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
    1. Home
    2. jaysaurus
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 10
    • Best 0
    • Groups 0

    jaysaurus

    @jaysaurus

    0
    Reputation
    87
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jaysaurus Follow

    Latest posts made by jaysaurus

    • RE: how can I use vuex-electron with quasar?

      @s-molinari said in how can I use vuex-electron with quasar?:

      Did you see the bit about adding the store to the plugin as a way to initialize the plug-in? Not all plug-ins allow for this, but it’s supposed to be a method to get the plug-in “injected” after the store is created. Something like:

      import { createPersistedState, createSharedMutations } from 'vuex-electron'
      
      export default ({ router, store, Vue }) => {
        createPersistedState(store)
        createSharedMutations(store)
      }
      

      It’s a wild guess on my part. 😁

      Scott

      ooh no, that’s a good thing to investigate! I’m sort of at a point now where everything has been refactored to not use the store via the main process so it’s sort of a moot point, but that could well be a solution should other people have problems in future (assuming that it doesn’t quibble about electron since the event-pipeline hasn’t reached loading that at the point at which you create the boot).

      @metalsadman yeah I was defining said store in my electron-main as specified in the instructions. I suspect the actions wont work if you don’t have createSharedMutations().

      posted in Framework
      J
      jaysaurus
    • RE: how can I use vuex-electron with quasar?

      @metalsadman Yeah, that’s what I did! but it doesn’t work! Sorry, Maybe my OP should have been clearer 🙂 I did as the Vuex-electron instructions advised but I get the given error. Most likely this is because Electron needs to be initialised before the store. Unfortunately the quasar event chain runs the other way round!

      posted in Framework
      J
      jaysaurus
    • RE: how can I use vuex-electron with quasar?

      the boot file is the one pictured above

      import { createPersistedState, createSharedMutations } from 'vuex-electron'
      
      export default ({ router, store, Vue }) => {
        store.plugins = store.plugins || []
        store.plugins.push(createPersistedState())
        store.plugins.push(createSharedMutations())
      }
      

      it doesn’t require Vue.use() etc. you’re just declaring plugins in Vuex which - from what i’ve read - basically do a bunch of ipcrenderer/ipcmain calls on your behalf under the hood. It’s handy because you can do Nodejs file IO in vuex stores (that’s basically why I was using it, saves me playing pingpong between renderer and main all the time)

      If memory serves me, I put it in …/src/boot/vue-electron-boot.js

      then I put the relevant ‘vue-electron-boot’ in quasar.conf.js

      I’m not sure it spotted said file actually (I’m using quasar beta at the moment if that has anything to do with it).

      posted in Framework
      J
      jaysaurus
    • RE: how can I use vuex-electron with quasar?

      Looking at the lifecycle of Quasar, and having experimented with the boot, I’m not convinced you’d be able to wire up a boot file in this manner. Remember, the store is initialised just before the boot files are run and Electron is initialised just after. vuex’s complaint is that electron isn’t found in the node modules; given that the store is called first, I don’t think it’ll find the electron for that self-same reason. Even so,

      here’s an example of an initialised store with vuex-electron:

      import Vue from "vue"
      import Vuex from "vuex"
       
      import { createPersistedState, createSharedMutations } from "vuex-electron"
       
      Vue.use(Vuex)
       
      export default new Vuex.Store({
        // ...
        plugins: [
          createPersistedState(),
          createSharedMutations()
        ],
        // ...
      })
      

      The point at which you need to supply the plugins is during the definition of said store, I followed the instructions in the boot doc to the letter and - instead of calling them in the store page - pushed the plugins to the store. Unfortunately, it didn’t make any difference. Not sure, therefore, that there’s a cogent way of implementing this without manually implementing Electron myself 😞

      import { createPersistedState, createSharedMutations } from 'vuex-electron'
      
      export default ({ router, store, Vue }) => {
        store.plugins = store.plugins || []
        store.plugins.push(createPersistedState())
        store.plugins.push(createSharedMutations())
      }
      
      posted in Framework
      J
      jaysaurus
    • RE: how can I use vuex-electron with quasar?

      That simply enables electron 😕 I have electron running just fine but I want to use vuex-electron, a plugin that will allow me to access the store in either thread. I’ve used it with the vue-electron project in the past but it doesn’t seem to be included in Quasar’s variation of said project.

      posted in Framework
      J
      jaysaurus
    • how can I use vuex-electron with quasar?

      I’ve tried to just install it as I would with the default vue-electron build but it can’t find quasar’s electron:

      Cannot find module '/home/<user>/<project>/node_modules/electron'

      Obviously I could install electron but I suspect that wont work.

      posted in Framework
      J
      jaysaurus
    • RE: Security warnings when running in Electron dev mode

      Cool, that’s what I figured but it didn’t hurt to check 🙂

      posted in Starter Kits
      J
      jaysaurus
    • RE: Security warnings when running in Electron dev mode

      I’d like to second this question please.

      posted in Starter Kits
      J
      jaysaurus
    • Electron errors on dev, will they be there when I compile a production version?

      the dev server uses http://Localhost:8080 and serves compiled js using async webpack modules. Nothing wrong with that, however, it leads to the following message:

      Electron Security Warning (Insecure Resources) This renderer process loads resources using insecure
        protocols. This exposes users of this app to unnecessary security risks.
        Consider loading the following resources over HTTPS or FTPS. 
       - http://localhost:8080/app.js
      - http://localhost:8080/1.js
      - http://localhost:8080/0.js
      

      So the million dollar question: is this problem solved when Quasar compiles its production version? Does quasar ensure a security profile that wont expose localhost after the fact? I note that I also had to disable roboto and material-icons. Really, I don’t want a DTA requesting web services unless it has to (and this application reaally doesn’t have to)

      I tried altering the https flag in the quasar.conf.js but the error persists (I’ve seen these dynamic webpack modules before so I imagine they’ll be the culprit)

      Honestly, I’m a little worried that Electron was an afterthought; which would be a shame because I’m quite fond of Quasar

      posted in Help
      J
      jaysaurus
    • Disable ESLint errors

      Hi, the instructions on the site don’t really tell me what I need to know. I would like ESLint to behave as it might behave in a standard Vue 2 instance; ie. I just want it to warn me in the command line if it’s spotted an unused variable etc. There are many times where I’m midway through testing something and I have to comment out swaithes of code. it’s very frustrating.

      posted in Help
      J
      jaysaurus