Skip to content

Commit

Permalink
chore: 优化调试
Browse files Browse the repository at this point in the history
  • Loading branch information
027xiguapi committed Dec 3, 2023
1 parent 9cc9ab9 commit b56215f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "1.1.0",
"description": "pear-rec is a cross platform screenshot, screen recording, audio recording, and video recording software.",
"scripts": {
"dev:desktop": "concurrently --names \"WEB,DESKTOP\" -c \"red,blue\" \"pnpm run -C packages/web dev\" \"pnpm run -C packages/desktop dev\"",
"dev:desktop": "concurrently --names \"WEB,DESKTOP\" -c \"red,blue\" \"pnpm run -C packages/web dev\" \"wait-on tcp:9191 && pnpm run -C packages/desktop dev\"",
"build:desktop": "pnpm run -C packages/desktop build && pnpm run project:desktop && pnpm run -C packages/desktop build:win",
"project:desktop": "pnpm run -C packages/web build && node tools/copy-files-web2desktop.js",
"rebuild:server": "pnpm run -C packages/server rebuild && pnpm run -C packages/desktop rebuild",
"dev:web": "concurrently --names \"SERVER,WEB\" -c \"red,auto\" \"pnpm run dev:server\" \"pnpm run -C packages/web dev\"",
"dev:web": "concurrently --names \"SERVER,WEB\" -c \"red,auto\" \"pnpm run dev:server\" \"wait-on tcp:9190 && pnpm run -C packages/web dev\"",
"build:web": "concurrently -s \"pnpm run -C packages/server dev\" \"pnpm run project:web\"",
"only-build:web": "pnpm run -C packages/web build",
"watch:web": "pnpm run -C packages/web watch",
Expand Down Expand Up @@ -39,7 +39,8 @@
"commitizen": "^4.3.0",
"concurrently": "^8.2.1",
"cz-conventional-changelog": "^3.3.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"wait-on": "^7.2.0"
},
"keywords": [
"electron",
Expand All @@ -62,4 +63,4 @@
"url": "https://github.com/027xiguapi/pear-rec/issues"
},
"license": "Apache-2.0"
}
}
2 changes: 1 addition & 1 deletion packages/server/src/api/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const storage = multer.diskStorage({
const user = await userController._getUserById(userId);
const setting = await settingController._getSettingByUserId(userId);
try {
const filePath = join(setting.filePath || PEAR_FILES_PATH, `${user.uuid}/${type}`);
const filePath = join(setting?.filePath || PEAR_FILES_PATH, `${user.uuid}/${type}`);
if (!fs.existsSync(filePath)) {
fs.mkdirSync(filePath, { recursive: true });
}
Expand Down
6 changes: 6 additions & 0 deletions packages/web/src/pages/recorderVideo/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
overflow: hidden;
position: relative;
:global {
.tip {
font-size: 25px;
color: red;
text-align: center;
margin-top: 160px;
}
.content {
width: 100%;
height: 100%;
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/pages/recorderVideo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ const RecorderVideo = () => {

return (
<div className={styles.recorderVideo}>
<video className="content" ref={previewVideo} playsInline autoPlay />
{ isRecording ? <></> : <div className="tip">点击下面按钮开始录像</div> }
<video className={isRecording ? "content" : "hide"} ref={previewVideo} playsInline autoPlay />
<div className="footer">
<BsRecordCircle className={'recordIcon ' + `${isRecording ? 'blink' : ''}`} />
<CameraOutlined
Expand Down

0 comments on commit b56215f

Please sign in to comment.