Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 50d37bd

Browse files
committed
Update title + add InsertHtml to insert HTML into html page
1 parent ff786dc commit 50d37bd

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

src/ServiceStack.Admin.Web/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
7-
<title>ServiceStack.Admin.Web</title>
7+
<title>AutoQuery</title>
88
</head>
99
<body>
10-
1110
<div id="app"></div>
12-
13-
<script type="text/javascript" src="/dist/vendor.bundle.js"></script><script type="text/javascript" src="/dist/app.bundle.js"></script></body>
11+
<script type="text/javascript" src="/dist/vendor.bundle.js"></script>
12+
<script type="text/javascript" src="/dist/app.bundle.js"></script>
13+
</body>
1414
</html>

src/ServiceStack.Admin.Web/index.template.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
7-
<title>ServiceStack.Admin.Web</title>
7+
<title>AutoQuery</title>
88
</head>
99
<body>
1010

src/ServiceStack.Admin/AdminFeature.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ namespace ServiceStack.Admin
66
{
77
public class AdminFeature : IPlugin, IPreInitPlugin
88
{
9+
public string InsertHtml { get; set; }
10+
911
public void BeforePluginsLoaded(IAppHost appHost)
1012
{
1113
appHost.Config.EmbeddedResourceBaseTypes.Add(typeof(AdminFeature));
@@ -24,7 +26,10 @@ public void Register(IAppHost appHost)
2426
? (pathInfo == "/ss_admin/index.html" || !appHost.VirtualFileSources.FileExists(pathInfo)
2527
? new CustomActionHandlerAsync(async (req, res) => {
2628
res.ContentType = MimeTypes.Html;
27-
await res.WriteAsync(indexHtml.Replace("/dist", req.ResolveAbsoluteUrl("~/ss_admin/dist")));
29+
var html = indexHtml.Replace("/dist", req.ResolveAbsoluteUrl("~/ss_admin/dist"));
30+
if (!string.IsNullOrEmpty(InsertHtml))
31+
html = html.Replace("</body>", InsertHtml + "</body>");
32+
await res.WriteAsync(html);
2833
}) as IHttpHandler
2934
: new StaticFileHandler(appHost.VirtualFileSources.GetFile(pathInfo)))
3035
: null);

src/ServiceStack.Admin/ss_admin/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
7-
<title>ServiceStack.Admin.Web</title>
7+
<title>AutoQuery</title>
88
<link href="/dist/app.css" rel="stylesheet"></head>
99
<body>
1010

0 commit comments

Comments
 (0)