mirror of
https://github.com/Megghy/MegghysAPI.git
synced 2025-12-06 22:26:56 +08:00
添加项目文件。
This commit is contained in:
43
Components/Pages/Pixiv.razor
Normal file
43
Components/Pages/Pixiv.razor
Normal file
@@ -0,0 +1,43 @@
|
||||
@page "/pixiv"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<h3>Pixiv</h3>
|
||||
|
||||
<FluentButton OnClick="RandomGet">
|
||||
随机获取
|
||||
</FluentButton>
|
||||
<FluentDivider />
|
||||
<br/>
|
||||
<FluentStack Orientation="Orientation.Vertical" HorizontalAlignment="HorizontalAlignment.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" />
|
||||
}
|
||||
}
|
||||
</FluentStack>
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user