mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-06 08:11:02 +08:00
✨ Feature: add file-name for customurl
add $fileName arg for customUrl ISSUES CLOSED: #173
This commit is contained in:
@@ -213,13 +213,12 @@ export default {
|
||||
this.changeZIndexForGallery(false)
|
||||
},
|
||||
copy (item) {
|
||||
const url = item.url || item.imgUrl
|
||||
const style = this.$db.read().get('settings.pasteStyle').value() || 'markdown'
|
||||
const copyLink = pasteStyle(style, url)
|
||||
const copyLink = pasteStyle(style, item)
|
||||
const obj = {
|
||||
title: '复制链接成功',
|
||||
body: copyLink,
|
||||
icon: url
|
||||
icon: item.url || item.imgUrl
|
||||
}
|
||||
const myNotification = new window.Notification(obj.title, obj)
|
||||
this.$electron.clipboard.writeText(copyLink)
|
||||
@@ -325,8 +324,7 @@ export default {
|
||||
Object.keys(this.choosedList).forEach(key => {
|
||||
if (this.choosedList[key]) {
|
||||
const item = this.$db.read().get('uploaded').getById(key).value()
|
||||
const url = item.url || item.imgUrl
|
||||
copyString += pasteStyle(style, url) + '\n'
|
||||
copyString += pasteStyle(style, item) + '\n'
|
||||
this.choosedList[key] = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
this.notification.icon = item.imgUrl
|
||||
const myNotification = new window.Notification(this.notification.title, this.notification)
|
||||
const pasteStyle = this.$db.read().get('settings.pasteStyle').value() || 'markdown'
|
||||
this.$electron.clipboard.writeText(pasteTemplate(pasteStyle, item.imgUrl))
|
||||
this.$electron.clipboard.writeText(pasteTemplate(pasteStyle, item))
|
||||
myNotification.onclick = () => {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user