feat(settings): render title and menu image in notification

This commit is contained in:
2025-11-25 18:13:52 +01:00
parent 9f1e2015c6
commit 2e06600293
8 changed files with 128 additions and 53 deletions

View File

@@ -10,10 +10,10 @@ import USER_NAME_IMAGE from "/assets/images/settings/top-screen/user/user-name.w
const props = defineProps<{
x: number;
y: number;
isOpen: boolean;
isAnyOtherMenuOpen: boolean;
}>();
const settingsStore = useSettingsStore();
const [
menuImage,
menuActiveImage,
@@ -32,12 +32,17 @@ const [
USER_NAME_IMAGE,
);
const animation = useMenuAnimation(toRef(() => props.isOpen));
const isOpen = computed(() => settingsStore.isMenuOpen("user"));
const isAnyOtherMenuOpen = computed(() =>
settingsStore.isAnyOtherMenuOpen("user"),
);
const animation = useMenuAnimation(isOpen);
useRender((ctx) => {
ctx.translate(props.x, props.y);
if (props.isOpen || animation.playing) {
if (isOpen.value || animation.playing) {
ctx.drawImage(
birthdayImage!,
-48 + animation.stage2Offset,
@@ -56,7 +61,7 @@ useRender((ctx) => {
);
ctx.drawImage(menuActiveImage!, 0, 0);
} else if (props.isAnyOtherMenuOpen) {
} else if (isAnyOtherMenuOpen.value) {
ctx.drawImage(menuDisabledImage!, 0, 0);
} else {
ctx.drawImage(menuImage!, 0, 0);