Skip to content

Commit

Permalink
fix: fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
Oc1S committed Jul 7, 2024
1 parent 24aee6e commit 6fe4806
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/hmr/lib/initReloadServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function initReloadServer() {
ping();
} catch {
console.error(`[HMR] Failed to start server at ${LOCAL_RELOAD_SOCKET_URL}`);
console.error('PLEASE MAKE SURE YOU ARE RUNNING `pnpm dev-server`');
}
}

Expand Down
1 change: 0 additions & 1 deletion packages/hmr/lib/injections/refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function addRefresh() {
let pendingReload = false;

initClient({
// eslint-disable-next-line
// @ts-ignore
id: __HMR_ID,
onUpdate: () => {
Expand Down
8 changes: 2 additions & 6 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"downlevelIteration": true,
"isolatedModules": true,
"strict": true,
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
Expand All @@ -20,10 +20,6 @@
"suppressImplicitAnyIndexErrors": true,
"jsx": "react-jsx",
"ignoreDeprecations": "5.0",
"lib": [
"DOM",
"ESNext"
],
"lib": ["DOM", "ESNext"]
}
}

19 changes: 15 additions & 4 deletions pages/popup/src/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Popup = () => {
const finishedList = downloadList.filter(item => item.state === 'complete');

const extractImagePageUrls = (html: string) => {
const urls = [];
const urls: string[] = [];
const doc = htmlStr2DOM(html);
// Normal previews.
let elements = doc.getElementsByClassName('gdtm');
Expand Down Expand Up @@ -253,7 +253,18 @@ const Popup = () => {
case StatusEnum.Downloading:
return <>🤗Please do NOT close the extension popup page before ALL download tasks start.</>;
case StatusEnum.DownLoadSuccess:
return <div>Congrats! Download completed.</div>;
return (
<div>
<div>Congrats! Download completed.</div>
<div>
If this extension proves beneficial to you, please give me a star at
<Link href="https://github.com/Oc1S/ehentai-helper" isExternal>
Github
</Link>
🤗
</div>
</div>
);
case StatusEnum.Fail:
return 'Failed to fetch data from the server, please retry later.';
}
Expand Down Expand Up @@ -331,7 +342,7 @@ const Popup = () => {
{progress}

{[StatusEnum.BeforeDownload].includes(status) && (
<div className="fixed bottom-40 flex flex-col items-center">
<div className="fixed bottom-48 flex flex-col items-center">
{range[1] > 0 && <PageSelector range={range} setRange={setRange} maxValue={totalImages} />}
<Button
color="primary"
Expand All @@ -348,7 +359,7 @@ const Popup = () => {
}
setIsBtnVisible(false);
}}>
Download Gallery
Download
</Button>
</div>
)}
Expand Down

0 comments on commit 6fe4806

Please sign in to comment.