Skip to content

Commit db7e45f

Browse files
Merge remote-tracking branch 'origin/update-sample-tfms' into update-sample-tfms
2 parents 1e8c46e + 73914a6 commit db7e45f

File tree

15 files changed

+214
-80
lines changed

15 files changed

+214
-80
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
<Router AppAssembly="@typeof(Program).Assembly">
1+
<Router AppAssembly="@typeof(App).Assembly" NotFoundPage="typeof(Pages.NotFound)">
22
<Found Context="routeData">
33
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
45
</Found>
5-
<NotFound>
6-
<LayoutView Layout="@typeof(MainLayout)">
7-
<p>Sorry, there's nothing at this address.</p>
8-
</LayoutView>
9-
</NotFound>
106
</Router>

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Catcher.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
private static class OtherStuffThrower
3030
{
3131
public static void DoSomething() => Thrower();
32-
private static void Thrower() => throw null;
32+
private static void Thrower() => throw null!;
3333
}
3434
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@page "/not-found"
2+
@layout MainLayout
3+
4+
<h3>Not Found</h3>
5+
<p>Sorry, the content you are looking for does not exist.</p>

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Thrower.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
private static class StuffThrower
3131
{
3232
public static void DoSomething() => Thrower();
33-
private static void Thrower() => throw null;
33+
private static void Thrower() => throw null!;
3434
}
3535
}

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Microsoft.AspNetCore.Components.Web;
12
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
23
using Sentry.Samples.AspNetCore.Blazor.Wasm;
34

@@ -15,6 +16,7 @@
1516
});
1617

1718
builder.RootComponents.Add<App>("#app");
19+
builder.RootComponents.Add<HeadOutlet>("head::after");
1820
builder.Logging.SetMinimumLevel(LogLevel.Debug);
1921

2022
builder.Services.AddScoped(_ =>

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Properties/launchSettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
23
"iisSettings": {
34
"windowsAuthentication": false,
45
"anonymousAuthentication": true,
@@ -18,7 +19,7 @@
1819
},
1920
"Sentry.Samples.AspNetCore.Blazor.Wasm": {
2021
"commandName": "Project",
21-
"dotnetRunMessages": "true",
22+
"dotnetRunMessages": true,
2223
"launchBrowser": true,
2324
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
2425
"applicationUrl": "https://localhost:5001;http://localhost:5000",

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
58
<RunAOTCompilation>true</RunAOTCompilation>
69
</PropertyGroup>
710

@@ -15,8 +18,8 @@
1518
</PropertyGroup>
1619

1720
<ItemGroup>
18-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.8"/>
19-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.8" PrivateAssets="all"/>
21+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.0"/>
22+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.0" PrivateAssets="all"/>
2023
<ProjectReference Include="..\..\src\Sentry.AspNetCore.Blazor.WebAssembly\Sentry.AspNetCore.Blazor.WebAssembly.csproj" />
2124
</ItemGroup>
2225
</Project>

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Shared/MainLayout.razor

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<NavMenu />
66
</div>
77

8-
<div>
9-
@Body
10-
</div>
8+
<main>
9+
<article class="content">
10+
@Body
11+
</article>
12+
</main>
1113
</div>

samples/Sentry.Samples.AspNetCore.Blazor.Wasm/_Imports.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
@using Microsoft.AspNetCore.Components.Forms
44
@using Microsoft.AspNetCore.Components.Routing
55
@using Microsoft.AspNetCore.Components.Web
6+
@using Microsoft.AspNetCore.Components.Web.Virtualization
67
@using Microsoft.AspNetCore.Components.WebAssembly.Http
78
@using Microsoft.JSInterop
89
@using Sentry.Samples.AspNetCore.Blazor.Wasm
Lines changed: 111 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
/* styles all <a> tags within <nav> tags */
1+
html, body {
2+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3+
}
4+
25
nav {
36
width: 100%;
47
background-color: #7428d2;
@@ -11,37 +14,122 @@ nav a {
1114
font-family: sans-serif;
1215
padding: 1.0em;
1316
border-style: none;
14-
display: inline-block; /* makes the links align horizontally */
17+
display: inline-block;
1518
}
1619

17-
/* styles for hovered <a> tags within <nav> tags */
1820
nav a:hover {
1921
background-color: #d37e05;
2022
color: #f0f0f0;
2123
}
2224

23-
button {
25+
h1:focus {
26+
outline: none;
27+
}
28+
29+
a, .btn-link {
30+
color: #0071c1;
31+
}
32+
33+
.btn-primary {
2434
color: #fff;
25-
background-color: #cf7209;
26-
display: inline-block;
27-
font-weight: 400;
35+
background-color: #1b6ec2;
36+
border-color: #1861ac;
37+
}
38+
39+
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
40+
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
41+
}
42+
43+
.content {
44+
padding-top: 1.1rem;
45+
}
46+
47+
.valid.modified:not([type=checkbox]) {
48+
outline: 1px solid #26b050;
49+
}
50+
51+
.invalid {
52+
outline: 1px solid red;
53+
}
54+
55+
.validation-message {
56+
color: red;
57+
}
58+
59+
#blazor-error-ui {
60+
color-scheme: light only;
61+
background: lightyellow;
62+
bottom: 0;
63+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
64+
box-sizing: border-box;
65+
display: none;
66+
left: 0;
67+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
68+
position: fixed;
69+
width: 100%;
70+
z-index: 1000;
71+
}
72+
73+
#blazor-error-ui .dismiss {
74+
cursor: pointer;
75+
position: absolute;
76+
right: 0.75rem;
77+
top: 0.5rem;
78+
}
79+
80+
.blazor-error-boundary {
81+
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgL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41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
82+
padding: 1rem 1rem 1rem 3.7rem;
83+
color: white;
84+
}
85+
86+
.blazor-error-boundary::after {
87+
content: "An error has occurred."
88+
}
89+
90+
.loading-progress {
91+
position: absolute;
92+
display: block;
93+
width: 8rem;
94+
height: 8rem;
95+
inset: 20vh 0 auto 0;
96+
margin: 0 auto 0 auto;
97+
}
98+
99+
.loading-progress circle {
100+
fill: none;
101+
stroke: #e0e0e0;
102+
stroke-width: 0.6rem;
103+
transform-origin: 50% 50%;
104+
transform: rotate(-90deg);
105+
}
106+
107+
.loading-progress circle:last-child {
108+
stroke: #1b6ec2;
109+
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
110+
transition: stroke-dasharray 0.05s ease-in-out;
111+
}
112+
113+
.loading-progress-text {
114+
position: absolute;
28115
text-align: center;
29-
vertical-align: middle;
30-
cursor: pointer;
31-
user-select: none;
32-
padding: .375rem .75rem;
33-
font-size: 1rem;
34-
line-height: 1.5;
35-
border: 1px solid transparent;
36-
border-radius: .25rem;
37-
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
38-
}
39-
40-
button:hover {
41-
color: #fff;
42-
background-color: #d37e05;
116+
font-weight: bold;
117+
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
118+
}
119+
120+
.loading-progress-text:after {
121+
content: var(--blazor-load-percentage-text, "Loading");
122+
}
123+
124+
code {
125+
color: #c02d76;
126+
}
127+
128+
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
129+
color: var(--bs-secondary-color);
130+
text-align: end;
43131
}
44132

45-
button:focus {
46-
box-shadow: 0 0 0 0.2rem rgba(241, 185, 144, 0.5);
133+
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
134+
text-align: start;
47135
}

0 commit comments

Comments
 (0)