diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index bb64d2f35..e80a293c6 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -77,7 +77,7 @@ const pinnedModulesRef = ref(); :worker-id="user.id" :title="user.name" size="lg" - :color="false" + color="transparent" /> {{ t('globals.userPanel') }} diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index a0ba6bb8e..690739d75 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -157,7 +157,7 @@ const isEmployee = computed(() => useRole().isEmployee()); :worker-id="user.id" :title="user.name" size="80px" - :color="false" + color="transparent" />
{{ user.nickname }} diff --git a/src/components/ui/CatalogItem.vue b/src/components/ui/CatalogItem.vue index 5c5d71018..ef722483b 100644 --- a/src/components/ui/CatalogItem.vue +++ b/src/components/ui/CatalogItem.vue @@ -31,7 +31,7 @@ const dialog = ref(null);
- +
-import { computed, ref } from 'vue'; +import { computed, ref, watch } from 'vue'; import { useI18n } from 'vue-i18n'; import { useSession } from 'src/composables/useSession'; import { useColor } from 'src/composables/useColor'; @@ -7,39 +7,39 @@ import { useColor } from 'src/composables/useColor'; const $props = defineProps({ workerId: { type: Number, required: true }, description: { type: String, default: null }, - size: { type: String, default: null }, - title: { type: String, default: null }, - color: { type: Boolean, default: true }, + title: { type: [String, Boolean], default: null }, + color: { type: String, default: null }, }); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); const { t } = useI18n(); - -const title = computed(() => $props.title ?? t('globals.system')); +const src = computed( + () => `/api/Images/user/160x160/${$props.workerId}/download?access_token=${token}` +); +const title = computed(() => + $props.title !== false ? $props.title || t('globals.system') : false +); const showLetter = ref(false); + +watch(src, () => (showLetter.value = false));