From b16ae3209affb9a7211ca92fc3470a52d492d537 Mon Sep 17 00:00:00 2001 From: jackfiled Date: Sat, 20 Jan 2024 20:25:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YaeBlog.Example/Components/App.razor | 18 --------- .../Components/Layout/MainLayout.razor | 9 ----- .../Components/Layout/MainLayout.razor.css | 18 --------- YaeBlog.Example/Components/Pages/Error.razor | 36 ------------------ YaeBlog.Example/Components/Pages/Home.razor | 7 ---- YaeBlog.Example/Components/Routes.razor | 6 --- YaeBlog.Example/Components/_Imports.razor | 10 ----- YaeBlog.Example/wwwroot/app.css | 29 -------------- YaeBlog.Theme.FluentUI/Component1.razor | 3 -- YaeBlog.Theme.FluentUI/Component1.razor.css | 6 --- YaeBlog.Theme.FluentUI/ExampleJsInterop.cs | 36 ------------------ YaeBlog.Theme.FluentUI/wwwroot/background.png | Bin 378 -> 0 bytes .../wwwroot/exampleJsInterop.js | 6 --- 13 files changed, 184 deletions(-) delete mode 100644 YaeBlog.Example/Components/App.razor delete mode 100644 YaeBlog.Example/Components/Layout/MainLayout.razor delete mode 100644 YaeBlog.Example/Components/Layout/MainLayout.razor.css delete mode 100644 YaeBlog.Example/Components/Pages/Error.razor delete mode 100644 YaeBlog.Example/Components/Pages/Home.razor delete mode 100644 YaeBlog.Example/Components/Routes.razor delete mode 100644 YaeBlog.Example/Components/_Imports.razor delete mode 100644 YaeBlog.Example/wwwroot/app.css delete mode 100644 YaeBlog.Theme.FluentUI/Component1.razor delete mode 100644 YaeBlog.Theme.FluentUI/Component1.razor.css delete mode 100644 YaeBlog.Theme.FluentUI/ExampleJsInterop.cs delete mode 100644 YaeBlog.Theme.FluentUI/wwwroot/background.png delete mode 100644 YaeBlog.Theme.FluentUI/wwwroot/exampleJsInterop.js diff --git a/YaeBlog.Example/Components/App.razor b/YaeBlog.Example/Components/App.razor deleted file mode 100644 index 8cf6de7..0000000 --- a/YaeBlog.Example/Components/App.razor +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/YaeBlog.Example/Components/Layout/MainLayout.razor b/YaeBlog.Example/Components/Layout/MainLayout.razor deleted file mode 100644 index 0fd1b20..0000000 --- a/YaeBlog.Example/Components/Layout/MainLayout.razor +++ /dev/null @@ -1,9 +0,0 @@ -@inherits LayoutComponentBase - -@Body - -
- An unhandled error has occurred. - Reload - 🗙 -
diff --git a/YaeBlog.Example/Components/Layout/MainLayout.razor.css b/YaeBlog.Example/Components/Layout/MainLayout.razor.css deleted file mode 100644 index df8c10f..0000000 --- a/YaeBlog.Example/Components/Layout/MainLayout.razor.css +++ /dev/null @@ -1,18 +0,0 @@ -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; -} - - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } diff --git a/YaeBlog.Example/Components/Pages/Error.razor b/YaeBlog.Example/Components/Pages/Error.razor deleted file mode 100644 index 576cc2d..0000000 --- a/YaeBlog.Example/Components/Pages/Error.razor +++ /dev/null @@ -1,36 +0,0 @@ -@page "/Error" -@using System.Diagnostics - -Error - -

Error.

-

An error occurred while processing your request.

