merge two repository screens into one
This commit is contained in:
parent
46feae36b6
commit
aab3a01a71
7 changed files with 33 additions and 44 deletions
|
@ -49,20 +49,13 @@ getConfigR = ifM (inFirstRun)
|
||||||
$(widgetFile "configurators/main")
|
$(widgetFile "configurators/main")
|
||||||
)
|
)
|
||||||
|
|
||||||
{- Lists different types of repositories that can be added. -}
|
{- Lists known repositories, followed by options to add more. -}
|
||||||
getAddRepositoryR :: Handler RepHtml
|
getRepositoriesR :: Handler RepHtml
|
||||||
getAddRepositoryR = bootstrap (Just Config) $ do
|
getRepositoriesR = bootstrap (Just Config) $ do
|
||||||
sideBarDisplay
|
sideBarDisplay
|
||||||
setTitle "Add repository"
|
setTitle "Repositories"
|
||||||
$(widgetFile "configurators/addrepository")
|
|
||||||
|
|
||||||
{- Lists known repositories. -}
|
|
||||||
getListRepositoriesR :: Handler RepHtml
|
|
||||||
getListRepositoriesR = bootstrap (Just Config) $ do
|
|
||||||
sideBarDisplay
|
|
||||||
setTitle "Repository list"
|
|
||||||
repolist <- lift repoList
|
repolist <- lift repoList
|
||||||
$(widgetFile "configurators/listrepositories")
|
$(widgetFile "configurators/repositories")
|
||||||
|
|
||||||
{- A numbered list of known repositories, including the current one. -}
|
{- A numbered list of known repositories, including the current one. -}
|
||||||
repoList :: Handler [(String, String)]
|
repoList :: Handler [(String, String)]
|
||||||
|
@ -217,7 +210,7 @@ getAddDriveR = bootstrap (Just Config) $ do
|
||||||
FormSuccess (RemovableDrive { mountPoint = d }) -> lift $ do
|
FormSuccess (RemovableDrive { mountPoint = d }) -> lift $ do
|
||||||
go $ T.unpack d
|
go $ T.unpack d
|
||||||
setMessage $ toHtml $ T.unwords ["Added", d]
|
setMessage $ toHtml $ T.unwords ["Added", d]
|
||||||
redirect ListRepositoriesR
|
redirect RepositoriesR
|
||||||
_ -> do
|
_ -> do
|
||||||
let authtoken = webAppFormAuthToken
|
let authtoken = webAppFormAuthToken
|
||||||
$(widgetFile "configurators/adddrive")
|
$(widgetFile "configurators/adddrive")
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
/about AboutR GET
|
/about AboutR GET
|
||||||
|
|
||||||
/config ConfigR GET
|
/config ConfigR GET
|
||||||
/config/repository/add AddRepositoryR GET
|
/config/repository RepositoriesR GET
|
||||||
/config/repository/add/drive AddDriveR GET
|
/config/repository/add/drive AddDriveR GET
|
||||||
/config/repository/first FirstRepositoryR GET
|
/config/repository/first FirstRepositoryR GET
|
||||||
/config/repository/list ListRepositoriesR GET
|
|
||||||
|
|
||||||
/transfers/#NotificationId TransfersR GET
|
/transfers/#NotificationId TransfersR GET
|
||||||
/sidebar/#NotificationId SideBarR GET
|
/sidebar/#NotificationId SideBarR GET
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
repositories on your devices ...
|
repositories on your devices ...
|
||||||
<h2>
|
<h2>
|
||||||
But no other repositories are set up yet.
|
But no other repositories are set up yet.
|
||||||
<a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
|
<a .btn .btn-primary .btn-large href="@{RepositoriesR}">Add another repository</a>
|
||||||
$else
|
$else
|
||||||
$if barelyenough
|
$if barelyenough
|
||||||
<span .badge .badge-warning>#{numrepos}</span>
|
<span .badge .badge-warning>#{numrepos}</span>
|
||||||
|
@ -23,6 +23,6 @@
|
||||||
#{num}
|
#{num}
|
||||||
<td>
|
<td>
|
||||||
#{name}
|
#{name}
|
||||||
<a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
|
<a .btn .btn-primary .btn-large href="@{RepositoriesR}">Add another repository</a>
|
||||||
<p>
|
<p>
|
||||||
Or just sit back, watch the magic, and get on with using your files.
|
Or just sit back, watch the magic, and get on with using your files.
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<div .span9>
|
|
||||||
<table .table .table-striped .table-condensed>
|
|
||||||
<tbody>
|
|
||||||
$forall (num, name) <- repolist
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
#{num}
|
|
||||||
<td>
|
|
||||||
#{name}
|
|
|
@ -2,14 +2,8 @@
|
||||||
<div .row-fluid>
|
<div .row-fluid>
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
<a href="@{AddRepositoryR}">
|
<a href="@{RepositoriesR}">
|
||||||
Add repositories
|
Manage repositories
|
||||||
<p>
|
<p>
|
||||||
Distribute the files in this repository to other devices;
|
Distribute the files in this repository to other devices,
|
||||||
make backups; and more by adding repositories.
|
make backups, and more, by adding repositories.
|
||||||
<div .span4>
|
|
||||||
<h3>
|
|
||||||
<a href="@{ListRepositoriesR}">
|
|
||||||
Repository list
|
|
||||||
<p>
|
|
||||||
An overview of your repositories.
|
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
<div .span9>
|
<div .span9>
|
||||||
|
<h2>
|
||||||
|
Your repositories
|
||||||
|
<table .table .table-condensed>
|
||||||
|
<tbody>
|
||||||
|
$forall (num, name) <- repolist
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
#{num}
|
||||||
|
<td>
|
||||||
|
#{name}
|
||||||
|
<h2>
|
||||||
|
Add more repositories
|
||||||
<div .row-fluid>
|
<div .row-fluid>
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
<a href="@{AddDriveR}">
|
<a href="@{AddDriveR}">
|
||||||
Add a removable drive
|
<i .icon-plus></i> Removable drive
|
||||||
<p>
|
<p>
|
||||||
Clone this repository to a USB drive, memory stick, or other #
|
Clone this repository to a USB drive, memory stick, or other #
|
||||||
removable media.
|
removable media.
|
||||||
|
@ -13,15 +25,15 @@
|
||||||
between computers.
|
between computers.
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
Pair with a local computer
|
<i .icon-plus></i> Local computer
|
||||||
<p>
|
<p>
|
||||||
Automatically keep files in sync between computers on your #
|
Pair with a local computer to automatically keep files in sync #
|
||||||
local network.
|
between computers on your local network.
|
||||||
<p>
|
<p>
|
||||||
For easy sharing with family and friends, or between your devices.
|
For easy sharing with family and friends, or between your devices.
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
Connect to your phone
|
<i .icon-plus></i> Phone
|
||||||
<p>
|
<p>
|
||||||
Save photos and recordings from your phone.
|
Save photos and recordings from your phone.
|
||||||
<p>
|
<p>
|
||||||
|
@ -29,7 +41,7 @@
|
||||||
<div .row-fluid>
|
<div .row-fluid>
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
Store data in the cloud
|
<i .icon-plus></i> The cloud
|
||||||
<p>
|
<p>
|
||||||
Store your data on a third-party cloud platform, #
|
Store your data on a third-party cloud platform, #
|
||||||
including Amazon S3, Box.com, and Rsync.net.
|
including Amazon S3, Box.com, and Rsync.net.
|
||||||
|
@ -38,7 +50,7 @@
|
||||||
With strong encryption to protect your privacy.
|
With strong encryption to protect your privacy.
|
||||||
<div .span4>
|
<div .span4>
|
||||||
<h3>
|
<h3>
|
||||||
Clone to a remote server
|
<i .icon-plus></i> Remote server
|
||||||
<p>
|
<p>
|
||||||
Set up a repository on a remote server using #
|
Set up a repository on a remote server using #
|
||||||
<tt>ssh</tt> or <tt>rsync</tt>.
|
<tt>ssh</tt> or <tt>rsync</tt>.
|
|
@ -17,7 +17,7 @@
|
||||||
Current Repository: #{reldir}
|
Current Repository: #{reldir}
|
||||||
<b .caret></b>
|
<b .caret></b>
|
||||||
<ul .dropdown-menu>
|
<ul .dropdown-menu>
|
||||||
<li><a href="@{AddRepositoryR}">Add another repository</a></li>
|
<li><a href="@{RepositoriesR}">Add another repository</a></li>
|
||||||
$nothing
|
$nothing
|
||||||
<div .container-fluid>
|
<div .container-fluid>
|
||||||
<div .row-fluid>
|
<div .row-fluid>
|
||||||
|
|
Loading…
Add table
Reference in a new issue