|
1 | 1 | <div class="flex" style="height: calc(100vh - 55px); height: calc(100dvh - 55px)"> |
2 | | - <div |
3 | | - class="fixed top-[65px] cursor-pointer bg-gray-100 rounded-r-md z-10" |
| 2 | + <button |
| 3 | + type="button" |
| 4 | + class="fixed top-[65px] left-0 cursor-pointer bg-gray-100 rounded-r-md z-10 p-1 lg:hidden" |
4 | 5 | @click="hideSidebar = false" |
5 | | - v-show="hideSidebar"> |
6 | | - <svg xmlns="http://www.w3.org/2000/svg" style="h-5 w-5" viewBox="0 -960 960 960" class="w-5" fill="#5f6368"><path d="M360-120v-720h80v720h-80Zm160-160v-400l200 200-200 200Z"/></svg> |
7 | | - </div> |
| 6 | + v-show="hideSidebar !== false" |
| 7 | + aria-label="Open chat history" |
| 8 | + title="Open chat history"> |
| 9 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" class="w-5 h-5" fill="#5f6368"><path d="M360-120v-720h80v720h-80Zm160-160v-400l200 200-200 200Z"/></svg> |
| 10 | + </button> |
8 | 11 | <button |
9 | 12 | class="fixed top-[65px] right-4 z-10 p-2 rounded-md shadow bg-white" |
10 | 13 | :class="hasWorkspace ? 'text-gray-700 hover:bg-gray-100' : 'text-gray-300 cursor-not-allowed bg-gray-50'" |
|
17 | 20 | <svg v-else xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M12 1a5 5 0 00-5 5v3H6a2 2 0 00-2 2v9a2 2 0 002 2h12a2 2 0 002-2v-9a2 2 0 00-2-2h-1V6a5 5 0 00-5-5zm-3 8V6a3 3 0 016 0v3H9zm9 2v9H6v-9h12z"/></svg> |
18 | 21 | </button> |
19 | 22 | <!-- Sidebar: Chat Threads --> |
20 | | - <aside class="border-r overflow-y-auto overflow-x-hidden h-full transition-all duration-300 ease-in-out z-20 w-0 lg:w-64 fixed lg:relative" :class="hideSidebar === true ? '!w-0' : hideSidebar === false ? '!w-64' : ''"> |
| 23 | + <aside |
| 24 | + class="bg-white border-r overflow-y-auto overflow-x-hidden h-full transition-transform duration-300 ease-in-out z-20 w-64 fixed lg:relative" |
| 25 | + :class="hideSidebar === false ? 'translate-x-0' : hideSidebar === true ? '-translate-x-full lg:hidden' : '-translate-x-full lg:translate-x-0'" |
| 26 | + style="z-index: 10000"> |
21 | 27 | <div class="flex items-center border-b border-gray-100 w-64 overflow-x-hidden"> |
22 | 28 | <div class="p-1 ml-2 font-bold">Chat Threads</div> |
23 | 29 | <button |
24 | 30 | @click="hideSidebar = true" |
25 | | - class="ml-auto mr-2 p-2 rounded hover:bg-gray-200 focus:outline-none" |
| 31 | + class="ml-auto mr-2 p-2 rounded hover:bg-gray-200 focus:outline-none lg:hidden" |
26 | 32 | aria-label="Close sidebar" |
27 | 33 | > |
28 | 34 | <svg xmlns="http://www.w3.org/2000/svg" style="h-5 w-5" viewBox="0 -960 960 960" class="w-5" fill="currentColor"><path d="M660-320v-320L500-480l160 160ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-80v-560H200v560h120Zm80 0h360v-560H400v560Zm-80 0H200h120Z"/></svg> |
|
0 commit comments