[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

66
scripts/config.js Normal file
View File

@@ -0,0 +1,66 @@
/** 상품 목록·필터·모달 관련 상수 */
export const ITEMS_PER_PAGE = 20;
export const VISIBILITY_CONFIG = {
showUnlisted: false,
showSold: true,
};
export const STATUS_META = {
미판매: {
selectable: false,
defaultVisible: false,
soldOut: false,
},
판매예정: {
selectable: true,
defaultVisible: true,
soldOut: false,
},
판매중: {
selectable: true,
defaultVisible: true,
soldOut: false,
},
판매완료: {
selectable: true,
defaultVisible: false,
soldOut: true,
},
};
export const STATUS_FILTERS = [
{ key: '판매중', label: '판매중', defaultActive: true, visible: true },
{ key: '판매예정', label: '판매 예정', defaultActive: true, visible: true },
{ key: '미판매', label: '미판매', defaultActive: false, visible: VISIBILITY_CONFIG.showUnlisted },
{ key: '판매완료', label: '판매완료', defaultActive: false, visible: VISIBILITY_CONFIG.showSold },
];
export const STATUS_ORDER = {
판매중: 0,
판매예정: 1,
미판매: 2,
판매완료: 3,
};
export const STATUS_COLOR = {
판매중: 'bg-primary/10 text-primary border-primary/30',
판매예정: 'bg-amber-400/10 text-amber-600 border-amber-400/30',
판매완료: 'bg-slate-400/10 text-slate-500 border-slate-400/30',
미판매: 'bg-slate-200/10 text-slate-400 border-slate-300/30',
};
/** 모달 커스텀 태그(customTag) 키워드별 뱃지 스타일 */
export const TAG_STYLES = {
완전생산한정판: 'bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400',
특전포함: 'bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400',
미개봉: 'bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400',
무료배송: 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400',
풀윤활완료: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400',
급매: 'bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400',
정품: 'bg-sky-100 text-sky-700 dark:bg-sky-900/30 dark:text-sky-400',
풀옵션: 'bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-400',
};
export const TAG_DEFAULT_STYLE = 'bg-indigo-100 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-400';