Skip to content

Commit

Permalink
Merge pull request #12 from LHRUN/feature/0.2.4
Browse files Browse the repository at this point in the history
Feature/0.2.4
  • Loading branch information
LHRUN authored Sep 23, 2023
2 parents 0d4c608 + 1645309 commit 8ad13e8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## Preview
Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)

![](https://s1.ax1x.com/2022/12/17/zH59vn.png)
![](/public/desc/desc_preview.png)

## Features
Completed Features:
Expand All @@ -32,7 +32,7 @@ Unfinished Features:
+ ...

## Operation Guide
<image src="https://s1.ax1x.com/2023/02/16/pSb8nYt.png" width="70%" />
<image src="/public/desc/desc_en.png" width="70%" />

## Getting Started
```
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## 预览
Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)

![](https://s1.ax1x.com/2022/12/17/zH59vn.png)
![](/public/desc/desc_preview.png)

## 功能列表
已完成功能:
Expand All @@ -32,7 +32,7 @@ Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)
+ ...

## 操作指南
<image src="https://s1.ax1x.com/2023/02/16/pSb8NYq.png" width="70%" />
<image src="/public/desc/desc_zh.png" width="70%" />

## 本地启动
```
Expand Down
Binary file added public/desc/desc_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/desc/desc_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/desc/desc_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Info: React.FC = () => {
setShowModal(false)
}}
>
<div className="flex flex-col bg-white rounded-2xl overflow-hidden w-7/12 py-1 px-3">
<div className="flex flex-col bg-white rounded-2xl overflow-hidden py-1 px-3">
<div className="flex items-center justify-between font-bold my-4 mx-4">
<div>
repo:
Expand All @@ -52,7 +52,7 @@ const Info: React.FC = () => {
</span>
</div>

<img className="mask" src={t('info.url') || ''} />
<img className="mask" width={600} src={t('info.url') || ''} />
</div>
</Mask>
</>
Expand Down
6 changes: 3 additions & 3 deletions src/components/mask/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ interface IProps {
const Mask: FC<IProps> = ({ show, clickMask, children }) => {
return (
<div
className={`fixed top-0 left-0 w-full h-full items-center justify-center bg-black z-10 bg-opacity-75 ${
show ? 'flex' : 'hidden'
className={`fixed top-0 left-0 right-0 bottom-0 bg-black z-10 bg-opacity-75 ${
show ? 'block' : 'hidden'
}`}
onClick={clickMask}
>
<div
className="flex items-center justify-center"
className="absolute top-1/2 left-1/2 -translate-x-2/4 -translate-y-2/4"
onClick={(e) => e.stopPropagation()}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"info": {
"welecome": "Welcome to star",
"url": "https://s1.ax1x.com/2023/02/16/pSb8nYt.png"
"url": "/desc/desc_en.png"
}
}
2 changes: 1 addition & 1 deletion src/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"info": {
"welecome": "欢迎Star",
"url": "https://s1.ax1x.com/2023/02/16/pSb8NYq.png"
"url": "/desc/desc_zh.png"
}
}
6 changes: 3 additions & 3 deletions src/utils/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class History<T> {
* 后退
*/
undo() {
if (this.step >= 0) {
if (this.step >= 1) {
this.step--
return this.cacheStack[this.step]
}
Expand All @@ -124,8 +124,8 @@ export class History<T> {
* 清空
*/
clean() {
this.cacheStack = []
this.step = -1
this.cacheStack = [[]]
this.step = 0
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/paintBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class PaintBoard {
// 选择元素
select: SelectElement
// 版本号,主要用于兼容缓存数据
version = '0.2.2'
version = '0.2.4'
// 画笔素材加载状态
loadMaterialState = false
// 画笔素材
Expand Down

0 comments on commit 8ad13e8

Please sign in to comment.