From 7fec6cb63fa65bb90062acd60dda8b668b25291e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 6 Mar 2026 18:55:36 +0800 Subject: [PATCH] Add JSDoc documentation and file headers to all source files Co-Authored-By: Claude Opus 4.6 --- cypress.config.js | 12 ++ cypress/e2e/accountAdmin.cy.js | 5 + .../accountDuplicationCheck.cy.js | 6 + .../accountAdmin/confirmPasswordMessage.cy.js | 6 + cypress/e2e/accountAdmin/createAccont.cy.js | 6 + cypress/e2e/accountAdmin/deleteAccount.cy.js | 6 + cypress/e2e/accountAdmin/editAccount.cy.js | 6 + cypress/e2e/accountCrud.cy.js | 5 + cypress/e2e/accountInfo.cy.js | 5 + cypress/e2e/compare.cy.js | 7 + cypress/e2e/discoverConformance.cy.js | 5 + cypress/e2e/discoverMap.cy.js | 5 + cypress/e2e/discoverPerformance.cy.js | 5 + cypress/e2e/discoverTabs.cy.js | 5 + cypress/e2e/edgeCases.cy.js | 5 + cypress/e2e/fileOperations.cy.js | 5 + cypress/e2e/files.cy.js | 5 + cypress/e2e/filesCompare.cy.js | 5 + cypress/e2e/filesToDiscover.cy.js | 5 + cypress/e2e/login.cy.js | 5 + cypress/e2e/logout.cy.js | 5 + cypress/e2e/myAccount.cy.js | 5 + cypress/e2e/navigation.cy.js | 5 + cypress/e2e/notFound404.cy.js | 5 + cypress/e2e/pageAdmin.cy.js | 6 + cypress/e2e/pasteUrlLoginRedirect.cy.js | 6 + cypress/e2e/sweetAlertModals.cy.js | 5 + cypress/support/commands.js | 6 + cypress/support/e2e.js | 5 + cypress/support/intercept.js | 5 + eslint.config.mjs | 10 ++ index.html | 7 + postcss.config.cjs | 10 ++ src/App.vue | 9 + src/api/auth.js | 15 +- src/api/client.js | 19 +++ src/assets/base.css | 9 + src/assets/components.css | 8 + src/assets/layout.css | 7 + src/assets/main.css | 8 + src/assets/tailwind.css | 9 + src/assets/vendors.css | 9 + src/assets/zindex.css | 7 + src/components/AccountMenu/AcctMenu.vue | 15 ++ src/components/AccountMenu/SearchBar.vue | 18 ++ src/components/Badge.vue | 10 ++ src/components/Button.vue | 10 ++ src/components/ButtonFilled.vue | 10 ++ src/components/Compare/SidebarStates.vue | 33 ++-- .../Conformance/ConformanceResults.vue | 28 +++- .../Conformance/ConformanceSidebar.vue | 139 ++++++++++++++-- .../ConformanceSidebar/ActList.vue | 14 +- .../ConformanceSidebar/ActRadio.vue | 17 +- .../ConformanceSidebar/ActSeqDrag.vue | 12 ++ .../ConformanceRadioGroup.vue | 31 ++-- .../ConformanceSelectResult.vue | 12 ++ .../ConformanceSidebar/ConformanceShowBar.vue | 44 +++-- .../ConformanceTimeRange.vue | 20 ++- .../ConformanceSidebar/ResultArrow.vue | 11 ++ .../ConformanceSidebar/ResultCheck.vue | 11 ++ .../ConformanceSidebar/ResultDot.vue | 11 ++ .../ConformanceSidebar/TimeRangeDuration.vue | 24 ++- .../Discover/Conformance/MoreModal.vue | 30 +++- .../Discover/Map/Filter/ActAndSeq.vue | 34 ++-- src/components/Discover/Map/Filter/ActOcc.vue | 13 +- .../Discover/Map/Filter/ActOccCase.vue | 26 +-- .../Discover/Map/Filter/Attributes.vue | 54 +++--- src/components/Discover/Map/Filter/Funnel.vue | 23 ++- .../Discover/Map/Filter/Timeframes.vue | 30 ++-- src/components/Discover/Map/Filter/Trace.vue | 30 ++-- src/components/Discover/Map/SidebarFilter.vue | 105 +++++++++++- src/components/Discover/Map/SidebarState.vue | 24 ++- src/components/Discover/Map/SidebarTraces.vue | 30 ++-- src/components/Discover/Map/SidebarView.vue | 30 +++- src/components/Discover/StatusBar.vue | 20 ++- src/components/File/UploadModal.vue | 15 +- src/components/Header.vue | 14 +- src/components/Loading.vue | 4 + src/components/Navbar.vue | 31 ++-- src/components/Search.vue | 11 ++ src/components/durationjs.vue | 38 +++++ src/components/icons/DspLogo.vue | 4 + src/components/icons/IconChecked.vue | 10 ++ src/components/icons/IconDataFormat.vue | 4 + src/components/icons/IconEyeClose.vue | 4 + src/components/icons/IconEyeOpen.vue | 4 + src/components/icons/IconFlowChart.vue | 4 + src/components/icons/IconGrid.vue | 4 + src/components/icons/IconList.vue | 4 + src/components/icons/IconLockKey.vue | 4 + src/components/icons/IconMember.vue | 4 + src/components/icons/IconNA.vue | 4 + src/components/icons/IconRule.vue | 4 + src/components/icons/IconSearch.vue | 4 + src/components/icons/IconSetting.vue | 4 + src/components/icons/IconUploarding.vue | 4 + src/components/icons/IconVector.vue | 4 + src/components/icons/IconWarnTriangle.vue | 4 + src/components/icons/IconsFilter.vue | 4 + src/constants/constants.js | 26 +++ src/i18n/i18n.js | 11 ++ src/main.ts | 12 ++ src/module/abbreviateNumber.js | 17 +- src/module/alertModal.js | 156 +++++++++++++----- src/module/apiError.js | 25 ++- src/module/cytoscapeMap.js | 53 ++++-- src/module/cytoscapeMapTrace.js | 32 ++-- src/module/numberLabel.js | 31 ++-- src/module/setChartData.js | 130 +++++++++------ src/module/shortScaleNumber.js | 20 ++- src/module/sortNumEngZhtw.js | 39 +++-- src/module/timeLabel.js | 117 +++++++------ src/plugins/myPiniaPlugin.ts | 14 ++ src/router/index.ts | 11 ++ src/stores/acctMgmt.ts | 11 ++ src/stores/allMapData.ts | 13 ++ src/stores/compare.ts | 12 ++ src/stores/conformance.ts | 12 ++ src/stores/conformanceInput.ts | 18 +- src/stores/cytoscapeStore.ts | 15 +- src/stores/files.ts | 12 ++ src/stores/loading.ts | 14 ++ src/stores/login.ts | 12 ++ src/stores/main.ts | 10 ++ src/stores/mapCompareStore.ts | 11 ++ src/stores/mapPathStore.ts | 11 ++ src/stores/modal.ts | 18 +- src/stores/pageAdmin.ts | 34 +++- src/stores/performance.ts | 12 ++ src/types/apiError.d.ts | 11 ++ src/types/env.d.ts | 18 +- src/types/shims-vue.d.ts | 14 +- src/types/store.d.ts | 13 ++ src/types/vue-axios.d.ts | 10 ++ src/types/vue-router.d.ts | 14 ++ src/types/vue.d.ts | 10 ++ src/utils/cookieUtil.js | 39 ++++- src/utils/emitter.ts | 7 + src/utils/escapeHtml.js | 11 +- src/utils/jsUtils.js | 22 ++- src/utils/pageUtils.js | 25 ++- src/utils/timeUtil.js | 17 +- .../AccountAdmin/AccountAdmin.vue | 14 +- .../ModalAccountEditCreate.vue | 10 ++ .../AccountManagement/ModalAccountInfo.vue | 11 ++ .../AccountManagement/ModalContainer.vue | 11 ++ .../AccountManagement/ModalDeleteAlert.vue | 12 ++ src/views/AccountManagement/ModalHeader.vue | 10 ++ src/views/AccountManagement/MyAccount.vue | 21 +++ src/views/AuthContainer.vue | 11 ++ src/views/Compare/Dashboard/Compare.vue | 92 +++++++++++ src/views/Compare/MapCompare.vue | 48 ++++++ src/views/Discover/Conformance/index.vue | 11 ++ src/views/Discover/Map/Map.vue | 48 ++++++ src/views/Discover/Performance/FreqChart.vue | 21 ++- src/views/Discover/Performance/index.vue | 77 +++++++++ src/views/Files/Files.vue | 50 +++--- src/views/Login/Login.vue | 13 +- src/views/MainContainer.vue | 14 ++ src/views/MemberArea/index.vue | 11 ++ src/views/NotFound404.vue | 11 ++ src/views/Upload/index.vue | 43 +++-- tests/components/Badge.test.js | 5 + tests/components/Button.test.js | 5 + tests/components/ButtonFilled.test.js | 5 + tests/components/IconChecked.test.js | 5 + tests/components/Loading.test.js | 5 + tests/components/Login.test.js | 5 + tests/components/ModalHeader.test.js | 5 + tests/components/ResultArrow.test.js | 5 + tests/components/ResultCheck.test.js | 5 + tests/components/ResultDot.test.js | 5 + tests/components/Search.test.js | 5 + tests/router/routerGuard.test.js | 5 + tests/stores/acctMgmt.test.js | 5 + tests/stores/allMapData.test.js | 5 + tests/stores/compare.test.js | 5 + tests/stores/conformance.test.js | 5 + tests/stores/conformanceInput.test.js | 5 + tests/stores/cytoscapeStore.test.js | 5 + tests/stores/files.test.js | 5 + tests/stores/loading.test.js | 5 + tests/stores/login.test.js | 5 + tests/stores/mapCompareStore.test.js | 5 + tests/stores/mapPathStore.test.js | 5 + tests/stores/modal.test.js | 5 + tests/stores/pageAdmin.test.js | 5 + tests/stores/performance.test.js | 5 + tests/unit/module/abbreviateNumber.test.js | 5 + tests/unit/module/numberLabel.test.js | 5 + tests/unit/module/setChartData.test.js | 5 + tests/unit/module/shortScaleNumber.test.js | 5 + tests/unit/module/sortNumEngZhtw.test.js | 5 + tests/unit/module/timeLabel.test.js | 5 + tests/unit/utils/cookieUtil.test.js | 5 + tests/unit/utils/escapeHtml.test.js | 5 + tests/unit/utils/pageUtils.test.js | 5 + tests/views/MainContainerGuard.test.js | 5 + vite.config.js | 24 ++- 199 files changed, 2764 insertions(+), 503 deletions(-) diff --git a/cypress.config.js b/cypress.config.js index dd16b64..81ccad1 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,4 +1,16 @@ /* eslint-env node */ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// chiayin.kuo@dsp.im (chiayin), 2023/1/31 +// cindy.chang@dsp.im (Cindy Chang), 2024/8/12 +// imacat.yang@dsp.im (imacat), 2026/3/5 +/** + * @module cypress.config + * Cypress E2E test configuration with viewport + * settings and base URL. + */ + const { defineConfig } = require("cypress"); module.exports = defineConfig({ diff --git a/cypress/e2e/accountAdmin.cy.js b/cypress/e2e/accountAdmin.cy.js index 32f2329..2038923 100644 --- a/cypress/e2e/accountAdmin.cy.js +++ b/cypress/e2e/accountAdmin.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Account Management', () => { diff --git a/cypress/e2e/accountAdmin/accountDuplicationCheck.cy.js b/cypress/e2e/accountAdmin/accountDuplicationCheck.cy.js index 43717af..e20aa7e 100644 --- a/cypress/e2e/accountAdmin/accountDuplicationCheck.cy.js +++ b/cypress/e2e/accountAdmin/accountDuplicationCheck.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/07/03 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../../support/intercept'; const MSG_ACCOUNT_NOT_UNIQUE = 'Account has already been registered.'; diff --git a/cypress/e2e/accountAdmin/confirmPasswordMessage.cy.js b/cypress/e2e/accountAdmin/confirmPasswordMessage.cy.js index be1231d..ed700df 100644 --- a/cypress/e2e/accountAdmin/confirmPasswordMessage.cy.js +++ b/cypress/e2e/accountAdmin/confirmPasswordMessage.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/07/02 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../../support/intercept'; describe('Password validation on create account.', () => { diff --git a/cypress/e2e/accountAdmin/createAccont.cy.js b/cypress/e2e/accountAdmin/createAccont.cy.js index 75e9def..cc9cf60 100644 --- a/cypress/e2e/accountAdmin/createAccont.cy.js +++ b/cypress/e2e/accountAdmin/createAccont.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/07/02 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../../support/intercept'; describe('Create an Account', () => { diff --git a/cypress/e2e/accountAdmin/deleteAccount.cy.js b/cypress/e2e/accountAdmin/deleteAccount.cy.js index b37b1ee..dbac1fc 100644 --- a/cypress/e2e/accountAdmin/deleteAccount.cy.js +++ b/cypress/e2e/accountAdmin/deleteAccount.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/07/03 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../../support/intercept'; describe('Delete an Account', () => { diff --git a/cypress/e2e/accountAdmin/editAccount.cy.js b/cypress/e2e/accountAdmin/editAccount.cy.js index 891945f..2ab6de0 100644 --- a/cypress/e2e/accountAdmin/editAccount.cy.js +++ b/cypress/e2e/accountAdmin/editAccount.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/07/03 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../../support/intercept'; const MODAL_TITLE_ACCOUNT_EDIT = 'Account Edit'; diff --git a/cypress/e2e/accountCrud.cy.js b/cypress/e2e/accountCrud.cy.js index bf138dc..00981d7 100644 --- a/cypress/e2e/accountCrud.cy.js +++ b/cypress/e2e/accountCrud.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Account Management CRUD', () => { diff --git a/cypress/e2e/accountInfo.cy.js b/cypress/e2e/accountInfo.cy.js index df8b1e4..30b6d36 100644 --- a/cypress/e2e/accountInfo.cy.js +++ b/cypress/e2e/accountInfo.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Account Info Modal', () => { diff --git a/cypress/e2e/compare.cy.js b/cypress/e2e/compare.cy.js index e9c37cf..0cfb486 100644 --- a/cypress/e2e/compare.cy.js +++ b/cypress/e2e/compare.cy.js @@ -1,3 +1,10 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// chiayin.kuo@dsp.im (chiayin), 2024/02/22 +// cindy.chang@dsp.im (Cindy Chang), 2024/05/30 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Compare', () => { diff --git a/cypress/e2e/discoverConformance.cy.js b/cypress/e2e/discoverConformance.cy.js index ff5a8b4..810b2c0 100644 --- a/cypress/e2e/discoverConformance.cy.js +++ b/cypress/e2e/discoverConformance.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Discover Conformance Page', () => { diff --git a/cypress/e2e/discoverMap.cy.js b/cypress/e2e/discoverMap.cy.js index d3531aa..6467171 100644 --- a/cypress/e2e/discoverMap.cy.js +++ b/cypress/e2e/discoverMap.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Discover Map Page', () => { diff --git a/cypress/e2e/discoverPerformance.cy.js b/cypress/e2e/discoverPerformance.cy.js index e3826b4..d690b75 100644 --- a/cypress/e2e/discoverPerformance.cy.js +++ b/cypress/e2e/discoverPerformance.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Discover Performance Page', () => { diff --git a/cypress/e2e/discoverTabs.cy.js b/cypress/e2e/discoverTabs.cy.js index e4d71eb..0cd55f3 100644 --- a/cypress/e2e/discoverTabs.cy.js +++ b/cypress/e2e/discoverTabs.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Discover Tab Navigation', () => { diff --git a/cypress/e2e/edgeCases.cy.js b/cypress/e2e/edgeCases.cy.js index 701f59a..c111f2d 100644 --- a/cypress/e2e/edgeCases.cy.js +++ b/cypress/e2e/edgeCases.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Edge Cases', () => { diff --git a/cypress/e2e/fileOperations.cy.js b/cypress/e2e/fileOperations.cy.js index 93f64cb..10c3959 100644 --- a/cypress/e2e/fileOperations.cy.js +++ b/cypress/e2e/fileOperations.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('File Operations', () => { diff --git a/cypress/e2e/files.cy.js b/cypress/e2e/files.cy.js index 570e31e..211e871 100644 --- a/cypress/e2e/files.cy.js +++ b/cypress/e2e/files.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Files Page', () => { diff --git a/cypress/e2e/filesCompare.cy.js b/cypress/e2e/filesCompare.cy.js index d65b348..7bdf398 100644 --- a/cypress/e2e/filesCompare.cy.js +++ b/cypress/e2e/filesCompare.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Files Page - COMPARE Tab', () => { diff --git a/cypress/e2e/filesToDiscover.cy.js b/cypress/e2e/filesToDiscover.cy.js index 6dbeebd..452ecc7 100644 --- a/cypress/e2e/filesToDiscover.cy.js +++ b/cypress/e2e/filesToDiscover.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Files to Discover Entry Flow', () => { diff --git a/cypress/e2e/login.cy.js b/cypress/e2e/login.cy.js index 4bb626b..2d26c1d 100644 --- a/cypress/e2e/login.cy.js +++ b/cypress/e2e/login.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { setupApiIntercepts, loginWithFixtures } from '../support/intercept'; describe('Login Flow', () => { diff --git a/cypress/e2e/logout.cy.js b/cypress/e2e/logout.cy.js index 6c2b5ef..1439b08 100644 --- a/cypress/e2e/logout.cy.js +++ b/cypress/e2e/logout.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Logout Flow', () => { diff --git a/cypress/e2e/myAccount.cy.js b/cypress/e2e/myAccount.cy.js index 5e022bf..c6b3bb4 100644 --- a/cypress/e2e/myAccount.cy.js +++ b/cypress/e2e/myAccount.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('My Account Page', () => { diff --git a/cypress/e2e/navigation.cy.js b/cypress/e2e/navigation.cy.js index d8fdc3e..82088c1 100644 --- a/cypress/e2e/navigation.cy.js +++ b/cypress/e2e/navigation.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures, setupApiIntercepts } from '../support/intercept'; describe('Navigation and Routing', () => { diff --git a/cypress/e2e/notFound404.cy.js b/cypress/e2e/notFound404.cy.js index 74d256e..43e934e 100644 --- a/cypress/e2e/notFound404.cy.js +++ b/cypress/e2e/notFound404.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('404 Not Found Page', () => { diff --git a/cypress/e2e/pageAdmin.cy.js b/cypress/e2e/pageAdmin.cy.js index c58d088..7cbdec7 100644 --- a/cypress/e2e/pageAdmin.cy.js +++ b/cypress/e2e/pageAdmin.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/06/03 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('Discover page navigation tabs', () => { diff --git a/cypress/e2e/pasteUrlLoginRedirect.cy.js b/cypress/e2e/pasteUrlLoginRedirect.cy.js index bb3b785..be03807 100644 --- a/cypress/e2e/pasteUrlLoginRedirect.cy.js +++ b/cypress/e2e/pasteUrlLoginRedirect.cy.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2024-2026 DSP, inc. All rights reserved. +// Authors: +// cindy.chang@dsp.im (Cindy Chang), 2024/06/11 +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { setupApiIntercepts } from '../support/intercept'; describe('Paste URL login redirect', () => { diff --git a/cypress/e2e/sweetAlertModals.cy.js b/cypress/e2e/sweetAlertModals.cy.js index 4abaacb..8b1ec12 100644 --- a/cypress/e2e/sweetAlertModals.cy.js +++ b/cypress/e2e/sweetAlertModals.cy.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + import { loginWithFixtures } from '../support/intercept'; describe('SweetAlert2 Modals', () => { diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 374bf91..f93cdfb 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -1,3 +1,9 @@ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// chiayin.kuo@dsp.im (chiayin), 2023/01/31 +// imacat.yang@dsp.im (imacat), 2026/03/06 + // *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 7e53ad2..45bc455 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// chiayin.kuo@dsp.im (chiayin), 2023/01/31 + // *********************************************************** // This example support/index.js is processed and // loaded automatically before your test files. diff --git a/cypress/support/intercept.js b/cypress/support/intercept.js index 4960ce7..70744ef 100644 --- a/cypress/support/intercept.js +++ b/cypress/support/intercept.js @@ -1,3 +1,8 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/03/05 + /** * Sets up cy.intercept for all API endpoints using fixture files. * Call setupApiIntercepts() in beforeEach to mock the entire backend. diff --git a/eslint.config.mjs b/eslint.config.mjs index 3558b52..b28702e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,3 +1,13 @@ +// The Lucia project. +// Copyright 2026-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2026/3/6 +/** + * @module eslint.config + * ESLint flat configuration for Vue, Cypress, and + * Prettier integration. + */ + import js from "@eslint/js"; import pluginVue from "eslint-plugin-vue"; import pluginCypress from "eslint-plugin-cypress"; diff --git a/index.html b/index.html index 0f1a1b6..118efda 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,10 @@ + diff --git a/postcss.config.cjs b/postcss.config.cjs index 483f378..898dbf7 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,3 +1,13 @@ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// chiayin.kuo@dsp.im (chiayin), 2023/1/31 +// imacat.yang@dsp.im (imacat), 2026/3/6 +/** + * @module postcss.config + * PostCSS configuration with Tailwind CSS plugin. + */ + module.exports = { plugins: { "@tailwindcss/postcss": {}, diff --git a/src/App.vue b/src/App.vue index 543cfdb..22ced1e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,5 +3,14 @@ diff --git a/src/api/auth.js b/src/api/auth.js index c14f55e..4d65701 100644 --- a/src/api/auth.js +++ b/src/api/auth.js @@ -1,10 +1,21 @@ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2023/9/23 +/** @module auth Authentication token refresh utilities. */ + import axios from 'axios'; import { getCookie, setCookie, setCookieWithoutExpiration } from '@/utils/cookieUtil.js'; /** - * Refresh the access token using the refresh token cookie. - * Uses plain axios (not apiClient) to avoid interceptor loops. + * Refreshes the access token using the stored refresh token cookie. + * + * Uses plain axios (not apiClient) to avoid interceptor loops. Updates + * both the access token (session cookie) and refresh token (6-month + * expiry) cookies. + * * @returns {Promise} The new access token. + * @throws {Error} If the refresh request fails. */ export async function refreshTokenAndGetNew() { const api = '/api/oauth/token'; diff --git a/src/api/client.js b/src/api/client.js index 24dd77a..ae3d3fc 100644 --- a/src/api/client.js +++ b/src/api/client.js @@ -1,6 +1,17 @@ +// The Lucia project. +// Copyright 2023-2026 DSP, inc. All rights reserved. +// Authors: +// imacat.yang@dsp.im (imacat), 2023/9/23 +/** + * @module apiClient Centralized axios instance with request/response + * interceptors for authentication token management and automatic + * 401 token refresh with request queuing. + */ + import axios from 'axios'; import { getCookie, deleteCookie } from '@/utils/cookieUtil.js'; +/** Axios instance configured with auth interceptors. */ const apiClient = axios.create(); // Request interceptor: automatically attach Authorization header @@ -16,11 +27,19 @@ apiClient.interceptors.request.use((config) => { let isRefreshing = false; let pendingRequests = []; +/** + * Resolves all pending requests with the new access token. + * @param {string} newToken - The refreshed access token. + */ function onRefreshSuccess(newToken) { pendingRequests.forEach((cb) => cb(newToken)); pendingRequests = []; } +/** + * Rejects all pending requests with the refresh error. + * @param {Error} error - The token refresh error. + */ function onRefreshFailure(error) { pendingRequests.forEach((cb) => cb(null, error)); pendingRequests = []; diff --git a/src/assets/base.css b/src/assets/base.css index b34b5f9..24ef516 100644 --- a/src/assets/base.css +++ b/src/assets/base.css @@ -1,3 +1,12 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/4/18 + cindy.chang@dsp.im (Cindy Chang), 2024/8/16 + + Base CSS layer with global font, validation, height, + and PrimeVue sidebar overrides. */ + /* 全域字型 */ @layer base { html { diff --git a/src/assets/components.css b/src/assets/components.css index 4ad4b6e..5af49b1 100644 --- a/src/assets/components.css +++ b/src/assets/components.css @@ -1,3 +1,11 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/2/17 + + Reusable component styles including loaders, scrollbar, + buttons, and toggle buttons. */ + /* loading */ .loader { width: 64px; diff --git a/src/assets/layout.css b/src/assets/layout.css index 082efbf..049ac0c 100644 --- a/src/assets/layout.css +++ b/src/assets/layout.css @@ -1,3 +1,10 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/4/18 + + Layout styles for navbar and heading elements. */ + /* Navbar */ nav ul>li { @apply px-2 py-3.5 duration-300 hover:bg-neutral-900 hover:text-neutral-10 ; diff --git a/src/assets/main.css b/src/assets/main.css index b53c1dc..d02d53e 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,3 +1,11 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/1/31 + cindy.chang@dsp.im (Cindy Chang), 2024/6/18 + + Main CSS entry point that imports all stylesheet modules. */ + @import './tailwind.css'; @import './base.css'; @import './components.css'; diff --git a/src/assets/tailwind.css b/src/assets/tailwind.css index 8e994ec..36cfd2e 100644 --- a/src/assets/tailwind.css +++ b/src/assets/tailwind.css @@ -1,3 +1,12 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/1/31 + imacat.yang@dsp.im (imacat), 2026/3/6 + + Tailwind CSS theme configuration with custom colors, + font sizes, breakpoints, and animations. */ + /* 引入 Google fonts */ @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap'); diff --git a/src/assets/vendors.css b/src/assets/vendors.css index dd8f066..d6fdaaf 100644 --- a/src/assets/vendors.css +++ b/src/assets/vendors.css @@ -1,3 +1,12 @@ +/* The Lucia project. + Copyright 2023-2026 DSP, inc. All rights reserved. + Authors: + chiayin.kuo@dsp.im (chiayin), 2023/3/14 + cindy.chang@dsp.im (Cindy Chang), 2024/7/26 + + Third-party vendor style overrides for Google Material + Icons, vue-toast-notification, and PrimeVue components. */ + /* import Google font icon */ @import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200'); diff --git a/src/assets/zindex.css b/src/assets/zindex.css index 8eb57b7..e26025c 100644 --- a/src/assets/zindex.css +++ b/src/assets/zindex.css @@ -1,3 +1,10 @@ +/* The Lucia project. + Copyright 2024-2026 DSP, inc. All rights reserved. + Authors: + cindy.chang@dsp.im (Cindy Chang), 2024/6/18 + + Z-index and positioning rules for the main content area. */ + main.w-full { z-index: 1; position: absolute; /*if it were static, the acct mgmt menu would be overlapped*/ diff --git a/src/components/AccountMenu/AcctMenu.vue b/src/components/AccountMenu/AcctMenu.vue index 9ab14d7..2433d5a 100644 --- a/src/components/AccountMenu/AcctMenu.vue +++ b/src/components/AccountMenu/AcctMenu.vue @@ -30,6 +30,16 @@ diff --git a/src/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue b/src/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue index 574cda0..f2d8f27 100644 --- a/src/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue +++ b/src/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue @@ -9,6 +9,17 @@ diff --git a/src/components/durationjs.vue b/src/components/durationjs.vue index 1f1195f..a468900 100644 --- a/src/components/durationjs.vue +++ b/src/components/durationjs.vue @@ -40,6 +40,18 @@ diff --git a/src/views/Compare/Dashboard/Compare.vue b/src/views/Compare/Dashboard/Compare.vue index a59ff3f..794fd65 100644 --- a/src/views/Compare/Dashboard/Compare.vue +++ b/src/views/Compare/Dashboard/Compare.vue @@ -150,6 +150,16 @@ diff --git a/src/views/Upload/index.vue b/src/views/Upload/index.vue index f4b379f..abc3671 100644 --- a/src/views/Upload/index.vue +++ b/src/views/Upload/index.vue @@ -78,6 +78,18 @@