-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsStore.elm
34 lines (22 loc) · 904 Bytes
/
SettingsStore.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module SettingsStore
exposing
( SettingsStore
, getSettingsForProjectOverview
, initialStore
, updateSettingsForProjectOverview
)
type SettingsStore
= SettingsStore Store
type alias Store =
{ projectOverviewSettings : ProjectOverviewSettings }
type alias ProjectOverviewSettings =
{ projectsPerRow : Int }
updateSettingsForProjectOverview : ProjectOverviewSettings -> SettingsStore -> SettingsStore
updateSettingsForProjectOverview projectOverviewSettings (SettingsStore store) =
SettingsStore { store | projectOverviewSettings = projectOverviewSettings }
getSettingsForProjectOverview : SettingsStore -> ProjectOverviewSettings
getSettingsForProjectOverview (SettingsStore store) =
store.projectOverviewSettings
initialStore : SettingsStore
initialStore =
SettingsStore { projectOverviewSettings = { projectsPerRow = 3 } }