mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Added website limit and show more button. Closes #592.
This commit is contained in:
parent
7a3c1e9faa
commit
373dbf50ba
8 changed files with 87 additions and 26 deletions
19
store/app.js
19
store/app.js
|
|
@ -1,10 +1,23 @@
|
|||
import create from 'zustand';
|
||||
import { DEFAULT_LOCALE, DEFAULT_THEME, LOCALE_CONFIG, THEME_CONFIG } from 'lib/constants';
|
||||
import {
|
||||
DASHBOARD_CONFIG,
|
||||
DEFAULT_LOCALE,
|
||||
DEFAULT_THEME,
|
||||
LOCALE_CONFIG,
|
||||
THEME_CONFIG,
|
||||
DEFAULT_WEBSITE_LIMIT,
|
||||
} from 'lib/constants';
|
||||
import { getItem } from 'lib/web';
|
||||
|
||||
const defaultDashboardConfig = {
|
||||
showCharts: true,
|
||||
limit: DEFAULT_WEBSITE_LIMIT,
|
||||
};
|
||||
|
||||
const initialState = {
|
||||
locale: getItem(LOCALE_CONFIG) || DEFAULT_LOCALE,
|
||||
theme: getItem(THEME_CONFIG) || DEFAULT_THEME,
|
||||
dashboard: getItem(DASHBOARD_CONFIG) || defaultDashboardConfig,
|
||||
shareToken: null,
|
||||
user: null,
|
||||
};
|
||||
|
|
@ -27,4 +40,8 @@ export function setUser(user) {
|
|||
store.setState({ user });
|
||||
}
|
||||
|
||||
export function setDashboard(dashboard) {
|
||||
store.setState({ dashboard });
|
||||
}
|
||||
|
||||
export default store;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue