feat: PC 페이지 개발 대기 상태 전환 및 자산현황 뷰 노출 범위 제한 (서버 탭 전용)
This commit is contained in:
11
src/main.ts
11
src/main.ts
@@ -47,10 +47,17 @@ const saveUsersToDB = () => apiBatchSave(`http://${location.hostname}:3000/api/u
|
||||
function refreshView() {
|
||||
const mainContent = document.getElementById('main-content')!;
|
||||
if (!mainContent) return;
|
||||
|
||||
// 서버 탭이 아닐 경우 '자산현황(위치)' 뷰 진입 방지 및 강제 리스트 모드 전환
|
||||
if (state.activeSubTab !== '서버' && state.viewMode === 'location') {
|
||||
state.viewMode = 'list';
|
||||
}
|
||||
|
||||
const isServerTab = state.activeSubTab === '서버';
|
||||
|
||||
mainContent.innerHTML = `
|
||||
<div class="view-header">
|
||||
<div class="view-toggle-container">
|
||||
<div class="view-toggle-container" style="${isServerTab ? '' : 'display:none;'}">
|
||||
<button class="mode-toggle-btn ${state.viewMode === 'location' ? 'active' : ''}" data-mode="location">자산현황(위치)</button>
|
||||
<button class="mode-toggle-btn ${state.viewMode === 'list' ? 'active' : ''}" data-mode="list">자산목록</button>
|
||||
</div>
|
||||
@@ -73,7 +80,7 @@ function refreshView() {
|
||||
} else {
|
||||
renderSWTable(viewBody); // 리스트 형식
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 통합 저장 및 갱신
|
||||
async function saveAllDataToDB() {
|
||||
|
||||
Reference in New Issue
Block a user