mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Initial version.
Features: - Upload PDF files let them analyze - Manage meta data and items - See processing in webapp
This commit is contained in:
20
modules/webapp/src/main/elm/Page/UserSettings/Data.elm
Normal file
20
modules/webapp/src/main/elm/Page/UserSettings/Data.elm
Normal file
@ -0,0 +1,20 @@
|
||||
module Page.UserSettings.Data exposing (..)
|
||||
|
||||
import Comp.ChangePasswordForm
|
||||
|
||||
type alias Model =
|
||||
{ currentTab: Maybe Tab
|
||||
, changePassModel: Comp.ChangePasswordForm.Model
|
||||
}
|
||||
|
||||
emptyModel: Model
|
||||
emptyModel =
|
||||
{ currentTab = Nothing
|
||||
, changePassModel = Comp.ChangePasswordForm.emptyModel
|
||||
}
|
||||
|
||||
type Tab = ChangePassTab
|
||||
|
||||
type Msg
|
||||
= SetTab Tab
|
||||
| ChangePassMsg Comp.ChangePasswordForm.Msg
|
20
modules/webapp/src/main/elm/Page/UserSettings/Update.elm
Normal file
20
modules/webapp/src/main/elm/Page/UserSettings/Update.elm
Normal file
@ -0,0 +1,20 @@
|
||||
module Page.UserSettings.Update exposing (update)
|
||||
|
||||
import Page.UserSettings.Data exposing (..)
|
||||
import Data.Flags exposing (Flags)
|
||||
import Comp.ChangePasswordForm
|
||||
|
||||
update: Flags -> Msg -> Model -> (Model, Cmd Msg)
|
||||
update flags msg model =
|
||||
case msg of
|
||||
SetTab t ->
|
||||
let
|
||||
m = { model | currentTab = Just t }
|
||||
in
|
||||
(m, Cmd.none)
|
||||
|
||||
ChangePassMsg m ->
|
||||
let
|
||||
(m2, c2) = Comp.ChangePasswordForm.update flags m model.changePassModel
|
||||
in
|
||||
({model | changePassModel = m2}, Cmd.map ChangePassMsg c2)
|
47
modules/webapp/src/main/elm/Page/UserSettings/View.elm
Normal file
47
modules/webapp/src/main/elm/Page/UserSettings/View.elm
Normal file
@ -0,0 +1,47 @@
|
||||
module Page.UserSettings.View exposing (view)
|
||||
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onClick)
|
||||
import Util.Html exposing (classActive)
|
||||
|
||||
import Page.UserSettings.Data exposing (..)
|
||||
import Comp.ChangePasswordForm
|
||||
|
||||
view: Model -> Html Msg
|
||||
view model =
|
||||
div [class "usersetting-page ui padded grid"]
|
||||
[div [class "four wide column"]
|
||||
[h4 [class "ui top attached ablue-comp header"]
|
||||
[text "User"
|
||||
]
|
||||
,div [class "ui attached fluid segment"]
|
||||
[div [class "ui fluid vertical secondary menu"]
|
||||
[div [classActive (model.currentTab == Just ChangePassTab) "link icon item"
|
||||
,onClick (SetTab ChangePassTab)
|
||||
]
|
||||
[i [class "user secret icon"][]
|
||||
,text "Change Password"
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
,div [class "twelve wide column"]
|
||||
[div [class ""]
|
||||
(case model.currentTab of
|
||||
Just ChangePassTab -> viewChangePassword model
|
||||
Nothing -> []
|
||||
)
|
||||
]
|
||||
]
|
||||
|
||||
viewChangePassword: Model -> List (Html Msg)
|
||||
viewChangePassword model =
|
||||
[h2 [class "ui header"]
|
||||
[i [class "ui user secret icon"][]
|
||||
,div [class "content"]
|
||||
[text "Change Password"
|
||||
]
|
||||
]
|
||||
,Html.map ChangePassMsg (Comp.ChangePasswordForm.view model.changePassModel)
|
||||
]
|
Reference in New Issue
Block a user