Pārlūkot izejas kodu

Merge pull request #16918 from ShirasawaSama/patch-6

fix: fix Windows sidebar button cursor icon
Tim Jaeryang Baek 1 mēnesi atpakaļ
vecāks
revīzija
85264e76de
1 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  1. 9 3
      src/lib/components/layout/Sidebar.svelte

+ 9 - 3
src/lib/components/layout/Sidebar.svelte

@@ -442,6 +442,8 @@
 
 		await tick();
 	};
+
+	const isWindows = /Windows/i.test(navigator.userAgent);
 </script>
 
 <ArchivedChatsModal
@@ -515,7 +517,7 @@
 		id="sidebar"
 	>
 		<button
-			class="flex flex-col flex-1 cursor-[e-resize]"
+			class="flex flex-col flex-1 {isWindows ? 'cursor-pointer' : 'cursor-[e-resize]'}"
 			on:click={async () => {
 				showSidebar.set(!$showSidebar);
 			}}
@@ -526,7 +528,9 @@
 					placement="right"
 				>
 					<button
-						class=" flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group cursor-[e-resize]"
+						class="flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group {isWindows
+							? 'cursor-pointer'
+							: 'cursor-[e-resize]'}"
 					>
 						<div class=" self-center flex items-center justify-center size-9">
 							<img
@@ -721,7 +725,9 @@
 					placement="bottom"
 				>
 					<button
-						class=" flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-[w-resize]"
+						class="flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition {isWindows
+							? 'cursor-pointer'
+							: 'cursor-[w-resize]'}"
 						on:click={() => {
 							showSidebar.set(!$showSidebar);
 						}}