瀏覽代碼

miniprofiler

懒得勤快 1 周之前
父節點
當前提交
96524a466f

+ 1 - 0
front/src/views/posts/list.vue

@@ -824,6 +824,7 @@ const initEventSource = () => {
 
   eventSource.onerror = (error) => {
     toast.error('EventSource 连接错误!', { autoClose: 2000, position: 'top-center' })
+    eventSource.close()
   }
 }
 

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/DashboardController.cs

@@ -24,7 +24,7 @@ public sealed class DashboardController(IWebHostEnvironment env) : AdminControll
             Expires = DateTime.Now.AddYears(1),
         });
         var html = System.IO.File.ReadAllText(Path.Combine(env.WebRootPath, "dashboard", "index.html"));
-        return Content(html, ContentType.Html);
+        return View("Index", html);
     }
 
     [Route("counter")]

+ 6 - 0
src/Masuit.MyBlogs.Core/Views/Dashboard/Index.cshtml

@@ -0,0 +1,6 @@
+@model string
+@{
+    Layout = null;
+}
[email protected](Model)
+<mini-profiler max-traces="5" />