diff --git a/services/pascal-editor/packages/editor/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx b/services/pascal-editor/packages/editor/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx
index 80a672db6..bf24a0dbf 100644
--- a/services/pascal-editor/packages/editor/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx
+++ b/services/pascal-editor/packages/editor/src/components/editor-2d/floorplan-cursor-indicator-overlay.tsx
@@ -2,6 +2,7 @@
import { Icon } from '@iconify/react'
import { memo, useMemo } from 'react'
+import { withEditorBasePath } from '../../lib/public-asset-path'
import useEditor, { type FloorplanSelectionTool } from '../../store/use-editor'
import { furnishTools } from '../ui/action-menu/furnish-tools'
import { tools as structureTools } from '../ui/action-menu/structure-tools'
@@ -108,7 +109,7 @@ export const FloorplanCursorIndicatorOverlay = memo(function FloorplanCursorIndi
alt=""
aria-hidden="true"
className="h-5 w-5 object-contain drop-shadow-[0_2px_4px_rgba(0,0,0,0.5)]"
- src={indicator.iconSrc}
+ src={withEditorBasePath(indicator.iconSrc)}
/>
) : (
) : (
(function Cursor
// eslint-disable-next-line @next/next/no-img-element
; n
className={disabled ? 'opacity-40 pointer-events-none' : ''}
icon={
action.iconSrc ? (
-
+
) : undefined
}
label={action.label}
diff --git a/services/pascal-editor/packages/editor/src/components/ui/sidebar/icon-rail.tsx b/services/pascal-editor/packages/editor/src/components/ui/sidebar/icon-rail.tsx
index 0fc6fe32f..b820134c9 100644
--- a/services/pascal-editor/packages/editor/src/components/ui/sidebar/icon-rail.tsx
+++ b/services/pascal-editor/packages/editor/src/components/ui/sidebar/icon-rail.tsx
@@ -6,6 +6,7 @@ import {
TooltipContent,
TooltipTrigger,
} from './../../../components/ui/primitives/tooltip'
+import { withEditorBasePath } from './../../../lib/public-asset-path'
import { cn } from './../../../lib/utils'
export type PanelId = string
@@ -22,13 +23,13 @@ interface IconRailProps {
const sitePanel: { id: PanelId; iconSrc: string; label: string } = {
id: 'site',
- iconSrc: '/icons/level.webp',
+ iconSrc: withEditorBasePath('/icons/level.webp'),
label: '场景',
}
const settingsPanel: { id: PanelId; iconSrc: string; label: string } = {
id: 'settings',
- iconSrc: '/icons/settings.webp',
+ iconSrc: withEditorBasePath('/icons/settings.webp'),
label: '设置',
}
diff --git a/services/pascal-editor/packages/editor/src/components/ui/sidebar/panels/site-panel/index.tsx b/services/pascal-editor/packages/editor/src/components/ui/sidebar/panels/site-panel/index.tsx
index b121e0ece..46313afca 100644
--- a/services/pascal-editor/packages/editor/src/components/ui/sidebar/panels/site-panel/index.tsx
+++ b/services/pascal-editor/packages/editor/src/components/ui/sidebar/panels/site-panel/index.tsx
@@ -47,6 +47,7 @@ import {
squareMetersToAreaUnit,
} from './../../../../../lib/measurements'
import { createLocalGuideImage } from './../../../../../lib/local-guide-image'
+import { withEditorBasePath } from './../../../../../lib/public-asset-path'
import { cn } from './../../../../../lib/utils'
import useEditor from './../../../../../store/use-editor'
import { useUploadStore } from '../../../../../store/use-upload'
@@ -379,13 +380,13 @@ const ReferenceItem = memo(function ReferenceItem({
) : (
)}
结构
@@ -1058,7 +1059,7 @@ const LayerToggle = memo(function LayerToggle() {
'mb-1 h-6 w-6 transition-all',
activeTab !== 'furnish' && 'opacity-50 grayscale',
)}
- src="/icons/couch.webp"
+ src={withEditorBasePath('/icons/couch.webp')}
/>
陈设
@@ -1095,7 +1096,7 @@ const LayerToggle = memo(function LayerToggle() {
'mb-1 h-6 w-6 transition-all',
activeTab !== 'zones' && 'opacity-50 grayscale',
)}
- src="/icons/kitchen.webp"
+ src={withEditorBasePath('/icons/kitchen.webp')}
/>
区域
@@ -1436,7 +1437,7 @@ const BuildingItem = memo(function BuildingItem({
'h-5 w-5 object-contain transition-all',
!isBuildingActive && 'opacity-60 grayscale',
)}
- src="/icons/building.webp"
+ src={withEditorBasePath('/icons/building.webp')}
/>
{building.name || '建筑'}
@@ -1592,7 +1593,7 @@ export function SitePanel({ projectId, onUploadAsset, onDeleteAsset }: SitePanel
'h-5 w-5 object-contain transition-all',
phase !== 'site' && 'opacity-60 grayscale',
)}
- src="/icons/site-flag.webp"
+ src={withEditorBasePath('/icons/site-flag.webp')}
/>
{siteNode.name || '场地'}
diff --git a/services/pascal-editor/packages/editor/src/components/ui/snap-target-badge.tsx b/services/pascal-editor/packages/editor/src/components/ui/snap-target-badge.tsx
index 4c318cd93..467275905 100644
--- a/services/pascal-editor/packages/editor/src/components/ui/snap-target-badge.tsx
+++ b/services/pascal-editor/packages/editor/src/components/ui/snap-target-badge.tsx
@@ -1,14 +1,15 @@
import type { AnyNode, AssetInput } from '@pascal-app/core'
import type { ReactNode } from 'react'
+import { withEditorBasePath } from '../../lib/public-asset-path'
import { cn } from '../../lib/utils'
export type SnapTarget = 'wall' | 'ceiling' | 'roof'
export type SnapTargetBadgeSize = 'tile' | 'tree'
const SNAP_TARGET_ICONS: Record = {
- wall: '/icons/wall.webp',
- ceiling: '/icons/ceiling.webp',
- roof: '/icons/roof.webp',
+ wall: withEditorBasePath('/icons/wall.webp'),
+ ceiling: withEditorBasePath('/icons/ceiling.webp'),
+ roof: withEditorBasePath('/icons/roof.webp'),
}
const SNAP_TARGET_LABELS: Record = {
diff --git a/services/pascal-editor/packages/editor/src/components/viewer-overlay.tsx b/services/pascal-editor/packages/editor/src/components/viewer-overlay.tsx
index e60c5d662..6b9bcd2f7 100644
--- a/services/pascal-editor/packages/editor/src/components/viewer-overlay.tsx
+++ b/services/pascal-editor/packages/editor/src/components/viewer-overlay.tsx
@@ -35,6 +35,7 @@ import {
import Link from 'next/link'
import { flushSync } from 'react-dom'
import { useShallow } from 'zustand/react/shallow'
+import { withEditorBasePath } from '../lib/public-asset-path'
import { cn } from '../lib/utils'
import useEditor from '../store/use-editor'
import { ActionButton } from './ui/action-menu/action-button'
@@ -88,25 +89,49 @@ const levelModeBadgeLabels: Record<'manual' | 'stacked' | 'exploded' | 'solo', s
const wallModeConfig = {
up: {
icon: (props: any) => (
-
+
),
label: 'Full Height',
},
cutaway: {
icon: (props: any) => (
-
+
),
label: 'Cutaway',
},
down: {
icon: (props: any) => (
-
+
),
label: 'Low',
},
translucent: {
icon: (props: any) => (
-
+
),
label: 'Translucent',
},
@@ -508,7 +533,7 @@ export const ViewerOverlay = ({
)}
@@ -529,7 +554,7 @@ export const ViewerOverlay = ({
)}
@@ -640,7 +665,7 @@ export const ViewerOverlay = ({
@@ -655,7 +680,7 @@ export const ViewerOverlay = ({
@@ -670,7 +695,7 @@ export const ViewerOverlay = ({