diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index d129ee580..1792c1338 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 975b51882..5df597f94 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; }>(); /** ------------------