Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #73

Merged
merged 8 commits into from
Aug 26, 2024
Merged

Dev #73

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/qodana_code_quality.yml

This file was deleted.

29 changes: 0 additions & 29 deletions qodana.yaml

This file was deleted.

84 changes: 32 additions & 52 deletions src/Components/AboutUs/AboutUs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Box sx={{width: '70%', p: '1rem'}}>
Expand All @@ -66,17 +46,17 @@ export function AboutUs() {
spacing={2}
>
{developers.map(developer =>
<Grid2 key={developer} xs={12} sm={6} lg={3}>
<Grid2 key={developer.id} xs={12} sm={6} lg={3}>
<Card>
<CardActionArea
component={Link}
to={getHyperlink(developer)}
to={developer.hyperlink || 'https://sist.shanghaitech.edu.cn'}
>
<CardHeader
avatar={
<Avatar alt={developer} src={developer === 'frm' ? `/avatars/${developer}.png` : `/avatars/${developer}.jpeg`}/>}
title={displayRealName(developer)}
subheader={displayMajor(developer)}
<Avatar alt={developer} src={developer.id === 'frm' ? `/avatars/${developer.id}.png` : `/avatars/${developer.id}.jpeg`}/>}
title={developer.name || '未知'}
subheader={developer.major || '未知'}
/>
</CardActionArea>
</Card>
Expand All @@ -97,4 +77,4 @@ export function AboutUs() {
<AgreementContent/>
</Box>
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function RecordBlock({Records, ApplicantID, editable}) {
<BaseListItem
Icon={<Chip label={record.Status} color={RecordStatusPalette[record.Status]}/>}
primary={
<Box sx={{display: 'flex', alignItems: 'center', justifyContent: 'space-between'}}>
<Box sx={{display: 'flex', alignItems: 'center', justifyContent: 'space-between', overflowWrap: 'anywhere'}}>
{record.ProgramID}
{
editable ?
Expand Down
1 change: 1 addition & 0 deletions src/Components/router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const router = createBrowserRouter([
path: '/datapoints/program/:programId',
element: <ProgramContentInDataPoints/>,
loader: programContentLoader,
action: programContentAction
}
]
}
Expand Down