mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-27 06:02:33 +01:00
Updated task notification UI. Last message will stay on screen for an extra 3 seconds if there are no new messages.
This commit is contained in:
parent
53a7b92a64
commit
0d139f9c21
@ -56,11 +56,30 @@ public int PercentComplete
|
||||
/// <value>The progress value.</value>
|
||||
public int ProgressValue { get; set; }
|
||||
|
||||
private ProgressNotificationStatus _status;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status.
|
||||
/// </summary>
|
||||
/// <value>The status.</value>
|
||||
public ProgressNotificationStatus Status { get; set; }
|
||||
public ProgressNotificationStatus Status
|
||||
{
|
||||
get { return _status; }
|
||||
set
|
||||
{
|
||||
if (value != ProgressNotificationStatus.InProgress)
|
||||
{
|
||||
CompletedTime = DateTime.Now;
|
||||
}
|
||||
_status = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the completed time.
|
||||
/// </summary>
|
||||
public DateTime CompletedTime { get; private set; }
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
|
@ -52,8 +52,8 @@ private void ScanSeries(ProgressNotification notification)
|
||||
updatedSeries.Title);
|
||||
_episodeProvider.RefreshEpisodeInfo(updatedSeries.SeriesId);
|
||||
|
||||
notification.CurrentStatus = String.Format("Scanning series folder {0}",
|
||||
updatedSeries.Path);
|
||||
notification.CurrentStatus = String.Format("Scanning disk for {0} files",
|
||||
updatedSeries.Title);
|
||||
_mediaFileProvider.Scan(_seriesProvider.GetSeries(updatedSeries.SeriesId));
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@ public void Start(ProgressNotification notification, int targetId)
|
||||
_seriesProvider.UpdateSeriesInfo(series.SeriesId);
|
||||
notification.CurrentStatus = "Updating episode info for " + series.Title;
|
||||
_episodeProvider.RefreshEpisodeInfo(series.SeriesId);
|
||||
notification.CurrentStatus = "Update completed for " + series.Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,9 +24,17 @@ public virtual List<ProgressNotification> GetProgressNotifications
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
new List<ProgressNotification>(
|
||||
_progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress));
|
||||
|
||||
var activeNotification = _progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress).ToList();
|
||||
|
||||
if (activeNotification.Count == 0)
|
||||
{
|
||||
//Get notifications that were recently done
|
||||
activeNotification = _progressNotification.Values.Where(p => p.CompletedTime >= DateTime.Now.AddSeconds(-3)).OrderByDescending(c => c.CompletedTime).ToList();
|
||||
|
||||
}
|
||||
|
||||
return activeNotification.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
#msgBox
|
||||
{
|
||||
display: none;
|
||||
height: 40px;
|
||||
height: 30px;
|
||||
background-color: #272525;
|
||||
background-image: url(images/spin.gif) no-repeat left middle;
|
||||
opacity: .9;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
|
||||
@ -12,13 +11,10 @@
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 20px;
|
||||
color: White;
|
||||
width: 100%
|
||||
margin-right: auto;
|
||||
width: 85%;
|
||||
margin-left: auto;
|
||||
min-width: 800px;
|
||||
text-align: center;
|
||||
}
|
||||
#msgCloseButton
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ $(function () {
|
||||
refreshNotifications();
|
||||
|
||||
var timer = window.setInterval(function () {
|
||||
speed = 1000;
|
||||
speed = 500;
|
||||
refreshNotifications();
|
||||
}, 2000);
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
@using Helpers;
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head runat="server">
|
||||
@ -10,11 +9,9 @@
|
||||
.Add("telerik.sitefinity.css")
|
||||
.Add("notibar.css"))
|
||||
.Render();}
|
||||
|
||||
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../Content/jquery-ui.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
@RenderSection("HeaderContent", required: false)
|
||||
</head>
|
||||
<body>
|
||||
@ -39,14 +36,12 @@
|
||||
<div id="footer">
|
||||
@{Html.RenderAction("Footer", "Shared");}
|
||||
</div>
|
||||
</div>
|
||||
<div id="msgBox">
|
||||
<span id="msgText">Scanning Series Folder...</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@RenderSection("Scripts", required: false)
|
||||
|
||||
@{Html.Telerik().ScriptRegistrar().Scripts(
|
||||
c => c.Add("jquery-ui-1.8.8.min.js")
|
||||
.Add("jquery.form.js")
|
||||
|
Loading…
Reference in New Issue
Block a user