Fix sidebar active link highlight
This commit is contained in:
		
							parent
							
								
									ca866a7f80
								
							
						
					
					
						commit
						4dd2a16d07
					
				| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
  <p class="menu-label">Chats</p>
 | 
			
		||||
  <ul class="menu-list">
 | 
			
		||||
    {#if sortedChats.length === 0}
 | 
			
		||||
      <li><a class="panel-block" href={"#"}>No chats yet...</a></li>
 | 
			
		||||
      <li><a href={"#"}>No chats yet...</a></li>
 | 
			
		||||
    {:else}
 | 
			
		||||
      <li>
 | 
			
		||||
        <ul>
 | 
			
		||||
| 
						 | 
				
			
			@ -20,9 +20,8 @@
 | 
			
		|||
            <li>
 | 
			
		||||
              <a
 | 
			
		||||
                href={"#"}
 | 
			
		||||
                class="panel-block"
 | 
			
		||||
                class:is-disabled={!apiKey}
 | 
			
		||||
                class:has-background-light={activeChatId === chat.id}
 | 
			
		||||
                class:is-active={activeChatId === chat.id}
 | 
			
		||||
                on:click|preventDefault={() => (activeChatId = chat.id)}>{chat.name || `Chat ${chat.id}`}</a
 | 
			
		||||
              >
 | 
			
		||||
            </li>
 | 
			
		||||
| 
						 | 
				
			
			@ -38,7 +37,7 @@
 | 
			
		|||
        href={"#"}
 | 
			
		||||
        class="panel-block"
 | 
			
		||||
        class:is-disabled={!apiKey}
 | 
			
		||||
        class:has-background-light={!activeChatId}
 | 
			
		||||
        class:is-active={!activeChatId}
 | 
			
		||||
        on:click|preventDefault={() => {
 | 
			
		||||
          activeChatId = null;
 | 
			
		||||
        }}><span class="greyscale mr-2">🔑</span> API key</a
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue