UI tweaks

This commit is contained in:
Joey Hess 2013-10-22 16:30:23 -04:00
parent d345e5b52f
commit 1eaec2f9aa
6 changed files with 15 additions and 11 deletions

View file

@ -82,7 +82,7 @@ warningAlert name msg = Alert
errorAlert :: String -> AlertButton -> Alert
errorAlert msg button = Alert
{ alertClass = Error
, alertHeader = Just $ tenseWords ["error"]
, alertHeader = Nothing
, alertMessageRender = renderData
, alertData = [UnTensed $ T.pack msg]
, alertCounter = 0
@ -175,7 +175,7 @@ fsckAlert button n = baseActivityAlert
}
brokenRepositoryAlert :: AlertButton -> Alert
brokenRepositoryAlert = errorAlert "Your repository needs repairs."
brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!"
pairingAlert :: AlertButton -> Alert
pairingAlert button = baseActivityAlert

View file

@ -192,7 +192,7 @@ runActivity' urlrenderer (ScheduledSelfFsck _ d) = do
when (Git.Fsck.foundBroken fsckresults) $ do
u <- liftAnnex getUUID
liftAnnex $ writeFsckResults u fsckresults
button <- mkAlertButton True (T.pack "Repair") urlrenderer $
button <- mkAlertButton True (T.pack "Click Here") urlrenderer $
RepairRepositoryR u
void $ addAlert $ brokenRepositoryAlert button
mapM_ reget =<< liftAnnex (dirKeys gitAnnexBadDir)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -57,10 +57,14 @@ call it for non-local remotes.
## git fsck
Have the sanity checker run git fsck periodically (it's fairly inexpensive,
but still not too often, and should be ioniced and niced).
Add git fsck to scheduled self fsck **done**
If committing to the repository fails, after resolving any dangling lock
TODO: Add git fsck of local remotes to scheduled remote fscks.
TODO: Display an alert to nudge user to schedule a fsck, if none is
scheduled. Without being annoying about it.
TODO: If committing to the repository fails, after resolving any dangling lock
files (see above), it should git fsck.
If git fsck finds problems, launch git repository repair.

View file

@ -1,6 +1,6 @@
<div .span9 .hero-unit>
<p>
A periodic #
A #
<a href="@{ConfigFsckR}">
consistency check #
found corrupt data in the git repository #{repodesc}.
@ -9,10 +9,10 @@
often without data loss.
<p>
When possible, the corrupt data will be recovered from other #
repositories. You should make sure any other repositories #
are available before continuing. Ie, plug in any removable drive #
that contains a repository, or make sure your network connection #
to other repositories is active.
repositories. You should make sure any other repositories that might #
have this data are available before continuing. So, plug in any #
removable drive that contains a repository, or make sure your network #
connection to other repositories is active.
<p>
<a .btn .btn-primary href="@{RepairRepositoryRunR u}" onclick="$('#workingmodal').modal('show');">
Start Repair Process