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)
|
||||
}
|
||||
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)
|
||||
} else {
|
||||
|
@ -402,6 +402,7 @@ function handleClose () {
|
||||
}
|
||||
|
||||
async function copy (item: ImgInfo) {
|
||||
item.config = JSON.parse(JSON.stringify(item.config))
|
||||
const copyLink = await ipcRenderer.invoke(PASTE_TEXT, item)
|
||||
const obj = {
|
||||
title: $T('COPY_LINK_SUCCEED'),
|
||||
|
@ -76,10 +76,9 @@
|
||||
label="UBB"
|
||||
title="[img]url[/img]"
|
||||
/>
|
||||
<!--TODO 修改title为用户具体设置的格式-->
|
||||
<el-radio-button
|
||||
:label="$T('CUSTOM')"
|
||||
:title="$T('CUSTOM')"
|
||||
label="Custom"
|
||||
:title="customLink"
|
||||
/>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@ -140,6 +139,7 @@ const showError = ref(false)
|
||||
const pasteStyle = ref('')
|
||||
const picBed = ref<IPicBedType[]>([])
|
||||
const picBedName = ref('')
|
||||
const customLink = ref('')
|
||||
onBeforeMount(() => {
|
||||
ipcRenderer.on('uploadProgress', (_event: IpcRendererEvent, _progress: number) => {
|
||||
if (_progress !== -1) {
|
||||
@ -242,6 +242,7 @@ function ipcSendFiles (files: FileList) {
|
||||
|
||||
async function getPasteStyle () {
|
||||
pasteStyle.value = await getConfig('settings.pasteStyle') || 'markdown'
|
||||
customLink.value = await getConfig('settings.customLink') || '$url'
|
||||
}
|
||||
|
||||
function handlePasteStyleChange (val: string | number | boolean) {
|
||||
|
Loading…
Reference in New Issue
Block a user