diff --git a/assets/locales/en/genericComponents.json b/assets/locales/en/genericComponents.json index d3822b7b0..979b51bc5 100644 --- a/assets/locales/en/genericComponents.json +++ b/assets/locales/en/genericComponents.json @@ -101,6 +101,8 @@ "InstallUpdate": "Install Update", "Skip": "Skip", "ViewReleaseNotes": "View release notes", + "ViewNamedReleaseNotes": "View {{name}} release notes", + "ViewDetailedChanges": "View detailed changes...", "InitialSyncInProgress": "Initial sync in progress...", "NodeSettings": "Node Settings...", "RemoveNode": "Remove Node...", diff --git a/src/common/nodeSpec.ts b/src/common/nodeSpec.ts index 7e71780bd..65390df43 100644 --- a/src/common/nodeSpec.ts +++ b/src/common/nodeSpec.ts @@ -105,7 +105,7 @@ export type NodeSpecification = { // (ex. peers, syncing, latest block num, etc.) iconUrl?: string; category?: string; - documentation?: { default?: string; docker?: string; binary?: string }; + documentation?: { default?: string; docker?: string; binary?: string, releaseNotesUrl?: string }; resources?: LabelValuesSectionItemsProps[]; }; @@ -141,7 +141,7 @@ export type NodePackageSpecification = { // (ex. peers, syncing, latest block num, etc.) iconUrl?: string; category?: string; - documentation?: { default?: string; docker?: string; binary?: string }; + documentation?: { default?: string; docker?: string; binary?: string; releaseNotesUrl?: string }; addNodeDescription?: string; description?: string; resources?: LabelValuesSectionItemsProps[]; diff --git a/src/main/nodeLibraryManager.ts b/src/main/nodeLibraryManager.ts index 9549165f9..a75d0e0af 100644 --- a/src/main/nodeLibraryManager.ts +++ b/src/main/nodeLibraryManager.ts @@ -57,11 +57,11 @@ export const initialize = async () => { // todo: use user defined url if available const getCartridgePackages = async (): Promise => { - // const cartridgePackagesApiURL = 'http://localhost:3000/api/cartridgePackage' - // const isHttp = true; - const cartridgePackagesApiURL = - 'https://api.nicenode.xyz/api/cartridgePackage'; - const isHttp = false; + const cartridgePackagesApiURL = 'http://localhost:3000/api/cartridgePackage' + const isHttp = true; + // const cartridgePackagesApiURL = + // 'https://api.nicenode.xyz/api/cartridgePackage'; + // const isHttp = false; const cartridgePackages: NodeSpecification[] = ( await httpGetJson(cartridgePackagesApiURL, isHttp) ).data; @@ -76,10 +76,10 @@ const getCartridgePackages = async (): Promise => { }; const getCartridges = async (): Promise => { - // const cartridgesApiURL = 'http://localhost:3000/api/cartridge' - // const isHttp = true; - const cartridgesApiURL = 'https://api.nicenode.xyz/api/cartridge'; - const isHttp = false; + const cartridgesApiURL = 'http://localhost:3000/api/cartridge' + const isHttp = true; + // const cartridgesApiURL = 'https://api.nicenode.xyz/api/cartridge'; + // const isHttp = false; const cartridges: NodeSpecification[] = ( await httpGetJson(cartridgesApiURL, isHttp) ).data; diff --git a/src/renderer/Generics/redesign/Header/Header.tsx b/src/renderer/Generics/redesign/Header/Header.tsx index 932e06fc0..814feac33 100644 --- a/src/renderer/Generics/redesign/Header/Header.tsx +++ b/src/renderer/Generics/redesign/Header/Header.tsx @@ -41,6 +41,7 @@ export const Header = ({ nodeOverview, isPodmanRunning }: HeaderProps) => { status, version, onAction, + documentation, } = nodeOverview; const [isCalloutDisplayed, setIsCalloutDisplayed] = useState(false); @@ -128,6 +129,13 @@ export const Header = ({ nodeOverview, isPodmanRunning }: HeaderProps) => { // biome-ignore lint/a11y/noNoninteractiveTabindex:
{ + console.log('show change modal'); + }} onClick={() => { setIsCalloutDisplayed(false); console.log('clicked!'); diff --git a/src/renderer/Generics/redesign/UpdateCallout/UpdateCallout.tsx b/src/renderer/Generics/redesign/UpdateCallout/UpdateCallout.tsx index 11b79c058..ba6fe2093 100644 --- a/src/renderer/Generics/redesign/UpdateCallout/UpdateCallout.tsx +++ b/src/renderer/Generics/redesign/UpdateCallout/UpdateCallout.tsx @@ -9,31 +9,53 @@ import { import Button from '../Button/Button'; import ExternalLink from '../Link/ExternalLink'; +import InternalLink from '../Link/InternalLink.js'; export interface UpdateCalloutProps { onClick: () => void; + serviceName: string; + releaseNotesUrl?: string; + onClickShowChanges?: () => void; } -export const UpdateCallout = ({ onClick }: UpdateCalloutProps) => { +export const UpdateCallout = ({ + onClick, + serviceName, + releaseNotesUrl, + onClickShowChanges, +}: UpdateCalloutProps) => { const { t: g } = useTranslation('genericComponents'); const onInstallClick = () => { onClick(); console.log('install action!'); }; + console.log('UpdateCallout releaseNotesUrl', releaseNotesUrl); return (
-
{g('UpdateClientDescription')}
+
{g('UpdateClient')}
{g('UpdateClientDescription', { - client: 'test', + client: serviceName, })}
-
- -
+ {releaseNotesUrl && ( +
+ +
+ )} + {onClickShowChanges && ( +
+ +
+ )}