Skip to content

Commit

Permalink
✨ Feature(custom): add milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Nov 25, 2024
1 parent 36fda9f commit 86671c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/transformer/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const handle = async (ctx: IPicGo): Promise<IPicGo> => {
const extname = info.extname || imgSize.extname || '.png'
results[index] = {
buffer: info.buffer,
fileName: info.fileName || `${dayjs().format('YYYYMMDDHHmmss')}${extname}`,
fileName: info.fileName || `${dayjs().format('YYYYMMDDHHmmssSSS')}${extname}`,
width: imgSize.width,
height: imgSize.height,
extname: info.extname
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getClipboardImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function createImageFolder(ctx: IPicGo): void {
const getClipboardImage = async (ctx: IPicGo): Promise<IClipboardImage> => {
createImageFolder(ctx)
// add an clipboard image folder to control the image cache file
const imagePath = path.join(ctx.baseDir, CLIPBOARD_IMAGE_FOLDER, `${dayjs().format('YYYYMMDDHHmmss')}.png`)
const imagePath = path.join(ctx.baseDir, CLIPBOARD_IMAGE_FOLDER, `${dayjs().format('YYYYMMDDHHmmssSSS')}.png`)
return await new Promise<IClipboardImage>((resolve: any, reject: any): void => {
const platform = getCurrentPlatform()
const scriptPath = path.join(ctx.baseDir, platform2ScriptFilename[platform])
Expand Down

0 comments on commit 86671c2

Please sign in to comment.