2021-04-07 17:15:40 +05:30
|
|
|
import { createApp } from "vue";
|
|
|
|
import { library } from "@fortawesome/fontawesome-svg-core";
|
|
|
|
import { faThumbsUp, faThumbsDown, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
|
|
import { faGithub, faBitcoin } from "@fortawesome/free-brands-svg-icons";
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|
|
|
library.add(faThumbsUp, faThumbsDown, faEye, faGithub, faBitcoin);
|
2020-11-17 10:45:35 +05:30
|
|
|
|
2021-04-25 00:37:11 +05:30
|
|
|
import("uikit/dist/css/uikit-core.css");
|
|
|
|
import("uikit/dist/js/uikit-core.min");
|
2020-11-17 10:45:35 +05:30
|
|
|
|
2021-04-07 17:15:40 +05:30
|
|
|
import router from "@/router/router";
|
|
|
|
import App from "./App.vue";
|
2020-11-17 10:45:35 +05:30
|
|
|
|
2021-04-07 17:15:40 +05:30
|
|
|
import "./registerServiceWorker";
|
2020-11-17 10:45:35 +05:30
|
|
|
|
2020-11-27 12:16:36 +05:30
|
|
|
const mixin = {
|
|
|
|
methods: {
|
2021-04-07 17:15:40 +05:30
|
|
|
timeFormat: function(duration) {
|
|
|
|
var pad = function(num, size) {
|
2020-11-27 12:16:36 +05:30
|
|
|
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 13:33:10 +05:30
|
|
|
if (hours > 0) str += hours + ":";
|
2020-11-27 12:16:36 +05:30
|
|
|
|
|
|
|
str += pad(minutes, 2) + ":" + pad(seconds, 2);
|
|
|
|
|
|
|
|
return str;
|
2021-02-24 15:05:41 +05:30
|
|
|
},
|
2021-04-07 17:15:40 +05:30
|
|
|
fetchJson: function(url, options) {
|
|
|
|
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");
|