Implemented negative filters in back-end, added basic fixed filters settings dialog.
This commit is contained in:
@@ -3,6 +3,7 @@ import VueVirtualScroller from 'vue-virtual-scroller';
|
||||
import FloatingVue from 'floating-vue';
|
||||
|
||||
import { setPageContext } from './usePageContext.js';
|
||||
import initClient from './init-client.js';
|
||||
|
||||
import '../assets/css/style.css';
|
||||
|
||||
@@ -27,7 +28,6 @@ function createApp(Page, pageProps, pageContext) {
|
||||
|
||||
const app = createSSRApp(PageWithLayout);
|
||||
|
||||
// We make pageContext available from any Vue component
|
||||
setPageContext(app, pageContext);
|
||||
|
||||
app.provide('pageContext', pageContext);
|
||||
@@ -38,6 +38,10 @@ function createApp(Page, pageProps, pageContext) {
|
||||
app.component('Link', Link);
|
||||
app.component('Icon', Icon);
|
||||
|
||||
if (typeof window === 'object') {
|
||||
initClient(pageContext);
|
||||
}
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
|
||||
14
renderer/init-client.js
Normal file
14
renderer/init-client.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
const cookies = Cookies.withConverter({
|
||||
write: (value) => value,
|
||||
});
|
||||
|
||||
export default function init(_pageContext) {
|
||||
// update tag filter to prevent unexpected expiry
|
||||
const storedTags = cookies.get('tags');
|
||||
|
||||
if (storedTags) {
|
||||
cookies.set('tags', storedTags, { expires: 400 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user