Editable dashboard

This commit is contained in:
eikek
2022-01-26 21:27:26 +01:00
parent 2c2b34cd89
commit e83bf6b750
41 changed files with 2813 additions and 130 deletions

View File

@ -0,0 +1,54 @@
module Messages.Data.BoxContent exposing (Texts, de, gb)
import Data.BoxContent exposing (BoxContent(..))
type alias Texts =
{ forContent : BoxContent -> String
, queryBox : String
, statsBox : String
, messageBox : String
, uploadBox : String
}
gb : Texts
gb =
updateForContent
{ forContent = \_ -> ""
, queryBox = "Query box"
, statsBox = "Statistics box"
, messageBox = "Message box"
, uploadBox = "Upload box"
}
de : Texts
de =
updateForContent
{ forContent = \_ -> ""
, queryBox = "Suchabfrage Kachel"
, statsBox = "Statistik Kachel"
, messageBox = "Mitteilung Kachel"
, uploadBox = "Datei hochladen Kachel"
}
updateForContent : Texts -> Texts
updateForContent init =
{ init
| forContent =
\cnt ->
case cnt of
BoxMessage _ ->
init.messageBox
BoxUpload _ ->
init.uploadBox
BoxQuery _ ->
init.queryBox
BoxStats _ ->
init.statsBox
}

View File

@ -0,0 +1,115 @@
module Messages.Data.ItemColumn exposing (Texts, de, gb)
import Data.ItemColumn exposing (ItemColumn(..))
type alias Texts =
{ header : ItemColumn -> String
, label : ItemColumn -> String
}
gb : Texts
gb =
let
headerName col =
case col of
Name ->
"Name"
DateLong ->
"Date"
DateShort ->
"Date"
DueDateLong ->
"Due date"
DueDateShort ->
"Due date"
Folder ->
"Folder"
Correspondent ->
"Correspondent"
Concerning ->
"Concerning"
Tags ->
"Tags"
in
{ header = headerName
, label =
\col ->
case col of
DateShort ->
headerName col ++ " (short)"
DateLong ->
headerName col ++ " (long)"
DueDateShort ->
headerName col ++ " (short)"
DueDateLong ->
headerName col ++ " (long)"
_ ->
headerName col
}
de : Texts
de =
let
headerName col =
case col of
Name ->
"Name"
DateLong ->
"Datum"
DateShort ->
"Datum"
DueDateLong ->
"Fälligkeitsdatum"
DueDateShort ->
"Fälligkeitsdatum"
Folder ->
"Ordner"
Correspondent ->
"Korrespondent"
Concerning ->
"Betreffend"
Tags ->
"Tags"
in
{ header = headerName
, label =
\col ->
case col of
DateShort ->
headerName col ++ " (kurz)"
DateLong ->
headerName col ++ " (lang)"
DueDateShort ->
headerName col ++ " (kurz)"
DueDateLong ->
headerName col ++ " (lang)"
_ ->
headerName col
}