Skip to content

Commit

Permalink
add .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Peugnet committed Nov 15, 2024
2 parents 38042bd + 46b522d commit b62294c
Show file tree
Hide file tree
Showing 9 changed files with 303 additions and 252 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Dotnet Publish
run:
dotnet publish --configuration Release
dotnet publish --configuration Release -f net8.0

- name: Change base-tag in index.html to repo name
run: sed -i 's/<base href="\/" \/>/<base href="\/${{ env.REPO_NAME }}\/" \/>/g' $GITHUB_WORKSPACE/$PUBLISH_FOLDER/index.html
Expand Down
11 changes: 8 additions & 3 deletions Blazor-Color-Picker-Library/BlazorColorPicker.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net8.0; net9.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>BlazorColorPicker</RootNamespace>
<Authors>Christophe Peugnet</Authors>
<PackageIcon>icon.png</PackageIcon>
<Version>3.1.0</Version>
<Version>3.1.1</Version>
<Description>Opens a modal palette with the Material colors for Blazor Application</Description>
<PackageProjectUrl>https://github.com/tossnet/Blazor-Color-Picker</PackageProjectUrl>
<RepositoryUrl>https://github.com/tossnet/Blazor-Color-Picker</RepositoryUrl>
Expand All @@ -28,8 +28,13 @@
</None>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.17" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
Expand Down
17 changes: 11 additions & 6 deletions Blazor-Color-Picker-Library/ColorPicker.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

<div class="color-picker-modal @CssClass"
tabindex="0" @onkeydown="@KeyDown" @ref="myPalette">
<div class="color-picker-content">
<div @ref="myPalette"
class="color-picker-modal @CssClass"
tabindex="0"
@onkeydown="@KeyDown" >
<div class="color-picker-content"
style="@Style">
@if (!string.IsNullOrEmpty(Title))
{
<div class="color-picker-header">
Expand All @@ -10,13 +13,15 @@
</div>
}
<div class="color-picker-body">
<div class="color-picker-palette" style="@CustomStyle">
<div class="color-picker-palette" style="@CustomStyle @Style">
@foreach (string item in colors)
{
<div class="color-picker-case text-center" style="background-color:@item" @onclick="() => ColorClick(item)">
<div class="color-picker-case text-center"
style="background-color:@item"
@onclick="() => ColorClick(item)">
@if (MyColor == item)
{
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" /></svg>
}
</div>
}
Expand Down
Loading

0 comments on commit b62294c

Please sign in to comment.