From 0a92267263af9443ea24984383ab8da66ccacd99 Mon Sep 17 00:00:00 2001 From: Haoyang Gao Date: Tue, 3 Sep 2024 11:45:06 -0400 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 6 + DonationList.html | 146 --------------------- manifest.config.ts | 8 +- package.json | 2 + pnpm-lock.yaml | 72 +++++++++++ src/App.tsx | 46 ++++--- src/ContentUI/ProgressBar/index.tsx | 18 +-- src/ContentUI/index.tsx | 194 ++++++++++++++++------------ src/ContentUI/scoreList.ts | 60 ++++----- src/content.tsx | 15 +-- src/index.css | 68 ---------- src/main.tsx | 9 +- src/type/PTEDataType.ts | 94 +++++++------- 13 files changed, 320 insertions(+), 418 deletions(-) create mode 100644 .prettierrc delete mode 100644 DonationList.html delete mode 100644 src/index.css diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..f359b31 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "plugins": ["prettier-plugin-tailwindcss"], + "semi": false, + "singleQuote": true, + "printWidth": 80 +} diff --git a/DonationList.html b/DonationList.html deleted file mode 100644 index 4018428..0000000 --- a/DonationList.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Donation List - - - -
-

Thank you for your support with the PTE Core Sub-Scores Chrome Extension!

-

I really appreciate it. Have a great day! :)

-
-
- Last updated: 2024-08-20 -
- - - - - - - - - - - - - - - - - - - -
NameDateAmountMethodMessage
T*m L*2024-08-20CA$5.00Interac e-Transfer-
-
-
-
- -
-

You can support me through the following methods.

