Feature: add autoCopy option for users to use or not

This commit is contained in:
Molunerfinn
2020-03-19 21:03:21 +08:00
parent cd70a1a5cc
commit 67e526f163
10 changed files with 51 additions and 17 deletions

8
src/main/utils/common.ts Normal file
View File

@@ -0,0 +1,8 @@
import db from '#/datastore'
import { clipboard } from 'electron'
export function handleCopyUrl (str: string): void {
if (db.get('settings.autoCopy') === true) {
clipboard.writeText(str)
}
}