mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -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)
|
public async Task<IActionResult> GetThemeContent([FromQuery]string url)
|
||||||
{
|
{
|
||||||
var css = await _githubApi.GetThemesRawContent(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");
|
return Content(css, "text/css");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,12 @@ O:::::::OOO:::::::Om::::m m::::m m::::mb:::::bbbbbb::::::bi::::::i
|
||||||
@{
|
@{
|
||||||
if (customization.HasPresetTheme)
|
if (customization.HasPresetTheme)
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(baseUrl))
|
||||||
|
{
|
||||||
|
var index = customization.PresetThemeContent.IndexOf("/api/");
|
||||||
|
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@Html.Raw(customization.PresetThemeContent)
|
@Html.Raw(customization.PresetThemeContent)
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue