fix icon paths

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-09-24 15:56:43 +02:00
parent 1df4213ef8
commit b6f8d377c1
+15 -3
View File
@@ -373,10 +373,22 @@ async function parseRemotes(remotes: string[]) {
submenuItems.push(stopServeMenuItem)
}
let iconPath = await resolveResource('icons/favicon/icon.png')
try {
if (remoteInfo?.provider) {
iconPath = await resolveResource(`icons/small/providers/${remoteInfo.provider}.png`)
} else if (remoteInfo?.type) {
iconPath = await resolveResource(`icons/small/backends/${remoteInfo?.type}.png`)
}
} catch (error) {
Sentry.captureException(new Error(`Error resolving icon path for ${remote}: ${error}`))
Sentry.captureException(error)
console.error('Error resolving icon path for', remote, error)
}
parsedRemotes[remote] = {
icon: remoteInfo?.provider
? await resolveResource(`icons/small/providers/${remoteInfo.provider}.png`)
: await resolveResource(`icons/small/backends/${remoteInfo?.type}.png`),
icon: iconPath,
items: submenuItems,
}
}