33 lines
874 B
JavaScript
33 lines
874 B
JavaScript
import routes from './routes.js';
|
|
|
|
export const store = Vue.reactive({
|
|
dark: JSON.parse(localStorage.getItem('dark')) || true,
|
|
shitty: JSON.parse(localStorage.getItem('shitty')) || false,
|
|
pointercrateLayout: JSON.parse(localStorage.getItem('pointercrateLayout')) || false,
|
|
toggleDark() {
|
|
this.dark = !this.dark;
|
|
localStorage.setItem('dark', JSON.stringify(this.dark));
|
|
},
|
|
toggleShitty() {
|
|
this.shitty = !this.shitty;
|
|
localStorage.setItem('shitty', JSON.stringify(this.shitty));
|
|
},
|
|
toggleLayout() {
|
|
this.pointercrateLayout = !this.pointercrateLayout;
|
|
localStorage.setItem('pointercrateLayout', JSON.stringify(this.pointercrateLayout));
|
|
},
|
|
listType: "dl",
|
|
});
|
|
|
|
const app = Vue.createApp({
|
|
data: () => ({ store }),
|
|
});
|
|
const router = VueRouter.createRouter({
|
|
history: VueRouter.createWebHashHistory(),
|
|
routes,
|
|
});
|
|
|
|
app.use(router);
|
|
|
|
app.mount('#app');
|