Skip to content

Commit 8a16133

Browse files
committed
renamed project to BlazorApp and fix input reset
1 parent 37a949c commit 8a16133

24 files changed

+89
-83
lines changed

.vs/VSWorkspaceState.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ExpandedNodes": [
3+
""
4+
],
5+
"SelectedNode": "\\hello-world-blazor.sln",
6+
"PreviewInSolutionExplorer": false
7+
}

.vs/slnx.sqlite

88 KB
Binary file not shown.

hello-world/blazor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ In `Pages\DecodeVideo.razor`, we will modify the component to enable barcode dec
5656
<button @onclick="ToggleVideoTask" style="margin-bottom: 1rem">@videoDecodeBtn</button>
5757
<div id="camera-view-container" style="width: 100%; height: 50vh; display: none"></div>
5858
<h3>Results:</h3>
59-
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap"></div>
59+
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap; border: 1px solid black;"></div>
6060
6161
6262
@code {
@@ -193,7 +193,7 @@ In `Pages\DecodeImage.razor`, we will modify the component to enable barcode dec
193193
<h1>Decode Image</h1>
194194
<InputFile id="inputElement" style="margin-bottom: 1rem" OnChange="DecodeImageTask" accept="image/*" multiple />
195195
<h3 style="margin-bottom: 1rem">Results:</h3>
196-
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap"></div>
196+
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap; border: 1px solid black;"></div>
197197
198198
@code {
199199
// reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
@@ -232,7 +232,6 @@ window.startImageDecode = async () => {
232232
resultsContainer.innerText = ""; // Reset results container
233233
234234
const { files } = inputElement;
235-
inputElement.value = '';
236235
237236
try {
238237
for (let file of files) {
@@ -256,6 +255,7 @@ window.startImageDecode = async () => {
256255
console.error(errMsg);
257256
alert(errMsg);
258257
} finally {
258+
inputElement.value = "";
259259
await cvRouter?.dispose();
260260
}
261261
};

hello-world/blazor/hello-world-blazor/BlazorApp1/App.razor renamed to hello-world/blazor/hello-world-blazor/BlazorApp/App.razor

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/BlazorApp1.csproj renamed to hello-world/blazor/hello-world-blazor/BlazorApp/BlazorApp.csproj

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/Layout/MainLayout.razor renamed to hello-world/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/Layout/MainLayout.razor.css renamed to hello-world/blazor/hello-world-blazor/BlazorApp/Layout/MainLayout.razor.css

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/Layout/NavMenu.razor renamed to hello-world/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/Layout/NavMenu.razor.css renamed to hello-world/blazor/hello-world-blazor/BlazorApp/Layout/NavMenu.razor.css

File renamed without changes.

hello-world/blazor/hello-world-blazor/BlazorApp1/Pages/DecodeImage.razor renamed to hello-world/blazor/hello-world-blazor/BlazorApp/Pages/DecodeImage.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<h1>Decode Image</h1>
77
<InputFile id="inputElement" style="margin-bottom: 1rem" OnChange="DecodeImageTask" accept="image/*" multiple />
88
<h3 style="margin-bottom: 1rem">Results:</h3>
9-
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap"></div>
9+
<div id="results" style="width: 100%; height: 30vh; overflow: auto; white-space: pre-wrap; border: 1px solid black;">
10+
</div>
1011

1112
@code {
12-
// reference: https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
13+
// reference:
14+
https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet?view=aspnetcore-8.0#invoke-js-functions
1315
1416
private async Task DecodeImageTask()
1517
{

0 commit comments

Comments
 (0)