Giter Club home page Giter Club logo

wails-template-quasar-js's Introduction

Wails Template Quasar (JS)

About

  • This project is a template for wails
  • It utilizes the quasar framework.
  • To generate the frontend the following quasar options were used
    • Quasar V2 (Vue 3)
    • Javascript
    • Quasar App CLI with Vite
    • Sass with SCSS syntax
    • ESLint + Pinia
    • Prettier ESLint preset

Live Development

To run in live development mode, run wails dev in the project directory. In another terminal, go into the frontend directory and run npm run dev. The frontend dev server will run on http://localhost:34115. Connect to this in your browser and connect to your application.

Note: The quasar dev server is manually configured to run on port :5173 in order to properly work with wails. If this needs to be changed, please adjust the quasar.conf.js and wails.json with the new port

Building

To build a redistributable, production mode package, use wails build.

wails-template-quasar-js's People

Contributors

sgosiaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

amos-lsl pschen

wails-template-quasar-js's Issues

How to access wails runtime?

Hi @sgosiaco

Thanks for putting this together. I've just (yesterday) discovered Wails, but been using Quasar for a couple of years no, so this is fantastic.

I'm having problems using the wails runtime events though.

At the moment, my initial proof-of-concept page is:

<template>
  <q-page class="row items-center justify-evenly"> Dashboard </q-page>
</template>

<script setup lang="ts">
import { onMounted } from 'vue';

onMounted(() => {
  try {
    window.runtime.EventsOn('test', function (data) {
      console.log('Timer', data);
    });
  } catch (err) {
    console.log('Error', err);
  }
});
</script>

But windows.runtime is undefined.

I've tried a few things to get round this:

First:
import * as runtime from "../../wailsjs/runtime/runtime"

This results in the EventsOn function failing with: Cannot read properties of undefined (reading 'EventsOnMultiple')

Second:
import than assign to windows:

window.runtime = runtime;```

This results in a recursive loop and maximum call stack reached.


Do you have an example of the runtime being available within Quasar? I've seen a vanilla vue project template as well, and that uses window.runtime but again I can't see any point where the runtime is specifically attached to the window.

Any help would be MUCH appreciated!

Regards,
Andy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.