Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
feat: 清除所有收集到的快照链接功能
Browse files Browse the repository at this point in the history
  • Loading branch information
adproqwq committed May 5, 2024
1 parent 1284fee commit d13a278
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
3 changes: 1 addition & 2 deletions changeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# 新增
1. 支持上传快照文件
2. 支持收集快照链接
1. 清除所有收集到的快照链接功能
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "GKD网页审查工具 for QQNT",
"slug": "LiteLoaderQQNT_GKDInspectForQQNT",
"description": "用于在QQNT中快捷开始审查快照",
"version": "1.2.0",
"version": "1.2.1",
"authors": [
{
"name": "Adpro",
Expand All @@ -26,7 +26,7 @@
"repo": "adproqwq/LiteLoaderQQNT-GKDInspectForQQNT",
"branch": "main",
"release": {
"tag": "v1.2.0",
"tag": "v1.2.1",
"file": "LiteLoaderQQNT-GKDInspectForQQNT"
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "liteloaderqqnt-gkd-inspect-for-qqnt",
"version": "1.2.0",
"version": "1.2.1",
"description": "用于在QQNT中快捷开始审查快照",
"main": "index.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ declare namespace LiteLoader {
openPath: (path: string) => void,
openExternal: (url: string) => void,
disablePlugin: (slug: string) => void,
registerUrlHandler: (name: string, callback: (rest: string[], url: string) => void) => void,
config: ILiteLoaderAPIConfig,
}

Expand Down
14 changes: 14 additions & 0 deletions src/pages/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ export default `
</setting-panel>
</setting-section>
<setting-section data-title="数据">
<setting-panel>
<setting-list data-direction="column">
<setting-item>
<div>
<setting-text>清除所有收集的快照链接</setting-text>
<setting-text data-type="secondary">会清除所有,请谨慎哦!</setting-text>
<setting-button id="cleanAllLinks" data-type="secondary">清除所有</setting-button>
</div>
</setting-item>
</setting-list>
</setting-panel>
</setting-section>
<setting-section data-title="关于">
<setting-panel>
<setting-list data-direction="column">
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import addInspectEntry from '../utils/addInspectEntry';
import settingsPage from '../pages/settings';
import { slug } from '../config/commonInfo';
import { snapshotCollections } from '../config/snapshotCollection';

// 当渲染进程窗口加载完成后触发
const onload = () => {
Expand All @@ -19,4 +21,8 @@ export const onSettingWindowCreated = async (view: HTMLElement) => {
(view.querySelector('#detail') as HTMLButtonElement).addEventListener('click', () => {
LL_GKDInspectForQQNT.openDetailWindow();
});

(view.querySelector('#cleanAllLinks') as HTMLButtonElement).addEventListener('click', async () => {
await LiteLoader.api.config.set(slug, snapshotCollections);
});
};

0 comments on commit d13a278

Please sign in to comment.