[260204] 역할별 스크립트 분리, 다크모드 추가

This commit is contained in:
2026-02-04 14:56:59 +09:00
parent d4ccc616a7
commit b29cd5e7d9
12 changed files with 1165 additions and 1056 deletions

17
scripts/state.js Normal file
View File

@@ -0,0 +1,17 @@
/** 앱 전역 상태 */
import products from '../data/index.js';
import { STATUS_META } from './config.js';
export const productsData = products;
export const state = {
currentPage: 1,
activeCategories: new Set(['All']),
visibleProducts: [...products],
searchKeyword: '',
activeStatuses: new Set(
Object.entries(STATUS_META)
.filter(([_, meta]) => meta.defaultVisible)
.map(([status]) => status),
),
};