Skip to content

Commit

Permalink
build: release v1.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Dec 1, 2020
1 parent 9b686b6 commit 2ce5637
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 11,818 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章

现有的开源微信 Markdown 编辑器,样式繁杂,也不符合我个人的审美需求。在我使用它们进行文章排版的时候,经常还要自己做一些改动,费时费力,因此动手做了二次开发。

欢迎各位朋友随时提交 PR,让这款微信 Markdown 编辑器变得更好!如果你有新的想法,也欢迎在 Issues 区反馈
欢迎各位朋友随时提交 PR,让这款微信 Markdown 编辑器变得更好!如果你有新的想法,也欢迎在 [Discussions 讨论区](https://github.com/doocs/md/discussions)反馈

## 功能特性

Expand Down Expand Up @@ -160,7 +160,7 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章
</tr>
</table>

注:如果你使用了本 Markdown 编辑器进行文章排版,并且希望在本项目 README 中展示你的公众号,请到 [#5](https://github.com/doocs/md/issues/5) 留言。
注:如果你使用了本 Markdown 编辑器进行文章排版,并且希望在本项目 README 中展示你的公众号,请到 [#5](https://github.com/doocs/md/discussions/5) 留言。

## 项目许可证

Expand Down
118 changes: 36 additions & 82 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-md",
"version": "1.4.5",
"version": "1.4.6",
"homepage": ".",
"description": "An open-source wechat markdown editor.",
"author": "doocs",
Expand Down
28 changes: 14 additions & 14 deletions src/api/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ function getConfig(useDefault, platform) {
};
}

function getDir() {
const date = new Date();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const day = date.getDate().toString().padStart(2, "0");
return `${year}/${month}/${day}`;
}

function getDateFilename(filename) {
const currentTimestamp = new Date().getTime();
const fileSuffix = filename.split(".")[1];
return `${currentTimestamp}-${uuidv4()}.${fileSuffix}`;
}

//-----------------------------------------------------------------------
// GitHub File Upload
//-----------------------------------------------------------------------
Expand Down Expand Up @@ -194,20 +208,6 @@ async function txCOSFileUpload(file) {
});
}

function getDir() {
const date = new Date();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const day = date.getDate().toString().padStart(2, "0");
return `${year}/${month}/${day}`;
}

function getDateFilename(filename) {
const currentTimestamp = new Date().getTime();
const fileSuffix = filename.split(".")[1];
return `${currentTimestamp}-${uuidv4()}.${fileSuffix}`;
}

function fileUpload(content, file) {
const imgHost = localStorage.getItem("imgHost");
!imgHost && localStorage.setItem("imgHost", "default");
Expand Down
Loading

0 comments on commit 2ce5637

Please sign in to comment.