improve first run screen
This commit is contained in:
parent
0d3686972d
commit
c70496dc7f
5 changed files with 46 additions and 22 deletions
|
@ -41,14 +41,22 @@ introDisplay ident = do
|
|||
where
|
||||
counter = map show ([1..] :: [Int])
|
||||
|
||||
addRepository :: Bool -> Widget
|
||||
addRepository firstrun = do
|
||||
setTitle $ if firstrun then "Getting started" else "Add repository"
|
||||
$(widgetFile "configurators/addrepository")
|
||||
|
||||
getConfigR :: Handler RepHtml
|
||||
getConfigR = bootstrap (Just Config) $ do
|
||||
sideBarDisplay
|
||||
setTitle "Configuration"
|
||||
$(widgetFile "configurators/main")
|
||||
ifM (lift inFirstRun)
|
||||
( addRepository True
|
||||
, do
|
||||
setTitle "Configuration"
|
||||
$(widgetFile "configurators/main")
|
||||
)
|
||||
|
||||
getAddRepositoryR :: Handler RepHtml
|
||||
getAddRepositoryR = bootstrap (Just Config) $ do
|
||||
sideBarDisplay
|
||||
setTitle "Add repository"
|
||||
$(widgetFile "configurators/addrepository")
|
||||
addRepository False
|
||||
|
|
|
@ -71,11 +71,14 @@ dashboard warnNoScript = do
|
|||
$(widgetFile "dashboard/main")
|
||||
|
||||
getHomeR :: Handler RepHtml
|
||||
getHomeR = bootstrap (Just DashBoard) $ dashboard True
|
||||
getHomeR = ifM (inFirstRun)
|
||||
( redirect ConfigR
|
||||
, bootstrap (Just DashBoard) $ dashboard True
|
||||
)
|
||||
|
||||
{- Same as HomeR, except no autorefresh at all (and no noscript warning). -}
|
||||
getNoScriptR :: Handler RepHtml
|
||||
getNoScriptR = bootstrap (Just DashBoard) $ dashboard False
|
||||
getNoScriptR = bootstrap (Just DashBoard) $ dashboard False
|
||||
|
||||
{- Same as HomeR, except with autorefreshing via meta refresh. -}
|
||||
getNoScriptAutoR :: Handler RepHtml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue