update startup wizard

This commit is contained in:
Luke Pulverenti 2015-08-22 14:09:02 -04:00
parent fafa879eef
commit 19796847d8
2 changed files with 8 additions and 5 deletions

View file

@ -198,10 +198,8 @@ namespace MediaBrowser.WebDashboard.Api
var contentType = MimeTypes.GetMimeType(path); var contentType = MimeTypes.GetMimeType(path);
var isHtml = IsHtml(path);
// Bounce them to the startup wizard if it hasn't been completed yet // Bounce them to the startup wizard if it hasn't been completed yet
if (isHtml && !_serverConfigurationManager.Configuration.IsStartupWizardCompleted && path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1) if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted && path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 && GetPackageCreator().IsCoreHtml(path))
{ {
// But don't redirect if an html import is being requested. // But don't redirect if an html import is being requested.
if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) == -1 && path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1) if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) == -1 && path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1)

View file

@ -61,7 +61,7 @@ namespace MediaBrowser.WebDashboard.Api
// jQuery ajax doesn't seem to handle if-modified-since correctly // jQuery ajax doesn't seem to handle if-modified-since correctly
if (IsFormat(path, "html")) if (IsFormat(path, "html"))
{ {
if (IsCoreHtml(path) && path.IndexOf(".template.html", StringComparison.OrdinalIgnoreCase) == -1) if (IsCoreHtml(path))
{ {
resourceStream = await ModifyHtml(resourceStream, mode, appVersion, localizationCulture, enableMinification).ConfigureAwait(false); resourceStream = await ModifyHtml(resourceStream, mode, appVersion, localizationCulture, enableMinification).ConfigureAwait(false);
} }
@ -222,13 +222,18 @@ namespace MediaBrowser.WebDashboard.Api
} }
} }
private bool IsCoreHtml(string path) public bool IsCoreHtml(string path)
{ {
if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) != -1) if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) != -1)
{ {
return false; return false;
} }
if (path.IndexOf(".template.html", StringComparison.OrdinalIgnoreCase) != -1)
{
return false;
}
path = GetDashboardResourcePath(path); path = GetDashboardResourcePath(path);
var parent = Path.GetDirectoryName(path); var parent = Path.GetDirectoryName(path);