Skip to content

Commit

Permalink
💁
Browse files Browse the repository at this point in the history
  • Loading branch information
hlaueriksson committed Jun 30, 2024
1 parent e9a8412 commit c273a33
Show file tree
Hide file tree
Showing 27 changed files with 85 additions and 43 deletions.
14 changes: 7 additions & 7 deletions GEmojiSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.Blazor", "src\G
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.Sample.BlazorWebAssembly", "samples\GEmojiSharp.Sample.BlazorWebAssembly\GEmojiSharp.Sample.BlazorWebAssembly.csproj", "{1BF0F93F-AEEC-4F49-84C8-CD88FA7E8239}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.Sample.BlazorServer", "samples\GEmojiSharp.Sample.BlazorServer\GEmojiSharp.Sample.BlazorServer.csproj", "{BD90A65E-9F61-48BF-8885-3505B8C0D299}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.DotnetTool", "src\GEmojiSharp.DotnetTool\GEmojiSharp.DotnetTool.csproj", "{D6294653-E1A0-4F02-B97D-9E3149D7A462}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.PowerToysRun", "src\GEmojiSharp.PowerToysRun\GEmojiSharp.PowerToysRun.csproj", "{F587ED51-27F6-47EE-AF43-70B82BC8D3ED}"
Expand All @@ -31,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.PowerToysRun.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GEmojiSharp.Benchmark", "tests\GEmojiSharp.Benchmark\GEmojiSharp.Benchmark.csproj", "{FDED188E-B80B-475D-9ECA-09A8A2BE091F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GEmojiSharp.Sample.BlazorWeb", "samples\GEmojiSharp.Sample.BlazorWeb\GEmojiSharp.Sample.BlazorWeb.csproj", "{3389CA47-8F04-4666-84DD-FAE7A1E2A032}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -61,10 +61,6 @@ Global
{1BF0F93F-AEEC-4F49-84C8-CD88FA7E8239}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BF0F93F-AEEC-4F49-84C8-CD88FA7E8239}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1BF0F93F-AEEC-4F49-84C8-CD88FA7E8239}.Release|Any CPU.Build.0 = Release|Any CPU
{BD90A65E-9F61-48BF-8885-3505B8C0D299}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD90A65E-9F61-48BF-8885-3505B8C0D299}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD90A65E-9F61-48BF-8885-3505B8C0D299}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD90A65E-9F61-48BF-8885-3505B8C0D299}.Release|Any CPU.Build.0 = Release|Any CPU
{D6294653-E1A0-4F02-B97D-9E3149D7A462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6294653-E1A0-4F02-B97D-9E3149D7A462}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6294653-E1A0-4F02-B97D-9E3149D7A462}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -81,6 +77,10 @@ Global
{FDED188E-B80B-475D-9ECA-09A8A2BE091F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDED188E-B80B-475D-9ECA-09A8A2BE091F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDED188E-B80B-475D-9ECA-09A8A2BE091F}.Release|Any CPU.Build.0 = Release|Any CPU
{3389CA47-8F04-4666-84DD-FAE7A1E2A032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3389CA47-8F04-4666-84DD-FAE7A1E2A032}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3389CA47-8F04-4666-84DD-FAE7A1E2A032}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3389CA47-8F04-4666-84DD-FAE7A1E2A032}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -92,11 +92,11 @@ Global
{FBC5D0FB-ECAE-471C-9447-91DB023D0B0E} = {6938AF53-C5C7-478A-9554-6E7A02509432}
{748078D9-2705-44E7-A6D9-30976F03D102} = {08210849-A04E-459A-907D-980E559710E6}
{1BF0F93F-AEEC-4F49-84C8-CD88FA7E8239} = {6938AF53-C5C7-478A-9554-6E7A02509432}
{BD90A65E-9F61-48BF-8885-3505B8C0D299} = {6938AF53-C5C7-478A-9554-6E7A02509432}
{D6294653-E1A0-4F02-B97D-9E3149D7A462} = {08210849-A04E-459A-907D-980E559710E6}
{F587ED51-27F6-47EE-AF43-70B82BC8D3ED} = {08210849-A04E-459A-907D-980E559710E6}
{F7B52BE0-D70B-4859-84C5-464E009C1799} = {01434E7A-C27D-4094-A3E9-0C322136EFF7}
{FDED188E-B80B-475D-9ECA-09A8A2BE091F} = {01434E7A-C27D-4094-A3E9-0C322136EFF7}
{3389CA47-8F04-4666-84DD-FAE7A1E2A032} = {6938AF53-C5C7-478A-9554-6E7A02509432}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4EE2F45B-9E7D-46BE-A6C1-A1ACC12A0DCA}
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,21 @@ Update the `_Imports.razor` file, to enable the component in all Razor views:
@using GEmojiSharp.Blazor
```

> [!NOTE]
> In a Blazor Web App (.NET 8 or later), the component requires an interactive render mode applied either globally to the app or to the component definition.
Set the global render mode in `App.razor`:

```cshtml
<Routes @rendermode="InteractiveServer" />
```

or per page/component:

```cshtml
@rendermode InteractiveServer
```

Use the `<Emoji>` component to render emojis:

```html
Expand Down Expand Up @@ -679,9 +694,9 @@ Change action keyword:

