UNPKG

sce-component

Version:

27 lines (22 loc) 530 B
// import Platform from '../features/platform' // import Dialog from '../components/dialog/dialog' import { Dialog, Platform } from 'quasar' /* istanbul ignore next */ export default (url) => { if (Platform.is.cordova) { navigator.app.loadUrl(url, { openExternal: true }) return } let win = window.open(url, '_blank') if (win) { win.focus() } else { Dialog.create({ title: 'Cannot Open Window', message: 'Please allow popups first, then please try again.' }).show() } }