Files
TK-FB-Project/web-ui/js/config.js
Hyungi Ahn b4037c9395 feat(web-ui): Refactor web-ui for improved maintainability and modularity
This commit introduces a series of refactoring changes to the web-ui
to remove hardcoded values and improve page integration.

- **Centralized Configuration:** Created  to
  centralize API ports, paths, and navigation URLs, replacing
  hardcoded values across multiple files.
- **Modular Component Loading:** Introduced
  to handle dynamic loading of common HTML components (e.g., sidebar, navbar),
  using paths from .
- **Modular Navigation:** Created  to centralize
  page redirection logic, improving maintainability and reducing direct
   manipulations.
- **Refactored Existing Modules:** Updated ,
  , , and
   to utilize the new , ,
  and  modules.
- **ES6 Module Compatibility:** Ensured  loads scripts
  as ES6 modules () to support  statements.
2026-01-06 15:54:49 +09:00

41 lines
1.2 KiB
JavaScript

// /js/config.js
// ES6 모듈을 사용하여 설정을 내보냅니다.
// 이 파일을 통해 프로젝트의 모든 하드코딩된 값을 관리합니다.
export const config = {
// API 관련 설정
api: {
// 로컬 개발 및 Docker 환경에서 사용하는 API 서버 포트
port: 20005,
// API의 기본 경로
path: '/api',
},
// 페이지 경로 설정
paths: {
// 로그인 페이지 경로
loginPage: '/index.html',
// 로그인 후 기본적으로 이동할 대시보드 경로
defaultDashboard: '/pages/dashboard/user.html',
// 시스템 대시보드 경로
systemDashboard: '/pages/dashboard/system.html',
// 그룹 리더 대시보드 경로
groupLeaderDashboard: '/pages/dashboard/group-leader.html',
},
// 공용 컴포넌트 경로 설정
components: {
// 사이드바 HTML 파일 경로
sidebar: '/components/sidebar.html',
// 네비게이션 바 HTML 파일 경로 (예상)
navbar: '/components/navbar.html',
},
// 애플리케이션 관련 기타 설정
app: {
// 토큰 만료 확인 주기 (밀리초 단위, 예: 5분)
tokenRefreshInterval: 5 * 60 * 1000,
}
};