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. paul
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 35
    • Posts 99
    • Best 11
    • Groups 0

    paul

    @paul

    18
    Reputation
    819
    Profile views
    99
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    paul Follow

    Best posts made by paul

    • RE: Dockerizing Quasar app for production

      Following dockerfile uses a 2 stage approach for building a quasar 0.15 app.
      2 stage means that the first stage will only build the sources and stage 2 is for hosting the SPA in an nginx container.

      # Build stage
      FROM node AS buildenv
      
      WORKDIR /generator
      
      ENV projectName "MyQuasarProjectFolder"
      # restore
      
      # copy src
      
      COPY ./${projectName}/package.json .
      COPY ./${projectName} .
      #RUN npm install -g quasar-cli
      
      RUN npm install
      
      RUN node node_modules/quasar-cli/bin/quasar-build
      
      # Runtime stage
      
      FROM nginx
      ENV projectName "MyQuasarProjectFolderr"
      COPY --from=buildenv /generator/dist/spa-mat /usr/share/nginx/html
      COPY ./${projectName}/default.conf /etc/nginx/conf.d/default.conf
      
      EXPOSE 80
      

      The additional default.conf file is nginx specific:

      # based on https://gist.github.com/szarapka/05ba804dfd1c10ad47bf
      server {
          listen       80;
          server_name  localhost;
      
          location / {
              root   /usr/share/nginx/html;
              index  index.html index.htm;
              try_files $uri $uri/ @rewrites;
          }
      
          location @rewrites {
          rewrite ^(.+)$ /index.html last;
        }
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   /usr/share/nginx/html;
          }
      
      }
      
      posted in Help
      P
      paul
    • RE: Documentation

      @fabio Thanks. Note that " … please fix it !" is a kind of directive which is 100% incompatible with open source development.
      Maybe what can help you is to imagine that the people reading your text are standing in front of you.

      Apart from that, I think that both content and presentation of the documentation is extraordinary.

      posted in Framework
      P
      paul
    • sharing my docker 2 stage build for production with yarn.

      For quasar pre-V1, I was using an approach with docker to publish my apps.
      for V1, this approach gave some issues. Maybe useful for other devs, so here is my new docker file:

      # Build stage
      FROM node:8 AS buildenv
      
      ENV YARN_VERSION 1.13.0
      
      RUN curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
          && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
          && ln -snf /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
          && ln -snf /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
          && rm yarn-v$YARN_VERSION.tar.gz
      
      WORKDIR /generator
      ENV projectName "my-project"
      COPY ./${projectName}/package.json .
      COPY ./${projectName}/yarn.lock .
      RUN yarn
      COPY ./${projectName} .
      RUN node node_modules/@quasar/app/bin/quasar-build
      # Runtime stage
      FROM nginx
      ENV projectName "my-project"
      COPY --from=buildenv /generator/dist/spa /usr/share/nginx/html
      # COPY ./${projectName}/default.conf /etc/nginx/conf.d/default.conf --> in case you want nginx specific conf
      
      EXPOSE 80
      
      

      Some remarks:

      • I run into something very strange when i used npm (with quasar V1) on docker: npm didn’t pick up the latest quasar node_modules. So, that’s why i moved to yarn in the docker file.
      • the docker file explicitely installs a version of yarn specified in the docker file.
      • I needed to downgrade to node:8
      • No need to install @quasar/cli in the docker container !

      Please provide feedback in case you see potential improvements.
      cheers

      posted in Framework
      P
      paul
    • RE: Store is no longer accessible in router.

      solved.
      When implementing the beforeEach in a plugin, it works 🙂

      export default ({ router, store, Vue }) => {
        router.beforeEach((to, from, next) => {
          console.log('before each')
          debugger
          console.log(store.state.example.test)
          next()
        })
      }
      
      posted in Framework
      P
      paul
    • Doing elastic search in the browser (without heavy server side elastic search)

      http://blog.opinionatedapps.com/posts/a-pure-client-side-elastic-search-solution-with-vuejs/
      (blog has link to sources).
      demo: http://blog.opinionatedapps.com/ItemsJs-Vue-Demo/

      cheers
      paul.

      posted in Show & Tell
      P
      paul
    • RE: @quasar/typescript preview Available

      @nothingismagick .
      Thanks for this. Great work.
      A lot of new things in this area when Vue v3 arrives.

      posted in [v1] App Extensions
      P
      paul
    • RE: Routes break in production when enabling HTML5 history mode

      I ran recently into same trouble with nginx when using child routes.
      So main routes worked perfectly , but not routes with 2 params in it.
      I’m using following nginx config:
      location / {
      root /usr/share/nginx/html;
      index index.html index.htm;
      try_files $uri $uri/ @rewrites;
      }

      location @rewrites {
      rewrite ^(.+)$ /index.html last;
      

      }

      But the most important update i did was in the config.index.js file:
      publicPath: ‘/’, for the PRODUCTION. section

      posted in Help
      P
      paul
    • RE: q-data-table: responsive columns break when in dist mode though work perfect in 'debug'

      Thanks. I proceed per your suggestion. Looking forward to all goodness in 0.14.

      posted in Framework
      P
      paul
    • Different Layout based on screen form factors

      I want a screen based on common components that has a different layout when it’s run a small form factors.
      More concrete on larger screens I want a screen that has 2 columns for visualizing master detail structure, left column is a list with master data, right column is the detail data.
      On smaller screens I only want to visualize the master data (so, the left column but full screen) and a ‘row click’ should navigate to a dedicated detail screen.
      I’m currently doing this with the javascript platform detection which I can use both the in the html and javascript.
      So e.g. for the logic of the master/detail:
      <div :class="{'col-4': $q.platform.is.desktop, 'col-12':!$q.platform.is.desktop}">
      and inside javascript I can provide dedicated handling for a row click in the master list:

       projectItemClicked(item) {
            if (this.$q.platform.is.desktop) {
              if (!canSave) {
                this.selected = item
              }
            } else {
              this.$router.push({ name: 'OrderItemEdit', params: { id: item.id, parentId: this.parentId } })
            }
          },
      

      This works nice but I’m evaluating another approach.
      The drawback of the above approach is that I can only make distinction desktop/non-desktop.

      • on large tablets I also get the one column layout
      • when a destkop uses a small browser window, the layout is still in 2 columns.

      I’m aware that flexbox could help here but I’m not understanding how exactly.
      With flexbox I could make sure that on small form factors the 2 columns are transposed to rows. Not completely what I want because on small form factors I don’t want to see the second column.
      How could I make logic decisions in javascript (as above)?
      thanks for the guidance.
      paul.

      posted in Framework
      P
      paul
    • RE: Access the store in routes.js to use navigation guards

      @Hawkeye64 solved. see: https://forum.quasar-framework.org/topic/2825/store-is-no-longer-accessible-in-router/4
      Thanks for the help.

      posted in Framework
      P
      paul

    Latest posts made by paul

    • Full screen menu overlay by means of q-drawer

      Would it be possible to get the same effect as here:
      https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_overlay
      with the q-drawer component?
      I mean, I can copy that that, but i want to use as much as possible of the quasar goodness.

      Thanks
      paul.

      posted in Framework
      P
      paul
    • RE: How to vertically centering a single line or component? (SOLVED!)

      @a47ae Very nice, the variable $top-bar-height is that something that is available automatically?

      posted in Help
      P
      paul
    • RE: Is support for storybook for a quasar-cli app possible?

      @thibautguedou3 This is working great, thanks again.
      I’m using ES6 instead of typescript.
      This is the webpack config for ES6:

      const path = require('path')
      
      module.exports = ({ config }) => {
        config.module.rules.push({
          test: /\.(scss|sass)$/,
          use: ['style-loader', 'css-loader', 'sass-loader'],
          include: path.resolve(__dirname, '../')
        })
        config.module.rules.push({
          test: /\.stories\.jsx?$/,
          loaders: [require.resolve('@storybook/source-loader')],
          enforce: 'pre'
        })
      
        return config
      }
      posted in Framework
      P
      paul
    • RE: Is support for storybook for a quasar-cli app possible?

      @thibautguedou3 thanks Thibaut. Will take a look.

      posted in Framework
      P
      paul
    • RE: Quasar build fails when project is created on windows machine - check in source control -opened on linux

      Everyone using docker will run into this problem when the original sources are created on Windows.

      posted in Framework
      P
      paul
    • Quasar build fails when project is created on windows machine - check in source control -opened on linux

      I’m using the very latest bits.
      When I create a quasar project (quasar -cli based) on my windows machine. Quasar build: OK.
      when I check in the sources, and load them on a linux machine (same quasar cli), quasar build gives following error.

      Module not found: Error: Can't resolve 'pages/Index.vue' in '/home/paul/tfs-kuub/MyProject/src/router'
       @ ./src/router/routes.js 13:13-38
       @ ./src/router/index.js
       @ ./.quasar/app.js
       @ ./.quasar/client-entry.js
       @ multi ./.quasar/client-entry.js
      
      
       app:build [FAIL] Build failed with errors. Check log above. +0ms
      

      When I create the project directly on the linux box: quasar build: OK.

      Black magic 🙂

      posted in Framework
      P
      paul
    • RE: Is there a way to set the size of the Q-toggle

      @pintaf thanks a lot !

      posted in Framework
      P
      paul
    • RE: Is support for storybook for a quasar-cli app possible?

      @s-molinari Thanks for the help. Indeed, that’s theoretical. Just like adding typescript to a quasar app boils down to ‘npm install typescript’, just theoretical 🙂
      I think there is more involved than that.
      But thanks a lot for getting the right persons involved to put it on the shortlist for adding it to the brilliant quasar testing support. thanks @digiproduct for your support.
      cheers.

      posted in Framework
      P
      paul
    • Is support for storybook for a quasar-cli app possible?

      https://storybook.js.org/docs/guides/guide-vue/

      For a vue-cli app following plugin works like a charm:
      https://github.com/storybooks/vue-cli-plugin-storybook

      Unfortunately, I’m using quasar-cli…

      posted in Framework
      P
      paul
    • V-touch repeat not working since upgrade to Beta 13

      I upgraded to beta 13 and buttons using v-touch repeat aren’t working any longer.
      Is there something I need to upgrade?

      posted in Framework
      P
      paul