diff --git a/packages/extension/src/ui/action/App.vue b/packages/extension/src/ui/action/App.vue index 525f51bb..1d1e6212 100644 --- a/packages/extension/src/ui/action/App.vue +++ b/packages/extension/src/ui/action/App.vue @@ -297,7 +297,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 a185fc0c..ae7b647a 100644 --- a/packages/extension/src/ui/action/components/app-menu/index.vue +++ b/packages/extension/src/ui/action/components/app-menu/index.vue @@ -24,6 +24,7 @@ :new-network-tags="newNetworksWithTags" @click="setNetwork(element)" @update:pin-network="updatePinNetwork" + @update:gradient="emit('update:gradient', $event)" :class="{ 'do-not-drag': !getCanDrag(element), }" @@ -91,6 +92,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; }>(); const newNetworksWithTags = ref<{ networks: string[]; swap: string[] }>({ networks: [],