-
-
-
- Interac e-Transfer -
-
gaohaoyang126@outlook.com
-
-
-
- PayPal -
-
- - - PayPal Donation Link - -
-
-
-
Wechat Pay
-
- -
-
-
-
AliPay
-
- -
-
-
-
- - diff --git a/manifest.config.ts b/manifest.config.ts index f9b6fe8..a57fef8 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -32,10 +32,10 @@ export default defineManifest(async (env) => ({ ], permissions: ['tabs'], web_accessible_resources: [ - { - resources: ['DonationList.html'], - matches: [''], - }, + // { + // resources: ['DonationList.html'], + // matches: [''], + // }, { resources: ['injected.js'], matches: ['https://mypte.pearsonpte.com/*'], diff --git a/package.json b/package.json index 8aeb386..e4c95d6 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,8 @@ "globals": "^15.9.0", "postcss": "^8.4.41", "postcss-nested": "^6.2.0", + "prettier": "^3.3.3", + "prettier-plugin-tailwindcss": "^0.6.6", "tailwindcss": "^3.4.10", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f855255..963da9c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,6 +63,12 @@ importers: postcss-nested: specifier: ^6.2.0 version: 6.2.0(postcss@8.4.41) + prettier: + specifier: ^3.3.3 + version: 3.3.3 + prettier-plugin-tailwindcss: + specifier: ^0.6.6 + version: 0.6.6(prettier@3.3.3) tailwindcss: specifier: ^3.4.10 version: 3.4.10 @@ -1285,6 +1291,66 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-plugin-tailwindcss@0.6.6: + resolution: {integrity: sha512-OPva5S7WAsPLEsOuOWXATi13QrCKACCiIonFgIR6V4lYv4QLp++UXVhZSzRbZxXGimkQtQT86CC6fQqTOybGng==} + engines: {node: '>=14.21.3'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@trivago/prettier-plugin-sort-imports': '*' + '@zackad/prettier-plugin-twig-melody': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-multiline-arrays: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-sort-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + '@zackad/prettier-plugin-twig-melody': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-multiline-arrays: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -2790,6 +2856,12 @@ snapshots: prelude-ls@1.2.1: {} + prettier-plugin-tailwindcss@0.6.6(prettier@3.3.3): + dependencies: + prettier: 3.3.3 + + prettier@3.3.3: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 diff --git a/src/App.tsx b/src/App.tsx index 149667b..68158b0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,11 @@ -import './App.css'; +import './App.css' function App() { return ( -
-

Welcome to use

-

PTE Core Sub-Scores

-

Chrome Extension!

+
+

Welcome to use

+

PTE Core Sub-Scores

+

Chrome Extension!

  • 1. Visit your{' '} @@ -13,16 +13,21 @@ function App() { className="text-blue-600" href="https://mypte.pearsonpte.com/my-activity" onClick={() => { - chrome.tabs.create({ url: 'https://mypte.pearsonpte.com/my-activity' }); + chrome.tabs.create({ + url: 'https://mypte.pearsonpte.com/my-activity', + }) }} > PTE score page
  • -
  • 2. Then you'll see a panel including your sub-scores, CLB levels, etc.
  • +
  • + 2. Then you'll see a panel including your sub-scores, CLB levels, etc. +
- If you found this helpful, feel free to sponsor me for a cup of coffee! ☕ :) + If you found this helpful, feel free to sponsor me for a cup of coffee! + ☕ :)
Your name will appear on the{' '} @@ -30,15 +35,18 @@ function App() { className="text-blue-500" href="" onClick={() => { - chrome.tabs.create({ url: chrome.runtime.getURL('DonationList.html') }); + chrome.tabs.create({ + url: 'https://gaohaoyang.github.io/pte-crx-page/?scrollTo=donation', + }) }} > donation list. - {' '} - ⭐ + +
+
+ You can support me through the following methods.
-
You can support me through the following methods.
- +
@@ -50,7 +58,7 @@ function App() { PayPal @@ -60,7 +68,7 @@ function App() { onClick={() => { chrome.tabs.create({ url: 'https://www.paypal.com/donate/?business=NB2D3UXSQKDKU&no_recurring=0&item_name=Thanks+for+your+support%21+I+really+appreciate+it.+Have+a+great+day%21¤cy_code=CAD', - }); + }) }} > PayPal Donation Link @@ -71,7 +79,7 @@ function App() { Wechat Pay @@ -81,7 +89,7 @@ function App() { AliPay @@ -90,7 +98,7 @@ function App() {
- ); + ) } -export default App; +export default App diff --git a/src/ContentUI/ProgressBar/index.tsx b/src/ContentUI/ProgressBar/index.tsx index 01a486e..fbc3b1f 100644 --- a/src/ContentUI/ProgressBar/index.tsx +++ b/src/ContentUI/ProgressBar/index.tsx @@ -1,17 +1,17 @@ type Props = { - progress: number; - total?: number; -}; + progress: number + total?: number +} const ProgressBar = (props: Props) => { - const { progress, total = 90 } = props; + const { progress, total = 90 } = props return ( -
+
- ); -}; + ) +} -export default ProgressBar; +export default ProgressBar diff --git a/src/ContentUI/index.tsx b/src/ContentUI/index.tsx index 20463e7..42e4d03 100644 --- a/src/ContentUI/index.tsx +++ b/src/ContentUI/index.tsx @@ -1,9 +1,9 @@ -import { useEffect, useState } from 'react'; -import { getEqualScores, skillsAnalysis, clbEEScore } from './scoreList'; -import { PTEDataType } from '../type/PTEDataType'; -import ProgressBar from './ProgressBar'; -import clsx from 'clsx'; -import Draggable from 'react-draggable'; +import { useEffect, useState } from 'react' +import { getEqualScores, skillsAnalysis, clbEEScore } from './scoreList' +import { PTEDataType } from '../type/PTEDataType' +import ProgressBar from './ProgressBar' +import clsx from 'clsx' +import Draggable from 'react-draggable' const ContentUI = () => { const [scoresComparison, setScoresComparison] = useState< @@ -14,30 +14,30 @@ const ContentUI = () => { | 'IELTS(G)' | 'Points for EE(Without Spouse)' | 'Points for EE(With Spouse)' - | 'Points for EE(As Spouse)'; - listening?: number; - reading?: number; - speaking?: number; - writing?: number; + | 'Points for EE(As Spouse)' + listening?: number + reading?: number + speaking?: number + writing?: number }[] - >([]); + >([]) const [skillsProfile, setSkillsProfile] = useState< Array<{ key: string; name: string; score: number; skills: string[] }> - >([]); - const [minimize, setMinimize] = useState(true); - const [showContent, setShowContent] = useState(false); + >([]) + const [minimize, setMinimize] = useState(true) + const [showContent, setShowContent] = useState(false) useEffect(() => { - console.log('PTE core Sub-Scores Chrome Extension is working.'); + console.log('PTE core Sub-Scores Chrome Extension is working.') // console.log('content script start'); // inject injected script - const s = document.createElement('script'); - s.src = chrome.runtime.getURL('injected.js'); + const s = document.createElement('script') + s.src = chrome.runtime.getURL('injected.js') s.onload = function () { // @ts-expect-error this is injected script - this.remove(); - }; - (document.head || document.documentElement).appendChild(s); + this.remove() + } + ;(document.head || document.documentElement).appendChild(s) // receive message from injected script window.addEventListener('message', function (e) { @@ -45,35 +45,35 @@ const ContentUI = () => { // console.log(typeof e.data.data); try { // console.log(JSON.parse(e.data.data)); - const pteData: PTEDataType = JSON.parse(e.data.data); - setShowContent(true); + const pteData: PTEDataType = JSON.parse(e.data.data) + setShowContent(true) // console.log('JSON', JSON.stringify(pteData)); - processData(pteData); + processData(pteData) // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // console.log('error', error); } - }); - }, []); + }) + }, []) const processData = (pteData: PTEDataType) => { const scoreList: { - name: 'Listening' | 'Speaking' | 'Reading' | 'Writing'; - score: number; - clb?: number; - ieltsCore?: number; + name: 'Listening' | 'Speaking' | 'Reading' | 'Writing' + score: number + clb?: number + ieltsCore?: number }[] = [ { name: 'Listening', score: pteData.communicativeSkills.listening }, { name: 'Reading', score: pteData.communicativeSkills.reading }, { name: 'Speaking', score: pteData.communicativeSkills.speaking }, { name: 'Writing', score: pteData.communicativeSkills.writing }, - ]; + ] scoreList.forEach((item) => { - const equivalentScore = getEqualScores(String(item.score), item.name); - item.clb = equivalentScore?.clb; - item.ieltsCore = equivalentScore?.[`ielts${item.name}`]; - }); + const equivalentScore = getEqualScores(String(item.score), item.name) + item.clb = equivalentScore?.clb + item.ieltsCore = equivalentScore?.[`ielts${item.name}`] + }) const scoresComparisonList: { testName: @@ -82,11 +82,11 @@ const ContentUI = () => { | 'IELTS(G)' | 'Points for EE(Without Spouse)' | 'Points for EE(With Spouse)' - | 'Points for EE(As Spouse)'; - listening?: number; - reading?: number; - speaking?: number; - writing?: number; + | 'Points for EE(As Spouse)' + listening?: number + reading?: number + speaking?: number + writing?: number }[] = [ { testName: 'PTE', @@ -142,51 +142,61 @@ const ContentUI = () => { // @ts-expect-error this is a number writing: clbEEScore[`clb${scoreList[3].clb}`].asSpouse, }, - ]; + ] // console.log('first', scoresComparisonList); // setScores(scoreList); - setScoresComparison(scoresComparisonList); + setScoresComparison(scoresComparisonList) - const skillsProfile: Array<{ key: string; name: string; score: number; skills: string[] }> = []; + const skillsProfile: Array<{ + key: string + name: string + score: number + skills: string[] + }> = [] for (const key in pteData.skillsProfile) { if (Object.prototype.hasOwnProperty.call(pteData.skillsProfile, key)) { // @ts-expect-error this is a number - const element: number = pteData.skillsProfile[key]; - let showName = key; + const element: number = pteData.skillsProfile[key] + let showName = key if (key === 'openResponseSpeakingWriting') { - showName = 'Open Response Speaking and Writing'; + showName = 'Open Response Speaking and Writing' } else if (key === 'reproducingSpokenWrittenLanguage') { - showName = 'Reproducing Spoken and Written Language'; + showName = 'Reproducing Spoken and Written Language' } else if (key === 'writingExtended') { - showName = 'Extended Writing'; + showName = 'Extended Writing' } else if (key === 'writingShort') { - showName = 'Short Writing'; + showName = 'Short Writing' } else if (key === 'speakingExtended') { - showName = 'Extended Speaking'; + showName = 'Extended Speaking' } else if (key === 'speakingShort') { - showName = 'Short Speaking'; + showName = 'Short Speaking' } else if (key === 'multipleSkillsComprehension') { - showName = 'Multiple-skills Comprehension'; + showName = 'Multiple-skills Comprehension' } else if (key === 'singleSkillComprehension') { - showName = 'Single-skill Comprehension'; + showName = 'Single-skill Comprehension' } - // @ts-expect-error err - skillsProfile.push({ key, name: showName, score: element, skills: skillsAnalysis[key] }); + skillsProfile.push({ + key, + name: showName, + score: element, + // @ts-expect-error err + skills: skillsAnalysis[key], + }) } } - setSkillsProfile(skillsProfile); + setSkillsProfile(skillsProfile) setTimeout(() => { - setMinimize(false); - }, 80); - }; + setMinimize(false) + }, 80) + } - const [dragging, setDragging] = useState(false); + const [dragging, setDragging] = useState(false) if (!showContent) { - return null; + return null } return ( @@ -194,50 +204,52 @@ const ContentUI = () => { { - setDragging(true); + setDragging(true) }} onStop={() => { - setDragging(false); + setDragging(false) }} > -
+
{ - setMinimize(() => !minimize); + setMinimize(() => !minimize) }} onMouseDown={(e) => e.stopPropagation()} > {minimize ? ( ) : ( )}
-
Score
- +
Score
+
@@ -245,21 +257,25 @@ const ContentUI = () => { - + {scoresComparison.map((item) => ( {item.testName === 'PTE' && ( - + )} {item.testName === 'CLB' && ( - + )} {item.testName === 'IELTS(G)' && ( @@ -294,7 +310,10 @@ const ContentUI = () => { {item.testName === 'Points for EE(Without Spouse)' || item.testName === 'Points for EE(With Spouse)' || item.testName === 'Points for EE(As Spouse)' - ? item.listening! + item.reading! + item.speaking! + item.writing! + ? item.listening! + + item.reading! + + item.speaking! + + item.writing! : ''} @@ -305,9 +324,9 @@ const ContentUI = () => {
{skillsProfile.map((skill) => (
-
+
{skill.name}
-
+
{skill.skills.join(', ')}
{
))} +
- ); -}; + ) +} -export default ContentUI; +export default ContentUI diff --git a/src/ContentUI/scoreList.ts b/src/ContentUI/scoreList.ts index 1accef7..be80399 100644 --- a/src/ContentUI/scoreList.ts +++ b/src/ContentUI/scoreList.ts @@ -76,7 +76,7 @@ export const scoreList = [ ieltsListening: 4.5, ieltsSpeaking: 4.0, }, -]; +] export const clbEEScore = { clb10: { @@ -114,45 +114,47 @@ export const clbEEScore = { withSpouse: 0, asSpouse: 0, }, -}; +} export const getEqualScores = ( scoreValue: string, type: 'Listening' | 'Speaking' | 'Reading' | 'Writing', ) => { - const scoreValueNum = Number(scoreValue); + const scoreValueNum = Number(scoreValue) const resultItem = scoreList.find((item) => { - const pteTypeScore = item[`pte${type}`]; + const pteTypeScore = item[`pte${type}`] if (pteTypeScore.length > 1) { - return scoreValueNum <= pteTypeScore[1] && scoreValueNum >= pteTypeScore[0]; + return ( + scoreValueNum <= pteTypeScore[1] && scoreValueNum >= pteTypeScore[0] + ) } else { - return scoreValueNum === pteTypeScore[0]; + return scoreValueNum === pteTypeScore[0] } - }); - return resultItem; -}; + }) + return resultItem +} -const RA = 'RA'; -const RS = 'RS'; -const DI = 'DI'; -const RTS = 'RTS'; -const ASQ = 'ASQ'; -const SWT = 'SWT'; -const WE = 'WE'; +const RA = 'RA' +const RS = 'RS' +const DI = 'DI' +const RTS = 'RTS' +const ASQ = 'ASQ' +const SWT = 'SWT' +const WE = 'WE' -const FIBRW = 'FIB-RW'; -const MCMRW = 'MCM-RW'; -const RO = 'RO'; -const FIBR = 'FIB-R'; -const MCSR = 'MCS-R'; +const FIBRW = 'FIB-RW' +const MCMRW = 'MCM-RW' +const RO = 'RO' +const FIBR = 'FIB-R' +const MCSR = 'MCS-R' -const SST = 'SST'; -const MCML = 'MCM-L'; -const FIBL = 'FIB-L'; -const MCSL = 'MCS-L'; -const SMW = 'SMW'; -const HIW = 'HIW'; -const WFD = 'WFD'; +const SST = 'SST' +const MCML = 'MCM-L' +const FIBL = 'FIB-L' +const MCSL = 'MCS-L' +const SMW = 'SMW' +const HIW = 'HIW' +const WFD = 'WFD' export const skillsAnalysis = { openResponseSpeakingWriting: [WE, DI, RTS], @@ -163,4 +165,4 @@ export const skillsAnalysis = { speakingShort: [RA, RS, ASQ], multipleSkillsComprehension: [FIBRW, SST, WFD, RA, RS, SWT, HIW], singleSkillComprehension: [RO, FIBR, MCMRW, MCSR, MCML, MCSL, SMW], -}; +} diff --git a/src/content.tsx b/src/content.tsx index 7201055..7847430 100644 --- a/src/content.tsx +++ b/src/content.tsx @@ -1,11 +1,11 @@ // import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './content.css'; -import ContentUI from './ContentUI'; +import ReactDOM from 'react-dom/client' +import './content.css' +import ContentUI from './ContentUI' -const root = document.createElement('div'); -root.id = 'crx-root'; -document.body.appendChild(root); +const root = document.createElement('div') +root.id = 'crx-root' +document.body.appendChild(root) // const ContentUI = () => { // return
hi
; @@ -15,5 +15,4 @@ ReactDOM.createRoot(root).render( // , // , -); - +) diff --git a/src/index.css b/src/index.css deleted file mode 100644 index 6119ad9..0000000 --- a/src/index.css +++ /dev/null @@ -1,68 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} diff --git a/src/main.tsx b/src/main.tsx index 969e1c2..3e18231 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,10 +1,9 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App' ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( , -); +) diff --git a/src/type/PTEDataType.ts b/src/type/PTEDataType.ts index 25c9cc2..bad5fcc 100644 --- a/src/type/PTEDataType.ts +++ b/src/type/PTEDataType.ts @@ -1,55 +1,55 @@ export interface PTEDataType { - gender: string; - testDate: string; - candidateId: string; - appointmentId: string; - middleName: null; - countryOfResidence: string; - reportIssueDate: string; - testCenter: string; - testCenterId: string; - testCenterCountry: string; - hasPhoto: boolean; - enablingSkills: null; - countryOfCitizenShip: string; - institutionCode: null; - institutionName: null; - scoreReportNumber: string; - isRevoked: boolean; - revokedStatusChangeDate: string; - examSeriesCode: string; - ukviNumber: null; - admissioinId: string; - idNumber: string; - countryIssuanceId: string; - isExpired: boolean; - isNoShow: boolean; - isNDARefused: boolean; - cefrLevel: null; - photoInfo: string; - skillsProfile: SkillsProfile; - firstName: string; - lastName: string; - dateOfBirth: string; - testValidUntil: string; - gseScore: string; - communicativeSkills: CommunicativeSkills; + gender: string + testDate: string + candidateId: string + appointmentId: string + middleName: null + countryOfResidence: string + reportIssueDate: string + testCenter: string + testCenterId: string + testCenterCountry: string + hasPhoto: boolean + enablingSkills: null + countryOfCitizenShip: string + institutionCode: null + institutionName: null + scoreReportNumber: string + isRevoked: boolean + revokedStatusChangeDate: string + examSeriesCode: string + ukviNumber: null + admissioinId: string + idNumber: string + countryIssuanceId: string + isExpired: boolean + isNoShow: boolean + isNDARefused: boolean + cefrLevel: null + photoInfo: string + skillsProfile: SkillsProfile + firstName: string + lastName: string + dateOfBirth: string + testValidUntil: string + gseScore: string + communicativeSkills: CommunicativeSkills } export interface SkillsProfile { - openResponseSpeakingWriting: number; - reproducingSpokenWrittenLanguage: number; - writingExtended: number; - writingShort: number; - speakingExtended: number; - speakingShort: number; - multipleSkillsComprehension: number; - singleSkillComprehension: number; + openResponseSpeakingWriting: number + reproducingSpokenWrittenLanguage: number + writingExtended: number + writingShort: number + speakingExtended: number + speakingShort: number + multipleSkillsComprehension: number + singleSkillComprehension: number } export interface CommunicativeSkills { - listening: number; - speaking: number; - reading: number; - writing: number; + listening: number + speaking: number + reading: number + writing: number } From 720ece8dc7346ea47e60cc4aebcf47e6a648a79d Mon Sep 17 00:00:00 2001 From: Haoyang Gao Date: Tue, 3 Sep 2024 16:20:47 -0400 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/ContentUI/index.tsx | 11 ++++++----- src/content.css | 8 +++----- src/content.tsx | 3 --- src/main.tsx | 5 +---- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index e4c95d6..c7e5b96 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pte-crx", "private": true, - "version": "1.1.0", + "version": "1.2.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/ContentUI/index.tsx b/src/ContentUI/index.tsx index 42e4d03..917acd9 100644 --- a/src/ContentUI/index.tsx +++ b/src/ContentUI/index.tsx @@ -217,7 +217,7 @@ const ContentUI = () => { minimize ? 'h-6 w-6 overflow-hidden p-0' : 'h-[576px] max-h-[71vh] w-[554px] p-4', - dragging ? 'scale-105 shadow-2xl' : 'scale-100 shadow-md', + dragging ? 'scale-[1.02] shadow-2xl' : 'scale-100 shadow-md', )} > {
))} -
+
- Buy me a Coffee ☕ - + Sponsor me for a cup of coffee! + {' '} + ☕
diff --git a/src/content.css b/src/content.css index e4c19b4..b5c61c9 100644 --- a/src/content.css +++ b/src/content.css @@ -1,5 +1,3 @@ -#crx-root { - @tailwind base; - @tailwind components; - @tailwind utilities; -} +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/content.tsx b/src/content.tsx index 7847430..249d157 100644 --- a/src/content.tsx +++ b/src/content.tsx @@ -1,4 +1,3 @@ -// import React from 'react'; import ReactDOM from 'react-dom/client' import './content.css' import ContentUI from './ContentUI' @@ -12,7 +11,5 @@ document.body.appendChild(root) // }; ReactDOM.createRoot(root).render( - // , - // , ) diff --git a/src/main.tsx b/src/main.tsx index 3e18231..710f1f8 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,9 +1,6 @@ -import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - , + , )
Reading Speaking WritingTotalTotal
Your PTE score + Your PTE score + CLB + CLB +