Skip to content

Commit

Permalink
Merge pull request #28 from LHRUN/feature/1.2.0
Browse files Browse the repository at this point in the history
Feature/1.2.0
  • Loading branch information
LHRUN authored Jan 13, 2024
2 parents 316b605 + d208c86 commit cebebd5
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 5 deletions.
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# dependencies
node_modules

# build outputs
dist

# configurations
.github
.vscode

# documentation
README.md
README.zh.md
CHANGELOG.md
CONTRIBUTING.md
LICENSE

# macOS system files
.DS_Store
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "\U0001F41E Bug Report"
description: Report an issue with paint-board
body:
- type: markdown
attributes:
value: |
感谢你花费时间填写该问题报告 (Thank you for taking the time to fill out this bug report)
- type: textarea
id: bug-description
attributes:
label: 问题描述 (Description of the problem)
placeholder: 请描述您的问题 (Please describe your problem)
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: 如何复现该问题 (How to reproduce the problem)
placeholder: 请提供该问题的具体复现步骤,便于我们快速定位问题 (Please provide specific steps to reproduce the problem so that we can quickly locate the problem)
validations:
required: true
- type: textarea
id: system-info
attributes:
label: 操作系统和浏览器信息 (Operating System and Browser Information)
placeholder: 请填写该问题的运行环境,便于我们快速定位问题 (Please fill in the operating environment of the problem, so that we can quickly locate the problem)
validations:
required: true
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 1.2.0

### Feat

- add docker support

### Docs

- add CONTRIBUTING.md
- add Issues template

# 1.1.0

### Feat
Expand Down
62 changes: 62 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 🎉 Contributing to Paint Board 🥳

First of all, thank you very much for considering contributing to our project! We welcome any kind of contribution, whether it's proposing new functional features, improving code, fixing bugs, or improving documentation.

This guide will provide all the relevant information to help you get started working on this project. Please take a few minutes to read it, it will help us collaborate better and create a better project together.

## Submit Issue

