mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 13:26:47 +01:00
POS: Fix manifest (#4373)
- Manifest v1 doesn't support HEX colors - Make icon URLs absolute Closes #4363.
This commit is contained in:
parent
425d70f261
commit
84132e794a
@ -25,7 +25,12 @@
|
||||
var jObject = JObject.Parse(await reader.ReadToEndAsync());
|
||||
jObject["short_name"] = title;
|
||||
jObject["name"] = $"BTCPay Server: {title}";
|
||||
return $"data:application/manifest+json, {jObject.ToString(Formatting.None)}";
|
||||
foreach (var jToken in jObject["icons"]!)
|
||||
{
|
||||
var icon = (JObject)jToken;
|
||||
icon["src"] = $"{Context.Request.GetAbsoluteRoot()}/{icon["src"]}";
|
||||
}
|
||||
return $"data:application/manifest+json,{Safe.Json(jObject)}";
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +50,6 @@
|
||||
<link href="~/main/fonts/OpenSans.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="~/main/layout.css" asp-append-version="true" rel="stylesheet" />
|
||||
<link href="~/main/site.css" asp-append-version="true" rel="stylesheet" />
|
||||
|
||||
<link href="@Context.Request.GetRelativePathOrAbsolute(Theme.CssUri)" rel="stylesheet" asp-append-version="true"/>
|
||||
@if (Model.CustomCSSLink != null)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "BTCPayServer Point of Sale",
|
||||
"name": "BTCPay Server Point of Sale",
|
||||
"short_name": "BTCPay POS",
|
||||
"theme_color": "#1e7a44",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "green",
|
||||
"background_color": "white",
|
||||
"display": "standalone",
|
||||
"icons": [
|
||||
{
|
||||
@ -47,4 +47,4 @@
|
||||
}
|
||||
],
|
||||
"splash_pages": null
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user