mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-06 03:56:35 -05:00
@@ -5,9 +5,7 @@ import store from "./store/store";
|
||||
import VueRouter from "vue-router";
|
||||
import { routes } from "./routes";
|
||||
import i18n from "./i18n";
|
||||
import FlashMessage from "@smartweb/vue-flash-message";
|
||||
|
||||
Vue.use(FlashMessage);
|
||||
Vue.config.productionTip = false;
|
||||
Vue.use(VueRouter);
|
||||
|
||||
@@ -16,16 +14,16 @@ const router = new VueRouter({
|
||||
mode: process.env.NODE_ENV === "production" ? "history" : "hash",
|
||||
});
|
||||
|
||||
const vueApp = new Vue({
|
||||
new Vue({
|
||||
vuetify,
|
||||
store,
|
||||
router,
|
||||
i18n,
|
||||
render: h => h(App),
|
||||
render: (h) => h(App),
|
||||
}).$mount("#app");
|
||||
|
||||
// Truncate
|
||||
let truncate = function(text, length, clamp) {
|
||||
let truncate = function (text, length, clamp) {
|
||||
clamp = clamp || "...";
|
||||
let node = document.createElement("div");
|
||||
node.innerHTML = text;
|
||||
@@ -33,12 +31,11 @@ let truncate = function(text, length, clamp) {
|
||||
return content.length > length ? content.slice(0, length) + clamp : content;
|
||||
};
|
||||
|
||||
let titleCase = function(value) {
|
||||
return value.replace(/(?:^|\s|-)\S/g, x => x.toUpperCase());
|
||||
let titleCase = function (value) {
|
||||
return value.replace(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
|
||||
};
|
||||
|
||||
Vue.filter("truncate", truncate);
|
||||
Vue.filter("titleCase", titleCase);
|
||||
|
||||
export { vueApp };
|
||||
export { router };
|
||||
|
||||
Reference in New Issue
Block a user