mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 22:57:12 +01:00
preserve dashboard settings in localStorage
This commit is contained in:
parent
b494a2595d
commit
fa7fb5eb4e
1 changed files with 2 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ import {
|
||||||
THEME_CONFIG,
|
THEME_CONFIG,
|
||||||
DEFAULT_WEBSITE_LIMIT,
|
DEFAULT_WEBSITE_LIMIT,
|
||||||
} from 'lib/constants';
|
} from 'lib/constants';
|
||||||
import { getItem } from 'lib/web';
|
import { getItem, setItem } from 'lib/web';
|
||||||
|
|
||||||
export const defaultDashboardConfig = {
|
export const defaultDashboardConfig = {
|
||||||
showCharts: true,
|
showCharts: true,
|
||||||
|
|
@ -42,6 +42,7 @@ export function setUser(user) {
|
||||||
|
|
||||||
export function setDashboard(dashboard) {
|
export function setDashboard(dashboard) {
|
||||||
store.setState({ dashboard });
|
store.setState({ dashboard });
|
||||||
|
setItem(DASHBOARD_CONFIG, dashboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default store;
|
export default store;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue