Skip to content

Commit

Permalink
1. 反馈功能优化;
Browse files Browse the repository at this point in the history
2. 样式优化;
3. 修复已知BUG
  • Loading branch information
HCLonely committed Jan 6, 2022
1 parent ae8a763 commit e2ef763
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 151 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@
"GM_deleteValue",
"GM_registerMenuCommand",
"GM_openInTab",
"GM_listValues"
"GM_listValues",
"GM_setClipboard"
]
}
],
Expand Down
20 changes: 10 additions & 10 deletions dist/auto-task-v4-for-giveawaysu.user.js

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

53 changes: 22 additions & 31 deletions dist/auto-task-v4.user.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "auto-task-new",
"version": "4.1.4-Beta",
"version": "4.1.5-Beta",
"change": [
"更新检测优化",
"Keylol任务识别优化",
"Gleam剩余Key检测优化"
"反馈功能优化",
"样式优化",
"修复已知BUG"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
Expand Down
20 changes: 10 additions & 10 deletions page/dist/auto-task-v4-for-giveawaysu.user.js

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions page/dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

53 changes: 22 additions & 31 deletions page/dist/auto-task-v4.user.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions page/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "auto-task-new",
"version": "4.1.4-Beta",
"version": "4.1.5-Beta",
"change": [
"更新检测优化",
"Keylol任务识别优化",
"Gleam剩余Key检测优化"
"反馈功能优化",
"样式优化",
"修复已知BUG"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
Expand Down
3 changes: 2 additions & 1 deletion src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-13 13:18:21
* @LastEditTime : 2022-01-02 10:50:47
* @LastEditTime : 2022-01-06 12:03:45
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/global.d.ts
*/
Expand Down Expand Up @@ -179,6 +179,7 @@ declare global {
function GM_listValues(): Array<string>
function GM_deleteValue(name: string): void
function GM_registerMenuCommand(name: string, callback: () => void): void
function GM_setClipboard(text: string, type?: string): void
function GM_openInTab(url: string, options?: {
active?: boolean
insert?: boolean
Expand Down
1 change: 1 addition & 0 deletions src/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// @grant GM_registerMenuCommand
// @grant GM_info
// @grant GM_openInTab
// @grant GM_setClipboard
// @grant unsafeWindow
// @grant window.close
// @grant window.localStorage
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-26 15:44:54
* @LastEditTime : 2022-01-02 12:57:04
* @LastEditTime : 2022-01-06 13:35:09
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/index.ts
* @Description :
Expand Down Expand Up @@ -196,7 +196,7 @@ const loadScript = async () => {
GM_setValue('notice', new Date().getTime());
});

echoLog({}).warning(__('echoNotice', __('noticeLink'))).font?.find('a').on('click', () => {
echoLog({ html: `<li><font class="warning">${__('echoNotice', __('noticeLink'))}</font></li>` }).font?.find('a').on('click', () => {
GM_setValue('notice', new Date().getTime());
});
}
Expand Down
6 changes: 3 additions & 3 deletions src/locales/en-US.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-12-30 17:08:27
* @LastEditTime : 2022-01-06 11:17:03
* @LastEditTime : 2022-01-06 12:10:48
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/locales/en-US.js
* @Description : i18n英文
Expand Down Expand Up @@ -149,13 +149,13 @@ const data = {
savingData: 'Saving data...',
syncHistory: 'Synchronize tasks history',
checkUpdateFailed: 'Check update failed',
newVersionNotice: 'Checked a new version V%0, <a href="%1" target="_blank">click to update</a>',
newVersionNotice: 'Checked a new version V%0, <a class="high-light" href="%1" target="_blank">click to update</a>',
language: 'Language</br> Currently only supports zh: Chinese, en: English',
gistOptions: 'Gist Settings',
swalNotice: 'It is detected that you are installing the V4 version script for the first time' +
', please go to read the READ ME FIRST content before use!',
echoNotice: 'It is detected that you are installing the V4 version script for the first time' +
', please <a href="%0" target="_blank">click here</a> to read the READ ME FIRST content before use!',
', please <a class="high-light" href="%0" target="_blank">click here</a> to read the READ ME FIRST content before use!',
noticeLink: 'https://auto-task-doc.js.org/en/guide/#read-me-first',
toGithub: 'Feedback(Github)',
toKeylol: 'Feedback(Keylol)',
Expand Down
6 changes: 3 additions & 3 deletions src/locales/zh-CN.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-11-20 19:38:41
* @LastEditTime : 2022-01-03 14:02:28
* @LastEditTime : 2022-01-06 12:10:11
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/locales/zh-CN.js
* @Description : i18n中文
Expand Down Expand Up @@ -137,11 +137,11 @@ const data = {
savingData: '正在保存数据...',
syncHistory: '同步任务历史',
checkUpdateFailed: '检测更新失败',
newVersionNotice: '检测到新版本V%0, <a href="%1" target="_blank">点此更新</a>',
newVersionNotice: '检测到新版本V%0, <a class="high-light" href="%1" target="_blank">点此更新</a>',
language: '语言</br>目前仅支持zh: 中文, en: 英文',
gistOptions: 'Gist 设置',
swalNotice: '检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!',
echoNotice: '检测到您第一次安装V4版本脚本,请<a href="%0" target="_blank">点此前往</a>阅读用前必读内容!',
echoNotice: '检测到您第一次安装V4版本脚本,请<a class="high-light" href="%0" target="_blank">点此前往</a>阅读用前必读内容!',
noticeLink: 'https://auto-task-doc.js.org/guide/#用前必读',
toGithub: '前往Github反馈',
toKeylol: '前往其乐论坛反馈',
Expand Down
32 changes: 9 additions & 23 deletions src/scripts/tools/throwError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-13 14:08:18
* @LastEditTime : 2022-01-01 13:52:17
* @LastEditTime : 2022-01-06 12:05:21
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/tools/throwError.ts
* @Description : 错误处理函数
Expand Down Expand Up @@ -58,28 +58,14 @@ ${$.makeArray($('#auto-task-info>li')).map((element) => element.innerText)
执行日志:
[code]${$.makeArray($('#auto-task-info>li')).map((element) => element.innerText)
.join('\n')}[/code]`;
const textarea = $('<textarea>');
$('body').append(textarea);
textarea.val(text).trigger('select');
if (document.execCommand('Copy')) {
Swal.fire({
title: __('copySuccess'),
icon: 'success',
confirmButtonText: __('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
} else {
Swal.fire({
title: __('copyFailed'),
input: 'textarea',
inputValue: text,
confirmButtonText: __('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
}
textarea.remove();
GM_setClipboard(text);
Swal.fire({
title: __('copySuccess'),
icon: 'success',
confirmButtonText: __('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
}
});
console.log('%c%s', 'color:white;background:red', `${name}\n${error.stack}`);
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/website/Givekey.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-11-13 17:57:40
* @LastEditTime : 2022-01-02 12:46:41
* @LastEditTime : 2022-01-06 13:37:17
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/website/Givekey.ts
* @Description : https://givekey.ru
Expand Down Expand Up @@ -181,7 +181,7 @@ class Givekey extends Website {
}

echoLog({}).success(__('allTasksComplete'));
echoLog({}).warning(__('giveKeyNoticeAfter'));
echoLog({ html: `<li><font class="warning">${__('giveKeyNoticeAfter')}</font></li>` });
return true;
} catch (error) {
throwError(error as Error, 'Givekey.verifyTask');
Expand Down
5 changes: 5 additions & 0 deletions src/style/auto-task.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@

li {
text-align: left;

a.high-light {
color: #00aeff;
font-weight: bold;
}
}

.success {
Expand Down

1 comment on commit e2ef763

@vercel
Copy link

@vercel vercel bot commented on e2ef763 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.