mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
🐛 Fix: fix auto link copy funtion failure bug when using custom format
This commit is contained in:
parent
729aad882f
commit
9c96870563
@ -164,7 +164,7 @@ class Uploader {
|
|||||||
} as IAnalyticsData)
|
} as IAnalyticsData)
|
||||||
}
|
}
|
||||||
output.forEach((item: ImgInfo) => {
|
output.forEach((item: ImgInfo) => {
|
||||||
item.config = db.get(`picBed.${item.type}`)
|
item.config = JSON.parse(JSON.stringify(db.get(`picBed.${item.type}`)))
|
||||||
})
|
})
|
||||||
return output.filter(item => item.imgUrl)
|
return output.filter(item => item.imgUrl)
|
||||||
} else {
|
} else {
|
||||||
|
@ -402,6 +402,7 @@ function handleClose () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function copy (item: ImgInfo) {
|
async function copy (item: ImgInfo) {
|
||||||
|
item.config = JSON.parse(JSON.stringify(item.config))
|
||||||
const copyLink = await ipcRenderer.invoke(PASTE_TEXT, item)
|
const copyLink = await ipcRenderer.invoke(PASTE_TEXT, item)
|
||||||
const obj = {
|
const obj = {
|
||||||
title: $T('COPY_LINK_SUCCEED'),
|
title: $T('COPY_LINK_SUCCEED'),
|
||||||
|
@ -76,10 +76,9 @@
|
|||||||
label="UBB"
|
label="UBB"
|
||||||
title="[img]url[/img]"
|
title="[img]url[/img]"
|
||||||
/>
|
/>
|
||||||
<!--TODO 修改title为用户具体设置的格式-->
|
|
||||||
<el-radio-button
|
<el-radio-button
|
||||||
:label="$T('CUSTOM')"
|
label="Custom"
|
||||||
:title="$T('CUSTOM')"
|
:title="customLink"
|
||||||
/>
|
/>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@ -140,6 +139,7 @@ const showError = ref(false)
|
|||||||
const pasteStyle = ref('')
|
const pasteStyle = ref('')
|
||||||
const picBed = ref<IPicBedType[]>([])
|
const picBed = ref<IPicBedType[]>([])
|
||||||
const picBedName = ref('')
|
const picBedName = ref('')
|
||||||
|
const customLink = ref('')
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
ipcRenderer.on('uploadProgress', (_event: IpcRendererEvent, _progress: number) => {
|
ipcRenderer.on('uploadProgress', (_event: IpcRendererEvent, _progress: number) => {
|
||||||
if (_progress !== -1) {
|
if (_progress !== -1) {
|
||||||
@ -242,6 +242,7 @@ function ipcSendFiles (files: FileList) {
|
|||||||
|
|
||||||
async function getPasteStyle () {
|
async function getPasteStyle () {
|
||||||
pasteStyle.value = await getConfig('settings.pasteStyle') || 'markdown'
|
pasteStyle.value = await getConfig('settings.pasteStyle') || 'markdown'
|
||||||
|
customLink.value = await getConfig('settings.customLink') || '$url'
|
||||||
}
|
}
|
||||||
|
|
||||||
function handlePasteStyleChange (val: string | number | boolean) {
|
function handlePasteStyleChange (val: string | number | boolean) {
|
||||||
|
Loading…
Reference in New Issue
Block a user