diff --git a/frontend/src/components/VLicense/VLicense.vue b/frontend/src/components/VLicense/VLicense.vue index 7c0327aa67d..8b3d4d27c30 100644 --- a/frontend/src/components/VLicense/VLicense.vue +++ b/frontend/src/components/VLicense/VLicense.vue @@ -7,10 +7,10 @@ import { useI18n } from "#imports" import { computed } from "vue" -import { useDarkMode } from "~/composables/use-dark-mode" +import { useIconNames } from "~/composables/use-icon-names" import type { License } from "~/constants/license" -import { getFullLicenseName, getElements } from "~/utils/license" +import { getFullLicenseName } from "~/utils/license" import { camelCase } from "~/utils/case" import VIcon from "~/components/VIcon/VIcon.vue" @@ -37,11 +37,13 @@ const props = withDefaults( } ) -const { effectiveColorMode } = useDarkMode() - const { t } = useI18n({ useScope: "global" }) -const iconNames = computed(() => getElements(props.license)) +const { iconNames } = useIconNames({ + license: props.license, + filterOutCc: false, +}) + const licenseName = computed(() => { const licenseKey = props.license === "sampling+" ? props.license : camelCase(props.license) @@ -60,7 +62,7 @@ const licenseName = computed(() => { :key="name" :class="{ 'license-bg text-black': bgFilled }" view-box="0 0 30 30" - :name="`licenses/${name}-${effectiveColorMode}`" + :name="name" :size="4" /> diff --git a/frontend/src/components/VLicense/VLicenseElements.vue b/frontend/src/components/VLicense/VLicenseElements.vue index a290454fb19..79a1be175c2 100644 --- a/frontend/src/components/VLicense/VLicenseElements.vue +++ b/frontend/src/components/VLicense/VLicenseElements.vue @@ -4,7 +4,7 @@ import { useI18n } from "#imports" import { computed } from "vue" import type { License } from "~/constants/license" -import { useDarkMode } from "~/composables/use-dark-mode" +import { useIconNames } from "~/composables/use-icon-names" import { useUiStore } from "~/stores/ui" import { camelCase } from "~/utils/case" import { getElements } from "~/utils/license" @@ -28,13 +28,16 @@ const props = withDefaults( } ) -const { effectiveColorMode } = useDarkMode() - const i18n = useI18n({ useScope: "global" }) const elementNames = computed(() => getElements(props.license).filter((icon) => icon !== "cc") ) +const { iconNames } = useIconNames({ + license: props.license, + filterOutCc: true, +}) + const isSmall = computed(() => props.size === "small") const uiStore = useUiStore() const isMobile = computed(() => !uiStore.isDesktopLayout) @@ -47,14 +50,14 @@ const getLicenseDescription = (element: string) => {