Improve detail view on small screens

This commit is contained in:
eikek 2022-02-25 22:47:49 +01:00
parent cab2fc7997
commit dcd8267d6e
45 changed files with 335 additions and 136 deletions

View File

@ -257,6 +257,7 @@ viewTable texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ class "flex flex-col"
@ -334,6 +335,7 @@ viewForm texts _ _ model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -153,7 +153,7 @@ update flags msg model =
, Sub.none
)
NameExistsResp (Err err) ->
NameExistsResp (Err _) ->
( model, Cmd.none, Sub.none )
UpdateThrottle ->

View File

@ -352,6 +352,7 @@ view2 flags texts settings model =
]
, end = []
, rootClasses = "mb-4"
, sticky = True
}
, h2 [ class S.header2 ]
[ text texts.documentLanguage

View File

@ -416,4 +416,5 @@ viewButtons2 texts model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}

View File

@ -233,6 +233,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.CustomFieldTable.view2 texts.fieldTable

View File

@ -347,6 +347,7 @@ view texts flags settings model =
}
]
, rootClasses = "mb-2"
, sticky = True
}
, div
[ class (gridStyle model.dashboard)

View File

@ -285,6 +285,7 @@ view texts flags cfg settings model =
}
]
, rootClasses = ""
, sticky = True
}
, div
[ class S.errorMessage

View File

@ -483,6 +483,7 @@ view2 texts extraClasses settings model =
[ startOnceBtn
]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -296,6 +296,7 @@ viewList2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map ListMsg
(Comp.DueItemsTaskList.view2 texts.notificationTable

View File

@ -251,6 +251,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.EmailSettingsTable.view2 texts.settingsTable
@ -296,6 +297,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -268,6 +268,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.EquipmentTable.view2 texts.equipmentTable
@ -347,6 +348,7 @@ viewForm2 texts model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -373,91 +373,91 @@ view2 texts flags model =
texts.basics.no
in
div [ class "flex flex-col md:relative" ]
(viewButtons2 texts model
:: [ Html.map DeleteMsg
(Comp.YesNoDimmer.viewN
True
dimmerSettings
model.deleteDimmer
)
, div
[ class "py-2 text-lg opacity-75"
, classList [ ( "hidden", model.folder.id /= "" ) ]
([ viewButtons2 texts model
, Html.map DeleteMsg
(Comp.YesNoDimmer.viewN
True
dimmerSettings
model.deleteDimmer
)
, div
[ class "py-2 text-lg opacity-75"
, classList [ ( "hidden", model.folder.id /= "" ) ]
]
[ text texts.autoOwnerInfo
]
, div
[ class "py-2 text-lg opacity-75"
, classList [ ( "hidden", model.folder.id == "" ) ]
]
[ text texts.modifyInfo
]
, div
[ class S.message
, classList [ ( "hidden", model.folder.id == "" || isOwner ) ]
]
[ text texts.notOwnerInfo
]
, div [ class "mb-4 flex flex-col" ]
[ label
[ class S.inputLabel
, for "folder-name"
]
[ text texts.basics.name
, B.inputRequired
]
, div [ class "flex flex-row space-x-2" ]
[ input
[ type_ "text"
, onInput SetName
, Maybe.withDefault "" model.name
|> value
, classList [ ( S.inputErrorBorder, model.name == Nothing ) ]
, class S.textInput
, id "folder-name"
]
[ text texts.autoOwnerInfo
[]
, a
[ class S.primaryButton
, class "rounded-r -ml-1"
, onClick SaveName
, href "#"
]
, div
[ class "py-2 text-lg opacity-75"
, classList [ ( "hidden", model.folder.id == "" ) ]
]
[ text texts.modifyInfo
]
, div
[ class S.message
, classList [ ( "hidden", model.folder.id == "" || isOwner ) ]
]
[ text texts.notOwnerInfo
]
, div [ class "mb-4 flex flex-col" ]
[ label
[ class S.inputLabel
, for "folder-name"
]
[ text texts.basics.name
, B.inputRequired
]
, div [ class "flex flex-row space-x-2" ]
[ input
[ type_ "text"
, onInput SetName
, Maybe.withDefault "" model.name
|> value
, classList [ ( S.inputErrorBorder, model.name == Nothing ) ]
, class S.textInput
, id "folder-name"
]
[]
, a
[ class S.primaryButton
, class "rounded-r -ml-1"
, onClick SaveName
, href "#"
]
[ i [ class "fa fa-save" ] []
, span [ class "ml-2 hidden sm:inline" ]
[ text texts.basics.submit
]
]
[ i [ class "fa fa-save" ] []
, span [ class "ml-2 hidden sm:inline" ]
[ text texts.basics.submit
]
]
, div
[ classList
[ ( "hidden", model.formState == FormStateInitial )
, ( S.errorMessage, isError model.formState )
, ( S.successMessage, isSuccess model.formState )
]
, class "my-4"
]
[ case model.formState of
FormStateInitial ->
text ""
]
]
, div
[ classList
[ ( "hidden", model.formState == FormStateInitial )
, ( S.errorMessage, isError model.formState )
, ( S.successMessage, isSuccess model.formState )
]
, class "my-4"
]
[ case model.formState of
FormStateInitial ->
text ""
FormStateHttpError err ->
text (texts.httpError err)
FormStateHttpError err ->
text (texts.httpError err)
FormStateGenericError m ->
text m
FormStateGenericError m ->
text m
FormStateFolderCreated ->
text texts.folderCreated
FormStateFolderCreated ->
text texts.folderCreated
FormStateNameChangeSuccessful ->
text texts.nameChangeSuccessful
FormStateNameChangeSuccessful ->
text texts.nameChangeSuccessful
FormStateDeleteSuccessful ->
text texts.deleteSuccessful
]
]
FormStateDeleteSuccessful ->
text texts.deleteSuccessful
]
]
++ viewMembers2 texts model
)
@ -558,4 +558,5 @@ viewButtons2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}

View File

@ -265,6 +265,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.FolderTable.view2

View File

@ -251,6 +251,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.ImapSettingsTable.view2
@ -297,6 +298,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -56,6 +56,14 @@ view texts model =
]
[ text texts.reset
]
, div [ class "flex-grow" ] []
, button
[ class S.secondaryButton
, href "#"
, onClick AddFilesToggle
]
[ text texts.basics.cancel
]
]
, div
[ classList

View File

@ -25,11 +25,10 @@ import Html.Attributes exposing (..)
import Messages.Comp.ItemDetail.ItemInfoHeader exposing (Texts)
import Page exposing (Page(..))
import Styles as S
import Util.Maybe
view : Texts -> UiSettings -> Model -> Html Msg
view texts settings model =
view : Texts -> UiSettings -> Model -> Html Msg -> Html Msg
view texts settings model beforeTags =
let
date =
( div
@ -45,24 +44,27 @@ view texts settings model =
)
itemStyle =
"ml-2 sm:ml-4 py-1 whitespace-nowrap "
"ml-2 sm:ml-4 py-1 whitespace-nowrap truncate"
linkStyle =
"opacity-75 hover:opacity-100"
"opacity-75 hover:opacity-100 "
duedate =
( div
[ class "ml-2 sm:ml-4 py-1 max-w-min whitespace-nowrap opacity-100"
, class S.basicLabel
[ class "ml-2 sm:ml-0 py-1 whitespace-nowrap "
, classList
[ ( "dark:text-amber-400 text-amber-800 italic underline"
, model.item.dueDate /= Nothing
)
]
, title texts.dueDate
]
[ Icons.dueDateIcon2 "mr-2"
, Maybe.map texts.formatDate model.item.dueDate
|> Maybe.withDefault ""
|> Maybe.withDefault "-"
|> text
]
, Data.UiSettings.fieldVisible settings Data.Fields.DueDate
&& Util.Maybe.nonEmpty model.item.dueDate
)
corr =
@ -126,7 +128,7 @@ view texts settings model =
model.item.state == "created"
in
div [ class "flex flex-col pb-2" ]
[ div [ class "flex flex-row items-center text-2xl" ]
[ div [ class "flex flex-row items-center text-2xl order-1" ]
[ if isDeleted then
div
[ classList
@ -172,34 +174,39 @@ view texts settings model =
]
]
]
, ul [ class "flex flex-col sm:flex-row flex-wrap text-base " ]
, div [ class "flex flex-col sm:flex-row flex-wrap text-base order-2" ]
(List.filter Tuple.second
[ date
, corr
, conc
, itemfolder
, src
, duedate
]
|> List.map Tuple.first
)
, div [ class "flex flex-col sm:flex-row flex-wrap text-base order-3" ]
(List.filter Tuple.second [ duedate ] |> List.map Tuple.first)
, div [ class "order-4 md:order-5" ]
[ beforeTags
]
, renderTagsAndFields settings model
]
renderTagsAndFields : UiSettings -> Model -> Html Msg
renderTagsAndFields settings model =
div [ class "flex flex-row flex-wrap items-center font-semibold sm:justify-end mt-1 min-h-7" ]
div [ class "flex flex-row flex-wrap items-center font-semibold justify-end mt-1 min-h-7 order-5 md:order-4" ]
(renderTags settings model ++ renderCustomValues settings model)
renderTags : UiSettings -> Model -> List (Html Msg)
renderTags settings model =
let
tagView t =
tagView index t =
Comp.LinkTarget.makeTagLink
(IdName t.id t.name)
[ ( "label md:text-sm inline-flex ml-2 hover:opacity-90 mt-1 items-center", True )
[ ( "label md:text-sm inline-flex hover:opacity-90 mt-1 items-center", True )
, ( "mr-0 ml-2", index > 0 )
, ( Data.UiSettings.tagColorString2 t settings, True )
]
SetLinkTarget
@ -208,7 +215,7 @@ renderTags settings model =
[]
else
List.map tagView model.item.tags
List.indexedMap tagView model.item.tags
renderCustomValues : UiSettings -> Model -> List (Html Msg)

View File

@ -118,6 +118,7 @@ type alias Model =
, allTags : List Tag
, allPersons : Dict String Person
, attachmentDropdownOpen : Bool
, mobileItemMenuOpen : Bool
, editMenuTabsOpen : Set String
, viewMode : ViewMode
, showQrModel : ShowQrModel
@ -253,6 +254,7 @@ emptyModel =
, allTags = []
, allPersons = Dict.empty
, attachmentDropdownOpen = False
, mobileItemMenuOpen = False
, editMenuTabsOpen = Set.empty
, viewMode = SimpleView
, showQrModel = initShowQrModel
@ -356,6 +358,7 @@ type Msg
| CustomFieldSaveResp CustomField String (Result Http.Error BasicResult)
| CustomFieldRemoveResp String (Result Http.Error BasicResult)
| ToggleAttachmentDropdown
| ToggleMobileItemMenu
| ToggleAkkordionTab String
| ToggleOpenAllAkkordionTabs
| RequestReprocessFile String

View File

@ -8,13 +8,11 @@
module Comp.ItemDetail.ShowQrCode exposing (UrlId(..), qrCodeElementId, view, view1)
import Api
import Comp.Basic as B
import Comp.ItemDetail.Model exposing (Model, Msg(..), isShowQrAttach, isShowQrItem)
import Comp.MenuBar as MB
import Data.Flags exposing (Flags)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick)
import QRCode
import Styles as S
import Svg.Attributes as SvgA
@ -72,16 +70,17 @@ view1 flags classes urlId =
, icon = Just "fa fa-print"
, label = "Print"
}
]
, end =
[ MB.SecondaryButton
, MB.SecondaryButton
{ tagger = toggleShowQr
, title = "Close"
, icon = Just "fa fa-times"
, label = "Close"
}
]
, end =
[]
, rootClasses = "w-full mt-2 mb-4"
, sticky = True
}
, div [ class "flex flex-col sm:flex-row sm:space-x-2" ]
[ div

View File

@ -170,13 +170,13 @@ attachHeader texts settings model _ attach =
in
div [ class "flex flex-col sm:flex-row items-center w-full" ]
[ attachSelectToggle False
, div [ class "text-base font-bold flex-grow w-full text-center sm:text-left break-all" ]
, div [ class "text-base font-bold flex-grow w-full text-left break-all" ]
[ text attachName
, text " ("
, text (Util.Size.bytesReadable Util.Size.B (toFloat attach.size))
, text ")"
]
, div [ class "flex flex-row justify-end items-center" ]
, div [ class "flex flex-row justify-end items-center w-full" ]
[ attachSelectToggle True
, a
[ href fileUrl

View File

@ -519,10 +519,16 @@ update key flags inav settings msg model =
resetCmds =
resetHiddenFields settings flags model.item.id ResetHiddenMsg
in
resultModelCmd ( model, Cmd.batch (Api.setConfirmed flags model.item.id SaveResp :: resetCmds) )
resultModelCmd
( { model | mobileItemMenuOpen = False }
, Cmd.batch (Api.setConfirmed flags model.item.id SaveResp :: resetCmds)
)
UnconfirmItem ->
resultModelCmd ( model, Api.setUnconfirmed flags model.item.id SaveResp )
resultModelCmd
( { model | mobileItemMenuOpen = False }
, Api.setUnconfirmed flags model.item.id SaveResp
)
ItemDatePickerMsg m ->
let
@ -573,7 +579,11 @@ update key flags inav settings msg model =
resultModel { model | itemModal = Nothing }
RequestDelete ->
resultModel { model | itemModal = Just (ConfirmModalDeleteItem DeleteItemConfirmed) }
resultModel
{ model
| itemModal = Just (ConfirmModalDeleteItem DeleteItemConfirmed)
, mobileItemMenuOpen = False
}
SetCorrOrgSuggestion idname ->
resultModelCmd ( model, setCorrOrg flags model (Just idname) )
@ -819,6 +829,7 @@ update key flags inav settings msg model =
| mailOpen = newOpen
, addFilesOpen = filesOpen
, mailSendResult = sendResult
, mobileItemMenuOpen = False
}
SendMailResp (Ok br) ->
@ -983,6 +994,7 @@ update key flags inav settings msg model =
resultModel
{ model
| addFilesOpen = not model.addFilesOpen
, mobileItemMenuOpen = False
, mailOpen =
if model.addFilesOpen == False then
False
@ -1520,6 +1532,9 @@ update key flags inav settings msg model =
ToggleAttachmentDropdown ->
resultModel { model | attachmentDropdownOpen = not model.attachmentDropdownOpen }
ToggleMobileItemMenu ->
resultModel { model | mobileItemMenuOpen = not model.mobileItemMenuOpen }
ToggleAkkordionTab name ->
let
tabs =
@ -1572,6 +1587,7 @@ update key flags inav settings msg model =
{ model
| attachmentDropdownOpen = False
, itemModal = Just (ConfirmModalReprocessItem ReprocessItemConfirmed)
, mobileItemMenuOpen = False
}
in
resultModel model_
@ -1611,7 +1627,7 @@ update key flags inav settings msg model =
next =
{ sqm | item = not sqm.item }
in
resultModel { model | showQrModel = next }
resultModel { model | showQrModel = next, mobileItemMenuOpen = False }
ToggleShowQrAttach id ->
let

View File

@ -42,8 +42,9 @@ import Styles as S
view : Texts -> Flags -> ItemNav -> UiSettings -> Model -> Html Msg
view texts flags inav settings model =
div [ class "flex flex-col h-full" ]
[ header texts settings model
, menuBar texts inav settings model
[ header texts settings inav model
-- , menuBar texts inav settings model
, body texts flags inav settings model
, itemModal texts model
]
@ -59,10 +60,14 @@ itemModal texts model =
span [ class "hidden" ] []
header : Texts -> UiSettings -> Model -> Html Msg
header texts settings model =
header : Texts -> UiSettings -> ItemNav -> Model -> Html Msg
header texts settings inav model =
div [ class "my-3" ]
[ Comp.ItemDetail.ItemInfoHeader.view texts.itemInfoHeader settings model ]
[ Comp.ItemDetail.ItemInfoHeader.view texts.itemInfoHeader
settings
model
(menuBar texts inav settings model)
]
menuBar : Texts -> ItemNav -> UiSettings -> Model -> Html Msg
@ -136,6 +141,7 @@ menuBar texts inav settings model =
[ classList
[ ( "bg-gray-200 dark:bg-slate-600", model.mailOpen )
]
, class "hidden md:block"
, title texts.sendMail
, onClick ToggleMail
, class S.secondaryBasicButton
@ -148,6 +154,7 @@ menuBar texts inav settings model =
[ classList
[ ( "bg-gray-200 dark:bg-slate-600", model.addFilesOpen )
]
, class "hidden md:block"
, if model.addFilesOpen then
title texts.close
@ -164,6 +171,7 @@ menuBar texts inav settings model =
[ classList
[ ( "bg-gray-200 dark:bg-slate-600", isShowQrItem model.showQrModel )
]
, class "hidden md:block"
, if isShowQrItem model.showQrModel then
title texts.close
@ -175,6 +183,11 @@ menuBar texts inav settings model =
]
[ Icons.showQrIcon ""
]
, MB.CustomElement <|
div
[ class "flex flex-grow md:hidden"
]
[]
, MB.CustomElement <|
a
[ class S.primaryButton
@ -183,9 +196,88 @@ menuBar texts inav settings model =
, title texts.confirmItemMetadata
, classList [ ( "hidden", model.item.state /= "created" ) ]
]
[ i [ class "fa fa-check mr-2" ] []
, text texts.confirm
[ i [ class "fa fa-check" ] []
, span [ class "hidden ml-0 sm:ml-2 sm:inline" ]
[ text texts.confirm ]
]
, MB.Dropdown
{ linkIcon = "fa fa-bars"
, label = ""
, linkClass =
[ ( "md:hidden", True )
, ( S.secondaryBasicButton, True )
]
, toggleMenu = ToggleMobileItemMenu
, menuOpen = model.mobileItemMenuOpen
, items =
[ { icon = i [ class "fa fa-envelope font-thin" ] []
, label = texts.sendMail
, disabled = False
, attrs =
[ href "#"
, onClick ToggleMail
]
}
, { icon = Icons.addFilesIcon2 ""
, label = texts.addMoreFiles
, disabled = False
, attrs =
[ href "#"
, onClick AddFilesToggle
]
}
, { icon = Icons.showQrIcon ""
, label = texts.showQrCode
, disabled = False
, attrs =
[ href "#"
, onClick (ToggleShowQrItem model.item.id)
]
}
, { icon = i [] []
, label = "separator"
, disabled = False
, attrs =
[]
}
, { icon = i [ class "fa fa-eye-slash font-thin" ] []
, label = texts.unconfirmItemMetadata
, disabled = False
, attrs =
[ href "#"
, onClick UnconfirmItem
, classList [ ( "hidden", model.item.state == "created" ) ]
]
}
, { icon = i [ class "fa fa-redo" ] []
, label = texts.reprocessItem
, disabled = False
, attrs =
[ href "#"
, onClick RequestReprocessItem
]
}
, if model.item.state == "deleted" then
{ icon = i [ class "fa fa-trash-restore" ] []
, label = texts.undeleteThisItem
, disabled = False
, attrs =
[ href "#"
, onClick RestoreItem
]
}
else
{ icon = i [ class "fa fa-trash", class "text-red-500 dark:text-orange-500" ] []
, label = texts.deleteThisItem
, disabled = False
, attrs =
[ href "#"
, onClick RequestDelete
]
}
]
}
]
, end =
[ MB.CustomElement <|
@ -195,12 +287,14 @@ menuBar texts inav settings model =
, onClick UnconfirmItem
, title texts.unconfirmItemMetadata
, classList [ ( "hidden", model.item.state == "created" ) ]
, class "hidden md:block"
]
[ i [ class "fa fa-eye-slash font-thin" ] []
]
, MB.CustomElement <|
a
[ class S.secondaryBasicButton
, class "hidden md:block"
, href "#"
, onClick RequestReprocessItem
, title texts.reprocessItem
@ -211,6 +305,7 @@ menuBar texts inav settings model =
MB.CustomElement <|
a
[ class S.undeleteButton
, class "hidden md:block"
, href "#"
, onClick RestoreItem
, title texts.undeleteThisItem
@ -222,6 +317,7 @@ menuBar texts inav settings model =
MB.CustomElement <|
a
[ class S.deleteButton
, class "hidden md:block"
, href "#"
, onClick RequestDelete
, title texts.deleteThisItem
@ -229,21 +325,39 @@ menuBar texts inav settings model =
[ i [ class "fa fa-trash" ] []
]
]
, rootClasses = "mb-2"
, rootClasses = "mb-2 md:mt-2"
, sticky = False
}
body : Texts -> Flags -> ItemNav -> UiSettings -> Model -> Html Msg
body texts flags _ settings model =
div [ class "grid gap-2 grid-cols-1 md:grid-cols-3 h-full" ]
[ leftArea texts flags settings model
, rightArea texts flags settings model
[ div [ class "flex flex-col hidden md:block h-full" ]
[ itemActions texts flags settings model ""
, notesAndSentMails texts flags settings model "h-full"
]
, attachmentView texts flags settings model "order-2 col-span-2"
, itemActions texts flags settings model "order-1 md:hidden"
, notesAndSentMails texts flags settings model "order-3 md:hidden"
]
leftArea : Texts -> Flags -> UiSettings -> Model -> Html Msg
leftArea texts flags settings model =
div [ class "w-full md:order-first md:mr-2 flex flex-col" ]
attachmentView : Texts -> Flags -> UiSettings -> Model -> String -> Html Msg
attachmentView texts flags settings model classes =
div
[ class "h-full"
, class classes
]
(attachmentsBody texts flags settings model)
itemActions : Texts -> Flags -> UiSettings -> Model -> String -> Html Msg
itemActions texts flags settings model classes =
div
[ class "w-full md:mr-2 flex flex-col"
, class classes
]
[ addDetailForm texts settings model
, sendMailForm texts settings model
, Comp.ItemDetail.AddFilesForm.view texts.addFilesForm model
@ -251,7 +365,16 @@ leftArea texts flags settings model =
(S.border ++ " mb-4")
model
(Comp.ItemDetail.ShowQrCode.Item model.item.id)
, Comp.ItemDetail.Notes.view texts.notes model
]
notesAndSentMails : Texts -> Flags -> UiSettings -> Model -> String -> Html Msg
notesAndSentMails texts _ _ model classes =
div
[ class "w-full md:mr-2 flex flex-col"
, class classes
]
[ Comp.ItemDetail.Notes.view texts.notes model
, div
[ classList
[ ( "hidden", Comp.SentMails.isEmpty model.sentMails )
@ -268,12 +391,6 @@ leftArea texts flags settings model =
]
rightArea : Texts -> Flags -> UiSettings -> Model -> Html Msg
rightArea texts flags settings model =
div [ class "md:col-span-2 h-full" ]
(attachmentsBody texts flags settings model)
attachmentsBody : Texts -> Flags -> UiSettings -> Model -> List (Html Msg)
attachmentsBody texts flags settings model =
List.indexedMap (Comp.ItemDetail.SingleAttachment.view texts.singleAttachment flags settings model)

View File

@ -31,7 +31,7 @@ import Data.Flags exposing (Flags)
import Data.UiSettings exposing (UiSettings)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick, onFocus, onInput)
import Html.Events exposing (onClick, onInput)
import Http
import Messages.Comp.ItemMail exposing (Texts)
import Styles as S

View File

@ -272,6 +272,7 @@ view texts settings model =
]
, end = []
, rootClasses = "my-4"
, sticky = True
}
, renderFormState texts model
, div [ class "flex-col px-2" ]

View File

@ -41,6 +41,7 @@ type alias MenuBar msg =
{ start : List (Item msg)
, end : List (Item msg)
, rootClasses : String
, sticky : Bool
}
@ -125,7 +126,8 @@ view1 classes mb =
in
div
[ class mb.rootClasses
, class "flex flex-col sm:flex-row space-y-1 sm:space-y-0 sticky top-0 z-40"
, class "flex flex-col md:flex-row space-y-1 md:space-y-0"
, classList [ ( "sticky top-0 z-40", mb.sticky ) ]
, class classes
]
[ left
@ -296,7 +298,7 @@ makeButton btnType model =
[]
else
[ span [ class (iconMargin ++ " hidden sm:inline") ]
[ span [ class (iconMargin ++ " hidden md:inline") ]
[ text model.label
]
]

View File

@ -391,6 +391,7 @@ viewForm texts settings outerModel model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div [ class "mt-2" ]
[ viewState texts outerModel
@ -445,6 +446,7 @@ viewList texts model =
[ Comp.ChannelMenu.channelMenu texts.channelType menuModel
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.NotificationChannelTable.view texts.notificationTable

View File

@ -358,6 +358,7 @@ viewForm texts settings outerModel model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div [ class "mt-2" ]
[ viewState texts outerModel
@ -409,6 +410,7 @@ viewList texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg
(Comp.NotificationHookTable.view texts.notificationTable

View File

@ -126,6 +126,7 @@ view cfg model =
}
]
, rootClasses = "mb-1"
, sticky = True
}
, case model of
ModelResp res ->
@ -137,7 +138,7 @@ view cfg model =
[ text (String.join "\n" res.messages)
]
ModelHttpError err ->
ModelHttpError _ ->
div [ class "" ]
[]

View File

@ -272,6 +272,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg (Comp.OrgTable.view2 texts.orgTable model.order model.tableModel)
, B.loadingDimmer
@ -343,6 +344,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -490,6 +490,7 @@ view texts extraClasses settings model =
[ startOnceBtn
]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -16,11 +16,9 @@ module Comp.PeriodicQueryTaskManage exposing
import Api
import Api.Model.BasicResult exposing (BasicResult)
import Api.Model.PeriodicQuerySettings exposing (PeriodicQuerySettings)
import Comp.ChannelMenu
import Comp.MenuBar as MB
import Comp.PeriodicQueryTaskForm
import Comp.PeriodicQueryTaskList
import Data.ChannelType exposing (ChannelType)
import Data.Flags exposing (Flags)
import Data.UiSettings exposing (UiSettings)
import Html exposing (..)
@ -305,6 +303,7 @@ viewList2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map ListMsg
(Comp.PeriodicQueryTaskList.view2 texts.notificationTable

View File

@ -305,6 +305,7 @@ viewTable2 texts model =
, label = texts.newPerson
}
]
, sticky = True
, rootClasses = "mb-4"
}
, Html.map TableMsg (Comp.PersonTable.view2 texts.personTable model.order model.tableModel)
@ -377,6 +378,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -290,6 +290,7 @@ viewInfo texts settings flags model share =
]
, end = []
, rootClasses = "my-4"
, sticky = True
}
, div []
[ Comp.ShareView.view cfg texts.shareView flags share
@ -346,6 +347,7 @@ viewForm texts model =
]
, end = []
, rootClasses = "my-4"
, sticky = True
}
, div []
[ Html.map FormMsg (Comp.ShareForm.view texts.shareForm model.formModel)

View File

@ -22,7 +22,6 @@ import Api.Model.IdName exposing (IdName)
import Api.Model.ImapSettingsList exposing (ImapSettingsList)
import Api.Model.ScanMailboxSettings exposing (ScanMailboxSettings)
import Api.Model.StringList exposing (StringList)
import Api.Model.Tag
import Api.Model.TagList exposing (TagList)
import Comp.Basic as B
import Comp.CalEventInput
@ -823,6 +822,7 @@ view2 texts flags extraClasses settings model =
[ startOnceBtn
]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -297,6 +297,7 @@ viewList2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map ListMsg
(Comp.ScanMailboxList.view2 texts.table

View File

@ -329,6 +329,7 @@ viewTable texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg (Comp.ShareTable.view texts.shareTable model.shares)
, B.loadingDimmer
@ -406,6 +407,7 @@ viewForm texts settings flags model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -261,6 +261,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg (Comp.SourceTable.view2 texts.sourceTable model.sources)
, B.loadingDimmer
@ -302,6 +303,7 @@ viewLinks2 texts flags _ source =
]
, end = []
, rootClasses = "mb-4"
, sticky = True
}
, p [ class "text-lg pt-2 opacity-75" ]
[ text texts.sourceInfoText
@ -449,6 +451,7 @@ viewForm2 texts flags settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map FormMsg
(Comp.SourceForm.view2 flags texts.sourceForm settings model.formModel)

View File

@ -284,6 +284,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg (Comp.TagTable.view2 texts.tagTable model.order model.tagTableModel)
, div
@ -359,6 +360,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -339,6 +339,7 @@ view2 texts flags _ classes model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, div
[ classList

View File

@ -271,6 +271,7 @@ viewTable2 texts model =
}
]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map TableMsg (Comp.UserTable.view2 texts.userTable model.tableModel)
, B.loadingDimmer
@ -281,7 +282,7 @@ viewTable2 texts model =
renderDeleteConfirm : Texts -> UiSettings -> Model -> Html Msg
renderDeleteConfirm texts settings model =
renderDeleteConfirm texts _ model =
case model.deleteConfirm of
DimmerOff ->
span [ class "hidden" ] []
@ -397,6 +398,7 @@ viewForm2 texts settings model =
else
[]
, rootClasses = "mb-4"
, sticky = True
}
, Html.map FormMsg (Comp.UserForm.view2 texts.userForm settings model.formModel)
, div

View File

@ -77,7 +77,7 @@ gb =
, nextItem = "Next item"
, sendMail = "Send Mail"
, addMoreFiles = "Add more files to this item"
, confirmItemMetadata = "Confirm item metadata"
, confirmItemMetadata = "Confirm metadata"
, confirm = "Confirm"
, unconfirmItemMetadata = "Un-confirm item metadata"
, reprocessItem = "Reprocess this item"
@ -91,7 +91,7 @@ gb =
, sendingMailNow = "Sending e-mail"
, formatDateTime = DF.formatDateTimeLong Messages.UiLanguage.English
, mailSendSuccessful = "Mail sent."
, showQrCode = "Show the URL to this page as QR code"
, showQrCode = "Show URL as QR code"
, close = "Close"
}
@ -127,6 +127,6 @@ de =
, sendingMailNow = "E-Mail wird gesendet"
, formatDateTime = DF.formatDateTimeLong Messages.UiLanguage.German
, mailSendSuccessful = "E-Mail wurde versendet."
, showQrCode = "Den Link zu dieser Seite als QR code anzeigen"
, showQrCode = "Link als QR code anzeigen"
, close = "Schließen"
}

View File

@ -44,7 +44,7 @@ gb =
, tagModeRemoveInfo = "Tags chosen here are *removed* from all selected items."
, tagModeReplaceInfo = "Tags chosen here *replace* those on selected items."
, chooseDirection = "Choose a direction"
, confirmUnconfirm = "Confirm/Unconfirm item metadata"
, confirmUnconfirm = "Confirm/Unconfirm metadata"
, confirm = "Confirm"
, unconfirm = "Unconfirm"
, changeTagMode = "Change tag edit mode"

View File

@ -54,6 +54,7 @@ viewSidebar texts visible flags settings model =
]
, end = []
, rootClasses = "text-sm mb-3 "
, sticky = True
}
, Html.map ItemDetailMsg
(Comp.ItemDetail.EditForm.view2 texts.editForm flags settings model.detail)

View File

@ -49,6 +49,7 @@ view texts flags settings model =
]
, start = []
, rootClasses = "text-sm w-full bg-blue-50 pt-2 hidden"
, sticky = True
}
, div [ class "flex flex-col" ]
(case model.viewMode of
@ -81,6 +82,7 @@ viewSearch texts flags settings model =
]
, end = []
, rootClasses = "my-1 text-xs hidden sm:flex"
, sticky = True
}
, let
searchMenuCfg =
@ -140,6 +142,7 @@ viewEditMenu texts flags svm settings =
]
, end = []
, rootClasses = "mt-2 text-sm"
, sticky = True
}
, Html.map EditMenuMsg
(Comp.ItemDetail.MultiEditMenu.view2

View File

@ -424,6 +424,7 @@ defaultMenuBar texts flags settings model =
}
]
, rootClasses = "mb-2 pt-1 dark:bg-slate-700 items-center text-sm"
, sticky = True
}
@ -551,6 +552,7 @@ editMenuBar texts model svm =
}
]
, rootClasses = "mb-2 pt-2 sticky top-0 text-sm"
, sticky = True
}

View File

@ -151,4 +151,5 @@ view texts flags model =
}
]
, rootClasses = "mb-2 pt-1 dark:bg-slate-700 items-center text-sm"
, sticky = True
}