update packaging
This commit is contained in:
parent
9a012e458c
commit
d24fe143f6
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user