diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-30 13:31:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-30 13:31:19 -0400 |
commit | 1f671ee40c7f26d0adb16408ba1cf7fc9ceb3a7a (patch) | |
tree | a32a226037653036b34e8481c3f531e02daa414a | |
parent | 9c9db6feb8e732887838337e700c33e6033cd192 (diff) |
spruce up display of the repo list
-rw-r--r-- | Assistant/Threads/WebApp.hs | 7 | ||||
-rw-r--r-- | templates/intro.hamlet | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index 5349ec2a4..44fb44f2b 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -171,17 +171,20 @@ introDisplay :: Text -> Widget introDisplay ident = do webapp <- lift getYesod let reldir = relDir webapp - remotelist <- liftIO $ runThreadState (threadState webapp) $ do + l <- liftIO $ runThreadState (threadState webapp) $ do u <- getUUID rs <- map Remote.uuid <$> Remote.remoteList rs' <- snd <$> trustPartition DeadTrusted rs Remote.prettyListUUIDs $ filter (/= webUUID) $ nub $ u:rs' - let n = length remotelist + let remotelist = zip counter l + let n = length l let numrepos = show n let notenough = n < 2 let barelyenough = n == 2 let morethanenough = n > 2 $(widgetFile "intro") + where + counter = map show ([1..] :: [Int]) {- Called by client to get a display of currently in process transfers. - diff --git a/templates/intro.hamlet b/templates/intro.hamlet index 6660b6a03..ecb15f39c 100644 --- a/templates/intro.hamlet +++ b/templates/intro.hamlet @@ -14,9 +14,14 @@ $else <span .badge .badge-success>#{numrepos}</span> \ repositories and devices: - <ul> - $forall name <- remotelist - <li>#{name} + <table .table .table-striped .table-condensed> + <tbody> + $forall (num, name) <- remotelist + <tr> + <td> + #{num} + <td> + #{name} <a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a> <p> Or just sit back, watch the magic, and get on with using your files. |