mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-24 11:28:25 +00:00
@ -100,7 +100,6 @@ type alias Model =
|
||||
, sentMailsOpen : Bool
|
||||
, attachMeta : Dict String Comp.AttachmentMeta.Model
|
||||
, attachMetaOpen : Bool
|
||||
, pdfNativeView : Maybe Bool
|
||||
, attachModal : Maybe ConfirmModalValue
|
||||
, addFilesOpen : Bool
|
||||
, addFilesModel : Comp.Dropzone.Model
|
||||
@ -236,7 +235,6 @@ emptyModel =
|
||||
, sentMailsOpen = False
|
||||
, attachMeta = Dict.empty
|
||||
, attachMetaOpen = False
|
||||
, pdfNativeView = Nothing
|
||||
, attachModal = Nothing
|
||||
, addFilesOpen = False
|
||||
, addFilesModel = Comp.Dropzone.init []
|
||||
@ -316,7 +314,6 @@ type Msg
|
||||
| SentMailsResp (Result Http.Error SentMails)
|
||||
| AttachMetaClick String
|
||||
| AttachMetaMsg String Comp.AttachmentMeta.Msg
|
||||
| TogglePdfNativeView Bool
|
||||
| RequestDeleteAttachment String
|
||||
| DeleteAttachConfirmed String
|
||||
| RequestDeleteSelected
|
||||
|
@ -85,12 +85,8 @@ view texts flags settings model pos attach =
|
||||
, style "max-height" "calc(100vh - 140px)"
|
||||
, style "min-height" "500px"
|
||||
]
|
||||
[ iframe
|
||||
[ if Maybe.withDefault settings.nativePdfPreview model.pdfNativeView then
|
||||
src fileUrl
|
||||
|
||||
else
|
||||
src (fileUrl ++ "/view")
|
||||
[ embed
|
||||
[ src <| Data.UiSettings.pdfUrl settings flags fileUrl
|
||||
, class "absolute h-full w-full top-0 left-0 mx-0 py-0"
|
||||
, id "ds-pdf-view-iframe"
|
||||
]
|
||||
@ -254,18 +250,6 @@ attachHeader texts settings model _ attach =
|
||||
, classList [ ( "hidden", not attach.converted ) ]
|
||||
]
|
||||
}
|
||||
, { icon =
|
||||
if Maybe.withDefault settings.nativePdfPreview model.pdfNativeView then
|
||||
"fa fa-toggle-on"
|
||||
|
||||
else
|
||||
"fa fa-toggle-off"
|
||||
, label = texts.renderPdfByBrowser
|
||||
, attrs =
|
||||
[ onClick (TogglePdfNativeView settings.nativePdfPreview)
|
||||
, href "#"
|
||||
]
|
||||
}
|
||||
, { icon =
|
||||
if isAttachMetaOpen model attach.id then
|
||||
"fa fa-toggle-on"
|
||||
|
@ -913,19 +913,6 @@ update key flags inav settings msg model =
|
||||
Nothing ->
|
||||
resultModel model
|
||||
|
||||
TogglePdfNativeView default ->
|
||||
resultModel
|
||||
{ model
|
||||
| pdfNativeView =
|
||||
case model.pdfNativeView of
|
||||
Just flag ->
|
||||
Just (not flag)
|
||||
|
||||
Nothing ->
|
||||
Just (not default)
|
||||
, attachmentDropdownOpen = False
|
||||
}
|
||||
|
||||
DeleteAttachConfirmed attachId ->
|
||||
let
|
||||
cmd =
|
||||
|
Reference in New Issue
Block a user