Skip to content

Commit

Permalink
admin about page design update
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed Sep 18, 2023
1 parent 0b9eb82 commit aa3b7df
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
54 changes: 28 additions & 26 deletions src/Moonglade.Web/Pages/Admin/About.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,84 +8,86 @@
var process = Process.GetCurrentProcess();
}

<div class="ps-4 pe-4 pb-3">
<h3 class="admin-h3 mb-3">
<i class="bi-moon-stars"></i>
<div class="pb-3">
<h4 class="admin-subtitle fw-bold mb-2">
@SharedLocalizer["Moonglade Configuration"]
</h3>
</h4>

<div class="row mb-4 rounded-3 shadow-sm border bg-white">
<table class="table table-borderless mx-1 my-1">
<div class="mb-4 rounded-3 shadow-sm border bg-white p-2">
<table class="table table-borderless table-sm mb-0">
<tbody>
<tr>
<td class="w-25">@SharedLocalizer["Version"]</td>
<td>@Helper.AppVersion</td>
<td class="text-muted">@Helper.AppVersion</td>
</tr>
<tr>
<td>@SharedLocalizer["Environment"]</td>
<td>@WebHostEnvironment.EnvironmentName</td>
<td class="text-muted">@WebHostEnvironment.EnvironmentName</td>
</tr>
<tr>
<td>@SharedLocalizer["Editor"]</td>
<td>@(Configuration.GetSection("Editor").Get<EditorChoice>())</td>
<td class="text-muted">@(Configuration.GetSection("Editor").Get<EditorChoice>())</td>
</tr>

<tr>
<td>Forwarded Headers</td>
<td>@Configuration["ForwardedHeaders:Enabled"]: @Configuration["ForwardedHeaders:ForwardedForHeaderName"]</td>
<td class="text-muted">@Configuration["ForwardedHeaders:Enabled"]: @Configuration["ForwardedHeaders:ForwardedForHeaderName"]</td>
</tr>

<tr>
<td>Client IP Address</td>
<td>@HttpContext.Connection.RemoteIpAddress?.ToString()</td>
<td class="text-muted">@HttpContext.Connection.RemoteIpAddress?.ToString()</td>
</tr>
</tbody>
</table>
</div>

<h3 class="admin-h3 mb-3">
<i class="bi-tools"></i>

<h4 class="admin-subtitle fw-bold mb-2">
@SharedLocalizer["Server Information"]
</h3>
</h4>

<div class="row mb-4 rounded-3 shadow-sm border bg-white">
<table class="table table-borderless mx-1 my-1">
<div class="mb-4 rounded-3 shadow-sm border bg-white p-2">
<table class="table table-borderless table-sm mb-0">
<tbody>
<tr>
<td class="w-25">@SharedLocalizer["System"]</td>
<td>@Helper.TryGetFullOSVersion() @(Environment.Is64BitOperatingSystem ? "(64-bit)" : "(32-bit)")</td>
<td class="text-muted">@Helper.TryGetFullOSVersion() @(Environment.Is64BitOperatingSystem ? "(64-bit)" : "(32-bit)")</td>
</tr>
<tr>
<td>@SharedLocalizer["Directory"]</td>
<td>@Environment.CurrentDirectory</td>
<td class="text-muted">@Environment.CurrentDirectory</td>
</tr>
<tr>
<td>@SharedLocalizer["Machine Name"]</td>
<td>@Environment.MachineName</td>
<td class="text-muted">@Environment.MachineName</td>
</tr>
<tr>
<td>@SharedLocalizer["User Name"]</td>
<td>@Environment.UserDomainName\@Environment.UserName</td>
<td class="text-muted">@Environment.UserDomainName\@Environment.UserName</td>
</tr>
<tr>
<td>@SharedLocalizer[".NET Version"]</td>
<td>@Environment.Version</td>
<td class="text-muted">@Environment.Version</td>
</tr>
<tr>
<td>@SharedLocalizer["ASP.NET Core Environment"]</td>
<td class="text-muted">@(Environment.GetEnvironmentVariable("aspnetcore_environment"))</td>
</tr>
<tr>
<td>@SharedLocalizer["Worker Process"]</td>
<td>[@process.Id] @process.ProcessName @(Environment.Is64BitProcess ? "(64-bit)" : "(32-bit)")</td>
<td class="text-muted">[@process.Id] @process.ProcessName @(Environment.Is64BitProcess ? "(64-bit)" : "(32-bit)")</td>
</tr>
<tr>
<td>@SharedLocalizer["Start Time"]</td>
<td>@process.StartTime.ToUniversalTime() (UTC)</td>
<td class="text-muted">@process.StartTime.ToUniversalTime() (UTC)</td>
</tr>
<tr>
<td>@SharedLocalizer["Memory"]</td>
<td>@(process.WorkingSet64 / 1024 / 1024) MB</td>
<td class="text-muted">@(process.WorkingSet64 / 1024 / 1024) MB</td>
</tr>
<tr>
<td>@SharedLocalizer["Docker Container"]</td>
<td>@(Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER") == "true")</td>
<td class="text-muted">@(Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER") == "true")</td>
</tr>
</tbody>
</table>
Expand Down
3 changes: 3 additions & 0 deletions src/Moonglade.Web/Resources/Program.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -888,4 +888,7 @@
<data name="RSS / Atom Feed" xml:space="preserve">
<value>RSS / Atom 订阅</value>
</data>
<data name="ASP.NET Core Environment" xml:space="preserve">
<value>ASP.NET Core 环境</value>
</data>
</root>
4 changes: 2 additions & 2 deletions src/Moonglade.Web/wwwroot/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,6 @@ table.dataTable {
display: none !important;
}

.admin-h3 {
font-size: 20px;
.admin-subtitle {
font-size: 0.9rem;
}

0 comments on commit aa3b7df

Please sign in to comment.