mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
Externalize strings in other of components
This commit is contained in:
parent
2f678aca17
commit
fa2c5750dd
@ -15,6 +15,7 @@ import Data.Flags exposing (Flags)
|
|||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Http
|
import Http
|
||||||
|
import Messages.AttachmentMetaComp exposing (Texts)
|
||||||
import Styles as S
|
import Styles as S
|
||||||
import Util.Http
|
import Util.Http
|
||||||
import Util.Time
|
import Util.Time
|
||||||
@ -64,15 +65,18 @@ update msg model =
|
|||||||
--- View2
|
--- View2
|
||||||
|
|
||||||
|
|
||||||
view2 : List (Attribute Msg) -> Model -> Html Msg
|
view2 : Texts -> List (Attribute Msg) -> Model -> Html Msg
|
||||||
view2 attrs model =
|
view2 texts attrs model =
|
||||||
div attrs
|
div attrs
|
||||||
[ h3 [ class S.header3 ]
|
[ h3 [ class S.header3 ]
|
||||||
[ text "Extracted Meta Data"
|
[ text texts.extractedMetadata
|
||||||
]
|
]
|
||||||
, case model.meta of
|
, case model.meta of
|
||||||
NotAvailable ->
|
NotAvailable ->
|
||||||
B.loadingDimmer True
|
B.loadingDimmer
|
||||||
|
{ active = True
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
|
|
||||||
Failure msg ->
|
Failure msg ->
|
||||||
div [ class S.errorMessage ]
|
div [ class S.errorMessage ]
|
||||||
@ -80,33 +84,33 @@ view2 attrs model =
|
|||||||
]
|
]
|
||||||
|
|
||||||
Success data ->
|
Success data ->
|
||||||
viewData2 data
|
viewData2 texts data
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewData2 : AttachmentMeta -> Html Msg
|
viewData2 : Texts -> AttachmentMeta -> Html Msg
|
||||||
viewData2 meta =
|
viewData2 texts meta =
|
||||||
div [ class "flex flex-col" ]
|
div [ class "flex flex-col" ]
|
||||||
[ div [ class "text-lg font-bold" ]
|
[ div [ class "text-lg font-bold" ]
|
||||||
[ text "Content"
|
[ text texts.content
|
||||||
]
|
]
|
||||||
, div [ class "px-2 py-2 text-sm bg-yellow-50 dark:bg-warmgray-800 break-words whitespace-pre max-h-80 overflow-auto" ]
|
, div [ class "px-2 py-2 text-sm bg-yellow-50 dark:bg-warmgray-800 break-words whitespace-pre max-h-80 overflow-auto" ]
|
||||||
[ text meta.content
|
[ text meta.content
|
||||||
]
|
]
|
||||||
, div [ class "text-lg font-bold mt-2" ]
|
, div [ class "text-lg font-bold mt-2" ]
|
||||||
[ text "Labels"
|
[ text texts.labels
|
||||||
]
|
]
|
||||||
, div [ class "flex fex-row flex-wrap" ]
|
, div [ class "flex fex-row flex-wrap" ]
|
||||||
(List.map renderLabelItem2 meta.labels)
|
(List.map renderLabelItem2 meta.labels)
|
||||||
, div [ class "text-lg font-bold mt-2" ]
|
, div [ class "text-lg font-bold mt-2" ]
|
||||||
[ text "Proposals"
|
[ text texts.proposals
|
||||||
]
|
]
|
||||||
, viewProposals2 meta.proposals
|
, viewProposals2 texts meta.proposals
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewProposals2 : ItemProposals -> Html Msg
|
viewProposals2 : Texts -> ItemProposals -> Html Msg
|
||||||
viewProposals2 props =
|
viewProposals2 texts props =
|
||||||
let
|
let
|
||||||
mkItem n lbl =
|
mkItem n lbl =
|
||||||
div
|
div
|
||||||
@ -130,32 +134,32 @@ viewProposals2 props =
|
|||||||
in
|
in
|
||||||
div [ class "flex flex-col" ]
|
div [ class "flex flex-col" ]
|
||||||
[ div [ class "font-bold mb-2" ]
|
[ div [ class "font-bold mb-2" ]
|
||||||
[ text "Correspondent Organization"
|
[ text texts.correspondentOrg
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
||||||
(List.indexedMap mkItem props.corrOrg)
|
(List.indexedMap mkItem props.corrOrg)
|
||||||
, div [ class "font-bold mt-3 mb-2" ]
|
, div [ class "font-bold mt-3 mb-2" ]
|
||||||
[ text "Correspondent Person"
|
[ text texts.correspondentPerson
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
||||||
(List.indexedMap mkItem props.corrPerson)
|
(List.indexedMap mkItem props.corrPerson)
|
||||||
, div [ class "font-bold mt-3 mb-2" ]
|
, div [ class "font-bold mt-3 mb-2" ]
|
||||||
[ text "Concerning Person"
|
[ text texts.concerningPerson
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
||||||
(List.indexedMap mkItem props.concPerson)
|
(List.indexedMap mkItem props.concPerson)
|
||||||
, div [ class "font-bold mt-3 mb-2" ]
|
, div [ class "font-bold mt-3 mb-2" ]
|
||||||
[ text "Concerning Equipment"
|
[ text texts.concerningEquipment
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
||||||
(List.indexedMap mkItem props.concEquipment)
|
(List.indexedMap mkItem props.concEquipment)
|
||||||
, div [ class "font-bold mb-2 mt-3" ]
|
, div [ class "font-bold mb-2 mt-3" ]
|
||||||
[ text "Item Date"
|
[ text texts.itemDate
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2" ]
|
||||||
(List.map mkTimeItem props.itemDate)
|
(List.map mkTimeItem props.itemDate)
|
||||||
, div [ class "font-bold mt-3 mb-2" ]
|
, div [ class "font-bold mt-3 mb-2" ]
|
||||||
[ text "Item Due Date"
|
[ text texts.itemDueDate
|
||||||
]
|
]
|
||||||
, div [ class "flex flex-row flex-wrap space-x-2 mb-2" ]
|
, div [ class "flex flex-row flex-wrap space-x-2 mb-2" ]
|
||||||
(List.map mkTimeItem props.dueDate)
|
(List.map mkTimeItem props.dueDate)
|
||||||
|
@ -12,7 +12,6 @@ module Comp.Basic exposing
|
|||||||
, secondaryBasicButton
|
, secondaryBasicButton
|
||||||
, secondaryButton
|
, secondaryButton
|
||||||
, stats
|
, stats
|
||||||
, tooltipRight
|
|
||||||
)
|
)
|
||||||
|
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
@ -176,18 +175,18 @@ linkLabel model =
|
|||||||
genericLink model.icon model.label attrs
|
genericLink model.icon model.label attrs
|
||||||
|
|
||||||
|
|
||||||
loadingDimmer : Bool -> Html msg
|
loadingDimmer : { label : String, active : Bool } -> Html msg
|
||||||
loadingDimmer active =
|
loadingDimmer cfg =
|
||||||
div
|
div
|
||||||
[ classList
|
[ classList
|
||||||
[ ( "hidden", not active )
|
[ ( "hidden", not cfg.active )
|
||||||
]
|
]
|
||||||
, class S.dimmer
|
, class S.dimmer
|
||||||
]
|
]
|
||||||
[ div [ class "text-gray-200" ]
|
[ div [ class "text-gray-200" ]
|
||||||
[ i [ class "fa fa-circle-notch animate-spin" ] []
|
[ i [ class "fa fa-circle-notch animate-spin" ] []
|
||||||
, span [ class "ml-2" ]
|
, span [ class "ml-2" ]
|
||||||
[ text "Loading…"
|
[ text cfg.label
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -279,17 +278,6 @@ inputRequired =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
tooltipRight : Bool -> String -> Html msg
|
|
||||||
tooltipRight show msg =
|
|
||||||
div
|
|
||||||
[ class "absolute bottom-0 right-5 px-2 py-2 rounded-lg z-50 w-40"
|
|
||||||
, class "bg-white border"
|
|
||||||
, class "text-sm font-thin"
|
|
||||||
]
|
|
||||||
[ text msg
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Helpers
|
--- Helpers
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ import Html exposing (..)
|
|||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onInput)
|
import Html.Events exposing (onInput)
|
||||||
import Http
|
import Http
|
||||||
|
import Messages.CalEventInputComp exposing (Texts)
|
||||||
import Styles as S
|
import Styles as S
|
||||||
import Util.Http
|
import Util.Http
|
||||||
import Util.Maybe
|
import Util.Maybe
|
||||||
@ -129,8 +130,8 @@ update flags ev msg model =
|
|||||||
--- View2
|
--- View2
|
||||||
|
|
||||||
|
|
||||||
view2 : String -> CalEvent -> Model -> Html Msg
|
view2 : Texts -> String -> CalEvent -> Model -> Html Msg
|
||||||
view2 extraClasses ev model =
|
view2 texts extraClasses ev model =
|
||||||
let
|
let
|
||||||
yearLen =
|
yearLen =
|
||||||
Basics.max 4 (String.length ev.year)
|
Basics.max 4 (String.length ev.year)
|
||||||
@ -155,7 +156,7 @@ view2 extraClasses ev model =
|
|||||||
[ label
|
[ label
|
||||||
[ class S.inputLabel
|
[ class S.inputLabel
|
||||||
]
|
]
|
||||||
[ text "Weekday" ]
|
[ text texts.weekday ]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
, class S.textInput
|
, class S.textInput
|
||||||
@ -172,7 +173,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, div [ class "flex flex-col space-y-2 mr-2" ]
|
, div [ class "flex flex-col space-y-2 mr-2" ]
|
||||||
[ label [ class S.inputLabel ]
|
[ label [ class S.inputLabel ]
|
||||||
[ text "Year" ]
|
[ text texts.year ]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
, class S.textInput
|
, class S.textInput
|
||||||
@ -188,7 +189,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, div [ class "flex flex-col space-y-2 mr-2" ]
|
, div [ class "flex flex-col space-y-2 mr-2" ]
|
||||||
[ label [ class S.inputLabel ]
|
[ label [ class S.inputLabel ]
|
||||||
[ text "Month" ]
|
[ text texts.month ]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
, class styleInput
|
, class styleInput
|
||||||
@ -204,7 +205,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, div [ class "flex flex-col space-y-2 mr-4 mr-2" ]
|
, div [ class "flex flex-col space-y-2 mr-4 mr-2" ]
|
||||||
[ label [ class S.inputLabel ]
|
[ label [ class S.inputLabel ]
|
||||||
[ text "Day"
|
[ text texts.day
|
||||||
]
|
]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
@ -218,7 +219,8 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, div [ class "flex flex-col space-y-2 mr-2" ]
|
, div [ class "flex flex-col space-y-2 mr-2" ]
|
||||||
[ label [ class S.inputLabel ]
|
[ label [ class S.inputLabel ]
|
||||||
[ text "Hour" ]
|
[ text texts.hour
|
||||||
|
]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
, class styleInput
|
, class styleInput
|
||||||
@ -234,7 +236,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, div [ class "flex flex-col space-y-2" ]
|
, div [ class "flex flex-col space-y-2" ]
|
||||||
[ label [ class S.inputLabel ]
|
[ label [ class S.inputLabel ]
|
||||||
[ text "Minute"
|
[ text texts.minute
|
||||||
]
|
]
|
||||||
, input
|
, input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
@ -253,7 +255,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
, class S.errorMessage
|
, class S.errorMessage
|
||||||
]
|
]
|
||||||
[ text "Error: "
|
[ text (texts.error ++ ": ")
|
||||||
, Maybe.map .message model.checkResult
|
, Maybe.map .message model.checkResult
|
||||||
|> Maybe.withDefault ""
|
|> Maybe.withDefault ""
|
||||||
|> text
|
|> text
|
||||||
@ -269,7 +271,7 @@ view2 extraClasses ev model =
|
|||||||
]
|
]
|
||||||
[ div []
|
[ div []
|
||||||
[ div [ class S.inputLabel ]
|
[ div [ class S.inputLabel ]
|
||||||
[ text "Schedule: "
|
[ text (texts.schedule ++ ": ")
|
||||||
]
|
]
|
||||||
, div [ class "px-12 font-mono " ]
|
, div [ class "px-12 font-mono " ]
|
||||||
[ Maybe.andThen .event model.checkResult
|
[ Maybe.andThen .event model.checkResult
|
||||||
@ -277,7 +279,7 @@ view2 extraClasses ev model =
|
|||||||
|> text
|
|> text
|
||||||
]
|
]
|
||||||
, div [ class S.inputLabel ]
|
, div [ class S.inputLabel ]
|
||||||
[ text "Next: "
|
[ text (texts.next ++ ": ")
|
||||||
]
|
]
|
||||||
, ul [ class "list-decimal list-inside text-sm" ]
|
, ul [ class "list-decimal list-inside text-sm" ]
|
||||||
(Maybe.map .next model.checkResult
|
(Maybe.map .next model.checkResult
|
||||||
|
@ -267,5 +267,8 @@ view2 texts model =
|
|||||||
[ text "Submit"
|
[ text "Submit"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -60,7 +60,7 @@ init flags sett =
|
|||||||
in
|
in
|
||||||
( { scheduleModel = cem
|
( { scheduleModel = cem
|
||||||
, schedule = Data.Validated.Unknown newSchedule
|
, schedule = Data.Validated.Unknown newSchedule
|
||||||
, itemCountModel = Comp.IntField.init (Just 0) Nothing True ""
|
, itemCountModel = Comp.IntField.init (Just 0) Nothing True
|
||||||
, itemCount = Just sett.itemCount
|
, itemCount = Just sett.itemCount
|
||||||
, categoryListModel =
|
, categoryListModel =
|
||||||
let
|
let
|
||||||
@ -237,6 +237,7 @@ view2 texts settings model =
|
|||||||
[ text texts.schedule ]
|
[ text texts.schedule ]
|
||||||
, Html.map ScheduleMsg
|
, Html.map ScheduleMsg
|
||||||
(Comp.CalEventInput.view2
|
(Comp.CalEventInput.view2
|
||||||
|
texts.calEventInput
|
||||||
""
|
""
|
||||||
(Data.Validated.value model.schedule)
|
(Data.Validated.value model.schedule)
|
||||||
model.scheduleModel
|
model.scheduleModel
|
||||||
|
@ -201,7 +201,9 @@ view2 : Texts -> ViewSettings -> Model -> List (Html Msg)
|
|||||||
view2 texts viewSettings model =
|
view2 texts viewSettings model =
|
||||||
let
|
let
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteField
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteField
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
|
|
||||||
ftypeCfg =
|
ftypeCfg =
|
||||||
{ display = texts.fieldTypeLabel
|
{ display = texts.fieldTypeLabel
|
||||||
|
@ -16,12 +16,13 @@ import Comp.DatePicker
|
|||||||
import Comp.MenuBar as MB
|
import Comp.MenuBar as MB
|
||||||
import Data.CustomFieldType exposing (CustomFieldType)
|
import Data.CustomFieldType exposing (CustomFieldType)
|
||||||
import Data.Icons as Icons
|
import Data.Icons as Icons
|
||||||
import Data.Money
|
import Data.Money exposing (MoneyParseError(..))
|
||||||
import Date exposing (Date)
|
import Date exposing (Date)
|
||||||
import DatePicker exposing (DatePicker)
|
import DatePicker exposing (DatePicker)
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onCheck, onClick, onInput)
|
import Html.Events exposing (onClick, onInput)
|
||||||
|
import Messages.CustomFieldInputComp exposing (Texts)
|
||||||
import Styles as S
|
import Styles as S
|
||||||
import Util.Maybe
|
import Util.Maybe
|
||||||
|
|
||||||
@ -32,9 +33,15 @@ type alias Model =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type FieldError
|
||||||
|
= NoValue
|
||||||
|
| NotANumber String
|
||||||
|
| NotMoney MoneyParseError
|
||||||
|
|
||||||
|
|
||||||
type alias FloatModel =
|
type alias FloatModel =
|
||||||
{ input : String
|
{ input : String
|
||||||
, result : Result String Float
|
, result : Result FieldError Float
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -61,27 +68,47 @@ fieldType field =
|
|||||||
|> Maybe.withDefault Data.CustomFieldType.Text
|
|> Maybe.withDefault Data.CustomFieldType.Text
|
||||||
|
|
||||||
|
|
||||||
errorMsg : Model -> Maybe String
|
errorMsg : Texts -> Model -> Maybe String
|
||||||
errorMsg model =
|
errorMsg texts model =
|
||||||
let
|
let
|
||||||
getMsg res =
|
parseMsg isMoneyField perr =
|
||||||
case res of
|
case perr of
|
||||||
Ok _ ->
|
NoValue ->
|
||||||
Nothing
|
if isMoneyField then
|
||||||
|
Just <| texts.errorNoAmount
|
||||||
|
|
||||||
Err m ->
|
else
|
||||||
Just m
|
Just <| texts.errorNoNumber
|
||||||
|
|
||||||
|
NotANumber str ->
|
||||||
|
Just <| texts.errorNotANumber str
|
||||||
|
|
||||||
|
NotMoney (RequireTwoDigitsAfterDot _) ->
|
||||||
|
Just "Two digits required after the dot."
|
||||||
|
|
||||||
|
NotMoney (NoOrTooManyPoints _) ->
|
||||||
|
Just "One single dot + digits required for money."
|
||||||
in
|
in
|
||||||
case model.fieldModel of
|
case model.fieldModel of
|
||||||
NumberField fm ->
|
NumberField fm ->
|
||||||
getMsg fm.result
|
case fm.result of
|
||||||
|
Ok _ ->
|
||||||
|
Nothing
|
||||||
|
|
||||||
|
Err parseError ->
|
||||||
|
parseMsg False parseError
|
||||||
|
|
||||||
MoneyField fm ->
|
MoneyField fm ->
|
||||||
getMsg fm.result
|
case fm.result of
|
||||||
|
Ok _ ->
|
||||||
|
Nothing
|
||||||
|
|
||||||
|
Err parseError ->
|
||||||
|
parseMsg True parseError
|
||||||
|
|
||||||
TextField mt ->
|
TextField mt ->
|
||||||
if mt == Nothing then
|
if mt == Nothing then
|
||||||
Just "Please fill in some value"
|
Just texts.errorNoValue
|
||||||
|
|
||||||
else
|
else
|
||||||
Nothing
|
Nothing
|
||||||
@ -103,10 +130,10 @@ init field =
|
|||||||
TextField Nothing
|
TextField Nothing
|
||||||
|
|
||||||
Data.CustomFieldType.Numeric ->
|
Data.CustomFieldType.Numeric ->
|
||||||
NumberField (FloatModel "" (Err "No number given"))
|
NumberField (FloatModel "" (Err NoValue))
|
||||||
|
|
||||||
Data.CustomFieldType.Money ->
|
Data.CustomFieldType.Money ->
|
||||||
MoneyField (FloatModel "" (Err "No amount given"))
|
MoneyField (FloatModel "" (Err NoValue))
|
||||||
|
|
||||||
Data.CustomFieldType.Boolean ->
|
Data.CustomFieldType.Boolean ->
|
||||||
BoolField False
|
BoolField False
|
||||||
@ -150,7 +177,7 @@ initWith value =
|
|||||||
updateFloatModel
|
updateFloatModel
|
||||||
False
|
False
|
||||||
value.value
|
value.value
|
||||||
Data.Money.fromString
|
(Data.Money.fromString >> Result.mapError NotMoney)
|
||||||
Data.Money.normalizeInput
|
Data.Money.normalizeInput
|
||||||
in
|
in
|
||||||
MoneyField fm
|
MoneyField fm
|
||||||
@ -230,7 +257,7 @@ update1 forSearch msg model =
|
|||||||
updateFloatModel
|
updateFloatModel
|
||||||
forSearch
|
forSearch
|
||||||
str
|
str
|
||||||
Data.Money.fromString
|
(Data.Money.fromString >> Result.mapError NotMoney)
|
||||||
Data.Money.normalizeInput
|
Data.Money.normalizeInput
|
||||||
|
|
||||||
model_ =
|
model_ =
|
||||||
@ -294,7 +321,7 @@ update1 forSearch msg model =
|
|||||||
updateFloatModel :
|
updateFloatModel :
|
||||||
Bool
|
Bool
|
||||||
-> String
|
-> String
|
||||||
-> (String -> Result String Float)
|
-> (String -> Result FieldError Float)
|
||||||
-> (String -> String)
|
-> (String -> String)
|
||||||
-> ( FloatModel, FieldResult )
|
-> ( FloatModel, FieldResult )
|
||||||
updateFloatModel forSearch msg parse normalize =
|
updateFloatModel forSearch msg parse normalize =
|
||||||
@ -331,11 +358,11 @@ hasWildCards msg =
|
|||||||
--- View2
|
--- View2
|
||||||
|
|
||||||
|
|
||||||
view2 : String -> Maybe String -> Model -> Html Msg
|
view2 : Texts -> String -> Maybe String -> Model -> Html Msg
|
||||||
view2 classes icon model =
|
view2 texts classes icon model =
|
||||||
let
|
let
|
||||||
error =
|
error =
|
||||||
errorMsg model
|
errorMsg texts model
|
||||||
in
|
in
|
||||||
div
|
div
|
||||||
[ class classes
|
[ class classes
|
||||||
@ -473,11 +500,11 @@ mkLabel model =
|
|||||||
Maybe.withDefault model.field.name model.field.label
|
Maybe.withDefault model.field.name model.field.label
|
||||||
|
|
||||||
|
|
||||||
string2Float : String -> Result String Float
|
string2Float : String -> Result FieldError Float
|
||||||
string2Float str =
|
string2Float str =
|
||||||
case String.toFloat str of
|
case String.toFloat str of
|
||||||
Just n ->
|
Just n ->
|
||||||
Ok n
|
Ok n
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
Err ("Not a number: " ++ str)
|
Err (NotANumber str)
|
||||||
|
@ -203,5 +203,8 @@ viewTable2 texts model =
|
|||||||
model.tableModel
|
model.tableModel
|
||||||
model.fields
|
model.fields
|
||||||
)
|
)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -29,6 +29,7 @@ import Html exposing (..)
|
|||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onClick)
|
import Html.Events exposing (onClick)
|
||||||
import Http
|
import Http
|
||||||
|
import Messages.CustomFieldMultiInputComp exposing (Texts)
|
||||||
import Styles as S
|
import Styles as S
|
||||||
import Util.CustomField
|
import Util.CustomField
|
||||||
import Util.Maybe
|
import Util.Maybe
|
||||||
@ -318,11 +319,11 @@ type alias ViewSettings =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
view2 : ViewSettings -> Model -> Html Msg
|
view2 : Texts -> ViewSettings -> Model -> Html Msg
|
||||||
view2 viewSettings model =
|
view2 texts viewSettings model =
|
||||||
div [ class viewSettings.classes ]
|
div [ class viewSettings.classes ]
|
||||||
(viewMenuBar2 viewSettings model
|
(viewMenuBar2 viewSettings model
|
||||||
:: List.map (viewCustomField2 viewSettings model) (visibleFields model)
|
:: List.map (viewCustomField2 texts viewSettings model) (visibleFields model)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -364,8 +365,8 @@ viewMenuBar2 viewSettings model =
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
viewCustomField2 : ViewSettings -> Model -> CustomField -> Html Msg
|
viewCustomField2 : Texts -> ViewSettings -> Model -> CustomField -> Html Msg
|
||||||
viewCustomField2 viewSettings model field =
|
viewCustomField2 texts viewSettings model field =
|
||||||
let
|
let
|
||||||
visibleField =
|
visibleField =
|
||||||
Dict.get field.name model.visibleFields
|
Dict.get field.name model.visibleFields
|
||||||
@ -373,7 +374,8 @@ viewCustomField2 viewSettings model field =
|
|||||||
case visibleField of
|
case visibleField of
|
||||||
Just vf ->
|
Just vf ->
|
||||||
Html.map (CustomFieldInputMsg field)
|
Html.map (CustomFieldInputMsg field)
|
||||||
(Comp.CustomFieldInput.view2 "mt-2"
|
(Comp.CustomFieldInput.view2 texts.customFieldInput
|
||||||
|
"mt-2"
|
||||||
(viewSettings.fieldIcon vf.field)
|
(viewSettings.fieldIcon vf.field)
|
||||||
vf.inputModel
|
vf.inputModel
|
||||||
)
|
)
|
||||||
|
@ -47,7 +47,7 @@ emptyModel =
|
|||||||
{ settings = Api.Model.EmailSettings.empty
|
{ settings = Api.Model.EmailSettings.empty
|
||||||
, name = ""
|
, name = ""
|
||||||
, host = ""
|
, host = ""
|
||||||
, portField = Comp.IntField.init (Just 0) Nothing True "SMTP Port"
|
, portField = Comp.IntField.init (Just 0) Nothing True
|
||||||
, portNum = Nothing
|
, portNum = Nothing
|
||||||
, user = Nothing
|
, user = Nothing
|
||||||
, passField = Comp.PasswordInput.init
|
, passField = Comp.PasswordInput.init
|
||||||
@ -68,7 +68,7 @@ init ems =
|
|||||||
{ settings = ems
|
{ settings = ems
|
||||||
, name = ems.name
|
, name = ems.name
|
||||||
, host = ems.smtpHost
|
, host = ems.smtpHost
|
||||||
, portField = Comp.IntField.init (Just 0) Nothing True "SMTP Port"
|
, portField = Comp.IntField.init (Just 0) Nothing True
|
||||||
, portNum = ems.smtpPort
|
, portNum = ems.smtpPort
|
||||||
, user = ems.smtpUser
|
, user = ems.smtpUser
|
||||||
, passField = Comp.PasswordInput.init
|
, passField = Comp.PasswordInput.init
|
||||||
@ -225,9 +225,12 @@ view2 texts settings model =
|
|||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
, Html.map PortMsg
|
, Html.map PortMsg
|
||||||
(Comp.IntField.viewWithInfo2 ""
|
(Comp.IntField.view
|
||||||
model.portNum
|
{ label = texts.smtpPort
|
||||||
""
|
, info = ""
|
||||||
|
, number = model.portNum
|
||||||
|
, classes = ""
|
||||||
|
}
|
||||||
model.portField
|
model.portField
|
||||||
)
|
)
|
||||||
, div [ class "col-span-4 sm:col-span-2" ]
|
, div [ class "col-span-4 sm:col-span-2" ]
|
||||||
|
@ -250,7 +250,9 @@ viewForm2 : Texts -> UiSettings -> Model -> Html Msg
|
|||||||
viewForm2 texts settings model =
|
viewForm2 texts settings model =
|
||||||
let
|
let
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteConnection
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteConnection
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
div [ class "flex flex-col md:relative" ]
|
div [ class "flex flex-col md:relative" ]
|
||||||
[ MB.view
|
[ MB.view
|
||||||
@ -302,5 +304,8 @@ viewForm2 texts settings model =
|
|||||||
dimmerSettings
|
dimmerSettings
|
||||||
model.deleteConfirm
|
model.deleteConfirm
|
||||||
)
|
)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -258,7 +258,9 @@ viewForm2 texts model =
|
|||||||
model.formModel.equipment.id == ""
|
model.formModel.equipment.id == ""
|
||||||
|
|
||||||
dimmerSettings2 =
|
dimmerSettings2 =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteEquipment
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteEquipment
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
Html.form
|
Html.form
|
||||||
[ class "relative flex flex-col"
|
[ class "relative flex flex-col"
|
||||||
@ -322,5 +324,8 @@ viewForm2 texts model =
|
|||||||
[ Maybe.withDefault "" model.formError |> text
|
[ Maybe.withDefault "" model.formError |> text
|
||||||
]
|
]
|
||||||
, Html.map FormMsg (Comp.EquipmentForm.view2 texts.equipmentForm model.formModel)
|
, Html.map FormMsg (Comp.EquipmentForm.view2 texts.equipmentForm model.formModel)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -286,7 +286,9 @@ view2 texts flags model =
|
|||||||
|
|
||||||
dimmerSettings : Comp.YesNoDimmer.Settings
|
dimmerSettings : Comp.YesNoDimmer.Settings
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteThisFolder
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteThisFolder
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
div [ class "flex flex-col md:relative" ]
|
div [ class "flex flex-col md:relative" ]
|
||||||
(viewButtons2 texts model
|
(viewButtons2 texts model
|
||||||
|
@ -156,25 +156,20 @@ viewDrop2 dropModel constr model =
|
|||||||
highlightDrop =
|
highlightDrop =
|
||||||
DD.getDropId dropModel == Just DD.FolderRemove
|
DD.getDropId dropModel == Just DD.FolderRemove
|
||||||
in
|
in
|
||||||
div [ class "ui list" ]
|
div []
|
||||||
[ div [ class "item" ]
|
[ div
|
||||||
[ i [ class "folder open icon" ] []
|
(classList
|
||||||
, div [ class "content" ]
|
[ ( "hidden", True )
|
||||||
[ div
|
, ( "current-drop-target", highlightDrop )
|
||||||
(classList
|
|
||||||
[ ( "hidden", True )
|
|
||||||
, ( "current-drop-target", highlightDrop )
|
|
||||||
]
|
|
||||||
:: DD.droppable FolderDDMsg DD.FolderRemove
|
|
||||||
-- note: re-enable this when adding a "no-folder selection"
|
|
||||||
-- this enables a drop target that removes a folder
|
|
||||||
)
|
|
||||||
[ text "Folders"
|
|
||||||
]
|
|
||||||
, div [ class "flex flex-col space-y-2 md:space-y-1" ]
|
|
||||||
(renderItems2 dropModel constr model)
|
|
||||||
]
|
]
|
||||||
|
:: DD.droppable FolderDDMsg DD.FolderRemove
|
||||||
|
-- note: re-enable this when adding a "no-folder selection"
|
||||||
|
-- this enables a drop target that removes a folder
|
||||||
|
)
|
||||||
|
[ text "Folders"
|
||||||
]
|
]
|
||||||
|
, div [ class "flex flex-col space-y-2 md:space-y-1" ]
|
||||||
|
(renderItems2 dropModel constr model)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ emptyModel =
|
|||||||
{ settings = Api.Model.ImapSettings.empty
|
{ settings = Api.Model.ImapSettings.empty
|
||||||
, name = ""
|
, name = ""
|
||||||
, host = ""
|
, host = ""
|
||||||
, portField = Comp.IntField.init (Just 0) Nothing True "IMAP Port"
|
, portField = Comp.IntField.init (Just 0) Nothing True
|
||||||
, portNum = Nothing
|
, portNum = Nothing
|
||||||
, user = Nothing
|
, user = Nothing
|
||||||
, passField = Comp.PasswordInput.init
|
, passField = Comp.PasswordInput.init
|
||||||
@ -66,7 +66,7 @@ init ems =
|
|||||||
{ settings = ems
|
{ settings = ems
|
||||||
, name = ems.name
|
, name = ems.name
|
||||||
, host = ems.imapHost
|
, host = ems.imapHost
|
||||||
, portField = Comp.IntField.init (Just 0) Nothing True "IMAP Port"
|
, portField = Comp.IntField.init (Just 0) Nothing True
|
||||||
, portNum = ems.imapPort
|
, portNum = ems.imapPort
|
||||||
, user = ems.imapUser
|
, user = ems.imapUser
|
||||||
, passField = Comp.PasswordInput.init
|
, passField = Comp.PasswordInput.init
|
||||||
@ -216,9 +216,12 @@ view2 texts settings model =
|
|||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
, Html.map PortMsg
|
, Html.map PortMsg
|
||||||
(Comp.IntField.viewWithInfo2 ""
|
(Comp.IntField.view
|
||||||
model.portNum
|
{ label = texts.imapPort
|
||||||
""
|
, info = ""
|
||||||
|
, number = model.portNum
|
||||||
|
, classes = ""
|
||||||
|
}
|
||||||
model.portField
|
model.portField
|
||||||
)
|
)
|
||||||
, div [ class "col-span-4 sm:col-span-2" ]
|
, div [ class "col-span-4 sm:col-span-2" ]
|
||||||
|
@ -251,7 +251,9 @@ viewForm2 : Texts -> UiSettings -> Model -> Html Msg
|
|||||||
viewForm2 texts settings model =
|
viewForm2 texts settings model =
|
||||||
let
|
let
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteSettings
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteSettings
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
div [ class "flex flex-col md:relative" ]
|
div [ class "flex flex-col md:relative" ]
|
||||||
[ MB.view
|
[ MB.view
|
||||||
@ -304,5 +306,8 @@ viewForm2 texts settings model =
|
|||||||
dimmerSettings
|
dimmerSettings
|
||||||
model.deleteConfirm
|
model.deleteConfirm
|
||||||
)
|
)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -5,11 +5,8 @@ module Comp.IntField exposing
|
|||||||
, init
|
, init
|
||||||
, update
|
, update
|
||||||
, view
|
, view
|
||||||
, viewWithInfo2
|
|
||||||
)
|
)
|
||||||
|
|
||||||
--- L10N TODO
|
|
||||||
|
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onInput)
|
import Html.Events exposing (onInput)
|
||||||
@ -20,7 +17,6 @@ import Styles as S
|
|||||||
type alias Model =
|
type alias Model =
|
||||||
{ min : Maybe Int
|
{ min : Maybe Int
|
||||||
, max : Maybe Int
|
, max : Maybe Int
|
||||||
, label : String
|
|
||||||
, error : Maybe String
|
, error : Maybe String
|
||||||
, lastInput : String
|
, lastInput : String
|
||||||
, optional : Bool
|
, optional : Bool
|
||||||
@ -31,11 +27,10 @@ type Msg
|
|||||||
= SetValue String
|
= SetValue String
|
||||||
|
|
||||||
|
|
||||||
init : Maybe Int -> Maybe Int -> Bool -> String -> Model
|
init : Maybe Int -> Maybe Int -> Bool -> Model
|
||||||
init min max opt label =
|
init min max opt =
|
||||||
{ min = min
|
{ min = min
|
||||||
, max = max
|
, max = max
|
||||||
, label = label
|
|
||||||
, error = Nothing
|
, error = Nothing
|
||||||
, lastInput = ""
|
, lastInput = ""
|
||||||
, optional = opt
|
, optional = opt
|
||||||
@ -149,11 +144,11 @@ view cfg model =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewWithInfo2 : String -> Maybe Int -> String -> Model -> Html Msg
|
viewWithInfo2 : String -> String -> Maybe Int -> String -> Model -> Html Msg
|
||||||
viewWithInfo2 info nval classes model =
|
viewWithInfo2 label info nval classes model =
|
||||||
let
|
let
|
||||||
cfg =
|
cfg =
|
||||||
{ label = model.label
|
{ label = label
|
||||||
, info = info
|
, info = info
|
||||||
, number = nval
|
, number = nval
|
||||||
, classes = classes
|
, classes = classes
|
||||||
|
@ -52,7 +52,7 @@ view2 texts flags settings model =
|
|||||||
formTabs texts flags settings model
|
formTabs texts flags settings model
|
||||||
|
|
||||||
allTabNames =
|
allTabNames =
|
||||||
List.map .title tabs
|
List.map .name tabs
|
||||||
|> Set.fromList
|
|> Set.fromList
|
||||||
in
|
in
|
||||||
div (class "flex flex-col relative" :: keyAttr)
|
div (class "flex flex-col relative" :: keyAttr)
|
||||||
@ -127,7 +127,7 @@ formTabs texts flags settings model =
|
|||||||
|
|
||||||
folderCfg =
|
folderCfg =
|
||||||
{ makeOption = Util.Folder.mkFolderOption flags model.allFolders
|
{ makeOption = Util.Folder.mkFolderOption flags model.allFolders
|
||||||
, placeholder = ""
|
, placeholder = texts.selectPlaceholder
|
||||||
, labelColor = \_ -> \_ -> ""
|
, labelColor = \_ -> \_ -> ""
|
||||||
, style = dds
|
, style = dds
|
||||||
}
|
}
|
||||||
@ -254,6 +254,7 @@ formTabs texts flags settings model =
|
|||||||
[ div [ class "mb-4" ]
|
[ div [ class "mb-4" ]
|
||||||
[ Html.map CustomFieldMsg
|
[ Html.map CustomFieldMsg
|
||||||
(Comp.CustomFieldMultiInput.view2
|
(Comp.CustomFieldMultiInput.view2
|
||||||
|
texts.customFieldInput
|
||||||
customFieldSettings
|
customFieldSettings
|
||||||
model.customFieldsModel
|
model.customFieldsModel
|
||||||
)
|
)
|
||||||
|
@ -39,7 +39,7 @@ import Html.Attributes exposing (..)
|
|||||||
import Html.Events exposing (onClick, onInput)
|
import Html.Events exposing (onClick, onInput)
|
||||||
import Http
|
import Http
|
||||||
import Markdown
|
import Markdown
|
||||||
import Messages.MultiEditComp exposing (Texts)
|
import Messages.MultiEditMenuComp exposing (Texts)
|
||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Set exposing (Set)
|
import Set exposing (Set)
|
||||||
import Styles as S
|
import Styles as S
|
||||||
@ -775,6 +775,7 @@ renderEditForm2 texts flags cfg settings model =
|
|||||||
, body =
|
, body =
|
||||||
[ Html.map CustomFieldMsg
|
[ Html.map CustomFieldMsg
|
||||||
(Comp.CustomFieldMultiInput.view2
|
(Comp.CustomFieldMultiInput.view2
|
||||||
|
texts.customFieldMultiInput
|
||||||
customFieldSettings
|
customFieldSettings
|
||||||
model.customFieldModel
|
model.customFieldModel
|
||||||
)
|
)
|
||||||
|
@ -52,6 +52,7 @@ view texts settings model pos attach =
|
|||||||
Just am ->
|
Just am ->
|
||||||
Html.map (AttachMetaMsg attach.id)
|
Html.map (AttachMetaMsg attach.id)
|
||||||
(Comp.AttachmentMeta.view2
|
(Comp.AttachmentMeta.view2
|
||||||
|
texts.attachmentMeta
|
||||||
[ class "border-r border-l border-b dark:border-bluegray-600 px-2" ]
|
[ class "border-r border-l border-b dark:border-bluegray-600 px-2" ]
|
||||||
am
|
am
|
||||||
)
|
)
|
||||||
|
@ -250,7 +250,10 @@ sendMailForm texts settings model =
|
|||||||
[ div [ class "text-lg font-bold" ]
|
[ div [ class "text-lg font-bold" ]
|
||||||
[ text texts.sendThisItemViaEmail
|
[ text texts.sendThisItemViaEmail
|
||||||
]
|
]
|
||||||
, B.loadingDimmer model.mailSending
|
, B.loadingDimmer
|
||||||
|
{ active = model.mailSending
|
||||||
|
, label = texts.sendingMailNow
|
||||||
|
}
|
||||||
, Html.map ItemMailMsg (Comp.ItemMail.view2 texts.itemMail settings model.itemMail)
|
, Html.map ItemMailMsg (Comp.ItemMail.view2 texts.itemMail settings model.itemMail)
|
||||||
, div
|
, div
|
||||||
[ classList
|
[ classList
|
||||||
|
@ -152,7 +152,7 @@ init flags =
|
|||||||
, recipients = []
|
, recipients = []
|
||||||
, recipientsModel = Comp.EmailInput.init
|
, recipientsModel = Comp.EmailInput.init
|
||||||
, remindDays = Just 1
|
, remindDays = Just 1
|
||||||
, remindDaysModel = Comp.IntField.init (Just 1) Nothing True "Remind Days"
|
, remindDaysModel = Comp.IntField.init (Just 1) Nothing True
|
||||||
, enabled = False
|
, enabled = False
|
||||||
, capOverdue = False
|
, capOverdue = False
|
||||||
, schedule = initialSchedule
|
, schedule = initialSchedule
|
||||||
@ -480,7 +480,9 @@ view2 : Texts -> String -> UiSettings -> Model -> Html Msg
|
|||||||
view2 texts extraClasses settings model =
|
view2 texts extraClasses settings model =
|
||||||
let
|
let
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteTask
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteTask
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
|
|
||||||
startOnceBtn =
|
startOnceBtn =
|
||||||
MB.SecondaryButton
|
MB.SecondaryButton
|
||||||
@ -506,7 +508,10 @@ view2 texts extraClasses settings model =
|
|||||||
dimmerSettings
|
dimmerSettings
|
||||||
model.yesNoDelete
|
model.yesNoDelete
|
||||||
)
|
)
|
||||||
, B.loadingDimmer (model.loading > 0)
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading > 0
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
, MB.view
|
, MB.view
|
||||||
{ start =
|
{ start =
|
||||||
[ MB.PrimaryButton
|
[ MB.PrimaryButton
|
||||||
@ -634,10 +639,12 @@ view2 texts extraClasses settings model =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
, Html.map RemindDaysMsg
|
, Html.map RemindDaysMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
texts.remindDaysInfo
|
{ label = texts.remindDaysLabel
|
||||||
model.remindDays
|
, info = texts.remindDaysInfo
|
||||||
"mb-4"
|
, number = model.remindDays
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.remindDaysModel
|
model.remindDaysModel
|
||||||
)
|
)
|
||||||
, div [ class "mb-4" ]
|
, div [ class "mb-4" ]
|
||||||
@ -668,7 +675,9 @@ view2 texts extraClasses settings model =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
, Html.map CalEventMsg
|
, Html.map CalEventMsg
|
||||||
(Comp.CalEventInput.view2 ""
|
(Comp.CalEventInput.view2
|
||||||
|
texts.calEventInput
|
||||||
|
""
|
||||||
(Data.Validated.value model.schedule)
|
(Data.Validated.value model.schedule)
|
||||||
model.scheduleModel
|
model.scheduleModel
|
||||||
)
|
)
|
||||||
|
@ -238,7 +238,10 @@ viewTable2 texts model =
|
|||||||
, rootClasses = "mb-4"
|
, rootClasses = "mb-4"
|
||||||
}
|
}
|
||||||
, Html.map TableMsg (Comp.OrgTable.view2 texts.orgTable model.tableModel)
|
, Html.map TableMsg (Comp.OrgTable.view2 texts.orgTable model.tableModel)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -249,7 +252,9 @@ viewForm2 texts settings model =
|
|||||||
model.formModel.org.id == ""
|
model.formModel.org.id == ""
|
||||||
|
|
||||||
dimmerSettings2 =
|
dimmerSettings2 =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteOrg
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteOrg
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
Html.form
|
Html.form
|
||||||
[ class "md:relative flex flex-col"
|
[ class "md:relative flex flex-col"
|
||||||
@ -319,5 +324,8 @@ viewForm2 texts settings model =
|
|||||||
settings
|
settings
|
||||||
model.formModel
|
model.formModel
|
||||||
)
|
)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -275,7 +275,10 @@ viewTable2 texts model =
|
|||||||
, rootClasses = "mb-4"
|
, rootClasses = "mb-4"
|
||||||
}
|
}
|
||||||
, Html.map TableMsg (Comp.PersonTable.view2 texts.personTable model.tableModel)
|
, Html.map TableMsg (Comp.PersonTable.view2 texts.personTable model.tableModel)
|
||||||
, B.loadingDimmer (isLoading model)
|
, B.loadingDimmer
|
||||||
|
{ active = isLoading model
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -286,7 +289,9 @@ viewForm2 texts settings model =
|
|||||||
model.formModel.person.id == ""
|
model.formModel.person.id == ""
|
||||||
|
|
||||||
dimmerSettings2 =
|
dimmerSettings2 =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeletePerson
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeletePerson
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
Html.form
|
Html.form
|
||||||
[ class "md:relative flex flex-col"
|
[ class "md:relative flex flex-col"
|
||||||
@ -355,5 +360,8 @@ viewForm2 texts settings model =
|
|||||||
settings
|
settings
|
||||||
model.formModel
|
model.formModel
|
||||||
)
|
)
|
||||||
, B.loadingDimmer (isLoading model)
|
, B.loadingDimmer
|
||||||
|
{ active = isLoading model
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -221,7 +221,7 @@ init flags =
|
|||||||
, enabled = False
|
, enabled = False
|
||||||
, deleteMail = False
|
, deleteMail = False
|
||||||
, receivedHours = Nothing
|
, receivedHours = Nothing
|
||||||
, receivedHoursModel = Comp.IntField.init (Just 1) Nothing True "Received Since Hours"
|
, receivedHoursModel = Comp.IntField.init (Just 1) Nothing True
|
||||||
, foldersModel = Comp.StringListInput.init
|
, foldersModel = Comp.StringListInput.init
|
||||||
, folders = []
|
, folders = []
|
||||||
, targetFolder = Nothing
|
, targetFolder = Nothing
|
||||||
@ -740,7 +740,7 @@ view2 : Texts -> Flags -> String -> UiSettings -> Model -> Html Msg
|
|||||||
view2 texts flags extraClasses settings model =
|
view2 texts flags extraClasses settings model =
|
||||||
let
|
let
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteTask
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteTask texts.basics.yes texts.basics.no
|
||||||
|
|
||||||
startOnceBtn =
|
startOnceBtn =
|
||||||
MB.SecondaryButton
|
MB.SecondaryButton
|
||||||
@ -813,7 +813,10 @@ view2 texts flags extraClasses settings model =
|
|||||||
dimmerSettings
|
dimmerSettings
|
||||||
model.yesNoDelete
|
model.yesNoDelete
|
||||||
)
|
)
|
||||||
, B.loadingDimmer (model.loading > 0)
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading > 0
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -926,10 +929,12 @@ viewProcessing2 texts model =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
, Html.map ReceivedHoursMsg
|
, Html.map ReceivedHoursMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
texts.receivedHoursInfo
|
{ label = texts.receivedHoursLabel
|
||||||
model.receivedHours
|
, info = texts.receivedHoursInfo
|
||||||
"mb-4"
|
, number = model.receivedHours
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.receivedHoursModel
|
model.receivedHoursModel
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@ -1163,7 +1168,9 @@ viewSchedule2 texts model =
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
, Html.map CalEventMsg
|
, Html.map CalEventMsg
|
||||||
(Comp.CalEventInput.view2 ""
|
(Comp.CalEventInput.view2
|
||||||
|
texts.calEventInput
|
||||||
|
""
|
||||||
(Data.Validated.value model.schedule)
|
(Data.Validated.value model.schedule)
|
||||||
model.scheduleModel
|
model.scheduleModel
|
||||||
)
|
)
|
||||||
|
@ -1202,6 +1202,7 @@ searchTabs texts ddd flags settings model =
|
|||||||
, body =
|
, body =
|
||||||
List.map (Html.map TagSelectMsg)
|
List.map (Html.map TagSelectMsg)
|
||||||
(Comp.TagSelect.viewTagsDrop2
|
(Comp.TagSelect.viewTagsDrop2
|
||||||
|
texts.tagSelect
|
||||||
ddd.model
|
ddd.model
|
||||||
tagSelectWM
|
tagSelectWM
|
||||||
settings
|
settings
|
||||||
@ -1303,6 +1304,7 @@ searchTabs texts ddd flags settings model =
|
|||||||
, body =
|
, body =
|
||||||
[ Html.map CustomFieldMsg
|
[ Html.map CustomFieldMsg
|
||||||
(Comp.CustomFieldMultiInput.view2
|
(Comp.CustomFieldMultiInput.view2
|
||||||
|
texts.customFieldMultiInput
|
||||||
{ showAddButton = False
|
{ showAddButton = False
|
||||||
, classes = ""
|
, classes = ""
|
||||||
, fieldIcon = \_ -> Nothing
|
, fieldIcon = \_ -> Nothing
|
||||||
|
@ -249,7 +249,10 @@ viewTable2 texts model =
|
|||||||
, rootClasses = "mb-4"
|
, rootClasses = "mb-4"
|
||||||
}
|
}
|
||||||
, Html.map TableMsg (Comp.SourceTable.view2 texts.sourceTable model.sources)
|
, Html.map TableMsg (Comp.SourceTable.view2 texts.sourceTable model.sources)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -386,7 +389,9 @@ viewForm2 texts flags settings model =
|
|||||||
model.formModel.source.source.id == ""
|
model.formModel.source.source.id == ""
|
||||||
|
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteSource
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteSource
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
[ if newSource then
|
[ if newSource then
|
||||||
h3 [ class S.header2 ]
|
h3 [ class S.header2 ]
|
||||||
@ -449,6 +454,9 @@ viewForm2 texts flags settings model =
|
|||||||
dimmerSettings
|
dimmerSettings
|
||||||
model.deleteConfirm
|
model.deleteConfirm
|
||||||
)
|
)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -264,7 +264,9 @@ viewForm2 texts model =
|
|||||||
model.tagFormModel.tag.id == ""
|
model.tagFormModel.tag.id == ""
|
||||||
|
|
||||||
dimmerSettings2 =
|
dimmerSettings2 =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteTag
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteTag
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
Html.form
|
Html.form
|
||||||
[ class "relative flex flex-col"
|
[ class "relative flex flex-col"
|
||||||
@ -328,5 +330,8 @@ viewForm2 texts model =
|
|||||||
[ Maybe.withDefault "" model.formError |> text
|
[ Maybe.withDefault "" model.formError |> text
|
||||||
]
|
]
|
||||||
, Html.map FormMsg (Comp.TagForm.view2 texts.tagForm model.tagFormModel)
|
, Html.map FormMsg (Comp.TagForm.view2 texts.tagForm model.tagFormModel)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -26,6 +26,7 @@ import Dict exposing (Dict)
|
|||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onClick, onInput)
|
import Html.Events exposing (onClick, onInput)
|
||||||
|
import Messages.TagSelectComp exposing (Texts)
|
||||||
import Set
|
import Set
|
||||||
import Simple.Fuzzy
|
import Simple.Fuzzy
|
||||||
import String as S
|
import String as S
|
||||||
@ -422,17 +423,17 @@ catState model name =
|
|||||||
--- View2
|
--- View2
|
||||||
|
|
||||||
|
|
||||||
viewAll2 : DD.Model -> UiSettings -> Selection -> Model -> List (Html Msg)
|
viewAll2 : Texts -> DD.Model -> UiSettings -> Selection -> Model -> List (Html Msg)
|
||||||
viewAll2 ddm settings sel model =
|
viewAll2 texts ddm settings sel model =
|
||||||
let
|
let
|
||||||
wm =
|
wm =
|
||||||
makeWorkModel sel model
|
makeWorkModel sel model
|
||||||
in
|
in
|
||||||
viewTagsDrop2 ddm wm settings model ++ [ viewCats2 settings wm model ]
|
viewTagsDrop2 texts ddm wm settings model ++ [ viewCats2 settings wm model ]
|
||||||
|
|
||||||
|
|
||||||
viewTagsDrop2 : DD.Model -> WorkModel -> UiSettings -> Model -> List (Html Msg)
|
viewTagsDrop2 : Texts -> DD.Model -> WorkModel -> UiSettings -> Model -> List (Html Msg)
|
||||||
viewTagsDrop2 ddm wm settings model =
|
viewTagsDrop2 texts ddm wm settings model =
|
||||||
[ div [ class "flex flex-col" ]
|
[ div [ class "flex flex-col" ]
|
||||||
[ div [ class "flex flex-row h-6 items-center text-xs mb-2" ]
|
[ div [ class "flex flex-row h-6 items-center text-xs mb-2" ]
|
||||||
[ a
|
[ a
|
||||||
@ -442,16 +443,16 @@ viewTagsDrop2 ddm wm settings model =
|
|||||||
, onClick ToggleShowEmpty
|
, onClick ToggleShowEmpty
|
||||||
]
|
]
|
||||||
[ if model.showEmpty then
|
[ if model.showEmpty then
|
||||||
text " Hide empty"
|
text (" " ++ texts.hideEmpty)
|
||||||
|
|
||||||
else
|
else
|
||||||
text " Show empty"
|
text (" " ++ texts.showEmpty)
|
||||||
]
|
]
|
||||||
, div [ class "flex-grow" ] []
|
, div [ class "flex-grow" ] []
|
||||||
, div [ class " relative h-6" ]
|
, div [ class " relative h-6" ]
|
||||||
[ input
|
[ input
|
||||||
[ type_ "text"
|
[ type_ "text"
|
||||||
, placeholder "Filter …"
|
, placeholder texts.filterPlaceholder
|
||||||
, onInput Search
|
, onInput Search
|
||||||
, class "bg-blue-50 w-30 h-6 px-0 py-0 text-xs"
|
, class "bg-blue-50 w-30 h-6 px-0 py-0 text-xs"
|
||||||
, class "border-0 border-b border-gray-200 focus:ring-0 focus:border-black"
|
, class "border-0 border-b border-gray-200 focus:ring-0 focus:border-black"
|
||||||
|
@ -109,7 +109,6 @@ init flags settings =
|
|||||||
(Just 10)
|
(Just 10)
|
||||||
(Just flags.config.maxPageSize)
|
(Just flags.config.maxPageSize)
|
||||||
False
|
False
|
||||||
"Page size"
|
|
||||||
, tagColors = settings.tagCategoryColors
|
, tagColors = settings.tagCategoryColors
|
||||||
, tagColorModel =
|
, tagColorModel =
|
||||||
Comp.ColorTagger.init
|
Comp.ColorTagger.init
|
||||||
@ -122,28 +121,24 @@ init flags settings =
|
|||||||
(Just 0)
|
(Just 0)
|
||||||
(Just flags.config.maxNoteLength)
|
(Just flags.config.maxNoteLength)
|
||||||
False
|
False
|
||||||
"Max. Note Length"
|
|
||||||
, searchMenuFolderCount = Just settings.searchMenuFolderCount
|
, searchMenuFolderCount = Just settings.searchMenuFolderCount
|
||||||
, searchMenuFolderCountModel =
|
, searchMenuFolderCountModel =
|
||||||
Comp.IntField.init
|
Comp.IntField.init
|
||||||
(Just 0)
|
(Just 0)
|
||||||
(Just 2000)
|
(Just 2000)
|
||||||
False
|
False
|
||||||
"Number of folders in search menu"
|
|
||||||
, searchMenuTagCount = Just settings.searchMenuTagCount
|
, searchMenuTagCount = Just settings.searchMenuTagCount
|
||||||
, searchMenuTagCountModel =
|
, searchMenuTagCountModel =
|
||||||
Comp.IntField.init
|
Comp.IntField.init
|
||||||
(Just 0)
|
(Just 0)
|
||||||
(Just 2000)
|
(Just 2000)
|
||||||
False
|
False
|
||||||
"Number of tags in search menu"
|
|
||||||
, searchMenuTagCatCount = Just settings.searchMenuTagCatCount
|
, searchMenuTagCatCount = Just settings.searchMenuTagCatCount
|
||||||
, searchMenuTagCatCountModel =
|
, searchMenuTagCatCountModel =
|
||||||
Comp.IntField.init
|
Comp.IntField.init
|
||||||
(Just 0)
|
(Just 0)
|
||||||
(Just 2000)
|
(Just 2000)
|
||||||
False
|
False
|
||||||
"Number of categories in search menu"
|
|
||||||
, formFields = settings.formFields
|
, formFields = settings.formFields
|
||||||
, itemDetailShortcuts = settings.itemDetailShortcuts
|
, itemDetailShortcuts = settings.itemDetailShortcuts
|
||||||
, cardPreviewSize = settings.cardPreviewSize
|
, cardPreviewSize = settings.cardPreviewSize
|
||||||
@ -535,10 +530,12 @@ settingFormTabs texts flags _ model =
|
|||||||
, info = Nothing
|
, info = Nothing
|
||||||
, body =
|
, body =
|
||||||
[ Html.map SearchPageSizeMsg
|
[ Html.map SearchPageSizeMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
(texts.maxResultsPerPageInfo flags.config.maxPageSize)
|
{ label = texts.maxResultsPerPage
|
||||||
model.itemSearchPageSize
|
, info = texts.maxResultsPerPageInfo flags.config.maxPageSize
|
||||||
"mb-4"
|
, number = model.itemSearchPageSize
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.searchPageSizeModel
|
model.searchPageSizeModel
|
||||||
)
|
)
|
||||||
, div [ class "mb-4" ]
|
, div [ class "mb-4" ]
|
||||||
@ -567,10 +564,12 @@ settingFormTabs texts flags _ model =
|
|||||||
, info = Nothing
|
, info = Nothing
|
||||||
, body =
|
, body =
|
||||||
[ Html.map NoteLengthMsg
|
[ Html.map NoteLengthMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
(texts.maxNoteSizeInfo flags.config.maxNoteLength)
|
{ label = texts.maxNoteSize
|
||||||
model.itemSearchNoteLength
|
, info = texts.maxNoteSizeInfo flags.config.maxNoteLength
|
||||||
"mb-4"
|
, number = model.itemSearchNoteLength
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.searchNoteLengthModel
|
model.searchNoteLengthModel
|
||||||
)
|
)
|
||||||
, Html.map CardPreviewSizeMsg
|
, Html.map CardPreviewSizeMsg
|
||||||
@ -636,24 +635,30 @@ settingFormTabs texts flags _ model =
|
|||||||
, info = Nothing
|
, info = Nothing
|
||||||
, body =
|
, body =
|
||||||
[ Html.map SearchMenuTagMsg
|
[ Html.map SearchMenuTagMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
texts.searchMenuTagCountInfo
|
{ label = texts.searchMenuTagCount
|
||||||
model.searchMenuTagCount
|
, info = texts.searchMenuTagCountInfo
|
||||||
"mb-4"
|
, number = model.searchMenuTagCount
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.searchMenuTagCountModel
|
model.searchMenuTagCountModel
|
||||||
)
|
)
|
||||||
, Html.map SearchMenuTagCatMsg
|
, Html.map SearchMenuTagCatMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
texts.searchMenuCatCountInfo
|
{ label = texts.searchMenuCatCount
|
||||||
model.searchMenuTagCatCount
|
, info = texts.searchMenuCatCountInfo
|
||||||
"mb-4"
|
, number = model.searchMenuTagCatCount
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.searchMenuTagCatCountModel
|
model.searchMenuTagCatCountModel
|
||||||
)
|
)
|
||||||
, Html.map SearchMenuFolderMsg
|
, Html.map SearchMenuFolderMsg
|
||||||
(Comp.IntField.viewWithInfo2
|
(Comp.IntField.view
|
||||||
texts.searchMenuFolderCountInfo
|
{ label = texts.searchMenuFolderCount
|
||||||
model.searchMenuFolderCount
|
, info = texts.searchMenuFolderCountInfo
|
||||||
"mb-4"
|
, number = model.searchMenuFolderCount
|
||||||
|
, classes = "mb-4"
|
||||||
|
}
|
||||||
model.searchMenuFolderCountModel
|
model.searchMenuFolderCountModel
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -239,7 +239,10 @@ viewTable2 texts model =
|
|||||||
, rootClasses = "mb-4"
|
, rootClasses = "mb-4"
|
||||||
}
|
}
|
||||||
, Html.map TableMsg (Comp.UserTable.view2 texts.userTable model.tableModel)
|
, Html.map TableMsg (Comp.UserTable.view2 texts.userTable model.tableModel)
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -251,7 +254,9 @@ viewForm2 texts settings model =
|
|||||||
|
|
||||||
dimmerSettings : Comp.YesNoDimmer.Settings
|
dimmerSettings : Comp.YesNoDimmer.Settings
|
||||||
dimmerSettings =
|
dimmerSettings =
|
||||||
Comp.YesNoDimmer.defaultSettings2 texts.reallyDeleteUser
|
Comp.YesNoDimmer.defaultSettings texts.reallyDeleteUser
|
||||||
|
texts.basics.yes
|
||||||
|
texts.basics.no
|
||||||
in
|
in
|
||||||
Html.form
|
Html.form
|
||||||
[ class "flex flex-col md:relative"
|
[ class "flex flex-col md:relative"
|
||||||
@ -317,5 +322,8 @@ viewForm2 texts settings model =
|
|||||||
FormErrorInvalid ->
|
FormErrorInvalid ->
|
||||||
text texts.pleaseCorrectErrors
|
text texts.pleaseCorrectErrors
|
||||||
]
|
]
|
||||||
, B.loadingDimmer model.loading
|
, B.loadingDimmer
|
||||||
|
{ active = model.loading
|
||||||
|
, label = texts.basics.loading
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -4,7 +4,6 @@ module Comp.YesNoDimmer exposing
|
|||||||
, Settings
|
, Settings
|
||||||
, activate
|
, activate
|
||||||
, defaultSettings
|
, defaultSettings
|
||||||
, defaultSettings2
|
|
||||||
, disable
|
, disable
|
||||||
, emptyModel
|
, emptyModel
|
||||||
, initActive
|
, initActive
|
||||||
@ -58,24 +57,13 @@ type alias Settings =
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
defaultSettings : Settings
|
defaultSettings : String -> String -> String -> Settings
|
||||||
defaultSettings =
|
defaultSettings msg yesLabel noLabel =
|
||||||
{ message = "Delete this item permanently?"
|
|
||||||
, headerIcon = "exclamation icon"
|
|
||||||
, headerClass = "ui inverted icon header"
|
|
||||||
, confirmButton = "Yes, do it!"
|
|
||||||
, cancelButton = "No"
|
|
||||||
, extraClass = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
defaultSettings2 : String -> Settings
|
|
||||||
defaultSettings2 msg =
|
|
||||||
{ message = msg
|
{ message = msg
|
||||||
, headerIcon = "fa fa-exclamation-circle mr-3"
|
, headerIcon = "fa fa-exclamation-circle mr-3"
|
||||||
, headerClass = "text-2xl font-bold text-center w-full"
|
, headerClass = "text-2xl font-bold text-center w-full"
|
||||||
, confirmButton = "Yes, do it!"
|
, confirmButton = yesLabel
|
||||||
, cancelButton = "No"
|
, cancelButton = noLabel
|
||||||
, extraClass = ""
|
, extraClass = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
module Data.Money exposing
|
module Data.Money exposing
|
||||||
( Money
|
( Money
|
||||||
|
, MoneyParseError(..)
|
||||||
, format
|
, format
|
||||||
, fromString
|
, fromString
|
||||||
, normalizeInput
|
, normalizeInput
|
||||||
@ -11,7 +12,12 @@ type alias Money =
|
|||||||
Float
|
Float
|
||||||
|
|
||||||
|
|
||||||
fromString : String -> Result String Money
|
type MoneyParseError
|
||||||
|
= RequireTwoDigitsAfterDot String
|
||||||
|
| NoOrTooManyPoints String
|
||||||
|
|
||||||
|
|
||||||
|
fromString : String -> Result MoneyParseError Money
|
||||||
fromString str =
|
fromString str =
|
||||||
let
|
let
|
||||||
input =
|
input =
|
||||||
@ -28,13 +34,13 @@ fromString str =
|
|||||||
if index == (len - 3) then
|
if index == (len - 3) then
|
||||||
String.toFloat input
|
String.toFloat input
|
||||||
|> Maybe.map Ok
|
|> Maybe.map Ok
|
||||||
|> Maybe.withDefault (Err "Two digits required after the dot.")
|
|> Maybe.withDefault (Err (RequireTwoDigitsAfterDot str))
|
||||||
|
|
||||||
else
|
else
|
||||||
Err ("Two digits required after the dot: " ++ str)
|
Err (RequireTwoDigitsAfterDot str)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
Err "One single dot + digits required for money."
|
Err (NoOrTooManyPoints str)
|
||||||
|
|
||||||
|
|
||||||
format : Float -> String
|
format : Float -> String
|
||||||
|
34
modules/webapp/src/main/elm/Messages/AttachmentMetaComp.elm
Normal file
34
modules/webapp/src/main/elm/Messages/AttachmentMetaComp.elm
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
module Messages.AttachmentMetaComp exposing (..)
|
||||||
|
|
||||||
|
import Messages.Basics
|
||||||
|
|
||||||
|
|
||||||
|
type alias Texts =
|
||||||
|
{ basics : Messages.Basics.Texts
|
||||||
|
, extractedMetadata : String
|
||||||
|
, content : String
|
||||||
|
, labels : String
|
||||||
|
, proposals : String
|
||||||
|
, correspondentOrg : String
|
||||||
|
, correspondentPerson : String
|
||||||
|
, concerningPerson : String
|
||||||
|
, concerningEquipment : String
|
||||||
|
, itemDate : String
|
||||||
|
, itemDueDate : String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gb : Texts
|
||||||
|
gb =
|
||||||
|
{ basics = Messages.Basics.gb
|
||||||
|
, extractedMetadata = "Extracted Meta Data"
|
||||||
|
, content = "Content"
|
||||||
|
, labels = "Labels"
|
||||||
|
, proposals = "Proposals"
|
||||||
|
, correspondentOrg = "Correspondent Organization"
|
||||||
|
, correspondentPerson = "Correspondent Person"
|
||||||
|
, concerningPerson = "Concerning Person"
|
||||||
|
, concerningEquipment = "Concerning Equipment"
|
||||||
|
, itemDate = "Item Date"
|
||||||
|
, itemDueDate = "Item Due Date"
|
||||||
|
}
|
@ -20,6 +20,7 @@ type alias Texts =
|
|||||||
, yes : String
|
, yes : String
|
||||||
, no : String
|
, no : String
|
||||||
, chooseTag : String
|
, chooseTag : String
|
||||||
|
, loading : String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ gb =
|
|||||||
, yes = "Yes"
|
, yes = "Yes"
|
||||||
, no = "No"
|
, no = "No"
|
||||||
, chooseTag = "Choose a tag…"
|
, chooseTag = "Choose a tag…"
|
||||||
|
, loading = "Loading…"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
28
modules/webapp/src/main/elm/Messages/CalEventInputComp.elm
Normal file
28
modules/webapp/src/main/elm/Messages/CalEventInputComp.elm
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
module Messages.CalEventInputComp exposing (..)
|
||||||
|
|
||||||
|
|
||||||
|
type alias Texts =
|
||||||
|
{ weekday : String
|
||||||
|
, year : String
|
||||||
|
, month : String
|
||||||
|
, day : String
|
||||||
|
, hour : String
|
||||||
|
, minute : String
|
||||||
|
, error : String
|
||||||
|
, schedule : String
|
||||||
|
, next : String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gb : Texts
|
||||||
|
gb =
|
||||||
|
{ weekday = "Weekday"
|
||||||
|
, year = "Year"
|
||||||
|
, month = "Month"
|
||||||
|
, day = "Day"
|
||||||
|
, hour = "Hour"
|
||||||
|
, minute = "Minute"
|
||||||
|
, error = "Error"
|
||||||
|
, schedule = "Schedule"
|
||||||
|
, next = "Next"
|
||||||
|
}
|
@ -1,8 +1,11 @@
|
|||||||
module Messages.ChangePasswordFormComp exposing (..)
|
module Messages.ChangePasswordFormComp exposing (..)
|
||||||
|
|
||||||
|
import Messages.Basics
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ currentPassword : String
|
{ basics : Messages.Basics.Texts
|
||||||
|
, currentPassword : String
|
||||||
, newPassword : String
|
, newPassword : String
|
||||||
, repeatPassword : String
|
, repeatPassword : String
|
||||||
, currentPasswordPlaceholder : String
|
, currentPasswordPlaceholder : String
|
||||||
@ -13,7 +16,8 @@ type alias Texts =
|
|||||||
|
|
||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ currentPassword = "Current Password"
|
{ basics = Messages.Basics.gb
|
||||||
|
, currentPassword = "Current Password"
|
||||||
, newPassword = "New Password"
|
, newPassword = "New Password"
|
||||||
, repeatPassword = "New Password (repeat)"
|
, repeatPassword = "New Password (repeat)"
|
||||||
, currentPasswordPlaceholder = "Password"
|
, currentPasswordPlaceholder = "Password"
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
module Messages.ClassifierSettingsFormComp exposing (..)
|
module Messages.ClassifierSettingsFormComp exposing (..)
|
||||||
|
|
||||||
|
import Messages.CalEventInputComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ autoTaggingText : String
|
{ calEventInput : Messages.CalEventInputComp.Texts
|
||||||
|
, autoTaggingText : String
|
||||||
, blacklistOrWhitelist : String
|
, blacklistOrWhitelist : String
|
||||||
, whitelistLabel : String
|
, whitelistLabel : String
|
||||||
, blacklistLabel : String
|
, blacklistLabel : String
|
||||||
@ -14,7 +17,8 @@ type alias Texts =
|
|||||||
|
|
||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ autoTaggingText =
|
{ calEventInput = Messages.CalEventInputComp.gb
|
||||||
|
, autoTaggingText =
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Auto-tagging works by learning from existing documents. The more
|
Auto-tagging works by learning from existing documents. The more
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
module Messages.CustomFieldInputComp exposing (..)
|
||||||
|
|
||||||
|
|
||||||
|
type alias Texts =
|
||||||
|
{ errorNoValue : String
|
||||||
|
, errorNoNumber : String
|
||||||
|
, errorNoAmount : String
|
||||||
|
, errorNotANumber : String -> String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gb : Texts
|
||||||
|
gb =
|
||||||
|
{ errorNoValue = "Please fill in some value"
|
||||||
|
, errorNoNumber = "No number given"
|
||||||
|
, errorNoAmount = "No amount given"
|
||||||
|
, errorNotANumber = \str -> "Not a number: " ++ str
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
module Messages.CustomFieldMultiInputComp exposing (..)
|
||||||
|
|
||||||
|
import Messages.CustomFieldInputComp
|
||||||
|
|
||||||
|
|
||||||
|
type alias Texts =
|
||||||
|
{ customFieldInput : Messages.CustomFieldInputComp.Texts
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gb : Texts
|
||||||
|
gb =
|
||||||
|
{ customFieldInput = Messages.CustomFieldInputComp.gb
|
||||||
|
}
|
@ -1,10 +1,12 @@
|
|||||||
module Messages.EditFormComp exposing (..)
|
module Messages.EditFormComp exposing (..)
|
||||||
|
|
||||||
import Messages.Basics
|
import Messages.Basics
|
||||||
|
import Messages.CustomFieldMultiInputComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
|
, customFieldInput : Messages.CustomFieldMultiInputComp.Texts
|
||||||
, createNewCustomField : String
|
, createNewCustomField : String
|
||||||
, chooseDirection : String
|
, chooseDirection : String
|
||||||
, selectPlaceholder : String
|
, selectPlaceholder : String
|
||||||
@ -34,6 +36,7 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
|
, customFieldInput = Messages.CustomFieldMultiInputComp.gb
|
||||||
, createNewCustomField = "Create new custom field"
|
, createNewCustomField = "Create new custom field"
|
||||||
, chooseDirection = "Choose a direction…"
|
, chooseDirection = "Choose a direction…"
|
||||||
, selectPlaceholder = "Select…"
|
, selectPlaceholder = "Select…"
|
||||||
|
@ -11,6 +11,7 @@ type alias Texts =
|
|||||||
, connectionNameInfo : String
|
, connectionNameInfo : String
|
||||||
, smtpHost : String
|
, smtpHost : String
|
||||||
, smtpHostPlaceholder : String
|
, smtpHostPlaceholder : String
|
||||||
|
, smtpPort : String
|
||||||
, smtpUser : String
|
, smtpUser : String
|
||||||
, smtpUserPlaceholder : String
|
, smtpUserPlaceholder : String
|
||||||
, smtpPassword : String
|
, smtpPassword : String
|
||||||
@ -32,6 +33,7 @@ gb =
|
|||||||
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
|
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
|
||||||
, smtpHost = "SMTP Host"
|
, smtpHost = "SMTP Host"
|
||||||
, smtpHostPlaceholder = "SMTP host name, e.g. 'mail.gmail.com'"
|
, smtpHostPlaceholder = "SMTP host name, e.g. 'mail.gmail.com'"
|
||||||
|
, smtpPort = "SMTP Port"
|
||||||
, smtpUser = "SMTP User"
|
, smtpUser = "SMTP User"
|
||||||
, smtpUserPlaceholder = "SMTP Username, e.g. 'your.name@gmail.com'"
|
, smtpUserPlaceholder = "SMTP Username, e.g. 'your.name@gmail.com'"
|
||||||
, smtpPassword = "SMTP Password"
|
, smtpPassword = "SMTP Password"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
module Messages.HomeSideMenu exposing (..)
|
module Messages.HomeSideMenu exposing (..)
|
||||||
|
|
||||||
import Messages.MultiEditComp
|
import Messages.MultiEditMenuComp
|
||||||
import Messages.SearchMenuComp
|
import Messages.SearchMenuComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ searchMenu : Messages.SearchMenuComp.Texts
|
{ searchMenu : Messages.SearchMenuComp.Texts
|
||||||
, multiEdit : Messages.MultiEditComp.Texts
|
, multiEdit : Messages.MultiEditMenuComp.Texts
|
||||||
, editMode : String
|
, editMode : String
|
||||||
, resetSearchForm : String
|
, resetSearchForm : String
|
||||||
, multiEditHeader : String
|
, multiEditHeader : String
|
||||||
@ -18,7 +18,7 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ searchMenu = Messages.SearchMenuComp.gb
|
{ searchMenu = Messages.SearchMenuComp.gb
|
||||||
, multiEdit = Messages.MultiEditComp.gb
|
, multiEdit = Messages.MultiEditMenuComp.gb
|
||||||
, editMode = "Edit Mode"
|
, editMode = "Edit Mode"
|
||||||
, resetSearchForm = "Reset search form"
|
, resetSearchForm = "Reset search form"
|
||||||
, multiEditHeader = "Multi-Edit"
|
, multiEditHeader = "Multi-Edit"
|
||||||
|
@ -11,6 +11,7 @@ type alias Texts =
|
|||||||
, connectionNameInfo : String
|
, connectionNameInfo : String
|
||||||
, imapHost : String
|
, imapHost : String
|
||||||
, imapHostPlaceholder : String
|
, imapHostPlaceholder : String
|
||||||
|
, imapPort : String
|
||||||
, imapUser : String
|
, imapUser : String
|
||||||
, imapUserPlaceholder : String
|
, imapUserPlaceholder : String
|
||||||
, imapPassword : String
|
, imapPassword : String
|
||||||
@ -30,6 +31,7 @@ gb =
|
|||||||
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
|
, connectionNameInfo = "The connection name must not contain whitespace or special characters."
|
||||||
, imapHost = "IMAP Host"
|
, imapHost = "IMAP Host"
|
||||||
, imapHostPlaceholder = "IMAP host name, e.g. 'mail.gmail.com'"
|
, imapHostPlaceholder = "IMAP host name, e.g. 'mail.gmail.com'"
|
||||||
|
, imapPort = "IMAP Port"
|
||||||
, imapUser = "IMAP User"
|
, imapUser = "IMAP User"
|
||||||
, imapUserPlaceholder = "IMAP Username, e.g. 'your.name@gmail.com'"
|
, imapUserPlaceholder = "IMAP Username, e.g. 'your.name@gmail.com'"
|
||||||
, imapPassword = "IMAP Password"
|
, imapPassword = "IMAP Password"
|
||||||
|
@ -33,6 +33,7 @@ type alias Texts =
|
|||||||
, itemId : String
|
, itemId : String
|
||||||
, createdOn : String
|
, createdOn : String
|
||||||
, lastUpdateOn : String
|
, lastUpdateOn : String
|
||||||
|
, sendingMailNow : String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -61,4 +62,5 @@ gb =
|
|||||||
, itemId = "Item ID"
|
, itemId = "Item ID"
|
||||||
, createdOn = "Created on"
|
, createdOn = "Created on"
|
||||||
, lastUpdateOn = "Last update on"
|
, lastUpdateOn = "Last update on"
|
||||||
|
, sendingMailNow = "Sending e-mail…"
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
module Messages.MultiEditComp exposing (..)
|
module Messages.MultiEditMenuComp exposing (..)
|
||||||
|
|
||||||
import Messages.Basics
|
import Messages.Basics
|
||||||
|
import Messages.CustomFieldMultiInputComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
|
, customFieldMultiInput : Messages.CustomFieldMultiInputComp.Texts
|
||||||
, tagModeAddInfo : String
|
, tagModeAddInfo : String
|
||||||
, tagModeRemoveInfo : String
|
, tagModeRemoveInfo : String
|
||||||
, tagModeReplaceInfo : String
|
, tagModeReplaceInfo : String
|
||||||
@ -32,6 +34,7 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
|
, customFieldMultiInput = Messages.CustomFieldMultiInputComp.gb
|
||||||
, tagModeAddInfo = "Tags chosen here are *added* to all selected items."
|
, tagModeAddInfo = "Tags chosen here are *added* to all selected items."
|
||||||
, tagModeRemoveInfo = "Tags chosen here are *removed* from all selected items."
|
, tagModeRemoveInfo = "Tags chosen here are *removed* from all selected items."
|
||||||
, tagModeReplaceInfo = "Tags chosen here *replace* those on selected items."
|
, tagModeReplaceInfo = "Tags chosen here *replace* those on selected items."
|
@ -1,10 +1,12 @@
|
|||||||
module Messages.NotificationFormComp exposing (..)
|
module Messages.NotificationFormComp exposing (..)
|
||||||
|
|
||||||
import Messages.Basics
|
import Messages.Basics
|
||||||
|
import Messages.CalEventInputComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
|
, calEventInput : Messages.CalEventInputComp.Texts
|
||||||
, reallyDeleteTask : String
|
, reallyDeleteTask : String
|
||||||
, startOnce : String
|
, startOnce : String
|
||||||
, startTaskNow : String
|
, startTaskNow : String
|
||||||
@ -22,6 +24,7 @@ type alias Texts =
|
|||||||
, tagsExclude : String
|
, tagsExclude : String
|
||||||
, tagsExcludeInfo : String
|
, tagsExcludeInfo : String
|
||||||
, remindDaysInfo : String
|
, remindDaysInfo : String
|
||||||
|
, remindDaysLabel : String
|
||||||
, capOverdue : String
|
, capOverdue : String
|
||||||
, capOverdueInfo : String
|
, capOverdueInfo : String
|
||||||
, schedule : String
|
, schedule : String
|
||||||
@ -33,6 +36,7 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
|
, calEventInput = Messages.CalEventInputComp.gb
|
||||||
, reallyDeleteTask = "Really delete this notification task?"
|
, reallyDeleteTask = "Really delete this notification task?"
|
||||||
, startOnce = "Start Once"
|
, startOnce = "Start Once"
|
||||||
, startTaskNow = "Start this task now"
|
, startTaskNow = "Start this task now"
|
||||||
@ -49,6 +53,7 @@ gb =
|
|||||||
, tagsIncludeInfo = "Items must have all the tags specified here."
|
, tagsIncludeInfo = "Items must have all the tags specified here."
|
||||||
, tagsExclude = "Tags Exclude (or)"
|
, tagsExclude = "Tags Exclude (or)"
|
||||||
, tagsExcludeInfo = "Items must not have any tag specified here."
|
, tagsExcludeInfo = "Items must not have any tag specified here."
|
||||||
|
, remindDaysLabel = "Remind Days"
|
||||||
, remindDaysInfo = "Select items with a due date *lower than* `today+remindDays`"
|
, remindDaysInfo = "Select items with a due date *lower than* `today+remindDays`"
|
||||||
, capOverdue = "Cap overdue items"
|
, capOverdue = "Cap overdue items"
|
||||||
, capOverdueInfo = "If checked, only items with a due date *greater than* `today - remindDays` are considered."
|
, capOverdueInfo = "If checked, only items with a due date *greater than* `today - remindDays` are considered."
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
module Messages.ScanMailboxFormComp exposing (..)
|
module Messages.ScanMailboxFormComp exposing (..)
|
||||||
|
|
||||||
import Messages.Basics
|
import Messages.Basics
|
||||||
|
import Messages.CalEventInputComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
|
, calEventInput : Messages.CalEventInputComp.Texts
|
||||||
, reallyDeleteTask : String
|
, reallyDeleteTask : String
|
||||||
, startOnce : String
|
, startOnce : String
|
||||||
, startNow : String
|
, startNow : String
|
||||||
@ -29,6 +31,7 @@ type alias Texts =
|
|||||||
, folders : String
|
, folders : String
|
||||||
, foldersInfo : String
|
, foldersInfo : String
|
||||||
, receivedHoursInfo : String
|
, receivedHoursInfo : String
|
||||||
|
, receivedHoursLabel : String
|
||||||
, fileFilter : String
|
, fileFilter : String
|
||||||
, fileFilterInfo : String
|
, fileFilterInfo : String
|
||||||
, subjectFilter : String
|
, subjectFilter : String
|
||||||
@ -57,6 +60,7 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
|
, calEventInput = Messages.CalEventInputComp.gb
|
||||||
, reallyDeleteTask = "Really delete this scan mailbox task?"
|
, reallyDeleteTask = "Really delete this scan mailbox task?"
|
||||||
, startOnce = "Start Once"
|
, startOnce = "Start Once"
|
||||||
, startNow = "Start this task now"
|
, startNow = "Start this task now"
|
||||||
@ -81,6 +85,7 @@ gb =
|
|||||||
, folders = "Folders"
|
, folders = "Folders"
|
||||||
, foldersInfo = "The folders to look for mails."
|
, foldersInfo = "The folders to look for mails."
|
||||||
, receivedHoursInfo = "Select mails newer than `now - receivedHours`"
|
, receivedHoursInfo = "Select mails newer than `now - receivedHours`"
|
||||||
|
, receivedHoursLabel = "Received Since Hours"
|
||||||
, fileFilter = "File Filter"
|
, fileFilter = "File Filter"
|
||||||
, fileFilterInfo =
|
, fileFilterInfo =
|
||||||
"Specify a file glob to filter attachments. For example, to only extract pdf files: "
|
"Specify a file glob to filter attachments. For example, to only extract pdf files: "
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
module Messages.SearchMenuComp exposing (..)
|
module Messages.SearchMenuComp exposing (..)
|
||||||
|
|
||||||
import Messages.Basics
|
import Messages.Basics
|
||||||
|
import Messages.CustomFieldMultiInputComp
|
||||||
|
import Messages.TagSelectComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
|
, customFieldMultiInput : Messages.CustomFieldMultiInputComp.Texts
|
||||||
|
, tagSelect : Messages.TagSelectComp.Texts
|
||||||
, chooseDirection : String
|
, chooseDirection : String
|
||||||
, choosePerson : String
|
, choosePerson : String
|
||||||
, chooseEquipment : String
|
, chooseEquipment : String
|
||||||
@ -41,6 +45,8 @@ type alias Texts =
|
|||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
|
, customFieldMultiInput = Messages.CustomFieldMultiInputComp.gb
|
||||||
|
, tagSelect = Messages.TagSelectComp.gb
|
||||||
, chooseDirection = "Choose a direction…"
|
, chooseDirection = "Choose a direction…"
|
||||||
, choosePerson = "Choose a person"
|
, choosePerson = "Choose a person"
|
||||||
, chooseEquipment = "Choose an equipment"
|
, chooseEquipment = "Choose an equipment"
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
module Messages.SingleAttachmentComp exposing (..)
|
module Messages.SingleAttachmentComp exposing (..)
|
||||||
|
|
||||||
|
import Messages.AttachmentMetaComp
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ noName : String
|
{ attachmentMeta : Messages.AttachmentMetaComp.Texts
|
||||||
|
, noName : String
|
||||||
, openFileInNewTab : String
|
, openFileInNewTab : String
|
||||||
, downloadFile : String
|
, downloadFile : String
|
||||||
, renameFile : String
|
, renameFile : String
|
||||||
@ -17,7 +20,8 @@ type alias Texts =
|
|||||||
|
|
||||||
gb : Texts
|
gb : Texts
|
||||||
gb =
|
gb =
|
||||||
{ noName = "No name"
|
{ attachmentMeta = Messages.AttachmentMetaComp.gb
|
||||||
|
, noName = "No name"
|
||||||
, openFileInNewTab = "Open file in new tab"
|
, openFileInNewTab = "Open file in new tab"
|
||||||
, downloadFile = "Download file"
|
, downloadFile = "Download file"
|
||||||
, renameFile = "Rename file"
|
, renameFile = "Rename file"
|
||||||
|
16
modules/webapp/src/main/elm/Messages/TagSelectComp.elm
Normal file
16
modules/webapp/src/main/elm/Messages/TagSelectComp.elm
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
module Messages.TagSelectComp exposing (..)
|
||||||
|
|
||||||
|
|
||||||
|
type alias Texts =
|
||||||
|
{ hideEmpty : String
|
||||||
|
, showEmpty : String
|
||||||
|
, filterPlaceholder : String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gb : Texts
|
||||||
|
gb =
|
||||||
|
{ hideEmpty = "Hide empty"
|
||||||
|
, showEmpty = "Show empty"
|
||||||
|
, filterPlaceholder = "Filter …"
|
||||||
|
}
|
@ -12,17 +12,22 @@ type alias Texts =
|
|||||||
, uiLanguage : String
|
, uiLanguage : String
|
||||||
, itemSearch : String
|
, itemSearch : String
|
||||||
, maxResultsPerPageInfo : Int -> String
|
, maxResultsPerPageInfo : Int -> String
|
||||||
|
, maxResultsPerPage : String
|
||||||
, showBasicSearchStatsByDefault : String
|
, showBasicSearchStatsByDefault : String
|
||||||
, enablePowerSearch : String
|
, enablePowerSearch : String
|
||||||
, itemCards : String
|
, itemCards : String
|
||||||
|
, maxNoteSize : String
|
||||||
, maxNoteSizeInfo : Int -> String
|
, maxNoteSizeInfo : Int -> String
|
||||||
, sizeOfItemPreview : String
|
, sizeOfItemPreview : String
|
||||||
, cardTitlePattern : String
|
, cardTitlePattern : String
|
||||||
, togglePatternHelpText : String
|
, togglePatternHelpText : String
|
||||||
, cardSubtitlePattern : String
|
, cardSubtitlePattern : String
|
||||||
, searchMenu : String
|
, searchMenu : String
|
||||||
|
, searchMenuTagCount : String
|
||||||
, searchMenuTagCountInfo : String
|
, searchMenuTagCountInfo : String
|
||||||
|
, searchMenuCatCount : String
|
||||||
, searchMenuCatCountInfo : String
|
, searchMenuCatCountInfo : String
|
||||||
|
, searchMenuFolderCount : String
|
||||||
, searchMenuFolderCountInfo : String
|
, searchMenuFolderCountInfo : String
|
||||||
, itemDetail : String
|
, itemDetail : String
|
||||||
, browserNativePdfView : String
|
, browserNativePdfView : String
|
||||||
@ -48,9 +53,11 @@ gb =
|
|||||||
"Maximum results in one page when searching items. At most "
|
"Maximum results in one page when searching items. At most "
|
||||||
++ String.fromInt max
|
++ String.fromInt max
|
||||||
++ "."
|
++ "."
|
||||||
|
, maxResultsPerPage = "Page size"
|
||||||
, showBasicSearchStatsByDefault = "Show basic search statistics by default"
|
, showBasicSearchStatsByDefault = "Show basic search statistics by default"
|
||||||
, enablePowerSearch = "Enable power-user search bar"
|
, enablePowerSearch = "Enable power-user search bar"
|
||||||
, itemCards = "Item Cards"
|
, itemCards = "Item Cards"
|
||||||
|
, maxNoteSize = "Max. Note Length"
|
||||||
, maxNoteSizeInfo =
|
, maxNoteSizeInfo =
|
||||||
\max ->
|
\max ->
|
||||||
"Maximum size of the item notes to display in card view. Between 0 - "
|
"Maximum size of the item notes to display in card view. Between 0 - "
|
||||||
@ -61,8 +68,11 @@ gb =
|
|||||||
, togglePatternHelpText = "Toggle pattern help text"
|
, togglePatternHelpText = "Toggle pattern help text"
|
||||||
, cardSubtitlePattern = "Card Subtitle Pattern"
|
, cardSubtitlePattern = "Card Subtitle Pattern"
|
||||||
, searchMenu = "Search Menu"
|
, searchMenu = "Search Menu"
|
||||||
|
, searchMenuTagCount = "Number of tags in search menu"
|
||||||
, searchMenuTagCountInfo = "How many tags to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
, searchMenuTagCountInfo = "How many tags to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
||||||
|
, searchMenuCatCount = "Number of categories in search menu"
|
||||||
, searchMenuCatCountInfo = "How many categories to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
, searchMenuCatCountInfo = "How many categories to display in search menu at once. Others can be expanded. Use 0 to always show all."
|
||||||
|
, searchMenuFolderCount = "Number of folders in search menu"
|
||||||
, searchMenuFolderCountInfo = "How many folders to display in search menu at once. Other folders can be expanded. Use 0 to always show all."
|
, searchMenuFolderCountInfo = "How many folders to display in search menu at once. Other folders can be expanded. Use 0 to always show all."
|
||||||
, itemDetail = "Item Detail"
|
, itemDetail = "Item Detail"
|
||||||
, browserNativePdfView = "Browser-native PDF preview"
|
, browserNativePdfView = "Browser-native PDF preview"
|
||||||
|
@ -287,13 +287,12 @@ dimmerSettings : Texts -> Comp.YesNoDimmer.Settings
|
|||||||
dimmerSettings texts =
|
dimmerSettings texts =
|
||||||
let
|
let
|
||||||
defaults =
|
defaults =
|
||||||
Comp.YesNoDimmer.defaultSettings
|
Comp.YesNoDimmer.defaultSettings texts.deleteThisJob texts.basics.yes texts.basics.no
|
||||||
in
|
in
|
||||||
{ defaults
|
{ defaults
|
||||||
| headerClass = "text-lg text-white"
|
| headerClass = "text-lg text-white"
|
||||||
, headerIcon = ""
|
, headerIcon = ""
|
||||||
, extraClass = "rounded"
|
, extraClass = "rounded"
|
||||||
, message = texts.deleteThisJob
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user