mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2026-03-15 23:20:08 +08:00
Merge pull request #19 from Aues6uen11Z/feat/api-url
feat: 添加用于小程序的API URL复制
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const { clipboard, ipcMain } = require('electron')
|
||||
const { getUrl, deleteData } = require('./getData')
|
||||
const { getUrl, deleteData, getApiUrl } = require('./getData')
|
||||
|
||||
ipcMain.handle('COPY_URL', async () => {
|
||||
const url = await getUrl()
|
||||
@@ -10,6 +10,15 @@ ipcMain.handle('COPY_URL', async () => {
|
||||
return false
|
||||
})
|
||||
|
||||
ipcMain.handle('COPY_API_URL', async () => {
|
||||
const apiUrl = await getApiUrl()
|
||||
if (apiUrl) {
|
||||
clipboard.writeText(apiUrl)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
ipcMain.handle('DELETE_DATA', async (event, uid, action) => {
|
||||
await deleteData(uid, action)
|
||||
})
|
||||
Reference in New Issue
Block a user