mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 15:24:09 +00:00
Update minimap and graph canvas menu (bottom right) to use menu tokens. Change canvas BG color on default dark theme. <img width="3840" height="2029" alt="image" src="https://github.com/user-attachments/assets/6d168981-df27-40c0-829c-59150b8a6a12" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6589-wip-Style-graph-canvas-color-2a26d73d365081cb88c4c4bdb2b6d3a5) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org>
28 lines
698 B
Vue
28 lines
698 B
Vue
<template>
|
|
<Avatar
|
|
class="bg-interface-panel-selected-surface"
|
|
:image="photoUrl ?? undefined"
|
|
:icon="hasAvatar ? undefined : 'icon-[lucide--user]'"
|
|
:pt:icon:class="{ 'size-4': !hasAvatar }"
|
|
shape="circle"
|
|
:aria-label="ariaLabel ?? $t('auth.login.userAvatar')"
|
|
@error="handleImageError"
|
|
/>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Avatar from 'primevue/avatar'
|
|
import { computed, ref } from 'vue'
|
|
|
|
const { photoUrl, ariaLabel } = defineProps<{
|
|
photoUrl?: string | null
|
|
ariaLabel?: string
|
|
}>()
|
|
|
|
const imageError = ref(false)
|
|
const handleImageError = () => {
|
|
imageError.value = true
|
|
}
|
|
const hasAvatar = computed(() => photoUrl && !imageError.value)
|
|
</script>
|