Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 })
}
}
},
showToast () {
Toast.create((Platform.is.desktop ? 'Clicked' : 'Tapped') + ' on a Popover item')
}
}
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,
showToast () {
this.$q.notify((Platform.is.desktop ? 'Clicked' : 'Tapped') + ' on a Popover item')
}
}
data () {
return {
orienting: window.DeviceOrientationEvent && !Platform.is.desktop,
rotating: window.DeviceMotionEvent && !Platform.is.desktop,
moveX: 0,
moveY: 0,
rotateY: 0,
rotateX: 0
}
},
computed: {
data () {
return {
orienting: window.DeviceOrientationEvent && !Platform.is.desktop,
rotating: window.DeviceMotionEvent && !Platform.is.desktop,
moveX: 0,
moveY: 0,
rotateY: 0,
rotateX: 0
}
},
computed: {
const IssueTabsIfMobile = () => Platform.is.mobile ? import('@/issues/components/IssueTabs') : Promise.resolve({ render: () => null })
const IssueList = () => import('@/issues/pages/IssueList')
heightSize (){
if (Platform.is.desktop) {
return 'items-center'
}
return ''
},
finalBgColor () {
loadConfig () {
let result = Platform.is.desktop
? this.loadConfigFromNativeStore()
: this.loadConfigFromLocalStorage()
result = changeKeysToCamelCase(result)
this.config = result
}