From fa18e3b77dde92667bb8337bc376c45d0f4cd53f Mon Sep 17 00:00:00 2001
From: Mistivia <i@mistivia.com>
Date: Thu, 2 Oct 2025 00:31:09 +0800
Subject: show english card pic

---
 src/components/card_thumb.svelte |  3 ++-
 src/components/left_panel.svelte |  5 ++---
 src/left_panel.js                | 14 +++++++++++---
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/components/card_thumb.svelte b/src/components/card_thumb.svelte
index 2b93c6e..39a996f 100644
--- a/src/components/card_thumb.svelte
+++ b/src/components/card_thumb.svelte
@@ -1,11 +1,12 @@
 <script lang="js">
     import { setLeftPanelCard, showMobileInfo } from '../left_panel';
     import { cardImageUrl } from '../utils';
+    import { currentTranslations } from '../language';
 
     let {id, area, idx, limitNum} = $props();
 
     function onhover() {
-        setLeftPanelCard(id); 
+        setLeftPanelCard(id, $currentTranslations.key); 
     }
 
     function onDragStart(e) {
diff --git a/src/components/left_panel.svelte b/src/components/left_panel.svelte
index bcfdba7..c3171a0 100644
--- a/src/components/left_panel.svelte
+++ b/src/components/left_panel.svelte
@@ -8,7 +8,6 @@
         closeMobileInfo,
     } from '../left_panel';
 
-    import { cardImageUrl } from '../utils';
     import { currentTranslations } from '../language';
 
 
@@ -39,8 +38,8 @@
         <button class="close-btn" onclick={closeMobileInfo}>×</button>
         <div class="content">
             <div class="card-image-large">
-                {#if $leftPanelCardId}
-                    <img height="100%" src={cardImageUrl($leftPanelCardId)} alt="card img">
+                {#if $leftPanelCardImgUrl !== ''}
+                    <img height="100%" src={$leftPanelCardImgUrl} alt="card img">
                 {/if}
             </div>
             <div class="card-description">
diff --git a/src/left_panel.js b/src/left_panel.js
index 84c55ab..1ec3e92 100644
--- a/src/left_panel.js
+++ b/src/left_panel.js
@@ -28,15 +28,23 @@ function preloadImage(url, callback, errorCallback) {
 }
 
 
-function setLeftPanelCard(id) {
+function setLeftPanelCard(id, lang) {
     leftPanelCardId.set(id);
     leftPanelCardImgUrl.set('');
     curVersion += 1;
     leftPanelCardDesc.set('加载中...');
     let ver = curVersion;
     setDesc(ver, id);
-    preloadImage(cardImageUrl(id), () => {
-        leftPanelCardImgUrl.set(cardImageUrl(id));
+    let url = '';
+    if (lang == 'cn') {
+        url = cardImageUrl(id);
+    } else if (lang == 'en') {
+        url = 'https://images.ygoprodeck.com/images/cards/' + id + '.jpg';
+    } else if (lang == 'jp') {
+        url = 'https://images.ygoprodeck.com/images/cards/' + id + '.jpg';
+    }
+    preloadImage(url, () => {
+        leftPanelCardImgUrl.set(url);
     });
 }
 
-- 
cgit v1.0

