重构作业结构:优化实体模型、DTO映射和前端界面
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 13s

- 重构AppMainStruct、AssignmentQuestion、Question等实体模型
- 更新相关DTO以匹配新的数据结构
- 优化前端页面布局和组件
- 添加全局信息和笔记功能相关代码
- 更新数据库迁移和程序配置
This commit is contained in:
SpecialX
2025-09-04 15:43:33 +08:00
parent 730b0ba04b
commit 6a65281850
58 changed files with 5459 additions and 244 deletions

View File

@@ -0,0 +1,11 @@
<MudPaper Class="d-flex flex-row my-3" Height="@Height" Width="@Width" Elevation="0">
<MudIcon Icon="@Icons.Custom.Brands.MudBlazor" Color="Color.Primary" />
<MudText Class="mx-3"><b>TechHelper</b></MudText>
</MudPaper>
@code {
[Parameter]
public string Height { get; set; } = "30px";
[Parameter]
public string Width { get; set; } = "100%";
}

View File

@@ -0,0 +1,8 @@
<MudPaper Class="d-flex flex-grow-1 rounded-xl pl-6" Elevation="0">
<MudTextField @bind-Value="TextValue" Label="Search for everything" Variant="Variant.Text"></MudTextField>
<MudIconButton Icon="@Icons.Material.Filled.Search"></MudIconButton>
</MudPaper>
@code {
public string TextValue { get; set; }
}

View File

@@ -0,0 +1,35 @@
@inherits ErrorBoundary
@inject ISnackbar Snackbar
@if (CurrentException is null)
{
@ChildContent
}
else if (ErrorContent is not null)
{
@ErrorContent(CurrentException)
}
else
{
<div class="custom-error-ui">
<MudAlert Severity="Severity.Error" Icon="@Icons.Material.Filled.Error">
<MudText>组件加载或执行时出现了问题。</MudText>
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
Class="mt-3">
重试
</MudButton>
</MudAlert>
</div>
}
@code {
protected override async Task OnErrorAsync(Exception exception)
{
Snackbar.Add("操作失败,请重试或联系管理员。", Severity.Error);
await base.OnErrorAsync(exception);
}
}