diff --git a/index.html b/index.html index 8aca84f..dc65047 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,6 @@ - 한맥가족 자산관리시스템 { try { - const res = await fetch(`http://${location.hostname}:3000/api/upload`, { + const res = await fetch(`${API_BASE_URL}/api/upload`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ fileName: file.name, fileData: reader.result }) @@ -728,7 +728,7 @@ class HwAssetModal extends BaseModal { private async fetchMapConfig() { try { - const res = await fetch(`http://${location.hostname}:3000/api/maps`); + const res = await fetch(`${API_BASE_URL}/api/maps`); this.dynamicMapConfig = await res.json(); } catch (err) { console.error('Failed to fetch map config:', err); } } @@ -925,7 +925,7 @@ class HwAssetModal extends BaseModal { private async fetchMasterComponents(): Promise { try { - const res = await fetch(`http://${location.hostname}:3000/api/hardware-components`); + const res = await fetch(`${API_BASE_URL}/api/hardware-components`); this.masterComponents = await res.json(); } catch (err) { console.error('Failed to fetch master components:', err); } } diff --git a/src/views/Dashboard/dashboard.css b/src/views/Dashboard/dashboard.css index 9057610..069f297 100644 --- a/src/views/Dashboard/dashboard.css +++ b/src/views/Dashboard/dashboard.css @@ -196,11 +196,14 @@ height: auto; object-fit: contain; display: block; + position: relative; + z-index: 1; } .map-overlay { position: absolute; - pointer-events: none; + pointer-events: auto; + z-index: 2; } .no-map-message { @@ -216,6 +219,7 @@ align-items: center; justify-content: center; transition: all 0.2s ease; + z-index: 3; } /* --- Asset Detail Sidebar --- */ diff --git a/src/views/List/ListFactory.ts b/src/views/List/ListFactory.ts index 62c2891..be9d98d 100644 --- a/src/views/List/ListFactory.ts +++ b/src/views/List/ListFactory.ts @@ -1,5 +1,5 @@ import { ASSET_SCHEMA, UI_TEXT } from '../../core/schema'; -import { dynamicSort, renderPageHeader, calculateAssetAge, formatInline, isWindows11Incompatible, calculatePcScoreDeductive } from '../../core/utils'; +import { API_BASE_URL, dynamicSort, renderPageHeader, calculateAssetAge, formatInline, isWindows11Incompatible, calculatePcScoreDeductive } from '../../core/utils'; import { setupTableSorting, SortState } from '../../core/tableHandler'; import { renderFilterBar, applyCommonFilters } from '../../core/filterHandler'; import { state } from '../../core/state'; @@ -77,7 +77,7 @@ export function createListView(container: HTMLElement, config: ListViewConfig) { const fetchMapConfig = async () => { try { - const res = await fetch(`http://${location.hostname}:3000/api/maps`); + const res = await fetch(`${API_BASE_URL}/api/maps`); dynamicMapConfig = await res.json(); } catch (err) { console.error('Failed to fetch map config:', err); } }; diff --git a/src/views/MapEditor.ts b/src/views/MapEditor.ts index 69a3841..ec76ac1 100644 --- a/src/views/MapEditor.ts +++ b/src/views/MapEditor.ts @@ -1,4 +1,5 @@ import { IMAGE_LOCATIONS } from '../components/Modal/SharedData'; +import { API_BASE_URL } from '../core/utils'; import { createIcons, X, Save, Trash2, ChevronLeft, ChevronRight } from 'lucide'; export class MapEditor { @@ -95,7 +96,7 @@ export class MapEditor { private async loadConfig() { try { - const res = await fetch(`http://${location.hostname}:3000/api/maps`); + const res = await fetch(`${API_BASE_URL}/api/maps`); this.allMapConfig = await res.json(); } catch (err) { console.error('Failed to load config:', err); @@ -195,7 +196,7 @@ export class MapEditor { this.saveBtn.disabled = true; this.saveBtn.textContent = '저장 중...'; - const res = await fetch(`http://${location.hostname}:3000/api/maps/save`, { + const res = await fetch(`${API_BASE_URL}/api/maps/save`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ path: this.currentPath, boxes: this.boxes })