diff --git a/Core/Core.csproj b/Core/Core.csproj index 6daa8725..aaa252c9 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -4,7 +4,7 @@ net8.0 latestmajor Core - 2.0.7 + 2.0.8 true diff --git a/Elib2EbookWeb/Components/BookForm.razor b/Elib2EbookWeb/Components/BookForm.razor index 42133f95..69697306 100644 --- a/Elib2EbookWeb/Components/BookForm.razor +++ b/Elib2EbookWeb/Components/BookForm.razor @@ -15,31 +15,45 @@ + + + - - +
+ + +
- - @if (_onGenerate) { - @if (!string.IsNullOrWhiteSpace(_log)) { - @_log - } else { - + @if (_onGenerate) { + + @if (_onGenerate) { + @if (!string.IsNullOrWhiteSpace(_log)) { + @_log + } else { + + } } - } else { - Сгенерировать - } - + + } else { + + + Скачать + + + Скачать без картинок + + + } @code { private readonly Options _options = new(); private ActionLogger? _logger; private bool _onGenerate; - private string _log; + private string? _log; private bool _isShow; private InputType _passwordInput = InputType.Password; @@ -60,7 +74,17 @@ } } - private async Task OnCLick() { + private async Task WithImages() { + _options.NoImage = false; + await Download(); + } + + private async Task NoImages() { + _options.NoImage = true; + await Download(); + } + + private async Task Download() { if (_options.Url == null || !_options.Url.Any() || string.IsNullOrWhiteSpace(_options.Url.First())) { Snackbar.Add("Укажите ссылку на книгу", Severity.Error); return; diff --git a/Elib2EbookWeb/Misc/SbWriter.cs b/Elib2EbookWeb/Misc/SbWriter.cs index c1713d12..ad8eb55a 100644 --- a/Elib2EbookWeb/Misc/SbWriter.cs +++ b/Elib2EbookWeb/Misc/SbWriter.cs @@ -1,9 +1,9 @@ namespace Elib2EbookWeb.Misc; public class ActionLogger : ILogger { - private readonly Action _action; + private readonly Action _action; - public ActionLogger(Action action) { + public ActionLogger(Action action) { _action = action; }