The [`samples`](/samples) folder contains...

- `GEmojiSharp.Sample.BlazorServer`, a Blazor Server app
- `GEmojiSharp.Sample.BlazorWebAssembly`, a Blazor WebAssembly app
- `GEmojiSharp.Sample.Web`, a ASP.NET Core web site
- `GEmojiSharp.Sample.BlazorWeb`, a Blazor Web App (InteractiveServer render mode)
- `GEmojiSharp.Sample.BlazorWebAssembly`, a Blazor WebAssembly App
- `GEmojiSharp.Sample.Web`, a ASP.NET Core Web App (Razor Pages)

The Blazor WebAssembly app is showcased here:

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">

<head>
Expand All @@ -7,7 +7,7 @@
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="GEmojiSharp.Sample.BlazorServer.styles.css" />
<link rel="stylesheet" href="GEmojiSharp.Sample.BlazorWeb.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@page "/all"
@rendermode InteractiveServer

<PageTitle>All</PageTitle>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@page "/"
@rendermode InteractiveServer

<PageTitle>Home</PageTitle>

Expand Down
6 changes: 6 additions & 0 deletions samples/GEmojiSharp.Sample.BlazorWeb/Components/Routes.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Router AppAssembly="typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
</Router>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using GEmojiSharp.Sample.BlazorServer
@using GEmojiSharp.Sample.BlazorServer.Components
@using GEmojiSharp.Sample.BlazorWeb
@using GEmojiSharp.Sample.BlazorWeb.Components
@using GEmojiSharp.Blazor
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GEmojiSharp.Sample.BlazorServer.Components;
using GEmojiSharp.Sample.BlazorWeb.Components;

var builder = WebApplication.CreateBuilder(args);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:59657",
"sslPort": 44368
"applicationUrl": "http://localhost:12000",
"sslPort": 44343
}
},
"profiles": {
"GEmojiSharp.Sample.BlazorServer": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5084",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7225;http://localhost:5084",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GEmojiSharp.Blazor" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:57516",
"sslPort": 44322
"applicationUrl": "http://localhost:36558",
"sslPort": 44320
}
},
"profiles": {
"GEmojiSharp.Sample.BlazorWebAssembly": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5127",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7220;http://localhost:5127",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
4 changes: 1 addition & 3 deletions samples/GEmojiSharp.Sample.Web/GEmojiSharp.Sample.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GEmojiSharp.AspNetCore" Version="3.1.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.3.3">
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion samples/GEmojiSharp.Sample.Web/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;

namespace GEmojiSharp.Sample.Web.Pages
{
Expand Down
18 changes: 14 additions & 4 deletions samples/GEmojiSharp.Sample.Web/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:57240",
"sslPort": 44351
"applicationUrl": "http://localhost:43525",
"sslPort": 44345
}
},
"profiles": {
"GEmojiSharp.Sample.Web": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "http://localhost:5141",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7068;http://localhost:5141",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down

0 comments on commit c273a33

Please sign in to comment.