Mercurial > gemma
view client/src/application/stores/application.js @ 585:ef307bd6b5d8
refac: restructured client application
To make the application more accessible for developers, the structure was reorganized.
Instead of sticking to technical terminology, the application terminology is according to the domain:
I.e. "map" contains everything regarding map (including store).
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 07 Sep 2018 11:13:56 +0200 |
parents | |
children | c4a4dc612191 |
line wrap: on
line source
const defaultCollapseState = true; const Application = { namespaced: true, state: { appTitle: process.env.VUE_APP_TITLE, secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL, sidebar: { iscollapsed: defaultCollapseState }, countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"] }, getters: { countries: state => { return state.countries; }, sidebarCollapsed: state => { return state.sidebar.iscollapsed; }, appTitle: state => { return state.appTitle; }, secondaryLogo: state => { return state.secondaryLogo; } }, mutations: { toggleSidebar: state => { state.sidebar.iscollapsed = !state.sidebar.iscollapsed; }, resetSidebar: state => { state.sidebar.iscollapsed = defaultCollapseState; }, collapseSidebar: state => { state.sidebar.iscollapsed = true; } }, actions: {} }; export default Application;