Skip to content

Commit

Permalink
chore: update openReleaseNotes
Browse files Browse the repository at this point in the history
Signed-off-by: Sonia Sandler <[email protected]>
  • Loading branch information
SoniaSandler committed Oct 3, 2024
1 parent 50998cf commit f2e9d93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/renderer/src/lib/dashboard/ReleaseNotesBox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ReleaseNotesBox from './ReleaseNotesBox.svelte';

const podmanDesktopUpdateAvailableMock = vi.fn();
const getPodmanDesktopVersionMock = vi.fn();
const podmanDesktopOpenReleaseNotesMock = vi.fn();
const openExternalMock = vi.fn();
const updatePodmanDesktopMock = vi.fn();
const updateConfigurationValueMock = vi.fn();
const getConfigurationValueMock = vi.fn();
Expand All @@ -38,7 +38,7 @@ beforeEach(() => {
vi.resetAllMocks();
(window as any).podmanDesktopUpdateAvailable = podmanDesktopUpdateAvailableMock.mockResolvedValue(false);
(window as any).getPodmanDesktopVersion = getPodmanDesktopVersionMock.mockResolvedValue('1.1.0');
(window as any).podmanDesktopOpenReleaseNotes = podmanDesktopOpenReleaseNotesMock;
(window as any).openExternal = openExternalMock;
(window as any).podmanDesktopGetReleaseNotes = podmanDesktopGetReleaseNotesMock.mockResolvedValue({
releaseNotesAvailable: true,
notesURL: `appHomepage/blog/podman-desktop-release-1.1`,
Expand Down
4 changes: 2 additions & 2 deletions packages/renderer/src/lib/dashboard/ReleaseNotesBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const receiveShowReleaseNotes = window.events?.receive('show-release-notes', ()
showBanner = true;
});
function openReleaseNotes() {
window.podmanDesktopOpenReleaseNotes('current');
window.openExternal(notesURL);
}
function updatePodmanDesktop() {
window.updatePodmanDesktop();
Expand Down Expand Up @@ -88,7 +88,7 @@ onDestroy(async () => {
<p class="text-[var(--pd-content-card-header-text)] font-bold text-lg w-full items-center">
Release notes are currently unavailable, please check again later
{#if notesURL}
or try this <a href={notesURL} class="text-[var(--pd-link)]">link</a>
or try this <Link on:click={openReleaseNotes}>link</Link>
{/if}
</p>
<CloseButton on:click={onClose} />
Expand Down

0 comments on commit f2e9d93

Please sign in to comment.