Timothy Jaeryang Baek 2 月之前
父節點
當前提交
7de88cc4eb
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      src/lib/components/layout/Navbar/Menu.svelte
  2. 1 0
      src/lib/components/layout/Sidebar/ChatMenu.svelte

+ 1 - 0
src/lib/components/layout/Navbar/Menu.svelte

@@ -69,6 +69,7 @@
 				const isDarkMode = $theme.includes('dark'); // Check theme mode
 
 				const canvas = await html2canvas(containerElement, {
+					useCORS: true,
 					backgroundColor: isDarkMode ? '#000' : '#fff', // Ensure proper background
 					scale: 2, // Enhance resolution
 					height: containerElement.scrollHeight,

+ 1 - 0
src/lib/components/layout/Sidebar/ChatMenu.svelte

@@ -87,6 +87,7 @@
 				const isDarkMode = $theme.includes('dark'); // Check theme mode
 
 				const canvas = await html2canvas(containerElement, {
+					useCORS: true,
 					backgroundColor: isDarkMode ? '#000' : '#fff', // Ensure proper background
 					scale: 2, // Enhance resolution
 					height: containerElement.scrollHeight,