- add methods for releasing datasets from submitter
All checks were successful
CI Pipeline / japa-tests (push) Successful in 54s
All checks were successful
CI Pipeline / japa-tests (push) Successful in 54s
- npm updates - side menu with child items - flash messages via HttpContext response (extended via macro)
This commit is contained in:
parent
e0ff71b117
commit
f403c3109f
37 changed files with 1020 additions and 482 deletions
|
@ -1,14 +1,14 @@
|
|||
import { defineStore } from 'pinia';
|
||||
|
||||
export const LayoutService = defineStore('layout', {
|
||||
state: () => ({
|
||||
isAsideMobileExpanded: false, // via action
|
||||
isAsideLgActive: false,
|
||||
}),
|
||||
state: () => ({
|
||||
isAsideMobileExpanded: false, // via action
|
||||
isAsideLgActive: false,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
asideMobileToggle() {
|
||||
this.isAsideMobileExpanded = !this.isAsideMobileExpanded;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
asideMobileToggle() {
|
||||
this.isAsideMobileExpanded = !this.isAsideMobileExpanded;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@ export const MainService = defineStore('main', {
|
|||
|
||||
setDataset(payload) {
|
||||
this.dataset = payload;
|
||||
|
||||
|
||||
// this.dataset = {
|
||||
// language: language,
|
||||
// licenses: payload.licenses,
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
import { defineStore } from 'pinia';
|
||||
// import axios from 'axios';
|
||||
|
||||
|
||||
export const MapService = defineStore('map', {
|
||||
state: () => ({
|
||||
|
||||
// dataset: {} as Dataset,
|
||||
|
||||
mapService: new Map<string, any>(),
|
||||
|
||||
}),
|
||||
actions: {
|
||||
// payload = authenticated user
|
||||
|
@ -28,19 +25,16 @@ export const MapService = defineStore('map', {
|
|||
return this.mapService.get(id);
|
||||
},
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
},
|
||||
|
||||
hasMap(id: string): boolean {
|
||||
return this.mapService.has(id);
|
||||
},
|
||||
|
||||
|
||||
deleteMap(id: string): boolean {
|
||||
return this.mapService.delete(id);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,55 +3,53 @@ import * as styles from '@/styles';
|
|||
import { darkModeKey, styleKey } from '@/config';
|
||||
|
||||
export const StyleService = defineStore('style', {
|
||||
state: () => ({
|
||||
/* Styles */
|
||||
asideStyle: '',
|
||||
asideScrollbarsStyle: '',
|
||||
asideBrandStyle: '',
|
||||
asideMenuItemStyle: '',
|
||||
asideMenuItemActiveStyle: '',
|
||||
asideMenuDropdownStyle: '',
|
||||
navBarItemLabelStyle: '',
|
||||
navBarItemLabelHoverStyle: '',
|
||||
navBarItemLabelActiveColorStyle: '',
|
||||
overlayStyle: '',
|
||||
state: () => ({
|
||||
/* Styles */
|
||||
asideStyle: '',
|
||||
asideScrollbarsStyle: '',
|
||||
asideBrandStyle: '',
|
||||
asideMenuItemStyle: '',
|
||||
asideMenuItemActiveStyle: '',
|
||||
asideMenuDropdownStyle: '',
|
||||
navBarItemLabelStyle: '',
|
||||
navBarItemLabelHoverStyle: '',
|
||||
navBarItemLabelActiveColorStyle: '',
|
||||
overlayStyle: '',
|
||||
|
||||
/* Dark mode default false */
|
||||
darkMode: false,
|
||||
}),
|
||||
/* Dark mode default false */
|
||||
darkMode: false,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
// style payload = 'basic' or 'white' with blue font
|
||||
setStyle(payload) {
|
||||
if (!styles[payload]) {
|
||||
return;
|
||||
}
|
||||
actions: {
|
||||
// style payload = 'basic' or 'white' with blue font
|
||||
setStyle(payload) {
|
||||
if (!styles[payload]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof localStorage !== 'undefined') {
|
||||
localStorage.setItem(styleKey, payload);
|
||||
}
|
||||
if (typeof localStorage !== 'undefined') {
|
||||
localStorage.setItem(styleKey, payload);
|
||||
}
|
||||
|
||||
const style = styles[payload];
|
||||
const style = styles[payload];
|
||||
|
||||
for (const key in style) {
|
||||
this[`${key}Style`] = style[key];
|
||||
}
|
||||
},
|
||||
// toggle dark mode
|
||||
setDarkMode(payload = null) {
|
||||
this.darkMode = payload !== null ? payload : !this.darkMode;
|
||||
for (const key in style) {
|
||||
this[`${key}Style`] = style[key];
|
||||
}
|
||||
},
|
||||
// toggle dark mode
|
||||
setDarkMode(payload = null) {
|
||||
this.darkMode = payload !== null ? payload : !this.darkMode;
|
||||
|
||||
if (typeof localStorage !== 'undefined') {
|
||||
localStorage.setItem(darkModeKey, this.darkMode ? '1' : '0');
|
||||
}
|
||||
if (typeof localStorage !== 'undefined') {
|
||||
localStorage.setItem(darkModeKey, this.darkMode ? '1' : '0');
|
||||
}
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
document.body.classList[this.darkMode ? 'add' : 'remove']('dark-scrollbars');
|
||||
if (typeof document !== 'undefined') {
|
||||
document.body.classList[this.darkMode ? 'add' : 'remove']('dark-scrollbars');
|
||||
|
||||
document.documentElement.classList[this.darkMode ? 'add' : 'remove'](
|
||||
'dark-scrollbars-compat'
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
document.documentElement.classList[this.darkMode ? 'add' : 'remove']('dark-scrollbars-compat');
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,25 +3,23 @@ import { defineStore } from 'pinia';
|
|||
// import dayjs from 'dayjs';
|
||||
|
||||
export const TimeService = defineStore('map', {
|
||||
state: () => ({
|
||||
state: () => ({
|
||||
// dataset: {} as Dataset,
|
||||
mapService: new Map<string, any>(),
|
||||
}),
|
||||
actions: {
|
||||
|
||||
actions: {
|
||||
getMap(id: string) {
|
||||
return this.mapService.get(id);
|
||||
},
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
},
|
||||
|
||||
hasMap(id: string): boolean {
|
||||
return this.mapService.has(id);
|
||||
},
|
||||
|
||||
|
||||
deleteMap(id: string): boolean {
|
||||
return this.mapService.delete(id);
|
||||
},
|
||||
|
@ -31,7 +29,5 @@ export const TimeService = defineStore('map', {
|
|||
// const to = dayjs(timespan.to);
|
||||
// return dayjs.duration(to.diff(from));
|
||||
// },
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue