mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-03-13 08:28:13 -04:00
Finished: github custom url
This commit is contained in:
parent
a0c1e95b15
commit
f8eceae8e4
@ -32,6 +32,8 @@ PicGo目前支持了`微博图床`,`七牛图床`,`腾讯云COS v4\v5版本`
|
|||||||
|
|
||||||
如果第一次使用,请参考应用使用[手册](https://github.com/Molunerfinn/PicGo/wiki)。
|
如果第一次使用,请参考应用使用[手册](https://github.com/Molunerfinn/PicGo/wiki)。
|
||||||
|
|
||||||
|
开发进度可以查看[Projects](https://github.com/Molunerfinn/PicGo/projects),会同步更新开发进度。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
@ -36,7 +36,11 @@ const githubUpload = async function (img, type, webContents) {
|
|||||||
const body = await request(postConfig)
|
const body = await request(postConfig)
|
||||||
if (body) {
|
if (body) {
|
||||||
delete imgList[i].base64Image
|
delete imgList[i].base64Image
|
||||||
imgList[i]['imgUrl'] = body.content.download_url
|
if (githubOptions.customUrl) {
|
||||||
|
imgList[i]['imgUrl'] = `${githubOptions.customUrl}/${githubOptions.path}${imgList[i].fileName}`
|
||||||
|
} else {
|
||||||
|
imgList[i]['imgUrl'] = body.content.download_url
|
||||||
|
}
|
||||||
imgList[i]['type'] = 'github'
|
imgList[i]['type'] = 'github'
|
||||||
if (i - length === -1) {
|
if (i - length === -1) {
|
||||||
webContents.send('uploadProgress', 60)
|
webContents.send('uploadProgress', 60)
|
||||||
|
@ -40,6 +40,11 @@
|
|||||||
>
|
>
|
||||||
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
<el-input v-model="form.path" @keyup.native.enter="confirm" placeholder="例如img/"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="设定自定义域名"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.customUrl" @keyup.native.enter="confirm" placeholder="例如https://xxxx.com"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="confirm" round>确定</el-button>
|
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||||
@ -62,6 +67,7 @@ export default {
|
|||||||
repo: '',
|
repo: '',
|
||||||
token: '',
|
token: '',
|
||||||
path: '',
|
path: '',
|
||||||
|
customUrl: '',
|
||||||
branch: ''
|
branch: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user