调整UI布局,消息模版新增语言字段
This commit is contained in:
@@ -47,6 +47,9 @@
|
||||
<ChildContent>
|
||||
@Body
|
||||
</ChildContent>
|
||||
<FooterRender>
|
||||
<FooterView Copyright="2025 Atomlust.com"></FooterView>
|
||||
</FooterRender>
|
||||
</AntDesign.ProLayout.BasicLayout>
|
||||
</ChildContent>
|
||||
<ErrorContent Context="ex">
|
||||
|
||||
@@ -1,24 +1,32 @@
|
||||
@page "/"
|
||||
@page "/{locale}/"
|
||||
@attribute [Authorize]
|
||||
<PageContainer Title="控制台首页">
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
<li>
|
||||
Welcome to your new app.
|
||||
|
||||
<li>
|
||||
<a href="/category/list">产品分类</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/product/category/edit">产品分类编辑</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/system/language/list">多语言设置</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/system/locale/resource/list">多语言资源设置</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/system/role/list">角色管理</a>
|
||||
</li>
|
||||
</li>
|
||||
</PageContainer>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,9 +1,25 @@
|
||||
@page "/system/app/version/list"
|
||||
@page "/{locale}/system/app/version/list"
|
||||
|
||||
@inject ILogger<AppVersionList> Logger
|
||||
@attribute [Authorize]
|
||||
<div>
|
||||
<PageContainer Title="App版本管理">
|
||||
<Breadcrumb>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem Href="/">管理后台</BreadcrumbItem>
|
||||
<BreadcrumbItem Href="/settings">系统配置</BreadcrumbItem>
|
||||
<BreadcrumbItem>版本管理</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</Breadcrumb>
|
||||
<ChildContent>
|
||||
<h3>App Version List</h3>
|
||||
</ChildContent>
|
||||
</PageContainer>
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
@page "/admin/list"
|
||||
@page "/{locale}/admin/list"
|
||||
@inject ILogger<AdminList> Logger
|
||||
@attribute [Authorize]
|
||||
|
||||
|
||||
<PageTitle>管理员账号管理</PageTitle>
|
||||
|
||||
<Title Level="4">管理员帐号</Title>
|
||||
<Card Class="">
|
||||
<PageContainer Title="管理员帐号">
|
||||
<Breadcrumb>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem Href="/">管理后台</BreadcrumbItem>
|
||||
<BreadcrumbItem Href="/admin/list">系统功能</BreadcrumbItem>
|
||||
<BreadcrumbItem>版本管理</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</Breadcrumb>
|
||||
<ChildContent>
|
||||
<Card Class="">
|
||||
<Form @ref="searchForm" Model="search" Layout="FormLayout.Inline" Class="search-form" OnFinish="OnSearchFinish">
|
||||
<Row Justify="RowJustify.Start" Gutter="16">
|
||||
<Col>
|
||||
@@ -23,15 +30,15 @@
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</Card>
|
||||
<br />
|
||||
<Card Class="mt-3">
|
||||
</Card>
|
||||
<br />
|
||||
<Card Class="mt-3">
|
||||
<Table DataSource="PagingList.Items" PageSize="100" HidePagination="true" Resizable>
|
||||
<TitleTemplate>
|
||||
<Flex Justify="FlexJustify.SpaceBetween">
|
||||
帐号列表
|
||||
<div>
|
||||
<AuthorizeCheck Permission="@Permissions.Admin.Create">\
|
||||
<AuthorizeCheck Permission="@Permissions.Admin.Create">
|
||||
<Button Class="me-3" OnClick="OnCreateClick" Type="ButtonType.Primary">新增</Button>
|
||||
</AuthorizeCheck>
|
||||
</div>
|
||||
@@ -55,7 +62,7 @@
|
||||
<Icon Type="close" Theme="IconThemeType.Outline" Width="1.3em" Height="1.3em" />
|
||||
}
|
||||
</PropertyColumn>
|
||||
<PropertyColumn Property="c => c.LastLogin" Title="最后登录" Width="120px" />
|
||||
<PropertyColumn Property="c => c.LastLogin" Title="最后登录" />
|
||||
<PropertyColumn Property="c => c.UpdateTime" Title="最后更新" />
|
||||
<ActionColumn Title="操作" Align="ColumnAlign.Right" Width="160px">
|
||||
<Space>
|
||||
@@ -89,9 +96,13 @@
|
||||
</ActionColumn>
|
||||
</ColumnDefinitions>
|
||||
</Table>
|
||||
</Card>
|
||||
<br />
|
||||
<Row Justify="RowJustify.End">
|
||||
<Pagination PageIndex="pager.Index" Total="PagingList.Count" PageSize="PagingList.Size" ShowSizeChanger="false" OnChange="OnPageChanged"></Pagination>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Drawer Closable="true" Width="520" Visible="drawerVisible" Title='(model.Id == 0 ? "新增帐号" : "编辑帐号")' OnClose="_ => CloseDrawer()">
|
||||
<Drawer Closable="true" Width="520" Visible="drawerVisible" Title='(model.Id == 0 ? "新增帐号" : "编辑帐号")' OnClose="_ => CloseDrawer()">
|
||||
<Form LabelColSpan="5" @ref="@editform" Model="@model" OnFinish="OnFormFinish">
|
||||
<FluentValidationValidator />
|
||||
<FormItem Label="帐号名称">
|
||||
@@ -141,9 +152,14 @@
|
||||
<Button Type="ButtonType.Primary" HtmlType="submit" Style="width: 100%;">保存</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Drawer>
|
||||
</Drawer>
|
||||
</ChildContent>
|
||||
</PageContainer>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
|
||||
[SupplyParameterFromQuery]
|
||||
int? Page { get; set; }
|
||||
|
||||
@@ -276,6 +292,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPageChanged(PaginationEventArgs args)
|
||||
{
|
||||
OnSearch(args.Page);
|
||||
}
|
||||
|
||||
void OnCreateClick()
|
||||
{
|
||||
model = new();
|
||||
@@ -325,7 +346,7 @@
|
||||
{
|
||||
|
||||
CloseDrawer();
|
||||
_= LoadList();
|
||||
_ = LoadList();
|
||||
await ModalService.InfoAsync(new ConfirmOptions() { Title = "提示", Content = "数据提交成功!" });
|
||||
}
|
||||
else
|
||||
|
||||
8
Atomx.Admin/Atomx.Admin.Client/Pages/Systems/Info.razor
Normal file
8
Atomx.Admin/Atomx.Admin.Client/Pages/Systems/Info.razor
Normal file
@@ -0,0 +1,8 @@
|
||||
@page "/system/info"
|
||||
@page "/{locale}/system/info"
|
||||
<h3>Info</h3>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,10 +1,18 @@
|
||||
@page "/system/role/permission/{RoleId:long}"
|
||||
@page "/{locale}/system/role/permission/{RoleId:long}"
|
||||
@attribute [Authorize]
|
||||
@inject ILogger<RoleList> Logger
|
||||
|
||||
<PageTitle>权限设置</PageTitle>
|
||||
<Spin Spinning="loading">
|
||||
<Title Level="4">编辑角色权限</Title>
|
||||
<PageContainer Title="权限角色设置">
|
||||
<Breadcrumb>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem Href="/">管理后台</BreadcrumbItem>
|
||||
<BreadcrumbItem Href="/admin/list">系统功能</BreadcrumbItem>
|
||||
<BreadcrumbItem>权限编辑</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</Breadcrumb>
|
||||
<ChildContent>
|
||||
<Spin Spinning="loading">
|
||||
<Card>
|
||||
<Form @ref="editForm" Model="model" LabelColSpan="2" WrapperColSpan="22" Class="search-form" OnFinish="OnFormFinishAsync">
|
||||
<FormItem Label="角色">
|
||||
@@ -83,8 +91,13 @@
|
||||
</Form>
|
||||
|
||||
</Card>
|
||||
</Spin>
|
||||
</Spin>
|
||||
</ChildContent>
|
||||
</PageContainer>
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
|
||||
[Parameter]
|
||||
public long RoleId { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
@page "/system/role/list"
|
||||
@page "/{locale}/system/role/list"
|
||||
@attribute [Authorize]
|
||||
@inject ILogger<RoleList> Logger
|
||||
|
||||
<PageTitle>角色管理</PageTitle>
|
||||
|
||||
<Title Level="4">角色管理</Title>
|
||||
|
||||
<Card Class="mt-3">
|
||||
<PageContainer Title="角色管理">
|
||||
<Breadcrumb>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem Href="/">管理后台</BreadcrumbItem>
|
||||
<BreadcrumbItem Href="/admin/list">系统功能</BreadcrumbItem>
|
||||
<BreadcrumbItem>角色管理</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</Breadcrumb>
|
||||
<ChildContent>
|
||||
<Card Class="mt-3">
|
||||
<Table DataSource="PagingList.Items" PageSize="100" HidePagination="true" Resizable>
|
||||
<TitleTemplate>
|
||||
<Flex Justify="FlexJustify.SpaceBetween">
|
||||
@@ -86,9 +92,9 @@
|
||||
<Row Justify="RowJustify.End">
|
||||
<Pagination PageIndex="pager.Index" Total="PagingList.Count" PageSize="PagingList.Size" ShowSizeChanger="false" OnChange="OnPageChanged"></Pagination>
|
||||
</Row>
|
||||
</Card>
|
||||
</Card>
|
||||
|
||||
<Drawer Closable="true" Width="520" Visible="drawerVisible" Title='(model.Id == 0 ? "新增角色" : "编辑角色")' OnClose="_ => CloseDrawer()">
|
||||
<Drawer Closable="true" Width="520" Visible="drawerVisible" Title='(model.Id == 0 ? "新增角色" : "编辑角色")' OnClose="_ => CloseDrawer()">
|
||||
<Form LabelColSpan="5" @ref="@editform" Model="@model" OnFinish="OnFormFinish">
|
||||
<FluentValidationValidator />
|
||||
<FormItem Label="角色名称">
|
||||
@@ -104,9 +110,14 @@
|
||||
<Button Type="ButtonType.Primary" HtmlType="submit" Style="width: 100%;">保存</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Drawer>
|
||||
</Drawer>
|
||||
</ChildContent>
|
||||
</PageContainer>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
|
||||
[SupplyParameterFromQuery]
|
||||
int? Page { get; set; }
|
||||
|
||||
|
||||
9
Atomx.Admin/Atomx.Admin.Client/Pages/Systems/Tools.razor
Normal file
9
Atomx.Admin/Atomx.Admin.Client/Pages/Systems/Tools.razor
Normal file
@@ -0,0 +1,9 @@
|
||||
@page "/system/tools"
|
||||
@page "/{locale}/system/tools"
|
||||
|
||||
<h3>Tools</h3>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Locale { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using Atomx.Data;
|
||||
using Atomx.Data.Services;
|
||||
using Atomx.Utils.Extension;
|
||||
using MapsterMapper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -14,6 +15,7 @@ namespace Atomx.Admin.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
public class AppVersionController : ControllerBase
|
||||
{
|
||||
readonly ILogger<AppVersionController> _logger;
|
||||
|
||||
@@ -75,3 +75,89 @@ h1:focus {
|
||||
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
|
||||
|
||||
html,
|
||||
body,
|
||||
#root,
|
||||
#app,
|
||||
app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.colorWeak {
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
||||
.ant-layout {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.action {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ant-page-header {
|
||||
background: #f0f2f5;
|
||||
padding: 12px 24px 12px;
|
||||
}
|
||||
|
||||
.ant-breadcrumb + .ant-page-header-heading {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.ant-pro-page-container-children-content {
|
||||
margin: 0 24px 0;
|
||||
}
|
||||
|
||||
.ant-page-header-heading-extra {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.ant-page-header-content {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.ant-table {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th,
|
||||
.ant-table-tbody > tr > th,
|
||||
.ant-table-thead > tr > td,
|
||||
.ant-table-tbody > tr > td {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th > span,
|
||||
.ant-table-tbody > tr > th > span,
|
||||
.ant-table-thead > tr > td > span,
|
||||
.ant-table-tbody > tr > td > span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
||||
body .ant-design-pro > .ant-layout {
|
||||
min-height: 100vh;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,11 @@ namespace Atomx.Common.Entities
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言编码
|
||||
/// </summary>
|
||||
public int LanguageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息模板类型
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user