From ce0996a96d6b6ec63a660e3deb727164d7ec2b84 Mon Sep 17 00:00:00 2001 From: Daniel Chalmers Date: Sat, 20 Jan 2024 01:09:43 -0600 Subject: [PATCH] Remove printing code --- .../Pages/Trends/TrendsDialog.razor | 14 +++++------ JournalApp/JournalApp.csproj | 1 - JournalApp/MauiProgram.cs | 4 +-- JournalApp/Resources/Raw/Credits.txt | 25 ------------------- 4 files changed, 7 insertions(+), 37 deletions(-) diff --git a/JournalApp/Components/Pages/Trends/TrendsDialog.razor b/JournalApp/Components/Pages/Trends/TrendsDialog.razor index 9e73536..7c5ab1c 100644 --- a/JournalApp/Components/Pages/Trends/TrendsDialog.razor +++ b/JournalApp/Components/Pages/Trends/TrendsDialog.razor @@ -1,11 +1,9 @@ @namespace JournalApp @using CommunityToolkit.Maui.Storage; -@using Append.Blazor.Printing @inject IDbContextFactory dbcf @inject ILogger logger @inject IDialogService DialogService @inject PageService PageService -@inject IPrintingService PrintingService @@ -14,11 +12,11 @@ Trends - - @if (Debugger.IsAttached) { - + + + } @@ -106,10 +104,10 @@ PageService.CloseDialog(MudDialog, true); } - public async Task Print() + public async Task Export() { - logger.LogInformation("Opening print dialog"); + logger.LogInformation("Starting export"); - await PrintingService.Print("trends-category-list", PrintType.Html); + await Task.CompletedTask; } } \ No newline at end of file diff --git a/JournalApp/JournalApp.csproj b/JournalApp/JournalApp.csproj index f9a51ba..42df03d 100644 --- a/JournalApp/JournalApp.csproj +++ b/JournalApp/JournalApp.csproj @@ -47,7 +47,6 @@ - diff --git a/JournalApp/MauiProgram.cs b/JournalApp/MauiProgram.cs index 3664ef8..8972f77 100644 --- a/JournalApp/MauiProgram.cs +++ b/JournalApp/MauiProgram.cs @@ -1,5 +1,4 @@ -using Append.Blazor.Printing; -using CommunityToolkit.Maui; +using CommunityToolkit.Maui; using MudBlazor; using MudBlazor.Services; @@ -41,7 +40,6 @@ public static MauiApp CreateMauiApp() builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); - builder.Services.AddScoped(); builder.Services.AddSingleton(Share.Default); builder.Services.AddSingleton(FilePicker.Default); diff --git a/JournalApp/Resources/Raw/Credits.txt b/JournalApp/Resources/Raw/Credits.txt index 74cb279..9c5feb7 100644 --- a/JournalApp/Resources/Raw/Credits.txt +++ b/JournalApp/Resources/Raw/Credits.txt @@ -965,31 +965,6 @@ SOFTWARE. -https://github.com/Append-IT/Blazor.Printing/blob/master/LICENSE -MIT License - -Copyright (c) 2020 Append - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - Inspired by eMoods: https://play.google.com/store/apps/details?id=com.emoodtracker.wellness