summaryrefslogtreecommitdiff
path: root/Pages/Component/AboutDialog.razor
diff options
context:
space:
mode:
Diffstat (limited to 'Pages/Component/AboutDialog.razor')
-rw-r--r--Pages/Component/AboutDialog.razor14
1 files changed, 13 insertions, 1 deletions
diff --git a/Pages/Component/AboutDialog.razor b/Pages/Component/AboutDialog.razor
index a533fbc..9823761 100644
--- a/Pages/Component/AboutDialog.razor
+++ b/Pages/Component/AboutDialog.razor
@@ -1,4 +1,6 @@
@using System.Reflection
+@using Microsoft.AspNetCore.Hosting
+@inject IHostingEnvironment hostingEnvironment
<Dialog @ref=dialog>
<p id="title">@Title</p>
@@ -686,11 +688,21 @@
public void Hide() => Visible = false;
public string Title =>
- $"HyperBooru v{Version}";
+ $"HyperBooru v{Version} {Development}";
public string? Version =>
GetType()
.Assembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion;
+
+ public string? Development {
+ get {
+ #if DEBUG
+ return "(Development)";
+ #else
+ return hostingEnvironment.IsDevelopment() ? "(Development)" : null;
+ #endif
+ }
+ }
}