update packaging

This commit is contained in:
Luke Pulverenti 2016-06-30 10:49:52 -04:00
parent 9a012e458c
commit d24fe143f6
2 changed files with 0 additions and 48 deletions

View File

@ -524,18 +524,6 @@ namespace MediaBrowser.WebDashboard.Api
await DumpFile(filename, Path.Combine(destination, filename), mode, culture, appVersion).ConfigureAwait(false);
}
var excludeFiles = new List<string>();
if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{
excludeFiles.Add("supporterkey.html");
}
foreach (var file in excludeFiles)
{
_fileSystem.DeleteFile(Path.Combine(destination, file));
}
}
private async Task DumpFile(string resourceVirtualPath, string destinationFilePath, string mode, string culture, string appVersion)

View File

@ -258,7 +258,6 @@ namespace MediaBrowser.WebDashboard.Api
if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
{
html = ModifyForCordova(html);
}
else if (!string.IsNullOrWhiteSpace(path) && !string.Equals(path, "index.html", StringComparison.OrdinalIgnoreCase))
{
@ -339,41 +338,6 @@ namespace MediaBrowser.WebDashboard.Api
return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
}
private string ModifyForCordova(string html)
{
// Replace CORDOVA_REPLACE_SUPPORTER_SUBMIT_START
html = ReplaceBetween(html, "<!--CORDOVA_REPLACE_SUPPORTER_SUBMIT_START-->", "<!--CORDOVA_REPLACE_SUPPORTER_SUBMIT_END-->", "<i class=\"fa fa-check\"></i><span>${ButtonPurchase}</span>");
return html;
}
private string ReplaceBetween(string html, string startToken, string endToken, string newHtml)
{
var start = html.IndexOf(startToken, StringComparison.OrdinalIgnoreCase);
if (start == -1)
{
return html;
}
var end = html.IndexOf(endToken, start, StringComparison.OrdinalIgnoreCase);
if (end == -1)
{
return html;
}
string result = html.Substring(start, end - start);
html = html.Replace(result, newHtml);
return ReplaceBetween(html, startToken, endToken, newHtml);
}
private string GetLocalizationToken(string phrase)
{
return "${" + phrase + "}";
}
/// <summary>
/// Gets the meta tags.
/// </summary>