Skip to content

Commit a950f18

Browse files
Fix broken icons: import via webpack file-loader instead of raw paths
The neuron icon and pyr icon were using static src paths that don't resolve in the build output. Import them as modules so webpack's file-loader handles the path correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 649208e commit a950f18

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/CellLibraryPanel.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
type HelpRequest,
1111
} from '../store';
1212
import { isLatestRoots, getLatestRoots } from '../widgets/pcg_service';
13+
import neuronIcon from '../../static/badges/pyr/neuron-icon-white.png';
1314
1415
const props = defineProps<{ initialTab?: string }>();
1516
const emit = defineEmits({ hide: null });
@@ -410,7 +411,7 @@ const panelStyle = computed(() => ({
410411
<!-- Top bar -->
411412
<div class="nge-cl-topbar" @mousedown="startDrag" :class="{ 'nge-cl-dragging': isDragging }">
412413
<div class="nge-cl-title">
413-
<img src="center-art/../neuron-icon-white.png" class="nge-cl-icon" /> Cell Library
414+
<img :src="neuronIcon" class="nge-cl-icon" /> Cell Library
414415
</div>
415416
<button class="nge-cl-close" @click="emit('hide')">×</button>
416417
</div>

src/components/UserProfilePanel.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {useLoginStore, useUserStatsStore, useUserPreferencesStore, useCellHistor
77
import {BADGE_DEFINITIONS, BUILDING_BADGES, EXPLORATION_BADGES, BadgeDefinition, BadgeTrack, statKeyForTrack} from '../widgets/badge_definitions';
88
import {BADGE_IMAGE_MAP} from '../widgets/badge_images';
99
import {DEMO_USERS, DEMO_COMMUNITY_EDITS_WEEK, DEMO_COMMUNITY_EDITS_MONTH} from '../data/demo-users';
10+
import pyrIcon from '../../static/badges/pyr/pyr-icon.png';
1011
1112
// ── Stores ────────────────────────────────────────────────────────────────────
1213
const {sessions} = storeToRefs(useLoginStore());
@@ -318,7 +319,7 @@ const emit = defineEmits({hide: null, 'open-settings': null});
318319
title="Click to change flag"
319320
>
320321
<img v-if="flagImgUrl(prefs.flag || '')" :src="flagImgUrl(prefs.flag)" class="nge-flag-img" />
321-
<img v-else src="center-art/../pyr-icon.png" class="nge-flag-img nge-pyr-icon" />
322+
<img v-else :src="pyrIcon" class="nge-flag-img nge-pyr-icon" />
322323
</button>
323324
<Transition name="nge-flag-picker">
324325
<div v-if="showFlagPicker" class="nge-profile-flag-picker">

0 commit comments

Comments
 (0)