From 6844e0d39d623d1186382c40616319cce4e5ca89 Mon Sep 17 00:00:00 2001 From: Anton Bracke Date: Sun, 20 Feb 2022 21:51:55 +0100 Subject: [PATCH] improve style --- desktop/local-app/index.html | 13 +++++++++++++ desktop/local-app/src/lib/Sidebar.svelte | 14 ++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/desktop/local-app/index.html b/desktop/local-app/index.html index 4eef13fd..6065affb 100644 --- a/desktop/local-app/index.html +++ b/desktop/local-app/index.html @@ -22,6 +22,19 @@ #app { display: flex; } + + *::-webkit-scrollbar { + width: 10px; + height: 10px; + } + *::-webkit-scrollbar-track { + background-color: transparent; + border-radius: 10px; + } + *::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.4); + border-radius: 10px; + } diff --git a/desktop/local-app/src/lib/Sidebar.svelte b/desktop/local-app/src/lib/Sidebar.svelte index bea59715..67736f2e 100644 --- a/desktop/local-app/src/lib/Sidebar.svelte +++ b/desktop/local-app/src/lib/Sidebar.svelte @@ -5,6 +5,12 @@ let isDevelopment = false; + function getServerColor(i: number) { + const serverColors = ['bg-red-400', 'bg-yellow-500', 'bg-green-500', 'bg-blue-500', 'bg-indigo-500', 'bg-purple-500']; + + return serverColors[i % serverColors.length]; + } + onMount(async () => { await loadServers(); isDevelopment = await window?.WorkAdventureDesktopApi?.isDevelopment(); @@ -12,16 +18,16 @@