mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fix baseurl breaking themes
This commit is contained in:
parent
827ea857e0
commit
738bdb46d7
2 changed files with 8 additions and 8 deletions
|
@ -274,12 +274,6 @@ namespace Ombi.Controllers
|
|||
public async Task<IActionResult> GetThemeContent([FromQuery]string url)
|
||||
{
|
||||
var css = await _githubApi.GetThemesRawContent(url);
|
||||
var ombiSettings = await OmbiSettings();
|
||||
if (ombiSettings.BaseUrl != null)
|
||||
{
|
||||
int index = css.IndexOf("/api/");
|
||||
css = css.Insert(index, ombiSettings.BaseUrl);
|
||||
}
|
||||
return Content(css, "text/css");
|
||||
}
|
||||
|
||||
|
|
|
@ -85,8 +85,14 @@ O:::::::OOO:::::::Om::::m m::::m m::::mb:::::bbbbbb::::::bi::::::i
|
|||
</head>
|
||||
<body>
|
||||
@{
|
||||
if (customization.HasPresetTheme)
|
||||
{
|
||||
if (customization.HasPresetTheme)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(baseUrl))
|
||||
{
|
||||
var index = customization.PresetThemeContent.IndexOf("/api/");
|
||||
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
|
||||
}
|
||||
|
||||
<style>
|
||||
@Html.Raw(customization.PresetThemeContent)
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue