Skip to content

Commit 6e2098b

Browse files
Merge pull request #48 from Athiswaran-SF3980/UpdatedToLatest
Migrated all projects to latest TFM and Updated NuGet Packages
2 parents 6010f3b + fdd1464 commit 6e2098b

File tree

27,145 files changed

+13461146
-268665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

27,145 files changed

+13461146
-268665
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<RootNamespace>_3Dchart_ServerApp</RootNamespace>
8+
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
9+
<BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Syncfusion.Blazor.Chart3D" Version="31.2.12" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="3Dchart_ServerApp.csproj" />
3+
</Solution>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<base href="/" />
8+
<ResourcePreloader />
9+
<link rel="stylesheet" href="@Assets["lib/bootstrap/dist/css/bootstrap.min.css"]" />
10+
<link rel="stylesheet" href="@Assets["app.css"]" />
11+
<link rel="stylesheet" href="@Assets["3Dchart_ServerApp.styles.css"]" />
12+
<ImportMap />
13+
<link rel="icon" type="image/png" href="favicon.png" />
14+
<HeadOutlet @rendermode="InteractiveServer" />
15+
</head>
16+
17+
<body>
18+
<Routes @rendermode="InteractiveServer" />
19+
<ReconnectModal />
20+
<script src="@Assets["_framework/blazor.web.js"]"></script>
21+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
22+
</body>
23+
24+
</html>

ChatUI/BlazorWebApp/BlazorWebApp.Client/Layout/MainLayout.razor renamed to 3Dchart/NET10/3Dchart_ServerApp/Components/Layout/MainLayout.razor

File renamed without changes.

ChatUI/BlazorWebApp/BlazorWebApp.Client/Layout/MainLayout.razor.css renamed to 3Dchart/NET10/3Dchart_ServerApp/Components/Layout/MainLayout.razor.css

File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<div class="top-row ps-3 navbar navbar-dark">
2+
<div class="container-fluid">
3+
<a class="navbar-brand" href="">3Dchart_ServerApp</a>
4+
</div>
5+
</div>
6+
7+
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
8+
9+
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
10+
<nav class="nav flex-column">
11+
<div class="nav-item px-3">
12+
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
13+
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
14+
</NavLink>
15+
</div>
16+
17+
<div class="nav-item px-3">
18+
<NavLink class="nav-link" href="counter">
19+
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
20+
</NavLink>
21+
</div>
22+
23+
<div class="nav-item px-3">
24+
<NavLink class="nav-link" href="weather">
25+
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
26+
</NavLink>
27+
</div>
28+
</nav>
29+
</div>
30+

ChatUI/BlazorWebApp/BlazorWebApp.Client/Layout/NavMenu.razor.css renamed to 3Dchart/NET10/3Dchart_ServerApp/Components/Layout/NavMenu.razor.css

File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script type="module" src="@Assets["Components/Layout/ReconnectModal.razor.js"]"></script>
2+
3+
<dialog id="components-reconnect-modal" data-nosnippet>
4+
<div class="components-reconnect-container">
5+
<div class="components-rejoining-animation" aria-hidden="true">
6+
<div></div>
7+
<div></div>
8+
</div>
9+
<p class="components-reconnect-first-attempt-visible">
10+
Rejoining the server...
11+
</p>
12+
<p class="components-reconnect-repeated-attempt-visible">
13+
Rejoin failed... trying again in <span id="components-seconds-to-next-attempt"></span> seconds.
14+
</p>
15+
<p class="components-reconnect-failed-visible">
16+
Failed to rejoin.<br />Please retry or reload the page.
17+
</p>
18+
<button id="components-reconnect-button" class="components-reconnect-failed-visible">
19+
Retry
20+
</button>
21+
<p class="components-pause-visible">
22+
The session has been paused by the server.
23+
</p>
24+
<button id="components-resume-button" class="components-pause-visible">
25+
Resume
26+
</button>
27+
<p class="components-resume-failed-visible">
28+
Failed to resume the session.<br />Please reload the page.
29+
</p>
30+
</div>
31+
</dialog>
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
.components-reconnect-first-attempt-visible,
2+
.components-reconnect-repeated-attempt-visible,
3+
.components-reconnect-failed-visible,
4+
.components-pause-visible,
5+
.components-resume-failed-visible,
6+
.components-rejoining-animation {
7+
display: none;
8+
}
9+
10+
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
11+
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
12+
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
13+
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
14+
#components-reconnect-modal.components-reconnect-retrying,
15+
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
16+
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
17+
#components-reconnect-modal.components-reconnect-failed,
18+
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
19+
display: block;
20+
}
21+
22+
23+
#components-reconnect-modal {
24+
background-color: white;
25+
width: 20rem;
26+
margin: 20vh auto;
27+
padding: 2rem;
28+
border: 0;
29+
border-radius: 0.5rem;
30+
box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
31+
opacity: 0;
32+
transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
33+
animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
34+
&[open]
35+
36+
{
37+
animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
38+
animation-fill-mode: both;
39+
}
40+
41+
}
42+
43+
#components-reconnect-modal::backdrop {
44+
background-color: rgba(0, 0, 0, 0.4);
45+
animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
46+
opacity: 1;
47+
}
48+
49+
@keyframes components-reconnect-modal-slideUp {
50+
0% {
51+
transform: translateY(30px) scale(0.95);
52+
}
53+
54+
100% {
55+
transform: translateY(0);
56+
}
57+
}
58+
59+
@keyframes components-reconnect-modal-fadeInOpacity {
60+
0% {
61+
opacity: 0;
62+
}
63+
64+
100% {
65+
opacity: 1;
66+
}
67+
}
68+
69+
@keyframes components-reconnect-modal-fadeOutOpacity {
70+
0% {
71+
opacity: 1;
72+
}
73+
74+
100% {
75+
opacity: 0;
76+
}
77+
}
78+
79+
.components-reconnect-container {
80+
display: flex;
81+
flex-direction: column;
82+
align-items: center;
83+
gap: 1rem;
84+
}
85+
86+
#components-reconnect-modal p {
87+
margin: 0;
88+
text-align: center;
89+
}
90+
91+
#components-reconnect-modal button {
92+
border: 0;
93+
background-color: #6b9ed2;
94+
color: white;
95+
padding: 4px 24px;
96+
border-radius: 4px;
97+
}
98+
99+
#components-reconnect-modal button:hover {
100+
background-color: #3b6ea2;
101+
}
102+
103+
#components-reconnect-modal button:active {
104+
background-color: #6b9ed2;
105+
}
106+
107+
.components-rejoining-animation {
108+
position: relative;
109+
width: 80px;
110+
height: 80px;
111+
}
112+
113+
.components-rejoining-animation div {
114+
position: absolute;
115+
border: 3px solid #0087ff;
116+
opacity: 1;
117+
border-radius: 50%;
118+
animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
119+
}
120+
121+
.components-rejoining-animation div:nth-child(2) {
122+
animation-delay: -0.5s;
123+
}
124+
125+
@keyframes components-rejoining-animation {
126+
0% {
127+
top: 40px;
128+
left: 40px;
129+
width: 0;
130+
height: 0;
131+
opacity: 0;
132+
}
133+
134+
4.9% {
135+
top: 40px;
136+
left: 40px;
137+
width: 0;
138+
height: 0;
139+
opacity: 0;
140+
}
141+
142+
5% {
143+
top: 40px;
144+
left: 40px;
145+
width: 0;
146+
height: 0;
147+
opacity: 1;
148+
}
149+
150+
100% {
151+
top: 0px;
152+
left: 0px;
153+
width: 80px;
154+
height: 80px;
155+
opacity: 0;
156+
}
157+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Set up event handlers
2+
const reconnectModal = document.getElementById("components-reconnect-modal");
3+
reconnectModal.addEventListener("components-reconnect-state-changed", handleReconnectStateChanged);
4+
5+
const retryButton = document.getElementById("components-reconnect-button");
6+
retryButton.addEventListener("click", retry);
7+
8+
const resumeButton = document.getElementById("components-resume-button");
9+
resumeButton.addEventListener("click", resume);
10+
11+
function handleReconnectStateChanged(event) {
12+
if (event.detail.state === "show") {
13+
reconnectModal.showModal();
14+
} else if (event.detail.state === "hide") {
15+
reconnectModal.close();
16+
} else if (event.detail.state === "failed") {
17+
document.addEventListener("visibilitychange", retryWhenDocumentBecomesVisible);
18+
} else if (event.detail.state === "rejected") {
19+
location.reload();
20+
}
21+
}
22+
23+
async function retry() {
24+
document.removeEventListener("visibilitychange", retryWhenDocumentBecomesVisible);
25+
26+
try {
27+
// Reconnect will asynchronously return:
28+
// - true to mean success
29+
// - false to mean we reached the server, but it rejected the connection (e.g., unknown circuit ID)
30+
// - exception to mean we didn't reach the server (this can be sync or async)
31+
const successful = await Blazor.reconnect();
32+
if (!successful) {
33+
// We have been able to reach the server, but the circuit is no longer available.
34+
// We'll reload the page so the user can continue using the app as quickly as possible.
35+
const resumeSuccessful = await Blazor.resumeCircuit();
36+
if (!resumeSuccessful) {
37+
location.reload();
38+
} else {
39+
reconnectModal.close();
40+
}
41+
}
42+
} catch (err) {
43+
// We got an exception, server is currently unavailable
44+
document.addEventListener("visibilitychange", retryWhenDocumentBecomesVisible);
45+
}
46+
}
47+
48+
async function resume() {
49+
try {
50+
const successful = await Blazor.resumeCircuit();
51+
if (!successful) {
52+
location.reload();
53+
}
54+
} catch {
55+
location.reload();
56+
}
57+
}
58+
59+
async function retryWhenDocumentBecomesVisible() {
60+
if (document.visibilityState === "visible") {
61+
await retry();
62+
}
63+
}

0 commit comments

Comments
 (0)