mirror of
https://github.com/Megghy/MegghysAPI.git
synced 2025-12-06 22:26:56 +08:00
44 lines
971 B
Plaintext
44 lines
971 B
Plaintext
@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();
|
|
}
|
|
}
|