mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-05 10:59:33 +00:00
Rename HomePage to SearchPage
This commit is contained in:
parent
5b5a25ac72
commit
c38ab3ef82
@ -26,13 +26,13 @@ import Http
|
|||||||
import Messages.UiLanguage exposing (UiLanguage)
|
import Messages.UiLanguage exposing (UiLanguage)
|
||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Page.CollectiveSettings.Data
|
import Page.CollectiveSettings.Data
|
||||||
import Page.Home.Data
|
|
||||||
import Page.ItemDetail.Data
|
import Page.ItemDetail.Data
|
||||||
import Page.Login.Data
|
import Page.Login.Data
|
||||||
import Page.ManageData.Data
|
import Page.ManageData.Data
|
||||||
import Page.NewInvite.Data
|
import Page.NewInvite.Data
|
||||||
import Page.Queue.Data
|
import Page.Queue.Data
|
||||||
import Page.Register.Data
|
import Page.Register.Data
|
||||||
|
import Page.Search.Data
|
||||||
import Page.Share.Data
|
import Page.Share.Data
|
||||||
import Page.ShareDetail.Data
|
import Page.ShareDetail.Data
|
||||||
import Page.Upload.Data
|
import Page.Upload.Data
|
||||||
@ -45,7 +45,7 @@ type alias Model =
|
|||||||
, key : Key
|
, key : Key
|
||||||
, page : Page
|
, page : Page
|
||||||
, version : VersionInfo
|
, version : VersionInfo
|
||||||
, homeModel : Page.Home.Data.Model
|
, searchModel : Page.Search.Data.Model
|
||||||
, loginModel : Page.Login.Data.Model
|
, loginModel : Page.Login.Data.Model
|
||||||
, manageDataModel : Page.ManageData.Data.Model
|
, manageDataModel : Page.ManageData.Data.Model
|
||||||
, collSettingsModel : Page.CollectiveSettings.Data.Model
|
, collSettingsModel : Page.CollectiveSettings.Data.Model
|
||||||
@ -98,18 +98,18 @@ init key url flags_ settings =
|
|||||||
( sdm, sdc ) =
|
( sdm, sdc ) =
|
||||||
Page.ShareDetail.Data.init (Page.pageShareDetail page) flags
|
Page.ShareDetail.Data.init (Page.pageShareDetail page) flags
|
||||||
|
|
||||||
homeViewMode =
|
searchViewMode =
|
||||||
if settings.searchMenuVisible then
|
if settings.searchMenuVisible then
|
||||||
Page.Home.Data.SearchView
|
Page.Search.Data.SearchView
|
||||||
|
|
||||||
else
|
else
|
||||||
Page.Home.Data.SimpleView
|
Page.Search.Data.SimpleView
|
||||||
in
|
in
|
||||||
( { flags = flags
|
( { flags = flags
|
||||||
, key = key
|
, key = key
|
||||||
, page = page
|
, page = page
|
||||||
, version = Api.Model.VersionInfo.empty
|
, version = Api.Model.VersionInfo.empty
|
||||||
, homeModel = Page.Home.Data.init flags homeViewMode
|
, searchModel = Page.Search.Data.init flags searchViewMode
|
||||||
, loginModel = loginm
|
, loginModel = loginm
|
||||||
, manageDataModel = mdm
|
, manageDataModel = mdm
|
||||||
, collSettingsModel = csm
|
, collSettingsModel = csm
|
||||||
@ -171,7 +171,7 @@ type Msg
|
|||||||
= NavRequest UrlRequest
|
= NavRequest UrlRequest
|
||||||
| NavChange Url
|
| NavChange Url
|
||||||
| VersionResp (Result Http.Error VersionInfo)
|
| VersionResp (Result Http.Error VersionInfo)
|
||||||
| HomeMsg Page.Home.Data.Msg
|
| SearchMsg Page.Search.Data.Msg
|
||||||
| LoginMsg Page.Login.Data.Msg
|
| LoginMsg Page.Login.Data.Msg
|
||||||
| ManageDataMsg Page.ManageData.Data.Msg
|
| ManageDataMsg Page.ManageData.Data.Msg
|
||||||
| CollSettingsMsg Page.CollectiveSettings.Data.Msg
|
| CollSettingsMsg Page.CollectiveSettings.Data.Msg
|
||||||
@ -201,7 +201,7 @@ type Msg
|
|||||||
|
|
||||||
defaultPage : Flags -> Page
|
defaultPage : Flags -> Page
|
||||||
defaultPage _ =
|
defaultPage _ =
|
||||||
HomePage
|
SearchPage
|
||||||
|
|
||||||
|
|
||||||
getUiLanguage : Model -> UiLanguage
|
getUiLanguage : Model -> UiLanguage
|
||||||
|
@ -22,8 +22,6 @@ import Messages exposing (Messages)
|
|||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Page.CollectiveSettings.Data
|
import Page.CollectiveSettings.Data
|
||||||
import Page.CollectiveSettings.Update
|
import Page.CollectiveSettings.Update
|
||||||
import Page.Home.Data
|
|
||||||
import Page.Home.Update
|
|
||||||
import Page.ItemDetail.Data
|
import Page.ItemDetail.Data
|
||||||
import Page.ItemDetail.Update
|
import Page.ItemDetail.Update
|
||||||
import Page.Login.Data
|
import Page.Login.Data
|
||||||
@ -36,6 +34,8 @@ import Page.Queue.Data
|
|||||||
import Page.Queue.Update
|
import Page.Queue.Update
|
||||||
import Page.Register.Data
|
import Page.Register.Data
|
||||||
import Page.Register.Update
|
import Page.Register.Update
|
||||||
|
import Page.Search.Data
|
||||||
|
import Page.Search.Update
|
||||||
import Page.Share.Data
|
import Page.Share.Data
|
||||||
import Page.Share.Update
|
import Page.Share.Update
|
||||||
import Page.ShareDetail.Data
|
import Page.ShareDetail.Data
|
||||||
@ -121,8 +121,8 @@ updateWithSub msg model =
|
|||||||
SetLanguage lang ->
|
SetLanguage lang ->
|
||||||
( { model | anonymousUiLang = lang, langMenuOpen = False }, Cmd.none, Sub.none )
|
( { model | anonymousUiLang = lang, langMenuOpen = False }, Cmd.none, Sub.none )
|
||||||
|
|
||||||
HomeMsg lm ->
|
SearchMsg lm ->
|
||||||
updateHome texts lm model
|
updateSearch texts lm model
|
||||||
|
|
||||||
ShareMsg lm ->
|
ShareMsg lm ->
|
||||||
updateShare lm model
|
updateShare lm model
|
||||||
@ -318,12 +318,12 @@ updateWithSub msg model =
|
|||||||
|
|
||||||
newModel =
|
newModel =
|
||||||
{ model
|
{ model
|
||||||
| showNewItemsArrived = isProcessItem && model.page /= HomePage
|
| showNewItemsArrived = isProcessItem && model.page /= SearchPage
|
||||||
, jobsWaiting = max 0 (model.jobsWaiting - 1)
|
, jobsWaiting = max 0 (model.jobsWaiting - 1)
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
if model.page == HomePage && isProcessItem then
|
if model.page == SearchPage && isProcessItem then
|
||||||
updateHome texts Page.Home.Data.RefreshView newModel
|
updateSearch texts Page.Search.Data.RefreshView newModel
|
||||||
|
|
||||||
else
|
else
|
||||||
( newModel, Cmd.none, Sub.none )
|
( newModel, Cmd.none, Sub.none )
|
||||||
@ -360,7 +360,7 @@ applyClientSettings texts model settings =
|
|||||||
, Sub.none
|
, Sub.none
|
||||||
)
|
)
|
||||||
, updateUserSettings texts Page.UserSettings.Data.UpdateSettings
|
, updateUserSettings texts Page.UserSettings.Data.UpdateSettings
|
||||||
, updateHome texts Page.Home.Data.UiSettingsUpdated
|
, updateSearch texts Page.Search.Data.UiSettingsUpdated
|
||||||
, updateItemDetail texts Page.ItemDetail.Data.UiSettingsUpdated
|
, updateItemDetail texts Page.ItemDetail.Data.UiSettingsUpdated
|
||||||
]
|
]
|
||||||
{ model | uiSettings = settings }
|
{ model | uiSettings = settings }
|
||||||
@ -404,7 +404,7 @@ updateItemDetail : Messages -> Page.ItemDetail.Data.Msg -> Model -> ( Model, Cmd
|
|||||||
updateItemDetail texts lmsg model =
|
updateItemDetail texts lmsg model =
|
||||||
let
|
let
|
||||||
inav =
|
inav =
|
||||||
Page.Home.Data.itemNav model.itemDetailModel.detail.item.id model.homeModel
|
Page.Search.Data.itemNav model.itemDetailModel.detail.item.id model.searchModel
|
||||||
|
|
||||||
result =
|
result =
|
||||||
Page.ItemDetail.Update.update
|
Page.ItemDetail.Update.update
|
||||||
@ -421,12 +421,12 @@ updateItemDetail texts lmsg model =
|
|||||||
}
|
}
|
||||||
|
|
||||||
( hm, hc, hs ) =
|
( hm, hc, hs ) =
|
||||||
updateHome texts (Page.Home.Data.SetLinkTarget result.linkTarget) model_
|
updateSearch texts (Page.Search.Data.SetLinkTarget result.linkTarget) model_
|
||||||
|
|
||||||
( hm1, hc1, hs1 ) =
|
( hm1, hc1, hs1 ) =
|
||||||
case result.removedItem of
|
case result.removedItem of
|
||||||
Just removedId ->
|
Just removedId ->
|
||||||
updateHome texts (Page.Home.Data.RemoveItem removedId) hm
|
updateSearch texts (Page.Search.Data.RemoveItem removedId) hm
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
( hm, hc, hs )
|
( hm, hc, hs )
|
||||||
@ -552,22 +552,22 @@ updateLogin lmsg model =
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
updateHome : Messages -> Page.Home.Data.Msg -> Model -> ( Model, Cmd Msg, Sub Msg )
|
updateSearch : Messages -> Page.Search.Data.Msg -> Model -> ( Model, Cmd Msg, Sub Msg )
|
||||||
updateHome texts lmsg model =
|
updateSearch texts lmsg model =
|
||||||
let
|
let
|
||||||
mid =
|
mid =
|
||||||
case model.page of
|
case model.page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
Util.Maybe.fromString model.itemDetailModel.detail.item.id
|
Util.Maybe.fromString model.itemDetailModel.detail.item.id
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
Nothing
|
Nothing
|
||||||
|
|
||||||
result =
|
result =
|
||||||
Page.Home.Update.update mid model.key model.flags texts.home model.uiSettings lmsg model.homeModel
|
Page.Search.Update.update mid model.key model.flags texts.search model.uiSettings lmsg model.searchModel
|
||||||
|
|
||||||
model_ =
|
model_ =
|
||||||
{ model | homeModel = result.model }
|
{ model | searchModel = result.model }
|
||||||
|
|
||||||
( lm, lc, ls ) =
|
( lm, lc, ls ) =
|
||||||
case result.newSettings of
|
case result.newSettings of
|
||||||
@ -579,11 +579,11 @@ updateHome texts lmsg model =
|
|||||||
in
|
in
|
||||||
( lm
|
( lm
|
||||||
, Cmd.batch
|
, Cmd.batch
|
||||||
[ Cmd.map HomeMsg result.cmd
|
[ Cmd.map SearchMsg result.cmd
|
||||||
, lc
|
, lc
|
||||||
]
|
]
|
||||||
, Sub.batch
|
, Sub.batch
|
||||||
[ Sub.map HomeMsg result.sub
|
[ Sub.map SearchMsg result.sub
|
||||||
, ls
|
, ls
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -611,9 +611,9 @@ initPage model_ page =
|
|||||||
Messages.get <| App.Data.getUiLanguage model
|
Messages.get <| App.Data.getUiLanguage model
|
||||||
in
|
in
|
||||||
case page of
|
case page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
Util.Update.andThen2
|
Util.Update.andThen2
|
||||||
[ updateHome texts Page.Home.Data.Init
|
[ updateSearch texts Page.Search.Data.Init
|
||||||
, updateQueue Page.Queue.Data.StopRefresh
|
, updateQueue Page.Queue.Data.StopRefresh
|
||||||
]
|
]
|
||||||
model
|
model
|
||||||
|
@ -19,14 +19,14 @@ import Messages.App exposing (Texts)
|
|||||||
import Messages.UiLanguage
|
import Messages.UiLanguage
|
||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Page.CollectiveSettings.View2 as CollectiveSettings
|
import Page.CollectiveSettings.View2 as CollectiveSettings
|
||||||
import Page.Home.Data
|
|
||||||
import Page.Home.View2 as Home
|
|
||||||
import Page.ItemDetail.View2 as ItemDetail
|
import Page.ItemDetail.View2 as ItemDetail
|
||||||
import Page.Login.View2 as Login
|
import Page.Login.View2 as Login
|
||||||
import Page.ManageData.View2 as ManageData
|
import Page.ManageData.View2 as ManageData
|
||||||
import Page.NewInvite.View2 as NewInvite
|
import Page.NewInvite.View2 as NewInvite
|
||||||
import Page.Queue.View2 as Queue
|
import Page.Queue.View2 as Queue
|
||||||
import Page.Register.View2 as Register
|
import Page.Register.View2 as Register
|
||||||
|
import Page.Search.Data
|
||||||
|
import Page.Search.View2 as Search
|
||||||
import Page.Share.View as Share
|
import Page.Share.View as Share
|
||||||
import Page.ShareDetail.View as ShareDetail
|
import Page.ShareDetail.View as ShareDetail
|
||||||
import Page.Upload.View2 as Upload
|
import Page.Upload.View2 as Upload
|
||||||
@ -76,7 +76,7 @@ topNavUser auth model =
|
|||||||
[ class S.infoMessageBase
|
[ class S.infoMessageBase
|
||||||
, class "my-2 px-1 py-1 rounded-lg inline-block hover:opacity-50"
|
, class "my-2 px-1 py-1 rounded-lg inline-block hover:opacity-50"
|
||||||
, classList [ ( "hidden", not model.showNewItemsArrived ) ]
|
, classList [ ( "hidden", not model.showNewItemsArrived ) ]
|
||||||
, Page.href HomePage
|
, Page.href SearchPage
|
||||||
, onClick ToggleShowNewItemsArrived
|
, onClick ToggleShowNewItemsArrived
|
||||||
]
|
]
|
||||||
[ i [ class "fa fa-exclamation-circle mr-1" ] []
|
[ i [ class "fa fa-exclamation-circle mr-1" ] []
|
||||||
@ -133,7 +133,7 @@ headerNavItem authenticated model =
|
|||||||
[ class "inline-flex font-bold items-center px-4"
|
[ class "inline-flex font-bold items-center px-4"
|
||||||
, classList [ ( "hover:bg-blue-200 dark:hover:bg-slate-800", authenticated ) ]
|
, classList [ ( "hover:bg-blue-200 dark:hover:bg-slate-800", authenticated ) ]
|
||||||
, if authenticated then
|
, if authenticated then
|
||||||
Page.href HomePage
|
Page.href SearchPage
|
||||||
|
|
||||||
else
|
else
|
||||||
href "#"
|
href "#"
|
||||||
@ -160,8 +160,8 @@ mainContent model =
|
|||||||
, class styleMain
|
, class styleMain
|
||||||
]
|
]
|
||||||
(case model.page of
|
(case model.page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
viewHome texts model
|
viewSearch texts model
|
||||||
|
|
||||||
CollectiveSettingPage ->
|
CollectiveSettingPage ->
|
||||||
viewCollectiveSettings texts model
|
viewCollectiveSettings texts model
|
||||||
@ -280,7 +280,7 @@ dataMenu texts _ model =
|
|||||||
, classList [ ( "hidden", not model.navMenuOpen ) ]
|
, classList [ ( "hidden", not model.navMenuOpen ) ]
|
||||||
]
|
]
|
||||||
[ dataPageLink model
|
[ dataPageLink model
|
||||||
HomePage
|
SearchPage
|
||||||
[]
|
[]
|
||||||
[ img
|
[ img
|
||||||
[ class "w-4 inline-block"
|
[ class "w-4 inline-block"
|
||||||
@ -510,20 +510,20 @@ viewShareDetail texts shareId itemId model =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewHome : Messages -> Model -> List (Html Msg)
|
viewSearch : Messages -> Model -> List (Html Msg)
|
||||||
viewHome texts model =
|
viewSearch texts model =
|
||||||
[ Html.map HomeMsg
|
[ Html.map SearchMsg
|
||||||
(Home.viewSidebar texts.home
|
(Search.viewSidebar texts.search
|
||||||
model.sidebarVisible
|
model.sidebarVisible
|
||||||
model.flags
|
model.flags
|
||||||
model.uiSettings
|
model.uiSettings
|
||||||
model.homeModel
|
model.searchModel
|
||||||
)
|
)
|
||||||
, Html.map HomeMsg
|
, Html.map SearchMsg
|
||||||
(Home.viewContent texts.home
|
(Search.viewContent texts.search
|
||||||
model.flags
|
model.flags
|
||||||
model.uiSettings
|
model.uiSettings
|
||||||
model.homeModel
|
model.searchModel
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -647,7 +647,7 @@ viewItemDetail : Messages -> String -> Model -> List (Html Msg)
|
|||||||
viewItemDetail texts id model =
|
viewItemDetail texts id model =
|
||||||
let
|
let
|
||||||
inav =
|
inav =
|
||||||
Page.Home.Data.itemNav id model.homeModel
|
Page.Search.Data.itemNav id model.searchModel
|
||||||
in
|
in
|
||||||
[ Html.map ItemDetailMsg
|
[ Html.map ItemDetailMsg
|
||||||
(ItemDetail.viewSidebar texts.itemDetail
|
(ItemDetail.viewSidebar texts.itemDetail
|
||||||
|
@ -741,7 +741,7 @@ update key flags inav settings msg model =
|
|||||||
resultModelCmd ( model, Page.set key (ItemDetailPage id) )
|
resultModelCmd ( model, Page.set key (ItemDetailPage id) )
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
resultModelCmd ( model, Page.set key HomePage )
|
resultModelCmd ( model, Page.set key SearchPage )
|
||||||
in
|
in
|
||||||
{ result_ | removedItem = Just removedId }
|
{ result_ | removedItem = Just removedId }
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ menuBar texts inav settings model =
|
|||||||
[ MB.CustomElement <|
|
[ MB.CustomElement <|
|
||||||
a
|
a
|
||||||
[ class S.secondaryBasicButton
|
[ class S.secondaryBasicButton
|
||||||
, Page.href HomePage
|
, Page.href SearchPage
|
||||||
, title texts.backToSearchResults
|
, title texts.backToSearchResults
|
||||||
]
|
]
|
||||||
[ i [ class "fa fa-arrow-left" ] []
|
[ i [ class "fa fa-arrow-left" ] []
|
||||||
|
@ -14,13 +14,13 @@ module Messages exposing
|
|||||||
|
|
||||||
import Messages.App
|
import Messages.App
|
||||||
import Messages.Page.CollectiveSettings
|
import Messages.Page.CollectiveSettings
|
||||||
import Messages.Page.Home
|
|
||||||
import Messages.Page.ItemDetail
|
import Messages.Page.ItemDetail
|
||||||
import Messages.Page.Login
|
import Messages.Page.Login
|
||||||
import Messages.Page.ManageData
|
import Messages.Page.ManageData
|
||||||
import Messages.Page.NewInvite
|
import Messages.Page.NewInvite
|
||||||
import Messages.Page.Queue
|
import Messages.Page.Queue
|
||||||
import Messages.Page.Register
|
import Messages.Page.Register
|
||||||
|
import Messages.Page.Search
|
||||||
import Messages.Page.Share
|
import Messages.Page.Share
|
||||||
import Messages.Page.ShareDetail
|
import Messages.Page.ShareDetail
|
||||||
import Messages.Page.Upload
|
import Messages.Page.Upload
|
||||||
@ -45,7 +45,7 @@ type alias Messages =
|
|||||||
, queue : Messages.Page.Queue.Texts
|
, queue : Messages.Page.Queue.Texts
|
||||||
, userSettings : Messages.Page.UserSettings.Texts
|
, userSettings : Messages.Page.UserSettings.Texts
|
||||||
, manageData : Messages.Page.ManageData.Texts
|
, manageData : Messages.Page.ManageData.Texts
|
||||||
, home : Messages.Page.Home.Texts
|
, search : Messages.Page.Search.Texts
|
||||||
, share : Messages.Page.Share.Texts
|
, share : Messages.Page.Share.Texts
|
||||||
, shareDetail : Messages.Page.ShareDetail.Texts
|
, shareDetail : Messages.Page.ShareDetail.Texts
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ gb =
|
|||||||
, queue = Messages.Page.Queue.gb
|
, queue = Messages.Page.Queue.gb
|
||||||
, userSettings = Messages.Page.UserSettings.gb
|
, userSettings = Messages.Page.UserSettings.gb
|
||||||
, manageData = Messages.Page.ManageData.gb
|
, manageData = Messages.Page.ManageData.gb
|
||||||
, home = Messages.Page.Home.gb
|
, search = Messages.Page.Search.gb
|
||||||
, share = Messages.Page.Share.gb
|
, share = Messages.Page.Share.gb
|
||||||
, shareDetail = Messages.Page.ShareDetail.gb
|
, shareDetail = Messages.Page.ShareDetail.gb
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ de =
|
|||||||
, queue = Messages.Page.Queue.de
|
, queue = Messages.Page.Queue.de
|
||||||
, userSettings = Messages.Page.UserSettings.de
|
, userSettings = Messages.Page.UserSettings.de
|
||||||
, manageData = Messages.Page.ManageData.de
|
, manageData = Messages.Page.ManageData.de
|
||||||
, home = Messages.Page.Home.de
|
, search = Messages.Page.Search.de
|
||||||
, share = Messages.Page.Share.de
|
, share = Messages.Page.Share.de
|
||||||
, shareDetail = Messages.Page.ShareDetail.de
|
, shareDetail = Messages.Page.ShareDetail.de
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Messages.Page.Home exposing
|
module Messages.Page.Search exposing
|
||||||
( Texts
|
( Texts
|
||||||
, de
|
, de
|
||||||
, gb
|
, gb
|
||||||
@ -17,14 +17,14 @@ import Messages.Comp.ItemCardList
|
|||||||
import Messages.Comp.ItemMerge
|
import Messages.Comp.ItemMerge
|
||||||
import Messages.Comp.PublishItems
|
import Messages.Comp.PublishItems
|
||||||
import Messages.Comp.SearchStatsView
|
import Messages.Comp.SearchStatsView
|
||||||
import Messages.Page.HomeSideMenu
|
import Messages.Page.SearchSideMenu
|
||||||
|
|
||||||
|
|
||||||
type alias Texts =
|
type alias Texts =
|
||||||
{ basics : Messages.Basics.Texts
|
{ basics : Messages.Basics.Texts
|
||||||
, itemCardList : Messages.Comp.ItemCardList.Texts
|
, itemCardList : Messages.Comp.ItemCardList.Texts
|
||||||
, searchStatsView : Messages.Comp.SearchStatsView.Texts
|
, searchStatsView : Messages.Comp.SearchStatsView.Texts
|
||||||
, sideMenu : Messages.Page.HomeSideMenu.Texts
|
, sideMenu : Messages.Page.SearchSideMenu.Texts
|
||||||
, itemMerge : Messages.Comp.ItemMerge.Texts
|
, itemMerge : Messages.Comp.ItemMerge.Texts
|
||||||
, publishItems : Messages.Comp.PublishItems.Texts
|
, publishItems : Messages.Comp.PublishItems.Texts
|
||||||
, bookmarkManage : Messages.Comp.BookmarkQueryManage.Texts
|
, bookmarkManage : Messages.Comp.BookmarkQueryManage.Texts
|
||||||
@ -66,7 +66,7 @@ gb =
|
|||||||
{ basics = Messages.Basics.gb
|
{ basics = Messages.Basics.gb
|
||||||
, itemCardList = Messages.Comp.ItemCardList.gb
|
, itemCardList = Messages.Comp.ItemCardList.gb
|
||||||
, searchStatsView = Messages.Comp.SearchStatsView.gb
|
, searchStatsView = Messages.Comp.SearchStatsView.gb
|
||||||
, sideMenu = Messages.Page.HomeSideMenu.gb
|
, sideMenu = Messages.Page.SearchSideMenu.gb
|
||||||
, itemMerge = Messages.Comp.ItemMerge.gb
|
, itemMerge = Messages.Comp.ItemMerge.gb
|
||||||
, publishItems = Messages.Comp.PublishItems.gb
|
, publishItems = Messages.Comp.PublishItems.gb
|
||||||
, bookmarkManage = Messages.Comp.BookmarkQueryManage.gb
|
, bookmarkManage = Messages.Comp.BookmarkQueryManage.gb
|
||||||
@ -108,7 +108,7 @@ de =
|
|||||||
{ basics = Messages.Basics.de
|
{ basics = Messages.Basics.de
|
||||||
, itemCardList = Messages.Comp.ItemCardList.de
|
, itemCardList = Messages.Comp.ItemCardList.de
|
||||||
, searchStatsView = Messages.Comp.SearchStatsView.de
|
, searchStatsView = Messages.Comp.SearchStatsView.de
|
||||||
, sideMenu = Messages.Page.HomeSideMenu.de
|
, sideMenu = Messages.Page.SearchSideMenu.de
|
||||||
, itemMerge = Messages.Comp.ItemMerge.de
|
, itemMerge = Messages.Comp.ItemMerge.de
|
||||||
, publishItems = Messages.Comp.PublishItems.de
|
, publishItems = Messages.Comp.PublishItems.de
|
||||||
, bookmarkManage = Messages.Comp.BookmarkQueryManage.de
|
, bookmarkManage = Messages.Comp.BookmarkQueryManage.de
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Messages.Page.HomeSideMenu exposing
|
module Messages.Page.SearchSideMenu exposing
|
||||||
( Texts
|
( Texts
|
||||||
, de
|
, de
|
||||||
, gb
|
, gb
|
@ -51,7 +51,7 @@ emptyLoginData =
|
|||||||
|
|
||||||
|
|
||||||
type Page
|
type Page
|
||||||
= HomePage
|
= SearchPage
|
||||||
| LoginPage LoginData
|
| LoginPage LoginData
|
||||||
| ManageDataPage
|
| ManageDataPage
|
||||||
| CollectiveSettingPage
|
| CollectiveSettingPage
|
||||||
@ -68,7 +68,7 @@ type Page
|
|||||||
isSecured : Page -> Bool
|
isSecured : Page -> Bool
|
||||||
isSecured page =
|
isSecured page =
|
||||||
case page of
|
case page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
True
|
True
|
||||||
|
|
||||||
LoginPage _ ->
|
LoginPage _ ->
|
||||||
@ -141,8 +141,8 @@ loginPage p =
|
|||||||
pageName : Page -> String
|
pageName : Page -> String
|
||||||
pageName page =
|
pageName page =
|
||||||
case page of
|
case page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
"Home"
|
"Search"
|
||||||
|
|
||||||
LoginPage _ ->
|
LoginPage _ ->
|
||||||
"Login"
|
"Login"
|
||||||
@ -226,8 +226,8 @@ uploadId page =
|
|||||||
pageToString : Page -> String
|
pageToString : Page -> String
|
||||||
pageToString page =
|
pageToString page =
|
||||||
case page of
|
case page of
|
||||||
HomePage ->
|
SearchPage ->
|
||||||
"/app/home"
|
"/app/search"
|
||||||
|
|
||||||
LoginPage data ->
|
LoginPage data ->
|
||||||
case data.referrer of
|
case data.referrer of
|
||||||
@ -312,10 +312,10 @@ pathPrefix =
|
|||||||
parser : Parser (Page -> a) a
|
parser : Parser (Page -> a) a
|
||||||
parser =
|
parser =
|
||||||
oneOf
|
oneOf
|
||||||
[ Parser.map HomePage
|
[ Parser.map SearchPage
|
||||||
(oneOf
|
(oneOf
|
||||||
[ Parser.top
|
[ Parser.top
|
||||||
, s pathPrefix </> s "home"
|
, s pathPrefix </> s "search"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
, Parser.map LoginPage (s pathPrefix </> s "login" <?> loginPageParser)
|
, Parser.map LoginPage (s pathPrefix </> s "login" <?> loginPageParser)
|
||||||
|
@ -60,7 +60,7 @@ update key flags inav settings msg model =
|
|||||||
Cmd.none
|
Cmd.none
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
Page.set key HomePage
|
Page.set key SearchPage
|
||||||
in
|
in
|
||||||
{ model = { model | detail = result.model }
|
{ model = { model | detail = result.model }
|
||||||
, cmd = Cmd.batch [ pageSwitch, Cmd.map ItemDetailMsg result.cmd ]
|
, cmd = Cmd.batch [ pageSwitch, Cmd.map ItemDetailMsg result.cmd ]
|
||||||
|
@ -53,7 +53,7 @@ update loginData flags msg model =
|
|||||||
AuthResp (Ok lr) ->
|
AuthResp (Ok lr) ->
|
||||||
let
|
let
|
||||||
gotoRef =
|
gotoRef =
|
||||||
Maybe.withDefault HomePage loginData.referrer |> Page.goto
|
Maybe.withDefault SearchPage loginData.referrer |> Page.goto
|
||||||
in
|
in
|
||||||
if lr.success && not lr.requireSecondFactor then
|
if lr.success && not lr.requireSecondFactor then
|
||||||
( { model | formState = AuthSuccess lr, password = "" }
|
( { model | formState = AuthSuccess lr, password = "" }
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Page.Home.Data exposing
|
module Page.Search.Data exposing
|
||||||
( ConfirmModalValue(..)
|
( ConfirmModalValue(..)
|
||||||
, Model
|
, Model
|
||||||
, Msg(..)
|
, Msg(..)
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Page.Home.SideMenu exposing (view)
|
module Page.Search.SideMenu exposing (view)
|
||||||
|
|
||||||
import Comp.Basic as B
|
import Comp.Basic as B
|
||||||
import Comp.ItemDetail.MultiEditMenu
|
import Comp.ItemDetail.MultiEditMenu
|
||||||
@ -16,8 +16,8 @@ import Data.UiSettings exposing (UiSettings)
|
|||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onClick)
|
import Html.Events exposing (onClick)
|
||||||
import Messages.Page.HomeSideMenu exposing (Texts)
|
import Messages.Page.SearchSideMenu exposing (Texts)
|
||||||
import Page.Home.Data exposing (..)
|
import Page.Search.Data exposing (..)
|
||||||
import Set
|
import Set
|
||||||
import Styles as S
|
import Styles as S
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Page.Home.Update exposing
|
module Page.Search.Update exposing
|
||||||
( UpdateResult
|
( UpdateResult
|
||||||
, update
|
, update
|
||||||
)
|
)
|
||||||
@ -28,9 +28,9 @@ import Data.ItemSelection
|
|||||||
import Data.Items
|
import Data.Items
|
||||||
import Data.SearchMode exposing (SearchMode)
|
import Data.SearchMode exposing (SearchMode)
|
||||||
import Data.UiSettings exposing (UiSettings)
|
import Data.UiSettings exposing (UiSettings)
|
||||||
import Messages.Page.Home exposing (Texts)
|
import Messages.Page.Search exposing (Texts)
|
||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Page.Home.Data exposing (..)
|
import Page.Search.Data exposing (..)
|
||||||
import Process
|
import Process
|
||||||
import Scroll
|
import Scroll
|
||||||
import Set exposing (Set)
|
import Set exposing (Set)
|
@ -5,7 +5,7 @@
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
|
|
||||||
module Page.Home.View2 exposing (viewContent, viewSidebar)
|
module Page.Search.View2 exposing (viewContent, viewSidebar)
|
||||||
|
|
||||||
import Api
|
import Api
|
||||||
import Comp.Basic as B
|
import Comp.Basic as B
|
||||||
@ -27,10 +27,10 @@ import Data.UiSettings exposing (UiSettings)
|
|||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
import Html.Attributes exposing (..)
|
import Html.Attributes exposing (..)
|
||||||
import Html.Events exposing (onClick, onInput)
|
import Html.Events exposing (onClick, onInput)
|
||||||
import Messages.Page.Home exposing (Texts)
|
import Messages.Page.Search exposing (Texts)
|
||||||
import Page exposing (Page(..))
|
import Page exposing (Page(..))
|
||||||
import Page.Home.Data exposing (..)
|
import Page.Search.Data exposing (..)
|
||||||
import Page.Home.SideMenu
|
import Page.Search.SideMenu
|
||||||
import Set
|
import Set
|
||||||
import Styles as S
|
import Styles as S
|
||||||
import Util.Html
|
import Util.Html
|
||||||
@ -44,7 +44,7 @@ viewSidebar texts visible flags settings model =
|
|||||||
, class S.sidebarBg
|
, class S.sidebarBg
|
||||||
, classList [ ( "hidden", not visible ) ]
|
, classList [ ( "hidden", not visible ) ]
|
||||||
]
|
]
|
||||||
[ Page.Home.SideMenu.view texts.sideMenu flags settings model
|
[ Page.Search.SideMenu.view texts.sideMenu flags settings model
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ import Comp.SharePasswordForm
|
|||||||
import Data.Flags exposing (Flags)
|
import Data.Flags exposing (Flags)
|
||||||
import Data.ItemArrange exposing (ItemArrange)
|
import Data.ItemArrange exposing (ItemArrange)
|
||||||
import Http
|
import Http
|
||||||
import Page.Home.Data exposing (Msg(..))
|
import Page.Search.Data exposing (Msg(..))
|
||||||
import Set exposing (Set)
|
import Set exposing (Set)
|
||||||
import Util.Html exposing (KeyCode)
|
import Util.Html exposing (KeyCode)
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ renderSuccessMsg texts public model =
|
|||||||
[ text texts.successBox.line1
|
[ text texts.successBox.line1
|
||||||
, a
|
, a
|
||||||
[ class S.successMessageLink
|
[ class S.successMessageLink
|
||||||
, Page.href HomePage
|
, Page.href SearchPage
|
||||||
]
|
]
|
||||||
[ text texts.successBox.itemsPage
|
[ text texts.successBox.itemsPage
|
||||||
]
|
]
|
||||||
|
@ -247,7 +247,7 @@ de =
|
|||||||
, queue = Messages.Page.Queue.gb
|
, queue = Messages.Page.Queue.gb
|
||||||
, userSettings = Messages.Page.UserSettings.gb
|
, userSettings = Messages.Page.UserSettings.gb
|
||||||
, manageData = Messages.Page.ManageData.gb
|
, manageData = Messages.Page.ManageData.gb
|
||||||
, home = Messages.Page.Home.gb
|
, search = Messages.Page.Search.gb
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ de =
|
|||||||
, queue = Messages.Page.Queue.gb
|
, queue = Messages.Page.Queue.gb
|
||||||
, userSettings = Messages.Page.UserSettings.gb
|
, userSettings = Messages.Page.UserSettings.gb
|
||||||
, manageData = Messages.Page.ManageData.gb
|
, manageData = Messages.Page.ManageData.gb
|
||||||
, home = Messages.Page.Home.gb
|
, search = Messages.Page.Search.gb
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user