mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-13 15:50:45 +08:00
Merge pull request #40 from x1ao4/dev
修复资源搜索分享链接逻辑、运行日志模态框滚动问题和重命名列表头显示错误问题
This commit is contained in:
commit
e573b1198c
@ -1752,7 +1752,7 @@
|
||||
fileSelect.index !== null && fileSelect.index >= 0 && formData.tasklist[fileSelect.index] ?
|
||||
(formData.tasklist[fileSelect.index].use_sequence_naming ? '顺序命名' :
|
||||
(formData.tasklist[fileSelect.index].use_episode_naming ? '剧集命名' : '正则命名')) :
|
||||
fileSelect.index === -1 && document.getElementById('fileSelectModal').getAttribute('data-modal-type') === 'preview' ?
|
||||
fileSelect.index === -1 && (document.getElementById('fileSelectModal').getAttribute('data-modal-type') === 'preview' || document.getElementById('fileSelectModal').getAttribute('data-modal-type') === 'source' || document.getElementById('fileSelectModal').getAttribute('data-modal-type') === 'start-file') ?
|
||||
(createTask.taskData.use_sequence_naming ? '顺序命名' :
|
||||
(createTask.taskData.use_episode_naming ? '剧集命名' : '正则命名')) :
|
||||
(fileManager.use_sequence_naming ? '顺序命名' :
|
||||
@ -4175,14 +4175,8 @@
|
||||
selectSuggestion(index, suggestion) {
|
||||
this.smart_param.showSuggestions = false;
|
||||
|
||||
// 首先设置分享链接到对应的输入框
|
||||
if (index === -1) {
|
||||
// 创建任务模态框的情况
|
||||
this.createTask.taskData.shareurl = suggestion.shareurl;
|
||||
} else if (index >= 0 && this.formData.tasklist[index]) {
|
||||
// 任务列表的情况
|
||||
this.formData.tasklist[index].shareurl = suggestion.shareurl;
|
||||
}
|
||||
// 不直接设置分享链接到输入框,只是打开文件选择模态框让用户浏览
|
||||
// 用户在模态框中导航后,最终的 this.fileSelect.shareurl 才是需要的地址
|
||||
|
||||
// 确保显示的是选择需转存的文件夹界面,而不是命名预览界面
|
||||
this.fileSelect.previewRegex = false;
|
||||
@ -4568,6 +4562,8 @@
|
||||
if (!this.fileSelect.fileList || this.fileSelect.fileList.length === 0) {
|
||||
this.$set(this.createTask.taskData, "shareurl_ban", "该分享已被删除,无法访问");
|
||||
}
|
||||
// 只有在用户点击"转存当前文件夹"时才更新分享链接
|
||||
// 使用用户最终访问的分享链接地址(包含用户导航后的路径)
|
||||
this.createTask.taskData.shareurl = this.fileSelect.shareurl;
|
||||
} else if (this.fileSelect.index !== null && this.fileSelect.index >= 0 && this.formData.tasklist[this.fileSelect.index]) {
|
||||
this.formData.tasklist[this.fileSelect.index].shareurl_ban = undefined;
|
||||
@ -4575,6 +4571,8 @@
|
||||
if (!this.fileSelect.fileList || this.fileSelect.fileList.length === 0) {
|
||||
this.$set(this.formData.tasklist[this.fileSelect.index], "shareurl_ban", "该分享已被删除,无法访问");
|
||||
}
|
||||
// 只有在用户点击"转存当前文件夹"时才更新分享链接
|
||||
// 使用用户最终访问的分享链接地址(包含用户导航后的路径)
|
||||
this.formData.tasklist[this.fileSelect.index].shareurl = this.fileSelect.shareurl;
|
||||
}
|
||||
} else {
|
||||
@ -7885,14 +7883,18 @@
|
||||
// 保存成功后更新用户信息
|
||||
this.fetchUserInfo();
|
||||
|
||||
// 运行新创建的任务
|
||||
const taskIndex = this.formData.tasklist.length - 1;
|
||||
this.runScriptNow(taskIndex);
|
||||
|
||||
// 显示任务创建成功消息
|
||||
this.showToast('任务创建成功并开始运行', 'success');
|
||||
this.createTask.loading = false;
|
||||
|
||||
// 先关闭创建任务模态框,然后运行新创建的任务
|
||||
this.cancelCreateTask();
|
||||
|
||||
// 等待模态框完全关闭后再打开运行日志模态框
|
||||
setTimeout(() => {
|
||||
const taskIndex = this.formData.tasklist.length - 1;
|
||||
this.runScriptNow(taskIndex);
|
||||
}, 300);
|
||||
} else {
|
||||
// 错误信息使用alert,确保用户看到
|
||||
alert(response.data.message);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user