better deets
Browse files
src/lib/components/Piclets/PicletDetail.svelte
CHANGED
|
@@ -10,6 +10,8 @@
|
|
| 10 |
|
| 11 |
let { instance, onClose, onDeleted }: Props = $props();
|
| 12 |
let showDeleteConfirm = $state(false);
|
|
|
|
|
|
|
| 13 |
|
| 14 |
async function handleDelete() {
|
| 15 |
if (!instance.id) return;
|
|
@@ -26,92 +28,198 @@
|
|
| 26 |
function getStatPercentage(value: number, max: number = 255): number {
|
| 27 |
return Math.round((value / max) * 100);
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
</script>
|
| 30 |
|
| 31 |
-
<div class="detail-modal"
|
| 32 |
<div class="detail-content">
|
| 33 |
-
<
|
| 34 |
-
<button class="close-btn" onclick={onClose}
|
| 35 |
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 36 |
-
<path d="M6 18L18 6M6 6l12 12"></path>
|
| 37 |
-
</svg>
|
| 38 |
-
</button>
|
| 39 |
<h2>{instance.nickname || instance.typeId}</h2>
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
-
<div class="
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
<div class="stats-section">
|
| 55 |
-
<h3>Stats</h3>
|
| 56 |
-
<div class="stat-grid">
|
| 57 |
-
<div class="stat">
|
| 58 |
-
<span class="stat-label">HP</span>
|
| 59 |
-
<div class="stat-bar">
|
| 60 |
-
<div class="stat-fill" style="width: {getStatPercentage(instance.currentHp, instance.maxHp)}%"></div>
|
| 61 |
</div>
|
| 62 |
-
<
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
<div class="stat">
|
| 66 |
-
<span class="stat-label">Attack</span>
|
| 67 |
-
<div class="stat-bar">
|
| 68 |
-
<div class="stat-fill" style="width: {getStatPercentage(instance.attack)}%"></div>
|
| 69 |
</div>
|
| 70 |
-
<span class="stat-value">{instance.attack}</span>
|
| 71 |
</div>
|
| 72 |
|
| 73 |
-
<div class="
|
| 74 |
-
<
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
</div>
|
| 78 |
-
<span class="stat-value">{instance.defense}</span>
|
| 79 |
-
</div>
|
| 80 |
-
|
| 81 |
-
<div class="stat">
|
| 82 |
-
<span class="stat-label">Speed</span>
|
| 83 |
-
<div class="stat-bar">
|
| 84 |
-
<div class="stat-fill" style="width: {getStatPercentage(instance.speed)}%"></div>
|
| 85 |
-
</div>
|
| 86 |
-
<span class="stat-value">{instance.speed}</span>
|
| 87 |
</div>
|
| 88 |
</div>
|
| 89 |
</div>
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
<
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
</div>
|
| 102 |
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
</div>
|
| 107 |
|
| 108 |
-
|
|
|
|
| 109 |
{#if showDeleteConfirm}
|
| 110 |
<p class="delete-confirm">Are you sure you want to release this piclet?</p>
|
| 111 |
<button class="btn btn-danger" onclick={handleDelete}>Yes, Release</button>
|
| 112 |
<button class="btn btn-secondary" onclick={() => showDeleteConfirm = false}>Cancel</button>
|
| 113 |
{:else}
|
| 114 |
-
<button class="btn btn-danger" onclick={() => showDeleteConfirm = true}>Release</button>
|
| 115 |
{/if}
|
| 116 |
</div>
|
| 117 |
</div>
|
|
@@ -124,173 +232,352 @@
|
|
| 124 |
inset: 0;
|
| 125 |
background: rgba(0, 0, 0, 0.5);
|
| 126 |
display: flex;
|
| 127 |
-
align-items:
|
| 128 |
-
justify-content: center;
|
| 129 |
z-index: 1000;
|
| 130 |
-
padding: 1rem;
|
| 131 |
}
|
| 132 |
|
| 133 |
.detail-content {
|
| 134 |
-
background:
|
| 135 |
-
border-radius: 16px;
|
| 136 |
width: 100%;
|
| 137 |
-
|
| 138 |
-
max-height: 90vh;
|
| 139 |
overflow: hidden;
|
| 140 |
display: flex;
|
| 141 |
flex-direction: column;
|
|
|
|
| 142 |
}
|
| 143 |
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
}
|
| 149 |
|
| 150 |
-
.
|
| 151 |
margin: 0;
|
|
|
|
|
|
|
|
|
|
| 152 |
text-align: center;
|
| 153 |
-
font-size: 1.25rem;
|
| 154 |
}
|
| 155 |
|
| 156 |
.close-btn {
|
| 157 |
-
position: absolute;
|
| 158 |
-
top: 1rem;
|
| 159 |
-
right: 1rem;
|
| 160 |
background: none;
|
| 161 |
border: none;
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
cursor: pointer;
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
}
|
| 168 |
|
| 169 |
-
|
|
|
|
| 170 |
flex: 1;
|
| 171 |
overflow-y: auto;
|
| 172 |
-
|
| 173 |
}
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
margin
|
|
|
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
|
| 180 |
-
.
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
object-fit: contain;
|
| 184 |
-
margin-bottom: 0.5rem;
|
| 185 |
}
|
| 186 |
|
| 187 |
-
.
|
| 188 |
display: flex;
|
| 189 |
-
|
| 190 |
-
justify-content: center;
|
| 191 |
align-items: center;
|
|
|
|
| 192 |
}
|
| 193 |
|
| 194 |
-
.
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
}
|
| 199 |
|
| 200 |
-
.
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
}
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
font-
|
|
|
|
|
|
|
| 211 |
}
|
| 212 |
|
| 213 |
-
.
|
|
|
|
| 214 |
display: flex;
|
| 215 |
flex-direction: column;
|
| 216 |
-
|
| 217 |
}
|
| 218 |
|
| 219 |
-
.
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
gap: 0.5rem;
|
| 224 |
}
|
| 225 |
|
| 226 |
-
.
|
| 227 |
-
|
| 228 |
-
|
|
|
|
| 229 |
}
|
| 230 |
|
| 231 |
-
.
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
border-radius:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
overflow: hidden;
|
| 236 |
}
|
| 237 |
|
| 238 |
-
.
|
|
|
|
| 239 |
height: 100%;
|
| 240 |
-
background: #007bff;
|
| 241 |
transition: width 0.3s;
|
| 242 |
}
|
| 243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
.stat-value {
|
| 245 |
-
text-align: right;
|
| 246 |
-
font-size: 0.875rem;
|
| 247 |
font-weight: 600;
|
| 248 |
}
|
| 249 |
|
| 250 |
-
.
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
}
|
| 255 |
|
| 256 |
-
.
|
| 257 |
-
|
| 258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
border-radius: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
}
|
| 261 |
|
| 262 |
.move-name {
|
| 263 |
-
font-
|
| 264 |
-
|
|
|
|
| 265 |
}
|
| 266 |
|
| 267 |
-
.move-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
}
|
| 271 |
|
| 272 |
-
.
|
| 273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
color: #666;
|
| 275 |
-
line-height: 1.
|
| 276 |
}
|
| 277 |
|
| 278 |
-
.
|
| 279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
border-top: 1px solid #e5e5ea;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
text-align: center;
|
| 282 |
}
|
| 283 |
|
| 284 |
.delete-confirm {
|
| 285 |
margin: 0 0 1rem;
|
| 286 |
-
color: #
|
|
|
|
| 287 |
}
|
| 288 |
|
| 289 |
.btn {
|
| 290 |
padding: 0.75rem 1.5rem;
|
| 291 |
border: none;
|
| 292 |
border-radius: 8px;
|
| 293 |
-
font-size:
|
| 294 |
font-weight: 600;
|
| 295 |
cursor: pointer;
|
| 296 |
transition: transform 0.2s;
|
|
@@ -301,13 +588,29 @@
|
|
| 301 |
}
|
| 302 |
|
| 303 |
.btn-danger {
|
| 304 |
-
background: #
|
| 305 |
color: white;
|
|
|
|
| 306 |
}
|
| 307 |
|
| 308 |
.btn-secondary {
|
| 309 |
background: #e5e5ea;
|
| 310 |
color: #333;
|
| 311 |
-
margin-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
}
|
| 313 |
</style>
|
|
|
|
| 10 |
|
| 11 |
let { instance, onClose, onDeleted }: Props = $props();
|
| 12 |
let showDeleteConfirm = $state(false);
|
| 13 |
+
let selectedTab = $state<'about' | 'stats' | 'actions'>('about');
|
| 14 |
+
let expandedMoves = $state(new Set<number>());
|
| 15 |
|
| 16 |
async function handleDelete() {
|
| 17 |
if (!instance.id) return;
|
|
|
|
| 28 |
function getStatPercentage(value: number, max: number = 255): number {
|
| 29 |
return Math.round((value / max) * 100);
|
| 30 |
}
|
| 31 |
+
|
| 32 |
+
function getHpColor(current: number, max: number): string {
|
| 33 |
+
const ratio = current / max;
|
| 34 |
+
if (ratio < 0.2) return '#ff3b30';
|
| 35 |
+
if (ratio < 0.5) return '#ff9500';
|
| 36 |
+
return '#34c759';
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
function toggleMoveExpanded(index: number) {
|
| 40 |
+
if (expandedMoves.has(index)) {
|
| 41 |
+
expandedMoves.delete(index);
|
| 42 |
+
} else {
|
| 43 |
+
expandedMoves.add(index);
|
| 44 |
+
}
|
| 45 |
+
expandedMoves = new Set(expandedMoves);
|
| 46 |
+
}
|
| 47 |
</script>
|
| 48 |
|
| 49 |
+
<div class="detail-modal">
|
| 50 |
<div class="detail-content">
|
| 51 |
+
<div class="navigation-bar">
|
| 52 |
+
<button class="close-btn" onclick={onClose}>Done</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
<h2>{instance.nickname || instance.typeId}</h2>
|
| 54 |
+
<div class="nav-spacer"></div>
|
| 55 |
+
</div>
|
| 56 |
|
| 57 |
+
<div class="content-scroll">
|
| 58 |
+
<!-- Header Card -->
|
| 59 |
+
<div class="header-card" style="background: linear-gradient(135deg, #007bff, #0056b3);">
|
| 60 |
+
<div class="header-layout">
|
| 61 |
+
<div class="image-column">
|
| 62 |
+
<div class="image-container">
|
| 63 |
+
<img
|
| 64 |
+
src={instance.imageData || instance.imageUrl}
|
| 65 |
+
alt={instance.nickname || instance.typeId}
|
| 66 |
+
class="piclet-image"
|
| 67 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
</div>
|
| 69 |
+
<div class="id-badge">
|
| 70 |
+
#{instance.id?.toString().padLeft(3, '0') || '???'}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
</div>
|
|
|
|
| 72 |
</div>
|
| 73 |
|
| 74 |
+
<div class="info-column">
|
| 75 |
+
<h1 class="piclet-name">{instance.nickname || instance.typeId}</h1>
|
| 76 |
+
|
| 77 |
+
<!-- Compact stats for caught piclet -->
|
| 78 |
+
<div class="compact-info">
|
| 79 |
+
<div class="level-badge">Lv. {instance.level}</div>
|
| 80 |
+
|
| 81 |
+
<div class="compact-stat-bar">
|
| 82 |
+
<div class="stat-bar-label">
|
| 83 |
+
<span>HP</span>
|
| 84 |
+
<span>{instance.currentHp}/{instance.maxHp}</span>
|
| 85 |
+
</div>
|
| 86 |
+
<div class="hp-bar-track">
|
| 87 |
+
<div
|
| 88 |
+
class="hp-bar-fill"
|
| 89 |
+
style="width: {getStatPercentage(instance.currentHp, instance.maxHp)}%; background-color: {getHpColor(instance.currentHp, instance.maxHp)};"
|
| 90 |
+
></div>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div class="compact-stat-bar">
|
| 95 |
+
<div class="stat-bar-label">
|
| 96 |
+
<span>XP</span>
|
| 97 |
+
<span>{instance.xp} pts</span>
|
| 98 |
+
</div>
|
| 99 |
+
<div class="xp-bar-track">
|
| 100 |
+
<div class="xp-bar-fill" style="width: 45%;"></div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
</div>
|
| 105 |
</div>
|
| 106 |
</div>
|
| 107 |
|
| 108 |
+
<!-- Tab Bar -->
|
| 109 |
+
<div class="tab-bar">
|
| 110 |
+
<button
|
| 111 |
+
class="tab-button"
|
| 112 |
+
class:active={selectedTab === 'about'}
|
| 113 |
+
onclick={() => selectedTab = 'about'}
|
| 114 |
+
>
|
| 115 |
+
About
|
| 116 |
+
</button>
|
| 117 |
+
<button
|
| 118 |
+
class="tab-button"
|
| 119 |
+
class:active={selectedTab === 'stats'}
|
| 120 |
+
onclick={() => selectedTab = 'stats'}
|
| 121 |
+
>
|
| 122 |
+
Stats
|
| 123 |
+
</button>
|
| 124 |
+
<button
|
| 125 |
+
class="tab-button"
|
| 126 |
+
class:active={selectedTab === 'actions'}
|
| 127 |
+
onclick={() => selectedTab = 'actions'}
|
| 128 |
+
>
|
| 129 |
+
Actions
|
| 130 |
+
</button>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
+
<!-- Tab Content -->
|
| 134 |
+
<div class="tab-content">
|
| 135 |
+
{#if selectedTab === 'about'}
|
| 136 |
+
<div class="content-card">
|
| 137 |
+
<p class="description">{instance.concept}</p>
|
| 138 |
+
<div class="image-caption">
|
| 139 |
+
<strong>Original prompt:</strong> {instance.imageCaption}
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
{:else if selectedTab === 'stats'}
|
| 143 |
+
<div class="content-card">
|
| 144 |
+
<h3 class="section-title">Battle Stats</h3>
|
| 145 |
+
<div class="stats-list">
|
| 146 |
+
<div class="stat-row">
|
| 147 |
+
<span>Attack</span>
|
| 148 |
+
<span class="stat-value">{instance.attack}</span>
|
| 149 |
+
</div>
|
| 150 |
+
<div class="stat-row">
|
| 151 |
+
<span>Defense</span>
|
| 152 |
+
<span class="stat-value">{instance.defense}</span>
|
| 153 |
+
</div>
|
| 154 |
+
<div class="stat-row">
|
| 155 |
+
<span>Field Attack</span>
|
| 156 |
+
<span class="stat-value">{instance.fieldAttack}</span>
|
| 157 |
+
</div>
|
| 158 |
+
<div class="stat-row">
|
| 159 |
+
<span>Field Defense</span>
|
| 160 |
+
<span class="stat-value">{instance.fieldDefense}</span>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="stat-row">
|
| 163 |
+
<span>Speed</span>
|
| 164 |
+
<span class="stat-value">{instance.speed}</span>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="divider"></div>
|
| 169 |
+
|
| 170 |
+
<div class="stat-summary">
|
| 171 |
+
<div class="summary-item">
|
| 172 |
+
<span class="summary-label">BST</span>
|
| 173 |
+
<span class="summary-value">{instance.bst}</span>
|
| 174 |
+
</div>
|
| 175 |
+
<div class="summary-item">
|
| 176 |
+
<span class="summary-label">Tier</span>
|
| 177 |
+
<span class="summary-value">{instance.tier.toUpperCase()}</span>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
{:else if selectedTab === 'actions'}
|
| 182 |
+
<div class="content-card">
|
| 183 |
+
{#each instance.moves as move, index}
|
| 184 |
+
<button
|
| 185 |
+
class="move-card"
|
| 186 |
+
onclick={() => toggleMoveExpanded(index)}
|
| 187 |
+
>
|
| 188 |
+
<div class="move-header">
|
| 189 |
+
<span class="move-name">{move.name}</span>
|
| 190 |
+
<div class="move-badges">
|
| 191 |
+
{#if move.power > 0}
|
| 192 |
+
<span class="power-badge">PWR {move.power}</span>
|
| 193 |
+
{/if}
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
+
<p class="move-description">{move.description}</p>
|
| 198 |
+
|
| 199 |
+
<div class="move-stats">
|
| 200 |
+
<span>Accuracy: {move.accuracy}%</span>
|
| 201 |
+
<span>PP: {move.currentPp}/{move.pp}</span>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
{#if expandedMoves.has(index)}
|
| 205 |
+
<div class="move-details">
|
| 206 |
+
<p>Type: {move.type}</p>
|
| 207 |
+
</div>
|
| 208 |
+
{/if}
|
| 209 |
+
</button>
|
| 210 |
+
{/each}
|
| 211 |
+
</div>
|
| 212 |
+
{/if}
|
| 213 |
</div>
|
| 214 |
|
| 215 |
+
<!-- Actions -->
|
| 216 |
+
<div class="bottom-actions">
|
| 217 |
{#if showDeleteConfirm}
|
| 218 |
<p class="delete-confirm">Are you sure you want to release this piclet?</p>
|
| 219 |
<button class="btn btn-danger" onclick={handleDelete}>Yes, Release</button>
|
| 220 |
<button class="btn btn-secondary" onclick={() => showDeleteConfirm = false}>Cancel</button>
|
| 221 |
{:else}
|
| 222 |
+
<button class="btn btn-danger" onclick={() => showDeleteConfirm = true}>Release Piclet</button>
|
| 223 |
{/if}
|
| 224 |
</div>
|
| 225 |
</div>
|
|
|
|
| 232 |
inset: 0;
|
| 233 |
background: rgba(0, 0, 0, 0.5);
|
| 234 |
display: flex;
|
| 235 |
+
align-items: flex-end;
|
|
|
|
| 236 |
z-index: 1000;
|
|
|
|
| 237 |
}
|
| 238 |
|
| 239 |
.detail-content {
|
| 240 |
+
background: #f2f2f7;
|
|
|
|
| 241 |
width: 100%;
|
| 242 |
+
height: 90vh;
|
|
|
|
| 243 |
overflow: hidden;
|
| 244 |
display: flex;
|
| 245 |
flex-direction: column;
|
| 246 |
+
border-radius: 16px 16px 0 0;
|
| 247 |
}
|
| 248 |
|
| 249 |
+
/* Navigation Bar */
|
| 250 |
+
.navigation-bar {
|
| 251 |
+
background: white;
|
| 252 |
+
padding: 16px;
|
| 253 |
+
display: flex;
|
| 254 |
+
align-items: center;
|
| 255 |
+
justify-content: space-between;
|
| 256 |
+
border-bottom: 0.5px solid #c6c6c8;
|
| 257 |
}
|
| 258 |
|
| 259 |
+
.navigation-bar h2 {
|
| 260 |
margin: 0;
|
| 261 |
+
font-size: 17px;
|
| 262 |
+
font-weight: 600;
|
| 263 |
+
flex: 1;
|
| 264 |
text-align: center;
|
|
|
|
| 265 |
}
|
| 266 |
|
| 267 |
.close-btn {
|
|
|
|
|
|
|
|
|
|
| 268 |
background: none;
|
| 269 |
border: none;
|
| 270 |
+
color: #007bff;
|
| 271 |
+
font-size: 17px;
|
| 272 |
+
font-weight: 400;
|
| 273 |
cursor: pointer;
|
| 274 |
+
padding: 0;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
.nav-spacer {
|
| 278 |
+
width: 50px;
|
| 279 |
}
|
| 280 |
|
| 281 |
+
/* Content Scroll */
|
| 282 |
+
.content-scroll {
|
| 283 |
flex: 1;
|
| 284 |
overflow-y: auto;
|
| 285 |
+
-webkit-overflow-scrolling: touch;
|
| 286 |
}
|
| 287 |
|
| 288 |
+
/* Header Card */
|
| 289 |
+
.header-card {
|
| 290 |
+
margin: 16px;
|
| 291 |
+
padding: 20px;
|
| 292 |
+
border-radius: 16px;
|
| 293 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 294 |
}
|
| 295 |
|
| 296 |
+
.header-layout {
|
| 297 |
+
display: flex;
|
| 298 |
+
gap: 16px;
|
|
|
|
|
|
|
| 299 |
}
|
| 300 |
|
| 301 |
+
.image-column {
|
| 302 |
display: flex;
|
| 303 |
+
flex-direction: column;
|
|
|
|
| 304 |
align-items: center;
|
| 305 |
+
gap: 8px;
|
| 306 |
}
|
| 307 |
|
| 308 |
+
.image-container {
|
| 309 |
+
background: rgba(255, 255, 255, 0.15);
|
| 310 |
+
padding: 8px;
|
| 311 |
+
border-radius: 12px;
|
| 312 |
}
|
| 313 |
|
| 314 |
+
.piclet-image {
|
| 315 |
+
width: 120px;
|
| 316 |
+
height: 120px;
|
| 317 |
+
object-fit: contain;
|
| 318 |
}
|
| 319 |
|
| 320 |
+
.id-badge {
|
| 321 |
+
background: rgba(255, 255, 255, 0.2);
|
| 322 |
+
padding: 4px 12px;
|
| 323 |
+
border-radius: 12px;
|
| 324 |
+
font-size: 14px;
|
| 325 |
+
font-weight: bold;
|
| 326 |
+
color: white;
|
| 327 |
}
|
| 328 |
|
| 329 |
+
.info-column {
|
| 330 |
+
flex: 1;
|
| 331 |
display: flex;
|
| 332 |
flex-direction: column;
|
| 333 |
+
color: white;
|
| 334 |
}
|
| 335 |
|
| 336 |
+
.piclet-name {
|
| 337 |
+
margin: 0 0 12px;
|
| 338 |
+
font-size: 24px;
|
| 339 |
+
font-weight: bold;
|
|
|
|
| 340 |
}
|
| 341 |
|
| 342 |
+
.compact-info {
|
| 343 |
+
display: flex;
|
| 344 |
+
flex-direction: column;
|
| 345 |
+
gap: 8px;
|
| 346 |
}
|
| 347 |
|
| 348 |
+
.level-badge {
|
| 349 |
+
background: rgba(52, 199, 89, 0.8);
|
| 350 |
+
padding: 3px 10px;
|
| 351 |
+
border-radius: 12px;
|
| 352 |
+
font-size: 13px;
|
| 353 |
+
font-weight: bold;
|
| 354 |
+
width: fit-content;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
.compact-stat-bar {
|
| 358 |
+
display: flex;
|
| 359 |
+
flex-direction: column;
|
| 360 |
+
gap: 4px;
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
.stat-bar-label {
|
| 364 |
+
display: flex;
|
| 365 |
+
justify-content: space-between;
|
| 366 |
+
font-size: 12px;
|
| 367 |
+
font-weight: 500;
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
.hp-bar-track,
|
| 371 |
+
.xp-bar-track {
|
| 372 |
+
height: 6px;
|
| 373 |
+
background: rgba(255, 255, 255, 0.3);
|
| 374 |
+
border-radius: 3px;
|
| 375 |
overflow: hidden;
|
| 376 |
}
|
| 377 |
|
| 378 |
+
.hp-bar-fill,
|
| 379 |
+
.xp-bar-fill {
|
| 380 |
height: 100%;
|
|
|
|
| 381 |
transition: width 0.3s;
|
| 382 |
}
|
| 383 |
|
| 384 |
+
.xp-bar-fill {
|
| 385 |
+
background: #af52de;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
/* Tab Bar */
|
| 389 |
+
.tab-bar {
|
| 390 |
+
margin: 0 16px 16px;
|
| 391 |
+
height: 32px;
|
| 392 |
+
background: #e5e5ea;
|
| 393 |
+
border-radius: 8px;
|
| 394 |
+
display: flex;
|
| 395 |
+
padding: 2px;
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
.tab-button {
|
| 399 |
+
flex: 1;
|
| 400 |
+
background: none;
|
| 401 |
+
border: none;
|
| 402 |
+
border-radius: 6px;
|
| 403 |
+
font-size: 13px;
|
| 404 |
+
font-weight: 500;
|
| 405 |
+
color: #8e8e93;
|
| 406 |
+
cursor: pointer;
|
| 407 |
+
transition: all 0.2s;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
.tab-button.active {
|
| 411 |
+
background: #007bff;
|
| 412 |
+
color: white;
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
/* Tab Content */
|
| 416 |
+
.tab-content {
|
| 417 |
+
margin: 0 16px 16px;
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
.content-card {
|
| 421 |
+
background: white;
|
| 422 |
+
border-radius: 12px;
|
| 423 |
+
padding: 16px;
|
| 424 |
+
border: 0.5px solid #c6c6c8;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.description {
|
| 428 |
+
margin: 0 0 16px;
|
| 429 |
+
font-size: 16px;
|
| 430 |
+
line-height: 1.4;
|
| 431 |
+
color: #000;
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
.image-caption {
|
| 435 |
+
font-size: 14px;
|
| 436 |
+
color: #666;
|
| 437 |
+
line-height: 1.4;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
/* Stats Tab */
|
| 441 |
+
.section-title {
|
| 442 |
+
margin: 0 0 16px;
|
| 443 |
+
font-size: 18px;
|
| 444 |
+
font-weight: bold;
|
| 445 |
+
color: #000;
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
.stats-list {
|
| 449 |
+
display: flex;
|
| 450 |
+
flex-direction: column;
|
| 451 |
+
gap: 12px;
|
| 452 |
+
}
|
| 453 |
+
|
| 454 |
+
.stat-row {
|
| 455 |
+
display: flex;
|
| 456 |
+
justify-content: space-between;
|
| 457 |
+
font-size: 15px;
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
.stat-value {
|
|
|
|
|
|
|
| 461 |
font-weight: 600;
|
| 462 |
}
|
| 463 |
|
| 464 |
+
.divider {
|
| 465 |
+
height: 1px;
|
| 466 |
+
background: #e5e5ea;
|
| 467 |
+
margin: 16px 0;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
.stat-summary {
|
| 471 |
+
display: flex;
|
| 472 |
+
justify-content: space-around;
|
| 473 |
}
|
| 474 |
|
| 475 |
+
.summary-item {
|
| 476 |
+
text-align: center;
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
.summary-label {
|
| 480 |
+
display: block;
|
| 481 |
+
font-size: 14px;
|
| 482 |
+
color: #8e8e93;
|
| 483 |
+
margin-bottom: 4px;
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
.summary-value {
|
| 487 |
+
font-size: 16px;
|
| 488 |
+
font-weight: bold;
|
| 489 |
+
color: #000;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
/* Actions Tab */
|
| 493 |
+
.move-card {
|
| 494 |
+
width: 100%;
|
| 495 |
+
background: #f2f2f7;
|
| 496 |
+
border: 1px solid rgba(0, 123, 255, 0.3);
|
| 497 |
border-radius: 8px;
|
| 498 |
+
padding: 12px;
|
| 499 |
+
margin-bottom: 12px;
|
| 500 |
+
cursor: pointer;
|
| 501 |
+
text-align: left;
|
| 502 |
+
transition: all 0.2s;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
.move-card:active {
|
| 506 |
+
transform: scale(0.98);
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
.move-header {
|
| 510 |
+
display: flex;
|
| 511 |
+
justify-content: space-between;
|
| 512 |
+
align-items: center;
|
| 513 |
+
margin-bottom: 8px;
|
| 514 |
}
|
| 515 |
|
| 516 |
.move-name {
|
| 517 |
+
font-size: 16px;
|
| 518 |
+
font-weight: bold;
|
| 519 |
+
color: #000;
|
| 520 |
}
|
| 521 |
|
| 522 |
+
.move-badges {
|
| 523 |
+
display: flex;
|
| 524 |
+
gap: 6px;
|
| 525 |
}
|
| 526 |
|
| 527 |
+
.power-badge {
|
| 528 |
+
background: rgba(255, 59, 48, 0.2);
|
| 529 |
+
color: #ff3b30;
|
| 530 |
+
padding: 4px 8px;
|
| 531 |
+
border-radius: 12px;
|
| 532 |
+
font-size: 12px;
|
| 533 |
+
font-weight: 500;
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
.move-description {
|
| 537 |
+
margin: 0 0 12px;
|
| 538 |
+
font-size: 14px;
|
| 539 |
color: #666;
|
| 540 |
+
line-height: 1.3;
|
| 541 |
}
|
| 542 |
|
| 543 |
+
.move-stats {
|
| 544 |
+
display: flex;
|
| 545 |
+
gap: 16px;
|
| 546 |
+
font-size: 13px;
|
| 547 |
+
color: #8e8e93;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
.move-details {
|
| 551 |
+
margin-top: 12px;
|
| 552 |
+
padding-top: 12px;
|
| 553 |
border-top: 1px solid #e5e5ea;
|
| 554 |
+
font-size: 14px;
|
| 555 |
+
color: #666;
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
.move-details p {
|
| 559 |
+
margin: 0;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
/* Bottom Actions */
|
| 563 |
+
.bottom-actions {
|
| 564 |
+
padding: 16px;
|
| 565 |
+
background: white;
|
| 566 |
+
border-top: 0.5px solid #c6c6c8;
|
| 567 |
text-align: center;
|
| 568 |
}
|
| 569 |
|
| 570 |
.delete-confirm {
|
| 571 |
margin: 0 0 1rem;
|
| 572 |
+
color: #ff3b30;
|
| 573 |
+
font-size: 16px;
|
| 574 |
}
|
| 575 |
|
| 576 |
.btn {
|
| 577 |
padding: 0.75rem 1.5rem;
|
| 578 |
border: none;
|
| 579 |
border-radius: 8px;
|
| 580 |
+
font-size: 16px;
|
| 581 |
font-weight: 600;
|
| 582 |
cursor: pointer;
|
| 583 |
transition: transform 0.2s;
|
|
|
|
| 588 |
}
|
| 589 |
|
| 590 |
.btn-danger {
|
| 591 |
+
background: #ff3b30;
|
| 592 |
color: white;
|
| 593 |
+
width: 100%;
|
| 594 |
}
|
| 595 |
|
| 596 |
.btn-secondary {
|
| 597 |
background: #e5e5ea;
|
| 598 |
color: #333;
|
| 599 |
+
margin-top: 8px;
|
| 600 |
+
width: 100%;
|
| 601 |
+
}
|
| 602 |
+
|
| 603 |
+
@media (min-width: 768px) {
|
| 604 |
+
.detail-modal {
|
| 605 |
+
align-items: center;
|
| 606 |
+
padding: 2rem;
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
.detail-content {
|
| 610 |
+
max-width: 500px;
|
| 611 |
+
height: auto;
|
| 612 |
+
max-height: 90vh;
|
| 613 |
+
border-radius: 16px;
|
| 614 |
+
}
|
| 615 |
}
|
| 616 |
</style>
|