mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-09-30 00:28:23 +00:00
Share page skeleton
This commit is contained in:
32
modules/webapp/src/main/elm/Page/Share/Data.elm
Normal file
32
modules/webapp/src/main/elm/Page/Share/Data.elm
Normal file
@@ -0,0 +1,32 @@
|
||||
{-
|
||||
Copyright 2020 Eike K. & Contributors
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-}
|
||||
|
||||
|
||||
module Page.Share.Data exposing (Model, Msg, init)
|
||||
|
||||
import Data.Flags exposing (Flags)
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : Maybe String -> Flags -> ( Model, Cmd Msg )
|
||||
init shareId flags =
|
||||
case shareId of
|
||||
Just id ->
|
||||
let
|
||||
_ =
|
||||
Debug.log "share" id
|
||||
in
|
||||
( {}, Cmd.none )
|
||||
|
||||
Nothing ->
|
||||
( {}, Cmd.none )
|
||||
|
||||
|
||||
type Msg
|
||||
= Msg
|
23
modules/webapp/src/main/elm/Page/Share/Update.elm
Normal file
23
modules/webapp/src/main/elm/Page/Share/Update.elm
Normal file
@@ -0,0 +1,23 @@
|
||||
{-
|
||||
Copyright 2020 Eike K. & Contributors
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-}
|
||||
|
||||
|
||||
module Page.Share.Update exposing (UpdateResult, update)
|
||||
|
||||
import Data.Flags exposing (Flags)
|
||||
import Page.Share.Data exposing (..)
|
||||
|
||||
|
||||
type alias UpdateResult =
|
||||
{ model : Model
|
||||
, cmd : Cmd Msg
|
||||
, sub : Sub Msg
|
||||
}
|
||||
|
||||
|
||||
update : Flags -> String -> Msg -> Model -> UpdateResult
|
||||
update flags shareId msg model =
|
||||
UpdateResult model Cmd.none Sub.none
|
38
modules/webapp/src/main/elm/Page/Share/View.elm
Normal file
38
modules/webapp/src/main/elm/Page/Share/View.elm
Normal file
@@ -0,0 +1,38 @@
|
||||
{-
|
||||
Copyright 2020 Eike K. & Contributors
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-}
|
||||
|
||||
|
||||
module Page.Share.View exposing (viewContent, viewSidebar)
|
||||
|
||||
import Data.Flags exposing (Flags)
|
||||
import Data.UiSettings exposing (UiSettings)
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Messages.Page.Share exposing (Texts)
|
||||
import Page.Share.Data exposing (..)
|
||||
import Styles as S
|
||||
|
||||
|
||||
viewSidebar : Texts -> Bool -> Flags -> UiSettings -> Model -> Html Msg
|
||||
viewSidebar _ visible _ _ _ =
|
||||
div
|
||||
[ id "sidebar"
|
||||
, classList [ ( "hidden", not visible ) ]
|
||||
]
|
||||
[ text "sidebar" ]
|
||||
|
||||
|
||||
viewContent : Texts -> Flags -> UiSettings -> Model -> Html Msg
|
||||
viewContent texts flags _ model =
|
||||
div
|
||||
[ id "content"
|
||||
, class "h-full flex flex-col"
|
||||
, class S.content
|
||||
]
|
||||
[ h1 [ class S.header1 ]
|
||||
[ text "Share Page!"
|
||||
]
|
||||
]
|
Reference in New Issue
Block a user