forked from DebaucheryLibrarian/traxxx
Fixed scroll component so it uses slot props instead of the depcrecated .
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
const EventBus = new Vue();
|
||||
|
||||
export default EventBus;
|
||||
@@ -1,6 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import VTooltip from 'v-tooltip';
|
||||
import VueLazyLoad from 'vue-lazyload';
|
||||
import { createApp } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import router from './router';
|
||||
@@ -14,9 +12,11 @@ import '../css/style.scss';
|
||||
import Container from '../components/container/container.vue';
|
||||
import Icon from '../components/icon/icon.vue';
|
||||
import Footer from '../components/footer/footer.vue';
|
||||
import Tooltip from '../components/tooltip/tooltip.vue';
|
||||
|
||||
function init() {
|
||||
async function init() {
|
||||
const store = initStore(router);
|
||||
const app = createApp(Container);
|
||||
|
||||
initUiObservers(store, router);
|
||||
|
||||
@@ -24,10 +24,17 @@ function init() {
|
||||
store.dispatch('setSfw', true);
|
||||
}
|
||||
|
||||
Vue.mixin({
|
||||
app.use(store);
|
||||
app.use(router);
|
||||
|
||||
await router.isReady();
|
||||
|
||||
app.mixin({
|
||||
components: {
|
||||
Icon,
|
||||
Footer,
|
||||
Tooltip,
|
||||
'v-popover': Tooltip,
|
||||
},
|
||||
watch: {
|
||||
pageTitle(title) {
|
||||
@@ -47,23 +54,14 @@ function init() {
|
||||
},
|
||||
});
|
||||
|
||||
Vue.use(VTooltip, {
|
||||
popover: {
|
||||
defaultContainer: '.container',
|
||||
app.directive('tooltip', {
|
||||
beforeMount(el, binding) {
|
||||
// console.log(binding.modifiers);
|
||||
el.title = binding.value; // eslint-disable-line no-param-reassign
|
||||
},
|
||||
});
|
||||
Vue.use(VueLazyLoad, {
|
||||
throttleWait: 0,
|
||||
});
|
||||
|
||||
new Vue({ // eslint-disable-line no-new
|
||||
el: '#container',
|
||||
store,
|
||||
router,
|
||||
render(createElement) {
|
||||
return createElement(Container);
|
||||
},
|
||||
});
|
||||
app.mount('#container');
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
@@ -1,14 +1 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
function setCache(state, { target, releases }) {
|
||||
Vue.set(state.cache, target, releases);
|
||||
}
|
||||
|
||||
function deleteCache(state, target) {
|
||||
Vue.delete(state.cache, target);
|
||||
}
|
||||
|
||||
export default {
|
||||
setCache,
|
||||
deleteCache,
|
||||
};
|
||||
export default {};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
|
||||
import Home from '../components/home/home.vue';
|
||||
import Release from '../components/releases/release.vue';
|
||||
@@ -14,8 +13,6 @@ import Search from '../components/search/search.vue';
|
||||
import Stats from '../components/stats/stats.vue';
|
||||
import NotFound from '../components/errors/404.vue';
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
@@ -184,15 +181,15 @@ const routes = [
|
||||
component: NotFound,
|
||||
},
|
||||
{
|
||||
path: '*',
|
||||
path: '/:catchAll(.*)',
|
||||
redirect: {
|
||||
name: 'not-found',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
import initUiStore from './ui/ui';
|
||||
@@ -9,8 +8,6 @@ import initActorsStore from './actors/actors';
|
||||
import initTagsStore from './tags/tags';
|
||||
|
||||
function initStore(router) {
|
||||
Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store();
|
||||
|
||||
store.registerModule('ui', initUiStore(store, router));
|
||||
|
||||
Reference in New Issue
Block a user