mirror of
https://github.com/Megghy/MegghysAPI.git
synced 2025-12-06 22:26:56 +08:00
将项目从 Fluent UI 迁移到 Ant Design Blazor: - 替换 UI 组件,更新样式和脚本。 - 移除 Fluent UI 相关依赖,添加 Ant Design 依赖。 优化 DNS 解析接口: - 将解析接口从 POST 改为 GET,简化参数结构。 - 更新 `DnsResponse` 和配置文件结构。 数据库模型优化: - 为 JSON 数据存储添加 `JArray` 映射支持。 初始化逻辑重构: - 简化 `AutoInit` 初始化逻辑,提升代码可读性。 其他改动: - 升级依赖包版本。 - 移除无用命名空间和属性。
43 lines
1.0 KiB
Plaintext
43 lines
1.0 KiB
Plaintext
@page "/pixiv"
|
|
@rendermode InteractiveServer
|
|
|
|
<h3>Pixiv</h3>
|
|
|
|
<Space Direction="SpaceDirection.Horizontal" Size="@("16")" Align="SpaceAlign.Center">
|
|
<Button Type="ButtonType.Primary" OnClick="RandomGet">随机获取</Button>
|
|
</Space>
|
|
<Divider />
|
|
<Space Direction="SpaceDirection.Vertical" Size="@("16")" Align="SpaceAlign.Center">
|
|
@foreach (var (index, img) in CurrentImgs.S3URL.Index())
|
|
{
|
|
@if(index == 0)
|
|
{
|
|
<img src="@img.Large" loading="lazy" referrerpolicy="no-referrer" onload="" />
|
|
}
|
|
else
|
|
{
|
|
<img src="@img.Large" loading="lazy" referrerpolicy="no-referrer" />
|
|
}
|
|
}
|
|
</Space>
|
|
|
|
@code {
|
|
public Modules.PixivFavoriteDownloader.Pixiv.PixivImgInfo CurrentImgs;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
RandomGet();
|
|
}
|
|
|
|
public void FirstImgLoaded()
|
|
{
|
|
|
|
}
|
|
|
|
public void RandomGet()
|
|
{
|
|
CurrentImgs = Modules.PixivFavoriteDownloader.Favorites.OrderByRandom().First();
|
|
}
|
|
}
|