Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions application/src/frontend/views/LibraryView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
);
}

function hasVisibleAppUpdate(app: LibraryInfo): boolean {
const update = updatesManager.getAppUpdate(app.appID);
if (!update?.updateAvailable || !update.updateVersion) return false;
return !updatesManager.isAppUpdateDismissed(
app.appID,
update.updateVersion
);
}

async function openPlayPage(app: LibraryInfo) {
const freshLibraryInfo = await window.electronAPI.app.getLibraryInfo(
app.appID
Expand Down Expand Up @@ -192,11 +201,11 @@
style={getLibraryEntryDelay(index)}
onclick={() => void openPlayPage(app)}
>
{#if updatesManager.getAppUpdate(app.appID)?.updateAvailable || needsUmuMigration(app)}
{#if hasVisibleAppUpdate(app) || needsUmuMigration(app)}
<div
class="absolute top-2 right-2 z-2 flex flex-col items-end gap-1"
>
{#if updatesManager.getAppUpdate(app.appID)?.updateAvailable}
{#if hasVisibleAppUpdate(app)}
<div
class="shadow-md h-6 flex items-center bg-yellow-500 rounded-lg flex-row justify-end gap-1 px-2"
>
Expand Down Expand Up @@ -334,11 +343,11 @@
)}
onclick={() => void openPlayPage(app)}
>
{#if updatesManager.getAppUpdate(app.appID)?.updateAvailable || needsUmuMigration(app)}
{#if hasVisibleAppUpdate(app) || needsUmuMigration(app)}
<div
class="absolute top-2 right-2 z-2 flex flex-col items-end gap-1"
>
{#if updatesManager.getAppUpdate(app.appID)?.updateAvailable}
{#if hasVisibleAppUpdate(app)}
<div
class="shadow-md h-6 flex items-center bg-yellow-500 rounded-lg flex-row justify-end gap-1 px-2"
>
Expand Down
Loading