mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Fix sidebar active link highlight
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
<p class="menu-label">Chats</p>
|
<p class="menu-label">Chats</p>
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
{#if sortedChats.length === 0}
|
{#if sortedChats.length === 0}
|
||||||
<li><a class="panel-block" href={"#"}>No chats yet...</a></li>
|
<li><a href={"#"}>No chats yet...</a></li>
|
||||||
{:else}
|
{:else}
|
||||||
<li>
|
<li>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -20,9 +20,8 @@
|
|||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href={"#"}
|
href={"#"}
|
||||||
class="panel-block"
|
|
||||||
class:is-disabled={!apiKey}
|
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
|
on:click|preventDefault={() => (activeChatId = chat.id)}>{chat.name || `Chat ${chat.id}`}</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
@@ -38,7 +37,7 @@
|
|||||||
href={"#"}
|
href={"#"}
|
||||||
class="panel-block"
|
class="panel-block"
|
||||||
class:is-disabled={!apiKey}
|
class:is-disabled={!apiKey}
|
||||||
class:has-background-light={!activeChatId}
|
class:is-active={!activeChatId}
|
||||||
on:click|preventDefault={() => {
|
on:click|preventDefault={() => {
|
||||||
activeChatId = null;
|
activeChatId = null;
|
||||||
}}><span class="greyscale mr-2">🔑</span> API key</a
|
}}><span class="greyscale mr-2">🔑</span> API key</a
|
||||||
@@ -65,7 +64,7 @@
|
|||||||
}}><span class="greyscale mr-2">🗑️</span> Clear chats</a
|
}}><span class="greyscale mr-2">🗑️</span> Clear chats</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
{#if activeChatId }
|
{#if activeChatId}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href={"#"}
|
href={"#"}
|
||||||
|
|||||||
Reference in New Issue
Block a user