2020-12-24 16:37:38 -09:00
|
|
|
import Vue from "vue";
|
|
|
|
|
import App from "./App.vue";
|
|
|
|
|
import vuetify from "./plugins/vuetify";
|
|
|
|
|
import store from "./store/store";
|
|
|
|
|
import VueRouter from "vue-router";
|
|
|
|
|
import { routes } from "./routes";
|
2021-01-16 22:00:35 +01:00
|
|
|
import i18n from './i18n'
|
2020-12-24 16:37:38 -09:00
|
|
|
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
|
routes,
|
|
|
|
|
mode: process.env.NODE_ENV === "production" ? "history" : "hash",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
|
vuetify,
|
|
|
|
|
store,
|
|
|
|
|
router,
|
2021-01-16 22:00:35 +01:00
|
|
|
i18n,
|
|
|
|
|
render: (h) => h(App)
|
2020-12-24 16:37:38 -09:00
|
|
|
}).$mount("#app");
|
|
|
|
|
|
|
|
|
|
// Truncate
|
2021-01-15 21:46:35 -09:00
|
|
|
let filter = function(text, length, clamp) {
|
2020-12-24 16:37:38 -09:00
|
|
|
clamp = clamp || "...";
|
|
|
|
|
let node = document.createElement("div");
|
|
|
|
|
node.innerHTML = text;
|
|
|
|
|
let content = node.textContent;
|
|
|
|
|
return content.length > length ? content.slice(0, length) + clamp : content;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Vue.filter("truncate", filter);
|
|
|
|
|
|
|
|
|
|
export { router };
|