diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml deleted file mode 100644 index ac8611b..0000000 --- a/.github/workflows/qodana_code_quality.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - - dev - - profile-dev - -jobs: - qodana: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2023.3 - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} \ No newline at end of file diff --git a/qodana.yaml b/qodana.yaml deleted file mode 100644 index 29f8f8c..0000000 --- a/qodana.yaml +++ /dev/null @@ -1,29 +0,0 @@ -#-------------------------------------------------------------------------------# -# Qodana analysis is configured by qodana.yaml file # -# https://www.jetbrains.com/help/qodana/qodana-yaml.html # -#-------------------------------------------------------------------------------# -version: "1.0" - -#Specify inspection profile for code analysis -profile: - name: qodana.starter - -#Enable inspections -#include: -# - name: - -#Disable inspections -#exclude: -# - name: -# paths: -# - - -#Execute shell command before Qodana execution (Applied in CI/CD pipeline) -#bootstrap: sh ./prepare-qodana.sh - -#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) -#plugins: -# - id: #(plugin id can be found at https://plugins.jetbrains.com) - -#Specify Qodana linter for analysis (Applied in CI/CD pipeline) -linter: jetbrains/qodana-js:latest diff --git a/src/Components/AboutUs/AboutUs.jsx b/src/Components/AboutUs/AboutUs.jsx index 9dde054..f9c92e2 100644 --- a/src/Components/AboutUs/AboutUs.jsx +++ b/src/Components/AboutUs/AboutUs.jsx @@ -10,52 +10,32 @@ import {OpenSIST} from "../common"; import {AgreementContent} from "../Agreement/Agreement"; export function AboutUs() { - const developers = ['cst', 'cze', 'frm', 'lbn']; - - const displayRealName = (username) => { - switch (username) { - case 'cze': - return '迟择恩 - 前端开发' - case 'lbn': - return '李炳楠 - 前端开发' - case 'cst': - return '陈溯汀 - 后端开发' - case 'frm': - return '范润铭 - 设计师' - default: - return '未知' - } - } - - const displayMajor = (username) => { - switch (username) { - case 'cze': - return '2020级CS本科生' - case 'lbn': - return '2020级CS本科生' - case 'cst': - return '2020级CS本科生' - case 'frm': - return '2021级创艺本科生' - default: - return '未知' - } - } - - const getHyperlink = (username) => { - switch (username) { - case 'cze': - return 'https://www.harrychi.com'; - case 'lbn': - return 'https://www.bingnanli.com'; - case 'cst': - return 'https://github.com/caoster'; - case 'frm': - return 'https://github.com/Fan-runming'; - default: - return 'https://sist.shanghaitech.edu.cn'; - } - } + const developers = [ + { + id: 'cze', + name: '迟择恩 - 前端开发', + major: '2020级CS本科生', + hyperlink: 'https://www.harrychi.com' + }, + { + id: 'lbn', + name: '李炳楠 - 前端开发', + major: '2020级CS本科生', + hyperlink: 'https://www.bingnanli.com' + }, + { + id: 'cst', + name: '陈溯汀 - 后端开发', + major: '2020级CS本科生', + hyperlink: 'https://github.com/caoster' + }, + { + id: 'frm', + name: '范润铭 - 设计师', + major: '2021级创艺本科生', + hyperlink: 'https://github.com/Fan-runming' + }, + ].sort((a, b) => a.id.localeCompare(b.id)) return ( @@ -66,17 +46,17 @@ export function AboutUs() { spacing={2} > {developers.map(developer => - + } - title={displayRealName(developer)} - subheader={displayMajor(developer)} + } + title={developer.name || '未知'} + subheader={developer.major || '未知'} /> @@ -97,4 +77,4 @@ export function AboutUs() { ) -} \ No newline at end of file +} diff --git a/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx b/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx index 9de86cf..bf29030 100644 --- a/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx +++ b/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx @@ -729,7 +729,7 @@ function RecordBlock({Records, ApplicantID, editable}) { } primary={ - + {record.ProgramID} { editable ? diff --git a/src/Components/router.jsx b/src/Components/router.jsx index cc6bd62..65e4bb1 100644 --- a/src/Components/router.jsx +++ b/src/Components/router.jsx @@ -112,6 +112,7 @@ const router = createBrowserRouter([ path: '/datapoints/program/:programId', element: , loader: programContentLoader, + action: programContentAction } ] }