Skip to content

Commit

Permalink
Remove printing code
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jan 20, 2024
1 parent 1d44bf3 commit ce0996a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 37 deletions.
14 changes: 6 additions & 8 deletions JournalApp/Components/Pages/Trends/TrendsDialog.razor
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
@namespace JournalApp
@using CommunityToolkit.Maui.Storage;
@using Append.Blazor.Printing
@inject IDbContextFactory<AppDbContext> dbcf
@inject ILogger<TrendsDialog> logger
@inject IDialogService DialogService
@inject PageService PageService
@inject IPrintingService PrintingService

<MudDialog DefaultFocus="DefaultFocus.None">
<TitleContent>
Expand All @@ -14,11 +12,11 @@

<MudText Typo="Typo.h6">Trends</MudText>

<MudSpacer />

@if (Debugger.IsAttached)
{
<MudIconButton Icon="@Icons.Material.Filled.Print" Title="Print" OnClick="Print" />
<MudSpacer />

<MudIconButton Icon="@Icons.Material.Filled.PictureAsPdf" Title="Export as PDF" OnClick="Export" />
}
</div>

Expand Down Expand Up @@ -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;
}
}
1 change: 0 additions & 1 deletion JournalApp/JournalApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Append.Blazor.Printing" Version="6.2.0" />
<PackageReference Include="Blazor-ApexCharts" Version="2.2.1" />
<PackageReference Include="CommunityToolkit.Maui" Version="7.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
Expand Down
4 changes: 1 addition & 3 deletions JournalApp/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Append.Blazor.Printing;
using CommunityToolkit.Maui;
using CommunityToolkit.Maui;
using MudBlazor;
using MudBlazor.Services;

Expand Down Expand Up @@ -41,7 +40,6 @@ public static MauiApp CreateMauiApp()
builder.Services.AddSingleton<AppDataService>();
builder.Services.AddSingleton<AppDbSeeder>();
builder.Services.AddSingleton<PageService>();
builder.Services.AddScoped<IPrintingService, PrintingService>();
builder.Services.AddSingleton(Share.Default);
builder.Services.AddSingleton(FilePicker.Default);

Expand Down
25 changes: 0 additions & 25 deletions JournalApp/Resources/Raw/Credits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce0996a

Please sign in to comment.