mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Externalize strings in upload page
This commit is contained in:
@ -18,6 +18,7 @@ import File.Select
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (..)
|
||||
import Messages.DropzoneComp exposing (Texts)
|
||||
import Styles as S
|
||||
import Util.Html exposing (onDragEnter, onDragLeave, onDragOver, onDropFiles)
|
||||
|
||||
@ -124,8 +125,8 @@ filterMime model files =
|
||||
--- View2
|
||||
|
||||
|
||||
view2 : Model -> Html Msg
|
||||
view2 model =
|
||||
view2 : Texts -> Model -> Html Msg
|
||||
view2 texts model =
|
||||
div
|
||||
[ classList
|
||||
[ ( "bg-opacity-100 bg-blue-100 dark:bg-lightblue-800", model.state.hover )
|
||||
@ -144,24 +145,23 @@ view2 model =
|
||||
]
|
||||
[ i [ class "fa fa-mouse-pointer" ] []
|
||||
, div [ class "ml-3" ]
|
||||
[ text "Drop files here"
|
||||
[ text texts.dropFilesHere
|
||||
]
|
||||
]
|
||||
, B.horizontalDivider
|
||||
{ label = "Or"
|
||||
{ label = texts.or
|
||||
, topCss = "w-2/3 mb-4 hidden md:inline-flex"
|
||||
, labelCss = "px-4 bg-gray-200 bg-opacity-50"
|
||||
, lineColor = "bg-gray-300 dark:bg-bluegray-600"
|
||||
}
|
||||
, B.primaryBasicButton
|
||||
{ label = "Select ..."
|
||||
{ label = texts.select
|
||||
, icon = "fa fa-folder-open font-thin"
|
||||
, handler = onClick PickFiles
|
||||
, attrs = [ href "#" ]
|
||||
, disabled = not model.state.active
|
||||
}
|
||||
, div [ class "text-center opacity-75 text-sm mt-4" ]
|
||||
[ text "Choose document files (pdf, docx, txt, html, …). "
|
||||
, text "Archives (zip and eml) are extracted."
|
||||
[ text texts.selectInfo
|
||||
]
|
||||
]
|
||||
|
@ -13,6 +13,7 @@ import Data.Flags exposing (Flags)
|
||||
import Data.ItemNav exposing (ItemNav)
|
||||
import Data.UiSettings exposing (UiSettings)
|
||||
import Html exposing (..)
|
||||
import Messages.ItemDetailComp exposing (Texts)
|
||||
import Page exposing (Page(..))
|
||||
|
||||
|
||||
@ -30,6 +31,6 @@ update =
|
||||
Comp.ItemDetail.Update.update
|
||||
|
||||
|
||||
view2 : ItemNav -> UiSettings -> Model -> Html Msg
|
||||
view2 : Texts -> ItemNav -> UiSettings -> Model -> Html Msg
|
||||
view2 =
|
||||
Comp.ItemDetail.View2.view
|
||||
|
@ -3,20 +3,20 @@ module Comp.ItemDetail.AddFilesForm exposing (view)
|
||||
import Comp.Dropzone
|
||||
import Comp.ItemDetail.Model exposing (..)
|
||||
import Comp.Progress
|
||||
import Data.DropdownStyle
|
||||
import Dict
|
||||
import File exposing (File)
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onCheck, onClick, onInput)
|
||||
import Html.Events exposing (onClick)
|
||||
import Messages.ItemDetail.AddFilesForm exposing (Texts)
|
||||
import Set
|
||||
import Styles as S
|
||||
import Util.File exposing (makeFileId)
|
||||
import Util.Size
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
view : Texts -> Model -> Html Msg
|
||||
view texts model =
|
||||
div
|
||||
[ classList
|
||||
[ ( "hidden", not model.addFilesOpen )
|
||||
@ -28,7 +28,7 @@ view model =
|
||||
[ text "Add more files to this item"
|
||||
]
|
||||
, Html.map AddFilesMsg
|
||||
(Comp.Dropzone.view2 model.addFilesModel)
|
||||
(Comp.Dropzone.view2 texts.dropzone model.addFilesModel)
|
||||
, div [ class "flex flex-row space-x-2 mt-2" ]
|
||||
[ button
|
||||
[ class S.primaryButton
|
||||
|
@ -23,17 +23,18 @@ import Data.UiSettings exposing (UiSettings)
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onClick)
|
||||
import Messages.ItemDetailComp exposing (Texts)
|
||||
import Page exposing (Page(..))
|
||||
import Styles as S
|
||||
import Util.Time
|
||||
|
||||
|
||||
view : ItemNav -> UiSettings -> Model -> Html Msg
|
||||
view inav settings model =
|
||||
view : Texts -> ItemNav -> UiSettings -> Model -> Html Msg
|
||||
view texts inav settings model =
|
||||
div [ class "flex flex-col h-full" ]
|
||||
[ header settings model
|
||||
, menuBar inav settings model
|
||||
, body inav settings model
|
||||
, body texts inav settings model
|
||||
, itemModal model
|
||||
]
|
||||
|
||||
@ -194,20 +195,20 @@ menuBar inav settings model =
|
||||
}
|
||||
|
||||
|
||||
body : ItemNav -> UiSettings -> Model -> Html Msg
|
||||
body inav settings model =
|
||||
body : Texts -> ItemNav -> UiSettings -> Model -> Html Msg
|
||||
body texts _ settings model =
|
||||
div [ class "grid gap-2 grid-cols-1 md:grid-cols-3 h-full" ]
|
||||
[ leftArea settings model
|
||||
[ leftArea texts settings model
|
||||
, rightArea settings model
|
||||
]
|
||||
|
||||
|
||||
leftArea : UiSettings -> Model -> Html Msg
|
||||
leftArea settings model =
|
||||
leftArea : Texts -> UiSettings -> Model -> Html Msg
|
||||
leftArea texts settings model =
|
||||
div [ class "w-full md:order-first md:mr-2 flex flex-col" ]
|
||||
[ addDetailForm settings model
|
||||
, sendMailForm settings model
|
||||
, Comp.ItemDetail.AddFilesForm.view model
|
||||
, Comp.ItemDetail.AddFilesForm.view texts.addFilesForm model
|
||||
, Comp.ItemDetail.Notes.view model
|
||||
, div
|
||||
[ classList
|
||||
|
Reference in New Issue
Block a user