How to use the quasar.Platform.is function in quasar

To help you get started, we’ve selected a few quasar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yunity / karrot-frontend / src / messages / datastore / detail.js View on Github external
routeEnter ({ dispatch, rootGetters }, { groupId, placeId, pickupId, userId, messageId, routeTo }) {
      if (pickupId) {
        dispatch('selectPickup', pickupId)
        if (!Platform.is.mobile) {
          // On desktop we don't have a pickup detail page, we go to the place page, and have a sidebar open
          throw createRouteRedirect({ name: 'place', params: { groupId, placeId }, query: routeTo.query })
        }
      }
      else if (userId) {
        // conversation with yourself is not implemented
        if (rootGetters['auth/userId'] !== userId) {
          dispatch('selectUser', userId)
          if (!Platform.is.mobile) {
            // On desktop we don't have a user detail page, we go to the user page, and have a sidebar open
            throw createRouteRedirect({ name: 'user', params: { userId }, query: routeTo.query })
          }
          dispatch('users/selectUser', { userId }, { root: true })
        }
        else {
          throw createRouteRedirect({ name: 'user', params: { userId }, query: routeTo.query })
        }
      }
      else if (messageId) {
        dispatch('selectThread', messageId)
        if (!Platform.is.mobile) {
          throw createRouteRedirect({ name: 'group', params: { groupId }, query: routeTo.query })
        }
      }
    },
github quasarframework / quasar-play / src / components / showcase / web-components / popover.vue View on Github external
showToast () {
      Toast.create((Platform.is.desktop ? 'Clicked' : 'Tapped') + ' on a Popover item')
    }
  }
github hugetiny / negibox / src / api / Api.js View on Github external
import { remote } from 'electron'
import { isEmpty } from 'lodash'
import Aria2 from 'aria2'
import { Platform } from 'quasar'
import {
  separateConfig,
  compactUndefined,
  formatOptionsForEngine,
  mergeTaskResult,
  changeKeysToCamelCase,
  changeKeysToKebabCase
} from 'src/shared/utils'

let application
if (Platform.is.desktop) {
  application = remote.getGlobal('application')
}

export default class Api {
  constructor (options = {}) {
    this.options = options

    this.client = null
    this.loadConfig()
    const {
      rpcListenPort: port,
      rpcSecret: secret
    } = this.config
    const host = '127.0.0.1'
    this.client = new Aria2({
      host,
github quasarframework / quasar-starter-kit / template / src / pages / demo / popover.vue View on Github external
showToast () {
      this.$q.notify((Platform.is.desktop ? 'Clicked' : 'Tapped') + ' on a Popover item')
    }
  }
github quasarframework / quasar-template-default / template / src / components / Index.vue View on Github external
data () {
    return {
      orienting: window.DeviceOrientationEvent && !Platform.is.desktop,
      rotating: window.DeviceMotionEvent && !Platform.is.desktop,
      moveX: 0,
      moveY: 0,
      rotateY: 0,
      rotateX: 0
    }
  },
  computed: {
github quasarframework / quasar-template-pwa / template / src / components / Index.vue View on Github external
data () {
    return {
      orienting: window.DeviceOrientationEvent && !Platform.is.desktop,
      rotating: window.DeviceMotionEvent && !Platform.is.desktop,
      moveX: 0,
      moveY: 0,
      rotateY: 0,
      rotateX: 0
    }
  },
  computed: {
github yunity / karrot-frontend / src / base / routes / main.js View on Github external
const IssueTabsIfMobile = () => Platform.is.mobile ? import('@/issues/components/IssueTabs') : Promise.resolve({ render: () => null })
const IssueList = () => import('@/issues/pages/IssueList')
github odranoelBR / vue-quasar-admin-example / src / components / views / login / login-one.vue View on Github external
heightSize (){
        if (Platform.is.desktop) {
          return 'items-center'
        }
        return ''
      },
      finalBgColor () {
github hugetiny / negibox / src / api / Api.js View on Github external
loadConfig () {
    let result = Platform.is.desktop
      ? this.loadConfigFromNativeStore()
      : this.loadConfigFromLocalStorage()

    result = changeKeysToCamelCase(result)
    this.config = result
  }