40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
// The Vue build version to load with the `import` command
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
import Vue from 'vue'
|
|
import './assets/scss/app.scss'
|
|
import App from './App'
|
|
import fontawesome from '@fortawesome/fontawesome'
|
|
import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
|
|
import solid from '@fortawesome/fontawesome-free-solid'
|
|
|
|
import BootstrapVue from 'bootstrap-vue'
|
|
|
|
Vue.use(BootstrapVue);
|
|
|
|
fontawesome.library.add(solid);
|
|
|
|
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
|
|
|
Vue.component('formatBytes', {
|
|
render: function (createElement) {
|
|
return createElement(
|
|
'span', formatBytes(this.bytes)
|
|
)
|
|
},
|
|
props: {
|
|
bytes: {
|
|
required: false
|
|
}
|
|
}
|
|
});
|
|
|
|
function formatBytes(a,b){if(0==a)return"0 Bytes";var c=1024,d=b||2,e=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],f=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,f)).toFixed(d))+" "+e[f]}
|
|
|
|
Vue.config.productionTip = true;
|
|
|
|
/* eslint-disable no-new */
|
|
new Vue({
|
|
el: '#app',
|
|
render: h => h(App)
|
|
});
|