2020-12-17 17:11:01 +00:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import Vue from 'vue';
|
2020-12-21 15:54:27 +00:00
|
|
|
import Router from 'vue-router';
|
2020-12-17 17:11:01 +00:00
|
|
|
|
|
|
|
import App from '@/app/App.vue';
|
2020-12-21 15:54:27 +00:00
|
|
|
import { router } from '@/app/router';
|
2020-12-23 17:21:23 +00:00
|
|
|
import { store } from '@/app/store';
|
2021-01-04 18:17:00 +00:00
|
|
|
import { Currency } from '@/app/utils/currency';
|
|
|
|
import { Size } from '@/app/utils/size';
|
2020-12-17 17:11:01 +00:00
|
|
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
2020-12-21 15:54:27 +00:00
|
|
|
Vue.use(Router);
|
|
|
|
|
2021-01-04 18:17:00 +00:00
|
|
|
/**
|
|
|
|
* centsToDollars is a Vue filter that converts amount of cents in dollars string.
|
|
|
|
*/
|
|
|
|
Vue.filter('centsToDollars', (cents: number): string => {
|
|
|
|
return Currency.dollarsFromCents(cents);
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Converts bytes to base-10 size.
|
|
|
|
*/
|
|
|
|
Vue.filter('bytesToBase10String', (amountInBytes: number): string => {
|
|
|
|
return Size.toBase10String(amountInBytes);
|
|
|
|
});
|
|
|
|
|
2020-12-21 15:54:27 +00:00
|
|
|
const app = new Vue({
|
|
|
|
router,
|
2020-12-23 17:21:23 +00:00
|
|
|
store,
|
2020-12-17 17:11:01 +00:00
|
|
|
render: (h) => h(App),
|
2020-12-21 15:54:27 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.$mount('#app');
|