diff options
Diffstat (limited to 'apps/settings/src/composables/useAppIcon.ts')
-rw-r--r-- | apps/settings/src/composables/useAppIcon.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/settings/src/composables/useAppIcon.ts b/apps/settings/src/composables/useAppIcon.ts index 76efea267a8..b5e211aa1bc 100644 --- a/apps/settings/src/composables/useAppIcon.ts +++ b/apps/settings/src/composables/useAppIcon.ts @@ -5,7 +5,7 @@ import type { Ref } from 'vue' import type { IAppstoreApp } from '../app-types.ts' -import { mdiCog } from '@mdi/js' +import { mdiCog, mdiCogOutline } from '@mdi/js' import { computed, ref, watchEffect } from 'vue' import AppstoreCategoryIcons from '../constants/AppstoreCategoryIcons.ts' import logger from '../logger.ts' @@ -23,11 +23,17 @@ export function useAppIcon(app: Ref<IAppstoreApp>) { * Fallback value if no app icon available */ const categoryIcon = computed(() => { - const path = [app.value?.category ?? []].flat() - .map((name) => AppstoreCategoryIcons[name]) - .filter((icon) => !!icon) - .at(0) - ?? mdiCog + let path: string + if (app.value?.app_api) { + // Use different default icon for ExApps (AppAPI) + path = mdiCogOutline + } else { + path = [app.value?.category ?? []].flat() + .map((name) => AppstoreCategoryIcons[name]) + .filter((icon) => !!icon) + .at(0) + ?? (!app.value?.app_api ? mdiCog : mdiCogOutline) + } return path ? `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="${path}" /></svg>` : null }) |