mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
54 lines
1.1 KiB
Elm
54 lines
1.1 KiB
Elm
{-
|
|
Copyright 2020 Docspell Contributors
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
-}
|
|
|
|
|
|
port module Ports exposing
|
|
( checkSearchQueryString
|
|
, initClipboard
|
|
, receiveCheckQueryResult
|
|
, receiveUiSettings
|
|
, removeAccount
|
|
, requestUiSettings
|
|
, setAccount
|
|
, setUiTheme
|
|
)
|
|
|
|
import Api.Model.AuthResult exposing (AuthResult)
|
|
import Data.QueryParseResult exposing (QueryParseResult)
|
|
import Data.UiSettings exposing (StoredUiSettings)
|
|
import Data.UiTheme exposing (UiTheme)
|
|
|
|
|
|
{-| Save the result of authentication to local storage.
|
|
-}
|
|
port setAccount : AuthResult -> Cmd msg
|
|
|
|
|
|
port removeAccount : () -> Cmd msg
|
|
|
|
|
|
port internalSetUiTheme : String -> Cmd msg
|
|
|
|
|
|
port checkSearchQueryString : String -> Cmd msg
|
|
|
|
|
|
port receiveCheckQueryResult : (QueryParseResult -> msg) -> Sub msg
|
|
|
|
|
|
port initClipboard : ( String, String ) -> Cmd msg
|
|
|
|
|
|
port receiveUiSettings : (StoredUiSettings -> msg) -> Sub msg
|
|
|
|
|
|
port requestUiSettings : AuthResult -> Cmd msg
|
|
|
|
|
|
setUiTheme : UiTheme -> Cmd msg
|
|
setUiTheme theme =
|
|
internalSetUiTheme (Data.UiTheme.toString theme)
|