Before jumping into a PR be sure to search [existing PRs](https://github.com/lhrun/paint-board/pulls) or [issues](https://github.com/lhrun/paint-board/issues) for an open or closed item that relates to your submission.

If it's a bug fix, please raise it in an Issue first.

In the case of new feature additions, please communicate with us first in Discussions or contact us directly via the contact information provided.

## Pull Requests Steps

1. Fork this project's repo on Github
2. Create a new branch on your local copy to develop new features, fix bugs, or make other contributions, `git checkout -b feat/xxxx`
3. Submit your changes: `git commit -am 'feat: add xxxxx'`
4. Push your branch: `git push origin feat/xxxx`
5. To submit a `Pull Request`, make sure your source branch is the one you just pushed, and your target branch is the `dev` branch of the Paint Board project.
6. After submitting, watch out for emails and notifications associated with the Pull request. Once it's approved, we'll merge it into the `main` branch as planned. Doing a new round of releases

## Development Environment

+ Node.js 16 +
+ Pnpm 8 +

## Code Style

Please follow the [node-style-guide](https://github.com/felixge/node-style-guide)

## Commit Messages

Please follow the [Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)

Please keep the commit message in English for better understanding by all developers.

- `feat` Add new features
- `fix` Fix the problem/BUG
- `style` The code style is related and does not affect the running result
- `perf` Optimization/performance improvement
- `refactor` Refactor
- `revert` Undo edit
- `test` Test related
- `docs` Documentation/notes
- `chore` Dependency update/scaffolding configuration modification etc.
- `workflow` Workflow improvements
- `ci` Continuous integration
- `types` Type definition file changes
- `wip` In development

## Code Content

Please keep the code comments and code content in English for better understanding by all developers.

## Contact Details

+ Email: [email protected]
+ Telegram: https://t.me/longhao_song
+ WeChat:
- <img style="width: 300px" src="https://raw.githubusercontent.com/LHRUN/file-store/main/paint-board/wechat.JPG" alt="wechat"/>
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:16-alpine as build-stage
LABEL maintainer="Leo '[email protected]'"

WORKDIR /app
COPY . ./

RUN echo "https://registry.npmmirror.com" > .npmrc && \
npm install -g pnpm && \
pnpm install --frozen-lockfile && \
pnpm build

FROM nginx:stable-alpine
COPY --from=build-stage /app/dist /usr/share/nginx/html/dist
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)

## Pending Features:
+ Multi-platform authentication login and data synchronization
+ Drawing of common shapes
+ AI Drawing

## Video Demo
## V1.0.0 Video Demo

[![v1.0.0 demo youtube](https://raw.githubusercontent.com/LHRUN/file-store/main/paint-board/v1.0.0_demo_youtube.jpg)](https://www.youtube.com/watch?v=zzWaR0wvz0s "")

Expand All @@ -79,6 +81,20 @@ pnpm install
pnpm dev
```

### Docker Support

1. Build a Docker image with the name `paint-board`.
```sh
docker build -t paint-board .
```

2. Start a docker container.
```sh
docker run -d -p 8080:80 --name paint-board paint-board
```

3. Accessed by opening `http://localhost:8080/paint-board/` in your browser.

## Contact me

If you have any suggestions or good ideas, welcome to contact me at any time!
Expand All @@ -88,6 +104,12 @@ If you have any suggestions or good ideas, welcome to contact me at any time!
+ WeChat:
- <img style="width: 300px" src="https://raw.githubusercontent.com/LHRUN/file-store/main/paint-board/wechat.JPG" alt="wechat"/>

## Contributing

I'm glad you're interested in contributing to PAINT BOARD. If you find a bug and want to fix it, please submit it in an Issue first. For new feature additions, please contact us in Discussions, or directly through the contact details provided above, and read the Contribution Guidelines below before contributing. Thank you for your support!

[Contribution Guidelines](./CONTRIBUTING.md)

## Document
+ After refactoring with Fabric.js
- [Exploring the Canvas Series: The Art of Time Reversal in the Canvas](https://songlh.top/2024/01/10/Exploring-the-Canvas-Series-The-Art-of-Time-Reversal-in-the-Canvas/)
Expand All @@ -96,3 +118,6 @@ If you have any suggestions or good ideas, welcome to contact me at any time!
- [Canvas Artistry:Mastering Selection, Dragging, and Scaling](https://songlh.top/2023/11/30/Canvas-Artistry1)
- [Canvas Artistry:Drawing magic with multiple effects](https://songlh.top/2023/12/01/Canvas-Artistry2)

## License

MIT License. See the [LICENSE](https://github.com/LHRUN/paint-board/blob/main/LICENSE) file.
30 changes: 28 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)

## 待完成功能
+ 多平台认证登录,数据同步
+ 常用图形的绘制
+ AI 绘制

## 视频演示
## V1.0.0 视频演示

[![v1.0.0 demo youtube](https://raw.githubusercontent.com/LHRUN/file-store/main/paint-board/v1.0.0_demo_youtube.jpg)](https://www.youtube.com/watch?v=zzWaR0wvz0s "")

Expand All @@ -75,6 +77,20 @@ pnpm install
pnpm dev
```

### Docker 支持

1. 构建 Docker 镜像,镜像名称为 `paint-board`
```sh
docker build -t paint-board .
```

2. 启动 docker 容器。
```sh
docker run -d -p 8080:80 --name paint-board paint-board
```

3. 在浏览器打开 `http://localhost:8080/paint-board/` 即可访问。

## 联系我

如果你有任何建议或者有好的想法,欢迎随时与我联系!
Expand All @@ -84,11 +100,21 @@ pnpm dev
+ 微信:
- <img style="width: 300px" src="https://raw.githubusercontent.com/LHRUN/file-store/main/paint-board/wechat.JPG" alt="wechat"/>

## 贡献

我很高兴你有兴趣对 PAINT BOARD 做出贡献。如果你发现了 BUG 并希望进行修复,请先在 Issue 中提出。对于新功能的增加,请先在 Discussions 中与我们进行沟通,或者直接通过以上提供的联系方式联系,进行贡献前请阅读以下贡献指南。感谢你的支持!

[贡献指南](./CONTRIBUTING.md)

## 技术文章
+ Fabric.js 重构后
- [画板探秘系列:画板中的时光倒流术](https://songlh.top/2024/01/09/%E7%94%BB%E6%9D%BF%E6%8E%A2%E7%A7%98%E7%B3%BB%E5%88%97%EF%BC%9A%E7%94%BB%E6%9D%BF%E4%B8%AD%E7%9A%84%E6%97%B6%E5%85%89%E5%80%92%E6%B5%81%E6%9C%AF/)
- 编写中...
+ Fabric.js 重构前
- [基于canvas实现的多功能画板](https://songlh.top/2022/09/21/%E5%9F%BA%E4%BA%8Ecanvas%E5%AE%9E%E7%8E%B0%E7%9A%84%E5%A4%9A%E5%8A%9F%E8%83%BD%E7%94%BB%E6%9D%BF/)
- [canvas画板之绘画元素的框选](https://songlh.top/2022/12/05/canvas%E7%94%BB%E6%9D%BF%E4%B9%8B%E7%BB%98%E7%94%BB%E5%85%83%E7%B4%A0%E7%9A%84%E6%A1%86%E9%80%89/)
- [canvas画板之画笔的多种效果](https://songlh.top/2022/12/17/canvas%E7%94%BB%E6%9D%BF%E4%B9%8B%E7%94%BB%E7%AC%94%E7%9A%84%E5%A4%9A%E7%A7%8D%E6%95%88%E6%9E%9C/)
- [canvas画板之画笔的多种效果](https://songlh.top/2022/12/17/canvas%E7%94%BB%E6%9D%BF%E4%B9%8B%E7%94%BB%E7%AC%94%E7%9A%84%E5%A4%9A%E7%A7%8D%E6%95%88%E6%9E%9C/)

## License

MIT License. See the [LICENSE](https://github.com/LHRUN/paint-board/blob/main/LICENSE) file.
28 changes: 28 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
worker_processes auto;
events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

add_header 'Access-Control-Allow-Origin' '*';

server {
listen 80;

location /paint-board {
alias /usr/share/nginx/html/dist;
try_files $uri $uri/ /index.html;
index index.html;
}

location / {
return 301 $scheme://$http_host/paint-board/;
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "paint-board",
"private": true,
"version": "1.1.0",
"version": "1.2.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/store/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface FileAction {
}

const initId = uuidv4()
export const BOARD_VERSION = '1.1.0'
export const BOARD_VERSION = '1.2.0'

const useFileStore = create<FileState & FileAction>()(
persist(
Expand Down

0 comments on commit cebebd5

Please sign in to comment.