debug icon issue

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-10-24 11:04:06 +02:00
parent 6e027a786c
commit 7a1fd53676
+13 -15
View File
@@ -392,24 +392,22 @@ async function parseRemotes(remotes: string[]) {
let iconPath = await resolveResource('icons/favicon/icon.png')
if (['windows', 'macos'].includes(platform())) {
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)
try {
if (remoteInfo?.provider && !remoteInfo.type) {
console.log('[parseRemotes] resolving provider icon', remoteInfo.provider)
iconPath = await resolveResource(`icons/small/providers/${remoteInfo.provider}.png`)
} else if (remoteInfo?.type) {
console.log('[parseRemotes] resolving backend icon', 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)
}
console.log('[parseRemotes] iconPath', iconPath)
parsedRemotes[remote] = {
icon: iconPath,
items: submenuItems,