fix more layout issues based on joey's feedback

This commit is contained in:
Sören Brunk 2014-04-30 16:38:37 +02:00
parent 2920554787
commit 58f92f148b
13 changed files with 76 additions and 44 deletions

View file

@ -47,7 +47,7 @@ boxComAForm :: Maybe CredPair -> MkAForm WebDAVInput
boxComAForm defcreds = WebDAVInput
<$> areq textField (bfs "Username or Email") (T.pack . fst <$> defcreds)
<*> areq passwordField (bfs "Box.com Password") (T.pack . snd <$> defcreds)
<*> areq checkBoxField (bfs "Share this account with other devices and friends?") (Just True)
<*> areq checkBoxField "Share this account with other devices and friends?" (Just True)
<*> areq textField (bfs "Directory") (Just "annex")
<*> enableEncryptionField

View file

@ -148,7 +148,7 @@ enableEncryptionField = areq (selectFieldList choices) (bfs "Encryption") (Just
{- Defines the layout used by the Bootstrap3 form helper -}
bootstrapFormLayout :: BootstrapFormLayout
bootstrapFormLayout = BootstrapHorizontalForm (ColSm 0) (ColSm 2) (ColSm 0) (ColSm 5)
bootstrapFormLayout = BootstrapHorizontalForm (ColSm 0) (ColSm 2) (ColSm 0) (ColSm 10)
{- Adds the form-control class used by Bootstrap3 for layout to a field
- This is the same as Yesod.Form.Bootstrap3.bfs except it takes just a Text

View file

@ -1,3 +1,3 @@
<a title="#{fromMaybe "" tooltip}" class="#{buttonclass}" href="@{route}" onclick="(function( $ ) { $.post('@{route}'); })( jQuery ); return false;">
<span class="glyphicon #{iconclass}"> #
#{fromMaybe "" label}
\ #{fromMaybe "" label}

View file

@ -4,7 +4,7 @@
Deleting #{reldir}
<p>
Deleting this repository will remove <tt>#{reldir}</tt> and all its #
^{actionButton FileBrowserR (Just "files") (Just "Click to open a file browser") "" "icon-folder-open"}.
^{actionButton FileBrowserR (Just "files") (Just "Click to open a file browser") "" "glyphicon-folder-open"}.
$if havegitremotes
$if havedataremotes
<div .alert>

View file

@ -24,7 +24,8 @@
<div .form-group>
<div .col-sm-10 .col-sm-offset-2>
<button .btn .btn-primary type=submit>
Save Changes #
Save Changes
\
<a .btn .btn-default href="@{DashboardR}">
Cancel #
$if new

View file

@ -3,9 +3,12 @@
<div .form-group>
Check ^{fvInput reposView} for #
<div .form-group>
\
^{fvInput durationView} minutes #
<div .form-group>
\
^{fvInput recurranceView} #
\
starting at ^{fvInput timeView} #
$if new
<button type=submit .btn .btn-primary>
@ -13,5 +16,6 @@
$else
<button type=submit .btn .btn-default>
Save
\
<a .btn .btn-default href="@{RemoveActivityR u activity}">
Remove

View file

@ -11,5 +11,6 @@
<div .col-sm-10 .col-sm-offset-2>
<button .btn .btn-primary type=submit>
Save Preferences
\
<a .btn .btn-default href="@{ConfigurationR}">
Cancel

View file

@ -29,6 +29,7 @@
<div .col-sm-10 .col-sm-offset-2>
<button .btn .btn-primary type=submit onclick="$('#workingmodal').modal('show');">
Use this account
\
<a .btn .btn-default href="@{DisconnectXMPPR}">
Stop using this account
<div .modal .fade #workingmodal>

View file

@ -1,21 +1,21 @@
<ul .dropdown-menu>
<li>
<a href="@{NewRepositoryR}">
<span .glyphicon .glyphicon-plus-sign> #
Add another local repository
<span .glyphicon .glyphicon-plus-sign>
\ Add another local repository
<li>
<a href="@{RepositorySwitcherR}">
<span .glyphicon .glyphicon-folder-close> #
Switch repository
<span .glyphicon .glyphicon-folder-close>
\ Switch repository
<li>
<a href="@{RestartR}">
<span .glyphicon .glyphicon-repeat> #
Restart daemon
<span .glyphicon .glyphicon-repeat>
\ Restart daemon
<li>
<a href="@{ShutdownR}">
<span .glyphicon .glyphicon-off> #
Shutdown daemon
<span .glyphicon .glyphicon-off>
\ Shutdown daemon
<li>
<a href="@{LogR}">
<span .glyphicon .glyphicon-list> #
View log
<span .glyphicon .glyphicon-list>
\ View log

View file

@ -1,2 +1,8 @@
.forcewrap
word-wrap: break-word
.small-margin-bottom
margin-bottom: 10px
.small-margin-top
margin-top: 10px
.tiny-margin-bottom
margin-bottom: 4px

View file

@ -5,37 +5,35 @@
$with percent <- maybe "unknown" (showPercentage 0) $ percentComplete transfer info
<div .row>
<div .col-sm-10>
<div .row>
<h3 .forcewrap>
$maybe file <- associatedFile info
#{file}
$nothing
#{key2file $ transferKey transfer}
$case transferDirection transfer
$of Upload
&rarr;
$of Download
&larr;
<small>
<a href="@{EditRepositoryR $ RepoUUID $ transferUUID transfer}">
#{maybe "unknown" Remote.name $ transferRemote info}
$with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer
$if isJust $ startedTime info
$if isrunning info
<small .pull-right><b>#{percent} of #{size}</b></small>
$else
<small .pull-right>paused at #{percent} of #{size}</small>
<h3 .forcewrap .small-margin-top .tiny-margin-bottom>
$maybe file <- associatedFile info
#{file}
$nothing
#{key2file $ transferKey transfer}
$case transferDirection transfer
$of Upload
&rarr;
$of Download
&larr;
<small>
<a href="@{EditRepositoryR $ RepoUUID $ transferUUID transfer}">
#{maybe "unknown" Remote.name $ transferRemote info}
$with size <- maybe "unknown" (roughSize dataUnits True) $ keySize $ transferKey transfer
$if isJust $ startedTime info
$if isrunning info
<span .pull-right><b>#{percent} of #{size}</b>
$else
<small .pull-right>queued (#{size})</small>
<div .row>
<div .progress .progress-striped>
<div .progress-bar style="width: #{percent};">
<div .btn-group .col-sm-2>
<span .pull-right>paused at #{percent} of #{size}
$else
<span .pull-right>queued (#{size})
<div .progress .progress-striped .small-margin-bottom>
<div .progress-bar style="width: #{percent};">
<div .btn-group .col-sm-2 .small-margin-top>
$if isrunning info
^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn" "icon-pause"}
^{actionButton (PauseTransferR transfer) Nothing (Just "pause") "btn btn-default btn-sm" "glyphicon-pause"}
$else
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn btn-default btn-sm" "glyphicon-play"}
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn btn-default btn-sm" "glyphicon-remove"}
$if scanrunning
<img src="@{StaticR activityicon_gif}" alt=""> #
Scanning for files to transfer

View file

@ -3,3 +3,24 @@ body
padding-bottom: 40px
.sidebar-nav
padding: 9px 0
.icon-white
color: #FFF
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus
color: #999
.form-horizontal .form-control
max-width: 300px
display: inline
.form-horizontal input.form-control+span
width: 100%
h1
font-size: 30px
h2
font-size: 24px
h3
font-size: 18px
h4
font-size: 14px
h5
font-size: 12px
h6
font-size: 11px

View file

@ -18,7 +18,7 @@
<ul .nav .navbar-nav .navbar-right>
$if hasFileBrowser
<li>
^{actionButton FileBrowserR (Just "Files") (Just "Click to open a file browser") "" "icon-folder-open icon-white"}
^{actionButton FileBrowserR (Just "Files") (Just "Click to open a file browser") "" "glyphicon-folder-open icon-white"}
<li .dropdown #menu1>
<a .dropdown-toggle data-toggle="dropdown" href="#menu1">
Repository: #{reldir}