mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Outline dashboard model
This commit is contained in:
12
modules/webapp/src/main/elm/Data/Box.elm
Normal file
12
modules/webapp/src/main/elm/Data/Box.elm
Normal file
@ -0,0 +1,12 @@
|
||||
module Data.Box exposing (Box)
|
||||
|
||||
import Data.BoxContent exposing (BoxContent)
|
||||
|
||||
|
||||
type alias Box =
|
||||
{ name : String
|
||||
, visible : Bool
|
||||
, decoration : Bool
|
||||
, colspan : Int
|
||||
, content : BoxContent
|
||||
}
|
27
modules/webapp/src/main/elm/Data/BoxContent.elm
Normal file
27
modules/webapp/src/main/elm/Data/BoxContent.elm
Normal file
@ -0,0 +1,27 @@
|
||||
module Data.BoxContent exposing (BoxContent(..), MessageData, QueryData, SummaryData)
|
||||
|
||||
import Data.ItemArrange exposing (ItemArrange)
|
||||
|
||||
|
||||
type BoxContent
|
||||
= BoxUpload
|
||||
| BoxMessage MessageData
|
||||
| BoxQuery QueryData
|
||||
| BoxSummary SummaryData
|
||||
|
||||
|
||||
type alias MessageData =
|
||||
{ title : String
|
||||
, body : String
|
||||
}
|
||||
|
||||
|
||||
type alias QueryData =
|
||||
{ query : String
|
||||
, view : ItemArrange
|
||||
}
|
||||
|
||||
|
||||
type alias SummaryData =
|
||||
{ query : String
|
||||
}
|
10
modules/webapp/src/main/elm/Data/Dashboard.elm
Normal file
10
modules/webapp/src/main/elm/Data/Dashboard.elm
Normal file
@ -0,0 +1,10 @@
|
||||
module Data.Dashboard exposing (Dashboard)
|
||||
|
||||
import Data.Box exposing (Box)
|
||||
|
||||
|
||||
type alias Dashboard =
|
||||
{ name : String
|
||||
, columns : Int
|
||||
, boxes : List Box
|
||||
}
|
Reference in New Issue
Block a user