Refactor to allow internal card links into search menu

Also allows to exchange the preview-url in the item card
This commit is contained in:
eikek
2021-10-05 01:44:50 +02:00
parent 83dd675e4f
commit 7b0f378558
10 changed files with 111 additions and 39 deletions

View File

@ -141,6 +141,8 @@ module Api exposing
, setTags
, setTagsMultiple
, setUnconfirmed
, shareAttachmentPreviewURL
, shareItemBasePreviewURL
, startClassifier
, startEmptyTrash
, startOnceNotifyDueItems
@ -2288,6 +2290,16 @@ searchShare flags token search receive =
}
shareAttachmentPreviewURL : String -> String
shareAttachmentPreviewURL id =
"/api/v1/share/attachment/" ++ id ++ "/preview?withFallback=true"
shareItemBasePreviewURL : String -> String
shareItemBasePreviewURL itemId =
"/api/v1/share/item/" ++ itemId ++ "/preview?withFallback=true"
--- Helper