- -@if (ShowRequestId) -{ -

- Request ID: @RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

- -@code{ - [CascadingParameter] - private HttpContext? HttpContext { get; set; } - - private string? RequestId { get; set; } - private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - protected override void OnInitialized() => - RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; -} diff --git a/YaeBlog.Example/Components/Pages/Home.razor b/YaeBlog.Example/Components/Pages/Home.razor deleted file mode 100644 index 9001e0b..0000000 --- a/YaeBlog.Example/Components/Pages/Home.razor +++ /dev/null @@ -1,7 +0,0 @@ -@page "/" - -Home - -

Hello, world!

- -Welcome to your new app. diff --git a/YaeBlog.Example/Components/Routes.razor b/YaeBlog.Example/Components/Routes.razor deleted file mode 100644 index d0df781..0000000 --- a/YaeBlog.Example/Components/Routes.razor +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/YaeBlog.Example/Components/_Imports.razor b/YaeBlog.Example/Components/_Imports.razor deleted file mode 100644 index 413ec40..0000000 --- a/YaeBlog.Example/Components/_Imports.razor +++ /dev/null @@ -1,10 +0,0 @@ -@using System.Net.Http -@using System.Net.Http.Json -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Web -@using static Microsoft.AspNetCore.Components.Web.RenderMode -@using Microsoft.AspNetCore.Components.Web.Virtualization -@using Microsoft.JSInterop -@using YaeBlog.Example -@using YaeBlog.Example.Components diff --git a/YaeBlog.Example/wwwroot/app.css b/YaeBlog.Example/wwwroot/app.css deleted file mode 100644 index e398853..0000000 --- a/YaeBlog.Example/wwwroot/app.css +++ /dev/null @@ -1,29 +0,0 @@ -h1:focus { - outline: none; -} - -.valid.modified:not([type=checkbox]) { - outline: 1px solid #26b050; -} - -.invalid { - outline: 1px solid #e50000; -} - -.validation-message { - color: #e50000; -} - -.blazor-error-boundary { - background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG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NjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; - padding: 1rem 1rem 1rem 3.7rem; - color: white; -} - - .blazor-error-boundary::after { - content: "An error has occurred." - } - -.darker-border-checkbox.form-check-input { - border-color: #929292; -} diff --git a/YaeBlog.Theme.FluentUI/Component1.razor b/YaeBlog.Theme.FluentUI/Component1.razor deleted file mode 100644 index 18f1597..0000000 --- a/YaeBlog.Theme.FluentUI/Component1.razor +++ /dev/null @@ -1,3 +0,0 @@ -
- This component is defined in the YaeBlog.Theme.FluentUI library. -
diff --git a/YaeBlog.Theme.FluentUI/Component1.razor.css b/YaeBlog.Theme.FluentUI/Component1.razor.css deleted file mode 100644 index c6afca4..0000000 --- a/YaeBlog.Theme.FluentUI/Component1.razor.css +++ /dev/null @@ -1,6 +0,0 @@ -.my-component { - border: 2px dashed red; - padding: 1em; - margin: 1em 0; - background-image: url('background.png'); -} diff --git a/YaeBlog.Theme.FluentUI/ExampleJsInterop.cs b/YaeBlog.Theme.FluentUI/ExampleJsInterop.cs deleted file mode 100644 index 70d69fb..0000000 --- a/YaeBlog.Theme.FluentUI/ExampleJsInterop.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.JSInterop; - -namespace YaeBlog.Theme.FluentUI; - -// This class provides an example of how JavaScript functionality can be wrapped -// in a .NET class for easy consumption. The associated JavaScript module is -// loaded on demand when first needed. -// -// This class can be registered as scoped DI service and then injected into Blazor -// components for use. - -public class ExampleJsInterop : IAsyncDisposable -{ - private readonly Lazy> moduleTask; - - public ExampleJsInterop(IJSRuntime jsRuntime) - { - moduleTask = new (() => jsRuntime.InvokeAsync( - "import", "./_content/YaeBlog.Theme.FluentUI/exampleJsInterop.js").AsTask()); - } - - public async ValueTask Prompt(string message) - { - var module = await moduleTask.Value; - return await module.InvokeAsync("showPrompt", message); - } - - public async ValueTask DisposeAsync() - { - if (moduleTask.IsValueCreated) - { - var module = await moduleTask.Value; - await module.DisposeAsync(); - } - } -} diff --git a/YaeBlog.Theme.FluentUI/wwwroot/background.png b/YaeBlog.Theme.FluentUI/wwwroot/background.png deleted file mode 100644 index e15a3bde6e2bdb380df6a0b46d7ed00bdeb0aaa8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1SGdsl%54rjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJwr2>%=KS^ie7oTIEF;HpS|GCbyPusHSqiXaCu3qf)82(9Gq&mZq2{Kq}M*X&MWtJ zSi1Jo7ZzfImg%g=t(qo=wsSR2lZoP(Rj#3wacN=q0?Br(rXzgZEGK2$ID{|A=5S{xJEuzSH>!M+7wSY6hB<=-E^*n0W7 S8wY^CX7F_Nb6Mw<&;$S{dxtsz diff --git a/YaeBlog.Theme.FluentUI/wwwroot/exampleJsInterop.js b/YaeBlog.Theme.FluentUI/wwwroot/exampleJsInterop.js deleted file mode 100644 index ea8d76a..0000000 --- a/YaeBlog.Theme.FluentUI/wwwroot/exampleJsInterop.js +++ /dev/null @@ -1,6 +0,0 @@ -// This is a JavaScript module that is loaded on demand. It can export any number of -// functions, and may import other JavaScript modules if required. - -export function showPrompt(message) { - return prompt(message, 'Type anything here'); -}