2021-04-07 11:45:40 +00:00
|
|
|
import { createApp } from "vue";
|
|
|
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
2021-05-26 19:02:12 +00:00
|
|
|
import { faThumbsUp, faThumbsDown, faEye, faThumbtack, faCheck, faHeart } from "@fortawesome/free-solid-svg-icons";
|
2021-04-07 11:45:40 +00:00
|
|
|
import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons";
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
2021-05-26 19:02:12 +00:00
|
|
|
library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin, faThumbtack, faCheck, faHeart);
|
2020-11-17 05:15:35 +00:00
|
|
|
|
2021-04-24 19:07:11 +00:00
|
|
|
import("uikit/dist/css/uikit-core.css");
|
|
|
|
import("uikit/dist/js/uikit-core.min");
|
2020-11-17 05:15:35 +00:00
|
|
|
|
2021-04-07 11:45:40 +00:00
|
|
|
import router from "@/router/router";
|
|
|
|
import App from "./App.vue";
|
2020-11-17 05:15:35 +00:00
|
|
|
|
2021-05-10 18:14:28 +00:00
|
|
|
import("./registerServiceWorker");
|
2020-11-17 05:15:35 +00:00
|
|
|
|
2020-11-27 06:46:36 +00:00
|
|
|
const mixin = {
|
|
|
|
methods: {
|
2021-05-10 18:14:28 +00:00
|
|
|
timeFormat: function (duration) {
|
|
|
|
var pad = function (num, size) {
|
2020-11-27 06:46:36 +00:00
|
|
|
return ("000" + num).slice(size * -1);
|
|
|
|
};
|
|
|
|
|
|
|
|
var time = parseFloat(duration).toFixed(3),
|
|
|
|
hours = Math.floor(time / 60 / 60),
|
|
|
|
minutes = Math.floor(time / 60) % 60,
|
|
|
|
seconds = Math.floor(time - minutes * 60);
|
|
|
|
|
|
|
|
var str = "";
|
|
|
|
|
2021-01-07 08:03:10 +00:00
|
|
|
if (hours > 0) str += hours + ":";
|
2020-11-27 06:46:36 +00:00
|
|
|
|
|
|
|
str += pad(minutes, 2) + ":" + pad(seconds, 2);
|
|
|
|
|
|
|
|
return str;
|
2021-02-24 09:35:41 +00:00
|
|
|
},
|
2021-05-10 18:14:28 +00:00
|
|
|
fetchJson: function (url, options) {
|
2021-04-07 11:45:40 +00:00
|
|
|
return fetch(url, options).then(response => {
|
|
|
|
return response.json();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const app = createApp(App);
|
|
|
|
app.use(router);
|
|
|
|
app.mixin(mixin);
|
|
|
|
app.component("font-awesome-icon", FontAwesomeIcon);
|
|
|
|
app.mount("#app");
|