更新
This commit is contained in:
parent
1e151060f3
commit
001e72d27b
@ -4,6 +4,14 @@
|
||||
|
||||
# CHANGE
|
||||
|
||||
## 0.8.1
|
||||
|
||||
2023年02月01日
|
||||
|
||||
### 添加
|
||||
|
||||
- 上次动作的开关
|
||||
|
||||
## 0.8.0
|
||||
|
||||
2023年01月16日
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wuhu-torn-helper",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.1",
|
||||
"description": "芜湖助手",
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -126,9 +126,10 @@ export default class WuhuConfig extends WuhuBase {
|
||||
{ key: 'CashChangeAlert', val: false },
|
||||
// 收集数据以改进翻译质量
|
||||
{ key: 'CollectPlayerData', val: true },
|
||||
// 迷你资料卡显示上次行动时间
|
||||
{ key: 'ShowMiniProfLastAct', val: true },
|
||||
|
||||
/**
|
||||
* 危险行为⚠️
|
||||
* @deprecated
|
||||
*/
|
||||
{ key: 'dangerZone', val: false },
|
||||
|
||||
@ -219,7 +219,7 @@ export default class ZhongIcon extends WuhuBase {
|
||||
|
||||
// 菜单
|
||||
private constructMenuList(): ZhongIcon {
|
||||
Log.info('构造展开菜单列表开始');
|
||||
Log.info('构造菜单列表开始');
|
||||
let timer = new Timer();
|
||||
let glob = Global.getInstance();
|
||||
const date = new Date();
|
||||
|
||||
@ -2,6 +2,7 @@ import WuhuBase from "../WuhuBase";
|
||||
import { MiniProfile } from "../../interface/responseType/MiniProfile";
|
||||
import CommonUtils from "../utils/CommonUtils";
|
||||
import globVars from "../../globVars";
|
||||
import WuhuConfig from "../WuhuConfig";
|
||||
|
||||
/**
|
||||
* fetch 事件监听回调
|
||||
@ -21,15 +22,15 @@ export default class FetchEventCallback extends WuhuBase {
|
||||
*/
|
||||
public handler(response, url: string) {
|
||||
// mini profile 中添加上次动作
|
||||
if (url.includes('profiles.php?step=getUserNameContextMenu')) {
|
||||
if (url.includes('profiles.php?step=getUserNameContextMenu') && WuhuConfig.get('ShowMiniProfLastAct')) {
|
||||
window.setTimeout(async () => {
|
||||
let cont = await CommonUtils.querySelector('[class*=profile-mini-_userProfileWrapper___]');
|
||||
let cont = CommonUtils.querySelector('[class*=profile-mini-_userProfileWrapper___]');
|
||||
let resp: MiniProfile = response.json as MiniProfile;
|
||||
let newNode = document.createElement('div');
|
||||
let formatted = CommonUtils.getInstance().secondsFormat(resp.user.lastAction.seconds);
|
||||
|
||||
newNode.innerText = '上次动作: ' + formatted;
|
||||
cont.append(newNode);
|
||||
(await cont).append(newNode);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,6 +405,12 @@ export default class SettingsHandler extends WuhuBase {
|
||||
dictName: 'ShowNameHistory',
|
||||
domId: ''
|
||||
});
|
||||
list.push({
|
||||
domType: 'checkbox',
|
||||
domText: '迷你资料卡显示上次行动时间',
|
||||
dictName: 'ShowMiniProfLastAct',
|
||||
domId: ''
|
||||
});
|
||||
|
||||
// 侧边栏
|
||||
list.push({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user