Fixed scroll component so it uses slot props instead of the depcrecated .

This commit is contained in:
DebaucheryLibrarian
2020-12-26 23:51:27 +01:00
parent ced8f447a7
commit c503e12adb
32 changed files with 1421 additions and 1538 deletions

View File

@@ -1,5 +0,0 @@
import Vue from 'vue';
const EventBus = new Vue();
export default EventBus;

View File

@@ -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();

View File

@@ -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 {};

View File

@@ -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,
});

View File

@@ -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));