From 5094953eb2d3cf977b699f96c8944f6479d77c4d Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Tue, 1 Oct 2024 11:37:05 +0200 Subject: [PATCH] Unify handling of top and bottom sidebar icons --- src/SideBar.svelte | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/SideBar.svelte b/src/SideBar.svelte index 5f97418..e0d562a 100644 --- a/src/SideBar.svelte +++ b/src/SideBar.svelte @@ -5,7 +5,10 @@ { icon: 'fas fa-info-circle', info: 'Information' }, { icon: 'fas fa-wifi', info: 'Networking' }, { icon: 'fas fa-microchip', info: 'CPU' }, - { icon: 'fas fa-compact-disc', info: 'Disk' } + { icon: 'fas fa-compact-disc', info: 'Disk' }, + null, + { icon: 'fab fa-discord', info: 'Discord' }, + { icon: 'fab fa-github', info: 'GitHub' }, ]; let activeInfo = null; @@ -21,17 +24,18 @@
- {#each icons as { id, icon, info }} - showInfo(e.detail)} - on:mouseout={hideInfo} - /> + {#each icons as i} + {#if i} + showInfo(e.detail)} + on:mouseout={hideInfo} + /> + {:else} +
+ {/if} {/each} -
- showInfo(e.detail)} on:mouseout={hideInfo}/> - showInfo(e.detail)} on:mouseout={hideInfo}/>

{activeInfo}