From 81a7674bba3eb40e6927034397710673ef45f577 Mon Sep 17 00:00:00 2001 From: olgakup <16910687+olgakup@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:28:55 -0800 Subject: [PATCH] devop: put back the gradient update --- packages/extension/src/ui/action/App.vue | 4 +++- .../extension/src/ui/action/components/app-menu/index.vue | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index d129ee58..1792c133 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -295,7 +295,9 @@ onMounted(async () => { openOnboard(); } }); -//TODO: WHAT IS THIS? +/** + * Update the gradient of the app menu on the active network change + */ const updateGradient = (newGradient: string) => { //hack may be there is a better way. less.modifyVars doesnt work if (appMenuRef.value) diff --git a/packages/extension/src/ui/action/components/app-menu/index.vue b/packages/extension/src/ui/action/components/app-menu/index.vue index 975b5188..5df597f9 100644 --- a/packages/extension/src/ui/action/components/app-menu/index.vue +++ b/packages/extension/src/ui/action/components/app-menu/index.vue @@ -23,6 +23,7 @@ :can-drag="getCanDrag(element)" @click="emit('update:network', element)" @update:pin-network="updatePinNetwork" + @update:gradient="emit('update:gradient', $event)" :class="{ 'do-not-drag': !getCanDrag(element), }" @@ -93,6 +94,7 @@ const emit = defineEmits<{ (e: 'update:network', network: BaseNetwork): void; (e: 'update:order', networks: BaseNetwork[]): void; (e: 'update:pinNetwork', network: string, isPinned: boolean): void; + (e: 'update:gradient', data: string): void; }>(); /** ------------------