Skip to content

Commit

Permalink
Merge pull request #6 from Gaohaoyang/develop
Browse files Browse the repository at this point in the history
feat: 🎸 update
  • Loading branch information
Gaohaoyang authored Sep 28, 2024
2 parents e304760 + 43d54d6 commit f27c972
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pte-crx",
"private": true,
"version": "1.2.1",
"version": "1.2.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
24 changes: 15 additions & 9 deletions src/ContentUI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ContentUI = () => {
key: string
name: string
score: number
skills: string[]
skills: string[][]
support: Array<'Listening' | 'Reading' | 'Speaking' | 'Writing'>
}>
>([])
Expand Down Expand Up @@ -166,7 +166,7 @@ const ContentUI = () => {
key: string
name: string
score: number
skills: string[]
skills: string[][]
support: Array<'Listening' | 'Reading' | 'Speaking' | 'Writing'>
}> = []
for (const key in pteData.skillsProfile) {
Expand Down Expand Up @@ -225,13 +225,13 @@ const ContentUI = () => {
setDragging(false)
}}
>
<div className="fixed left-10 top-40 z-[9999]">
<div className="fixed left-10 top-28 z-[9999]">
<div
className={clsx(
'relative box-border flex flex-col overflow-auto rounded-xl bg-sky-50 text-sm text-slate-900 shadow-cyan-950/55 transition-all',
minimize
? 'h-6 w-6 overflow-hidden p-0'
: 'h-[574px] max-h-[71vh] w-[564px] p-4',
: 'h-[590px] max-h-[81vh] w-[524px] p-4',
dragging ? 'scale-[1.02] shadow-2xl' : 'scale-100 shadow-md',
)}
>
Expand Down Expand Up @@ -269,7 +269,7 @@ const ContentUI = () => {
<VscGithubInverted className="text-slate-300 transition-all duration-300 hover:scale-110 hover:cursor-pointer hover:text-slate-900" />
</a>
</div>
<table className="mt-1 w-full border-collapse border-y-2 border-slate-400 text-center">
<table className="w-full border-collapse border-y-2 border-slate-400 text-center text-sm">
<thead className="border-b border-slate-400">
<tr>
<th className="border-r border-slate-400"></th>
Expand Down Expand Up @@ -361,13 +361,19 @@ const ContentUI = () => {
</tbody>
</table>
<div className="mt-2 text-base font-bold">Sub-Skills Score</div>
<div className="mt-1">
<div className="">
{skillsProfile.map((skill) => (
<div key={skill.key} className="mb-3">
<div className="flex items-center justify-between">
<div className="text-xs text-slate-700">{skill.name}</div>
<div className="flex items-end justify-between">
<div className="text-slate-700">{skill.name}</div>
<div className="ml-1 flex items-center justify-end">
<div className="">{skill.skills.join(', ')}</div>
<div className="flex flex-col items-end">
{skill.skills.map((skillGroup, index) => (
<div key={index} className="text-xs">
{skillGroup.join(', ')}
</div>
))}
</div>
<div
className={clsx(
'ml-2 font-bold',
Expand Down
24 changes: 15 additions & 9 deletions src/ContentUI/scoreList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const SWT = 'SWT'
const WE = 'WE'

const FIBRW = 'FIB-RW'
const MCMRW = 'MCM-RW'
const MCMR = 'MCM-R'
const RO = 'RO'
const FIBR = 'FIB-R'
const MCSR = 'MCS-R'
Expand All @@ -158,23 +158,29 @@ const WFD = 'WFD'

export const skillsAnalysis = {
openResponseSpeakingWriting: {
component: [WE, DI, RTS],
component: [[WE, DI, RTS]],
support: ['Speaking', 'Writing'],
},
reproducingSpokenWrittenLanguage: {
component: [WFD, RA, RS, SST],
component: [[WFD, RA, RS, SST]],
support: ['Speaking', 'Writing'],
},
writingExtended: { component: [WE, SST, SWT], support: ['Writing'] },
writingShort: { component: [WFD, FIBRW, FIBL], support: ['Writing'] },
speakingExtended: { component: [DI, RTS], support: ['Speaking'] },
speakingShort: { component: [RA, RS, ASQ], support: ['Speaking'] },
writingExtended: { component: [[WE, SST, SWT]], support: ['Writing'] },
writingShort: { component: [[WFD, FIBRW, FIBL]], support: ['Writing'] },
speakingExtended: { component: [[DI, RTS]], support: ['Speaking'] },
speakingShort: { component: [[RA, RS, ASQ]], support: ['Speaking'] },
multipleSkillsComprehension: {
component: [FIBRW, SST, WFD, RA, RS, SWT, HIW],
component: [
[WFD, RS, SST, FIBL, HIW, ASQ],
[RA, FIBRW, SWT],
],
support: ['Listening', 'Reading'],
},
singleSkillComprehension: {
component: [RO, FIBR, MCMRW, MCSR, MCML, MCSL, SMW],
component: [
[MCML, MCSL, SMW],
[FIBR, RO, MCMR, MCSR],
],
support: ['Listening', 'Reading'],
},
}

0 comments on commit f27c972

Please sign in to comment.