mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-06 15:15:58 +00:00
parent
927c3dfac9
commit
28b4546607
@ -58,6 +58,7 @@
|
|||||||
var elmFlags = {
|
var elmFlags = {
|
||||||
"account": account,
|
"account": account,
|
||||||
"pdfSupported": pdfSupported,
|
"pdfSupported": pdfSupported,
|
||||||
|
"innerWidth": window.innerWidth,
|
||||||
"config": {{{flagsJson}}}
|
"config": {{{flagsJson}}}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -125,7 +125,7 @@ init key url flags_ settings =
|
|||||||
, userMenuOpen = False
|
, userMenuOpen = False
|
||||||
, subs = Sub.none
|
, subs = Sub.none
|
||||||
, uiSettings = settings
|
, uiSettings = settings
|
||||||
, sidebarVisible = settings.sideMenuVisible
|
, sidebarVisible = flags.innerWidth > 768 && settings.sideMenuVisible
|
||||||
, anonymousTheme = Data.UiTheme.Light
|
, anonymousTheme = Data.UiTheme.Light
|
||||||
, anonymousUiLang = Messages.UiLanguage.English
|
, anonymousUiLang = Messages.UiLanguage.English
|
||||||
, langMenuOpen = False
|
, langMenuOpen = False
|
||||||
|
@ -14,7 +14,7 @@ import Api
|
|||||||
import App.Data exposing (..)
|
import App.Data exposing (..)
|
||||||
import Browser exposing (UrlRequest(..))
|
import Browser exposing (UrlRequest(..))
|
||||||
import Browser.Navigation as Nav
|
import Browser.Navigation as Nav
|
||||||
import Data.Flags
|
import Data.Flags exposing (Flags)
|
||||||
import Data.ServerEvent exposing (ServerEvent(..))
|
import Data.ServerEvent exposing (ServerEvent(..))
|
||||||
import Data.UiSettings exposing (UiSettings)
|
import Data.UiSettings exposing (UiSettings)
|
||||||
import Data.UiTheme
|
import Data.UiTheme
|
||||||
@ -349,10 +349,13 @@ applyClientSettings texts model settings =
|
|||||||
let
|
let
|
||||||
setTheme =
|
setTheme =
|
||||||
Ports.setUiTheme settings.uiTheme
|
Ports.setUiTheme settings.uiTheme
|
||||||
|
|
||||||
|
flags =
|
||||||
|
model.flags
|
||||||
in
|
in
|
||||||
Util.Update.andThen2
|
Util.Update.andThen2
|
||||||
[ \m ->
|
[ \m ->
|
||||||
( { m | sidebarVisible = settings.sideMenuVisible }
|
( { m | sidebarVisible = flags.innerWidth > 768 && settings.sideMenuVisible }
|
||||||
, setTheme
|
, setTheme
|
||||||
, Sub.none
|
, Sub.none
|
||||||
)
|
)
|
||||||
|
@ -42,6 +42,7 @@ type alias Config =
|
|||||||
type alias Flags =
|
type alias Flags =
|
||||||
{ account : Maybe AuthResult
|
{ account : Maybe AuthResult
|
||||||
, pdfSupported : Bool
|
, pdfSupported : Bool
|
||||||
|
, innerWidth : Int
|
||||||
, config : Config
|
, config : Config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user