Feature: optimize url encode and filename encode

This commit is contained in:
萌萌哒赫萝
2023-05-07 17:05:58 +08:00
parent f5b89ceaa9
commit 8d1b8173bd
7 changed files with 18 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
import fs from 'fs-extra'
import db from '~/main/apis/core/datastore'
import { clipboard, Notification, dialog } from 'electron'
import { handleUrlEncode } from '~/universal/utils/common'
export const handleCopyUrl = (str: string): void => {
if (db.get('settings.autoCopy') !== false) {
@@ -110,3 +111,5 @@ export const getClipboardFilePath = (): string => {
}
return ''
}
export const handleUrlEncodeWithSetting = (url: string) => db.get('settings.encodeOutputURL') ? handleUrlEncode(url) : url