diff --git a/documentation/package-lock.json b/documentation/package-lock.json index 7fa63c9958..0122d86f20 100644 --- a/documentation/package-lock.json +++ b/documentation/package-lock.json @@ -18,7 +18,7 @@ "react-dom": "^18.0.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.5.2", + "@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/tsconfig": "3.5.2", "@docusaurus/types": "3.0.0", "typescript": "~5.5.4" @@ -8237,10 +8237,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", - "license": "MIT", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", diff --git a/history.md b/history.md index d1468b00a0..874aec2539 100644 --- a/history.md +++ b/history.md @@ -42,7 +42,8 @@ Semantic Versioning 2.0.0 is from version 0.1.6+ ## List of versions ## version 0.6.3 - _(Unreleased)_ - 2024-08-?? {#v0.6.3} -- nothing + +- [x] (Fixed) _Front-end_ OkAndSame status in Upload Modal gives the wrong status (PR #1783) ## version 0.6.2 - 2024-10-11 {#v0.6.2} diff --git a/starsky/build/_build.csproj b/starsky/build/_build.csproj index 83439605d4..7e8a122ac2 100644 --- a/starsky/build/_build.csproj +++ b/starsky/build/_build.csproj @@ -16,7 +16,7 @@ - + diff --git a/starsky/nuget-packages-list.json b/starsky/nuget-packages-list.json index 881d10e665..c339b4fc22 100644 --- a/starsky/nuget-packages-list.json +++ b/starsky/nuget-packages-list.json @@ -1,7 +1,7 @@ [ "Microsoft.AspNetCore.Mvc.NewtonsoftJson 8.0.10", "Microsoft.Extensions.Hosting.WindowsServices 8.0.1", - "Swashbuckle.AspNetCore 6.8.1", + "Swashbuckle.AspNetCore 6.9.0", "Microsoft.Extensions.Caching.Abstractions 8.0.0", "Microsoft.Extensions.Caching.Memory 8.0.1", "Microsoft.Extensions.Hosting.Abstractions 8.0.1", diff --git a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx index ae7d008749..7bd31401f6 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx @@ -45,6 +45,39 @@ describe("ItemTextListView", () => { ); }); + const statusCorrectlyTheoryData = [ + { status: IExifStatus.OkAndSame, shouldShowError: false }, + { status: IExifStatus.ServerError, shouldShowError: true }, + { status: IExifStatus.NotFoundSourceMissing, shouldShowError: true }, + { status: IExifStatus.Ok, shouldShowError: false }, + { status: IExifStatus.ReadOnly, shouldShowError: true } + ]; + + test.each(statusCorrectlyTheoryData)( + "error-status should render %s", + ({ status, shouldShowError }) => { + const fileIndexItems = [ + { + filePath: "/test/image.jpg", + fileName: "image.jpg", + status: status, + isDirectory: false + } + ] as IFileIndexItem[]; + const list = render( {}} />); + + const item = screen.queryByTestId("image.jpg-error-status"); + + if (shouldShowError) { + expect(item).toBeTruthy(); + } else { + expect(item).toBeFalsy(); + } + + list.unmount(); + } + ); + it("list of 1 directory item", () => { const fileIndexItems = [ { diff --git a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx index 284244633e..e0b688d727 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx @@ -1,9 +1,9 @@ +import { FunctionComponent } from "react"; import useGlobalSettings from "../../../hooks/use-global-settings"; import { IExifStatus } from "../../../interfaces/IExifStatus"; import { IFileIndexItem } from "../../../interfaces/IFileIndexItem"; import localization from "../../../localization/localization.json"; import { Language } from "../../../shared/language"; -import { FunctionComponent } from "react"; import { GetBoxClassName } from "./internal/get-box-class-name.ts"; interface ItemListProps { @@ -51,8 +51,12 @@ const ItemTextListView: FunctionComponent = (props) => { ) : null} {!item.isDirectory ? item.fileName : null} - {item.status !== IExifStatus.Ok && item.status !== IExifStatus.Default ? ( - {item.status} + {item.status !== IExifStatus.Ok && + item.status !== IExifStatus.Default && + item.status !== IExifStatus.OkAndSame ? ( + + {item.status} + ) : null} ))} diff --git a/starsky/starsky/starsky.csproj b/starsky/starsky/starsky.csproj index 3b3094bbc4..706b96829c 100644 --- a/starsky/starsky/starsky.csproj +++ b/starsky/starsky/starsky.csproj @@ -61,7 +61,7 @@ - +