From 20d528986f208ae5d31809a478d4b07785ec0fba Mon Sep 17 00:00:00 2001 From: KristofferStrube Date: Sun, 18 Feb 2024 12:47:09 +0100 Subject: [PATCH] Added PNG download sample. --- .github/workflows/main.yml | 4 +- ...Strube.Blazor.SVGEditor.WasmExample.csproj | 17 +-- .../Pages/Save.razor | 123 +++++++++++++++--- 3 files changed, 115 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb79ccc..91b6c4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v2 # Install .NET SDK - - name: Setup .NET 7 preview + - name: Setup .NET 8 uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' include-prerelease: true # Add Nuget.Config to solution diff --git a/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/KristofferStrube.Blazor.SVGEditor.WasmExample.csproj b/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/KristofferStrube.Blazor.SVGEditor.WasmExample.csproj index 438c400..ca63e64 100644 --- a/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/KristofferStrube.Blazor.SVGEditor.WasmExample.csproj +++ b/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/KristofferStrube.Blazor.SVGEditor.WasmExample.csproj @@ -1,25 +1,18 @@  - net7.0 + net8.0 true enable - preview enable - - - - - - - - - - + + + + diff --git a/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/Pages/Save.razor b/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/Pages/Save.razor index 37a1ca5..bb1317e 100644 --- a/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/Pages/Save.razor +++ b/samples/KristofferStrube.Blazor.SVGEditor.WasmExample/Pages/Save.razor @@ -2,20 +2,32 @@ @using System.Reactive.Subjects; @using System.Reactive.Linq; @using KristofferStrube.Blazor.FileAPI; +@using System.Text +@using SkiaSharp +@implements IAsyncDisposable @inject IURLServiceInProcess URL @inject IJSRuntime JSRuntime Save SVG with SVGEditor -@if (SaveLink is null) -{ - Generate Save Link -} -else -{ - -} -
+
+ @if (SvgSaveLink is null && PngSaveLink is null) + { + Generate Save Links + } + else + { + @if (SvgSaveLink is not null) + { + + } + @if (PngSaveLink is not null) + { + + } + + } +