Compare commits
5 Commits
1ac9fb7e81
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9204fed54c | |||
| 406d0f5652 | |||
| 9cd651bdfe | |||
| 96336fd637 | |||
| e7d1b4b524 |
@@ -43,7 +43,7 @@ jobs:
|
|||||||
TEMP_LAST_TAG="${LAST_TAG%-*}"
|
TEMP_LAST_TAG="${LAST_TAG%-*}"
|
||||||
VERSION="${TEMP_LAST_TAG}-nightly.${COMMIT_COUNT}"
|
VERSION="${TEMP_LAST_TAG}-nightly.${COMMIT_COUNT}"
|
||||||
else
|
else
|
||||||
VERSION="$[LAST_TAG}-nightly.${COMMIT_COUNT}"
|
VERSION="${LAST_TAG}-nightly.${COMMIT_COUNT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV"
|
echo "LAST_TAG=$LAST_TAG" >> "$GITHUB_ENV"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<MudCardMedia Image="@GlobalEntity.PicturePath" Height="400" Style="object-fit: contain;"/>
|
<MudCardMedia Image="@GlobalEntity.PicturePath" Height="400" Style="object-fit: contain;"/>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
<MudText Typo="Typo.h5">@GlobalEntity.Title</MudText>
|
<MudText Typo="Typo.h5" Style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">@GlobalEntity.Title</MudText>
|
||||||
</MudCardContent>
|
</MudCardContent>
|
||||||
<MudCardActions>
|
<MudCardActions>
|
||||||
<MudTooltip Text="Add to shared List">
|
<MudTooltip Text="Add to shared List">
|
||||||
|
|||||||
@@ -120,6 +120,9 @@
|
|||||||
|
|
||||||
//Picture
|
//Picture
|
||||||
private IBrowserFile? _pictureFile;
|
private IBrowserFile? _pictureFile;
|
||||||
|
private string _pictureBase64;
|
||||||
|
private string? _pictureContentType;
|
||||||
|
private string? _pictureExtension;
|
||||||
|
|
||||||
private class GlobalEntityFormModel
|
private class GlobalEntityFormModel
|
||||||
{
|
{
|
||||||
@@ -165,8 +168,11 @@
|
|||||||
using var ms = new MemoryStream();
|
using var ms = new MemoryStream();
|
||||||
await stream.CopyToAsync(ms);
|
await stream.CopyToAsync(ms);
|
||||||
|
|
||||||
var base64 = Convert.ToBase64String(ms.ToArray());
|
_pictureContentType = _pictureFile.ContentType;
|
||||||
_imagePreview = $"data:{_pictureFile.ContentType};base64,{base64}";
|
_pictureExtension = Path.GetExtension(_pictureFile.Name);
|
||||||
|
|
||||||
|
_pictureBase64 = Convert.ToBase64String(ms.ToArray());
|
||||||
|
_imagePreview = $"data:{_pictureFile.ContentType};base64,{_pictureBase64}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cancel() => MudDialog.Cancel();
|
private void Cancel() => MudDialog.Cancel();
|
||||||
@@ -191,13 +197,10 @@
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string fileName = $"{Guid.NewGuid()}{Path.GetExtension(_pictureFile.Name)}";
|
string fileName = $"{Guid.NewGuid()}{_pictureExtension}";
|
||||||
string picturePath = Path.Combine("wwwroot", "Pictures", fileName);
|
string picturePath = Path.Combine("wwwroot", "Pictures", fileName);
|
||||||
|
|
||||||
await using (var fs = File.Create(picturePath))
|
await File.WriteAllBytesAsync(picturePath, Convert.FromBase64String(_pictureBase64));
|
||||||
{
|
|
||||||
await _pictureFile.OpenReadStream(maxAllowedSize: 10_000_000).CopyToAsync(fs);
|
|
||||||
}
|
|
||||||
|
|
||||||
var entity = new GlobalEntity
|
var entity = new GlobalEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
private async Task OnNewEntity(GlobalEntity entity)
|
private async Task OnNewEntity(GlobalEntity entity)
|
||||||
{
|
{
|
||||||
_globalEntities.Add(entity);
|
_globalEntities.Insert(0, entity);
|
||||||
await RefreshPage();
|
await RefreshPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<MudStack Class="pa-3" Spacing="2">
|
<MudStack Class="pa-3" Spacing="2">
|
||||||
<!--<editor-fold desc="Options">-->
|
<!--<editor-fold desc="Options">-->
|
||||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||||
<MudText Typo="Typo.h6">@PrivateEntity.GlobalEntity.Title</MudText>
|
<MudText Typo="Typo.h6" Style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">@PrivateEntity.GlobalEntity.Title</MudText>
|
||||||
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
|
||||||
<MudMenuItem>Edit</MudMenuItem>
|
<MudMenuItem>Edit</MudMenuItem>
|
||||||
<MudMenuItem OnClick="@(() => OnRemove.InvokeAsync())">Remove</MudMenuItem>
|
<MudMenuItem OnClick="@(() => OnRemove.InvokeAsync())">Remove</MudMenuItem>
|
||||||
@@ -40,6 +40,8 @@
|
|||||||
</MudSelect>
|
</MudSelect>
|
||||||
<!--</editor-fold>-->
|
<!--</editor-fold>-->
|
||||||
|
|
||||||
|
<!-- @if (PrivateEntity.GlobalEntity.MediaType.Name == "Series" || PrivateEntity.GlobalEntity.MediaType.Name == "Anime") -->
|
||||||
|
<!--{-->
|
||||||
<!--<editor-fold desc="Dropdown-Season">-->
|
<!--<editor-fold desc="Dropdown-Season">-->
|
||||||
<MudSelect
|
<MudSelect
|
||||||
T="int?"
|
T="int?"
|
||||||
@@ -47,7 +49,8 @@
|
|||||||
ValueChanged="@(newSeason => OnSeasonChange.InvokeAsync(newSeason))"
|
ValueChanged="@(newSeason => OnSeasonChange.InvokeAsync(newSeason))"
|
||||||
Dense="true"
|
Dense="true"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
Label="">
|
Label=""
|
||||||
|
Class="@(PrivateEntity.GlobalEntity.MediaType.Name == "Series" ? "" : "invisible")">
|
||||||
@{
|
@{
|
||||||
int? currentSeason = PrivateEntity.Season ?? 1;
|
int? currentSeason = PrivateEntity.Season ?? 1;
|
||||||
int? startOffsetSeason = currentSeason > 1 ? -1 : 0;
|
int? startOffsetSeason = currentSeason > 1 ? -1 : 0;
|
||||||
@@ -67,7 +70,8 @@
|
|||||||
ValueChanged="@(newEpisode => OnEpisodeChange.InvokeAsync(newEpisode))"
|
ValueChanged="@(newEpisode => OnEpisodeChange.InvokeAsync(newEpisode))"
|
||||||
Dense="true"
|
Dense="true"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
Label="">
|
Label=""
|
||||||
|
Class="@(PrivateEntity.GlobalEntity.MediaType.Name == "Series" ? "" : "invisible")">
|
||||||
@{
|
@{
|
||||||
int? currentEpisode = PrivateEntity.Episode ?? 1;
|
int? currentEpisode = PrivateEntity.Episode ?? 1;
|
||||||
int? startOffsetEpisode = currentEpisode > 1 ? -1 : 0;
|
int? startOffsetEpisode = currentEpisode > 1 ? -1 : 0;
|
||||||
@@ -79,6 +83,7 @@
|
|||||||
}
|
}
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
<!--</editor-fold>-->
|
<!--</editor-fold>-->
|
||||||
|
<!--}-->
|
||||||
|
|
||||||
<!--<editor-fold desc="Details Button">-->
|
<!--<editor-fold desc="Details Button">-->
|
||||||
<MudStack Row="true" Justify="Justify.FlexEnd">
|
<MudStack Row="true" Justify="Justify.FlexEnd">
|
||||||
|
|||||||
Reference in New Issue
Block a user