File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using Azure . Identity ;
22using BlazorApplicationInsights ;
3- using Microsoft . ApplicationInsights . AspNetCore . Extensions ;
43using Sudoku . Blazor ;
54using Sudoku . Blazor . Components ;
65
3635builder . Services
3736 . RegisterBlazorGameServices ( builder . Configuration ) ;
3837
39- // Only configure Application Insights if connection string is provided
38+ // Only configure client-side Application Insights if connection string is provided
39+ // Server-side telemetry is handled by Azure.Monitor.OpenTelemetry.AspNetCore via ServiceDefaults
4040if ( ! string . IsNullOrEmpty ( appInsightsConnectionString ) )
4141{
4242 builder . Services
4343 . AddBlazorApplicationInsights ( x =>
4444 {
4545 x . ConnectionString = appInsightsConnectionString ;
46- } )
47- . AddApplicationInsightsTelemetry ( new ApplicationInsightsServiceOptions
48- {
49- ConnectionString = appInsightsConnectionString ,
50- EnableQuickPulseMetricStream = true
5146 } ) ;
52-
53- // Configure Application Insights logging
54- builder . Logging
55- . AddApplicationInsights (
56- configureTelemetryConfiguration : ( config ) => config . ConnectionString = appInsightsConnectionString ,
57- configureApplicationInsightsLoggerOptions : ( options ) => { } ) ;
5847}
5948
6049var app = builder . Build ( ) ;
Original file line number Diff line number Diff line change 1212 <PackageReference Include =" Aspire.Microsoft.Azure.Cosmos" Version =" 13.2.2" />
1313 <PackageReference Include =" Azure.Extensions.AspNetCore.Configuration.Secrets" Version =" 1.5.0" />
1414 <PackageReference Include =" BlazorApplicationInsights" Version =" 3.3.0" />
15- <PackageReference Include =" Microsoft.ApplicationInsights.AspNetCore" Version =" 3.1.0" />
1615 <PackageReference Include =" Microsoft.Extensions.Azure" Version =" 1.13.1" />
1716 <PackageReference Include =" Microsoft.Extensions.Http" Version =" 10.0.6" />
18- <PackageReference Include =" Microsoft.Extensions.Logging.ApplicationInsights" Version =" 2.23.0" />
1917 <PackageReference Include =" Microsoft.Extensions.Logging.AzureAppServices" Version =" 10.0.6" />
2018 </ItemGroup >
2119
Original file line number Diff line number Diff line change 3939 background-color : # F0F8FF !important ;
4040}
4141
42- .highlight {
43- background-color : # F0F8F0 !important ;
42+ .highlight input ,
43+ .highlight label {
44+ background-color : # d8eef8 !important ;
4445}
4546
46- .invalid {
47+ .selected input ,
48+ .selected label {
49+ background-color : # b8d8f0 !important ;
50+ }
51+
52+ .invalid input ,
53+ .invalid label {
4754 background-color : # ffdddd !important ;
4855 outline : 1px solid red;
4956}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default function CellInput({
2323 const getCellClass = ( ) : string => {
2424 const classes = [ styles . cell ] ;
2525 if ( isInvalid ) classes . push ( styles . invalid ) ;
26- else if ( isSelected ) classes . push ( styles . highlight ) ;
26+ else if ( isSelected ) classes . push ( styles . selected ) ;
2727 else if ( isHighlighted ) classes . push ( styles . highlight ) ;
2828 return classes . join ( ' ' ) ;
2929 } ;
Original file line number Diff line number Diff line change @@ -254,11 +254,19 @@ export default function GamePage() {
254254 ) ;
255255 }
256256
257+ if ( solved ) {
258+ return (
259+ < Layout >
260+ < VictoryDisplay onClose = { handleVictoryClose } />
261+ </ Layout >
262+ ) ;
263+ }
264+
257265 if ( isGameLoading || ! game ) {
258266 return (
259267 < Layout >
260268 < div style = { { textAlign : 'center' , marginTop : '4rem' } } >
261- { isGameLoading ? ' Loading puzzle...' : 'Loading puzzle...' }
269+ Loading puzzle...
262270 </ div >
263271 </ Layout >
264272 ) ;
@@ -291,7 +299,6 @@ export default function GamePage() {
291299 onReset = { handleReset }
292300 onTogglePencil = { ( ) => setPencilMode ( p => ! p ) }
293301 />
294- { solved && < VictoryDisplay onClose = { handleVictoryClose } /> }
295302 </ div >
296303 </ Layout >
297304 ) ;
You can’t perform that action at this time.
0 commit comments