From 0dca6c9e0ea4a42760b431ecb9e317da1d2dbcbe Mon Sep 17 00:00:00 2001 From: jsakamoto Date: Sun, 15 Dec 2024 17:55:33 +0900 Subject: [PATCH 1/3] Add a new page to the sample site for testing on custom elements --- SampleSites/Client/wwwroot/index.html | 1 + .../Components/Pages/TestCustomElements.razor | 39 ++++++ .../Components/Shared/MainLayout.razor | 2 + SampleSites/Components/Shared/NavMenu.razor | 5 + .../Components/wwwroot/custom-elements.js | 129 ++++++++++++++++++ SampleSites/Server/Pages/_Host.cshtml | 1 + SampleSites/Server8/Components/App.razor | 1 + 7 files changed, 178 insertions(+) create mode 100644 SampleSites/Components/Pages/TestCustomElements.razor create mode 100644 SampleSites/Components/wwwroot/custom-elements.js diff --git a/SampleSites/Client/wwwroot/index.html b/SampleSites/Client/wwwroot/index.html index a4dd0f1..d41315c 100644 --- a/SampleSites/Client/wwwroot/index.html +++ b/SampleSites/Client/wwwroot/index.html @@ -28,6 +28,7 @@ + diff --git a/SampleSites/Components/Pages/TestCustomElements.razor b/SampleSites/Components/Pages/TestCustomElements.razor new file mode 100644 index 0000000..ba3fc12 --- /dev/null +++ b/SampleSites/Components/Pages/TestCustomElements.razor @@ -0,0 +1,39 @@ +@page "/test/custom-elements" + +

Test - Custom Elements

+ +
+ +
+ +
+ +
+ +
+ +
+ + + + + +
+ +
+ +
+ +
+ +
+ +
+ Click me +
+ +
+ Click me +
+ +
\ No newline at end of file diff --git a/SampleSites/Components/Shared/MainLayout.razor b/SampleSites/Components/Shared/MainLayout.razor index 0969902..be06b36 100644 --- a/SampleSites/Components/Shared/MainLayout.razor +++ b/SampleSites/Components/Shared/MainLayout.razor @@ -49,6 +49,8 @@ .Add(Code.H, () => GoTo("/"), "Go to Home page.", Exclude.TextArea | Exclude.ContentEditable) .Add(Code.C, () => GoTo("/counter"), "Go to Counter page.", Exclude.InputText | Exclude.TextArea) .Add(Code.F, () => GoTo("/fetchdata"), "Go to Fetch data page.") + .Add(Code.T, () => GoTo("/test/bykeyname"), "Go to \"Test by Key Name\" page.", Exclude.InputText | Exclude.InputNonText) + .Add(Code.S, () => GoTo("/save-text"), new HotKeyOptions { Description = "Go to \"Save Text\" page.", ExcludeSelector = "button" }) .Add(Key.Control, OnCtrlKeyDown, "Double tap to go to Home."); } } diff --git a/SampleSites/Components/Shared/NavMenu.razor b/SampleSites/Components/Shared/NavMenu.razor index 2771e2d..66b099d 100644 --- a/SampleSites/Components/Shared/NavMenu.razor +++ b/SampleSites/Components/Shared/NavMenu.razor @@ -52,6 +52,11 @@ Test Exclude Content Editable + @if (@RuntimeInformation.ProcessArchitecture.ToString() == "Wasm") {