mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-29 07:43:38 +08:00
分享中心添加一个退出按钮
This commit is contained in:
@@ -1209,14 +1209,18 @@
|
||||
icon: d.cover ? d.cover.replace(yuQueShareVars.yuQueImgBedBaseLink, yuQueShareVars.imgBedBaseLink) : `logo/${description.program}.png`
|
||||
}
|
||||
})
|
||||
let choise = await quickcommand.showSelectList(docs, { optionType: 'json' })
|
||||
let doc = await yuQueClient(`repos/${yuQueShareVars.releaseRepo}/docs/${choise.slug}?raw=1`)
|
||||
let body = doc.data.data.body
|
||||
let stringifyQc = body.match(/```json([\s\S]*)```/)[1]
|
||||
let qc = JSON.parse(stringifyQc)
|
||||
$('#options').show()
|
||||
qc.fromShare = true
|
||||
editCurrentCommand(qc)
|
||||
let choise = await quickcommand.showSelectList(docs, { optionType: 'json', showCancelButton: true })
|
||||
if (choise) {
|
||||
let doc = await yuQueClient(`repos/${yuQueShareVars.releaseRepo}/docs/${choise.slug}?raw=1`)
|
||||
let body = doc.data.data.body
|
||||
let stringifyQc = body.match(/```json([\s\S]*)```/)[1]
|
||||
let qc = JSON.parse(stringifyQc)
|
||||
qc.fromShare = true
|
||||
$('#options').show()
|
||||
editCurrentCommand(qc)
|
||||
} else {
|
||||
$('#options').show()
|
||||
}
|
||||
utools.setExpendHeight(600)
|
||||
}
|
||||
|
||||
@@ -1371,23 +1375,27 @@
|
||||
}
|
||||
putDB(code, pushData, 'customFts');
|
||||
$("#customize").animate({ top: '100%' }, () => {
|
||||
// 保存后标签跳转处理
|
||||
var redirectTag, currentTag = $('.currentTag').text()
|
||||
if (tags.length) {
|
||||
if (pushData.tags.includes(currentTag)) {
|
||||
redirectTag = currentTag
|
||||
} else {
|
||||
redirectTag = pushData.tags[0]
|
||||
}
|
||||
} else {
|
||||
redirectTag = "未分类"
|
||||
}
|
||||
showOptions(redirectTag);
|
||||
location.href = '#' + code
|
||||
$("#customize").empty()
|
||||
let checkSwitch = $(`#${code} .checked-switch`)
|
||||
checkSwitch.click()
|
||||
checkSwitch.is(':checked') || checkSwitch.click()
|
||||
if (extraInfo && extraInfo.fromShare) {
|
||||
getSharedQCFromYuQue()
|
||||
} else {
|
||||
// 保存后标签跳转处理
|
||||
var redirectTag, currentTag = $('.currentTag').text()
|
||||
if (tags.length) {
|
||||
if (pushData.tags.includes(currentTag)) {
|
||||
redirectTag = currentTag
|
||||
} else {
|
||||
redirectTag = pushData.tags[0]
|
||||
}
|
||||
} else {
|
||||
redirectTag = "未分类"
|
||||
}
|
||||
showOptions(redirectTag);
|
||||
location.href = '#' + code
|
||||
let checkSwitch = $(`#${code} .checked-switch`)
|
||||
checkSwitch.click()
|
||||
checkSwitch.is(':checked') || checkSwitch.click()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1497,6 +1505,8 @@
|
||||
if ($("#customize").is(":parent") && $("#featureList").is(":parent")) {
|
||||
$("#customize").animate({ top: '100%' });
|
||||
$("#customize").empty()
|
||||
var extraInfo = $('#customize').data('extraInfo')
|
||||
if (extraInfo && extraInfo.fromShare) getSharedQCFromYuQue()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -845,21 +845,34 @@ li.CodeMirror-hint {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#quicktextarea button {
|
||||
.circleButton {
|
||||
position: absolute;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#quicktextarea .circleButton{
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: #2196F3;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#quicktextarea button:hover {
|
||||
background: #6ab4f0;
|
||||
#quickselect .circleButton{
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
background: #db4d14;
|
||||
z-index: 1060;
|
||||
}
|
||||
|
||||
.circleButton:hover {
|
||||
filter: brightness(1.2);
|
||||
}
|
||||
|
||||
/*quicktextarea*/
|
||||
|
Reference in New Issue
Block a user