Add a new dashboard page.
This commit is contained in:
parent
89150e1164
commit
fd24b1898e
133 changed files with 17303 additions and 11112 deletions
10
webui/src/boot/_globals.js
Normal file
10
webui/src/boot/_globals.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { APP } from '../_helpers/APP'
|
||||
import Boot from '../_middleware/Boot'
|
||||
|
||||
export default async ({ app, router, store, Vue }) => {
|
||||
Vue.use(Boot)
|
||||
|
||||
APP.root = app
|
||||
APP.router = router
|
||||
APP.store = store
|
||||
}
|
13
webui/src/boot/_hacks.js
Normal file
13
webui/src/boot/_hacks.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Bowser from 'bowser'
|
||||
import vhCheck from 'vh-check'
|
||||
|
||||
const browser = Bowser.getParser(window.navigator.userAgent)
|
||||
|
||||
// In Mobile
|
||||
if (browser.getPlatform().type === 'mobile') {
|
||||
vhCheck()
|
||||
}
|
||||
|
||||
export default async ({ app, Vue }) => {
|
||||
|
||||
}
|
26
webui/src/boot/_init.js
Normal file
26
webui/src/boot/_init.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { APP } from '../_helpers/APP'
|
||||
import errors from '../_helpers/Errors'
|
||||
|
||||
export default async ({ Vue }) => {
|
||||
// Router
|
||||
// ----------------------------------------------
|
||||
APP.router.beforeEach(async (to, from, next) => {
|
||||
// Set APP
|
||||
APP.routeTo = to
|
||||
APP.routeFrom = from
|
||||
next()
|
||||
})
|
||||
|
||||
// Api (axios)
|
||||
// ----------------------------------------------
|
||||
APP.api.interceptors.request.use((config) => {
|
||||
console.log('interceptors -> config', config)
|
||||
// config.headers['Accept'] = '*/*'
|
||||
return config
|
||||
})
|
||||
|
||||
APP.api.interceptors.response.use((response) => {
|
||||
console.log('interceptors -> response', response)
|
||||
return response
|
||||
}, errors.handleResponse)
|
||||
}
|
12
webui/src/boot/api.js
Normal file
12
webui/src/boot/api.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import axios from 'axios'
|
||||
|
||||
import { APP } from '../_helpers/APP'
|
||||
|
||||
// Set config defaults when creating the instance
|
||||
const API = axios.create({
|
||||
baseURL: APP.config.apiUrl
|
||||
})
|
||||
|
||||
export default async ({ app, Vue }) => {
|
||||
Vue.prototype.$api = app.api = APP.api = API
|
||||
}
|
7
webui/src/boot/lodash.js
Normal file
7
webui/src/boot/lodash.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import lodash from 'lodash'
|
||||
|
||||
import { APP } from '../_helpers/APP'
|
||||
|
||||
export default async ({ app, Vue }) => {
|
||||
Vue.prototype.$_ = app._ = APP._ = lodash
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue