GM 工具:点券实时刷新 + 界面排版与文案优化
服务端: - gm_tool_wallet.go: GMAdjustAccountCera 落库后遍历在线会话,推送账号级 点券钱包投影(op53),在线角色点券余额即时刷新,无需离线/重登 启动器前端: - app.js: 副本控制改名「魔改中心」;删除角色详情页疲劳值编辑块 (saveFatigue/maxFatigue 及相关输入框);黑钻提示改为「在线回城即时生效」 - index.html/shell.css/shell.js/style.css: 精简 GM 全屏标题栏(仅保留 窗口按钮)、移除 D 字图标及死样式、修正侧边栏底部间距
This commit is contained in:
1 parent
645b64fe21
commit
d31a34e9aa
6 files changed
+29
-67
No files matched your search
+3
-38
@@ -276,7 +276,7 @@ const GM_PAGES = {
|
||||
inventory: ['背包装备', '/ 查看背包'],
|
||||
auction: ['拍卖行', '/ 挂单上下架'],
|
||||
quests: ['任务管理', '/ 任务查询'],
|
||||
dungeons: ['副本控制', '/ 副本状态'],
|
||||
dungeons: ['魔改中心', '/ 副本状态'],
|
||||
wallet: ['钱包点券', '/ 钱包与黑钻'],
|
||||
wipe: ['删档管理', '/ 删除角色与账号'],
|
||||
settings: ['连接设置', '/ 数据源切换'],
|
||||
@@ -620,8 +620,6 @@ async function openCharDetail(charId) {
|
||||
try {
|
||||
const r = await api('/api/character?id=' + encodeURIComponent(charId));
|
||||
const ch = r.data || {};
|
||||
const fat = await api('/api/character/fatigue?id=' + encodeURIComponent(charId) + '&mode=query');
|
||||
const fatInfo = fat.data || {};
|
||||
content.innerHTML = `
|
||||
<div class="gm-card">
|
||||
<div class="gm-card-title"><span class="dot"></span>角色:${escapeHtml(ch.name || charId)}</div>
|
||||
@@ -651,23 +649,6 @@ async function openCharDetail(charId) {
|
||||
|
||||
<div class="gm-card-title" style="margin-top:8px"><span class="dot"></span>职业 / 转职</div>
|
||||
<div id="careerPanel" style="margin-bottom:10px"><div class="gm-hint">正在加载职业信息…</div></div>
|
||||
|
||||
<div class="gm-card-title" style="margin-top:8px"><span class="dot"></span>疲劳值(无限疲劳)</div>
|
||||
<div class="gm-form-row" style="margin-bottom:10px">
|
||||
<div class="gm-field">
|
||||
<label>当前疲劳</label>
|
||||
<input class="gm-input" id="editFatigue" type="number" value="${fmt(fatInfo.fatigue)}">
|
||||
</div>
|
||||
<div class="gm-field">
|
||||
<label>疲劳上限</label>
|
||||
<input class="gm-input" id="editFatigueLimit" type="number" value="${fmt(fatInfo.fatigue_limit)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="gm-toolbar">
|
||||
<button class="gm-btn gm-btn-sm" onclick="saveFatigue()">保存疲劳</button>
|
||||
<button class="gm-btn gm-btn-sm gm-btn-primary" onclick="maxFatigue()">⚡ 一键无限疲劳</button>
|
||||
<span class="gm-hint">疲劳每日 6 点重置回上限;无限疲劳 = 把疲劳和上限都设成超大值</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gm-card gm-danger-zone">
|
||||
@@ -779,20 +760,6 @@ async function saveGold() {
|
||||
if (r.ok) gmToast('金币已更新', 'ok'); else gmToast('失败:' + (r.error || ''), 'err');
|
||||
}
|
||||
|
||||
async function saveFatigue() {
|
||||
const fatigue = $('editFatigue').value;
|
||||
const limit = $('editFatigueLimit').value;
|
||||
const r = await post('/api/character/fatigue', { id: currentCharId, fatigue: parseInt(fatigue), fatigue_limit: parseInt(limit) });
|
||||
if (r.ok) { gmToast('疲劳值已更新', 'ok'); openCharDetail(currentCharId); }
|
||||
else gmToast('失败:' + (r.error || ''), 'err');
|
||||
}
|
||||
|
||||
async function maxFatigue() {
|
||||
const r = await post('/api/character/fatigue', { id: currentCharId, fatigue: 999999, fatigue_limit: 999999 });
|
||||
if (r.ok) { gmToast('已设置无限疲劳(999999)', 'ok'); openCharDetail(currentCharId); }
|
||||
else gmToast('失败:' + (r.error || ''), 'err');
|
||||
}
|
||||
|
||||
async function deleteCurrentChar() {
|
||||
gmConfirm('删除角色', '确定要删除该角色的全部数据吗?<br>此操作<b style="color:#ff5d6c">不可恢复</b>,且需先停止服务端。', 'DELETE', async () => {
|
||||
const r = await post('/api/character/delete', { id: currentCharId, confirm: 'DELETE' });
|
||||
@@ -1988,7 +1955,7 @@ async function renderWallet(content) {
|
||||
</div>
|
||||
</div>
|
||||
<button class="gm-btn gm-btn-primary" onclick="activateBlackDiamond()">💎 开启黑钻</button>
|
||||
<div class="gm-hint" style="margin-top:8px">黑钻提升疲劳上限、额外翻牌等权益;角色需离线(下次登录生效)。</div>
|
||||
<div class="gm-hint" style="margin-top:8px">黑钻提升疲劳上限、额外翻牌等权益;在线角色回城后即时生效,无需离线。</div>
|
||||
</div>`;
|
||||
fillCharSelect($('wallet-char'));
|
||||
fillAccountSelect($('cera-account'));
|
||||
@@ -2066,7 +2033,7 @@ async function activateBlackDiamond() {
|
||||
const id = $('bd-char').value;
|
||||
const days = parseInt($('bd-days').value) || 30;
|
||||
if (!id) { gmToast('请选择角色', 'err'); return; }
|
||||
gmConfirm('开启黑钻', '确定要为所选角色开启黑钻 ' + days + ' 天吗?<br>角色需处于<b style="color:#ff5d6c">离线状态</b>,下次登录生效。', '开启黑钻', async () => {
|
||||
gmConfirm('开启黑钻', '确定要为所选角色开启黑钻 ' + days + ' 天吗?<br>在线角色回城后即时生效。', '开启黑钻', async () => {
|
||||
const r = await post('/api/black-diamond/activate', { id, days });
|
||||
if (r.ok) { gmToast('黑钻已开启 ' + days + ' 天', 'ok'); queryBlackDiamond(); }
|
||||
else gmToast('开启失败:' + (r.error || ''), 'err');
|
||||
@@ -2290,8 +2257,6 @@ function init() {
|
||||
window.openCharDetail = openCharDetail;
|
||||
window.saveLevel = saveLevel;
|
||||
window.saveGold = saveGold;
|
||||
window.saveFatigue = saveFatigue;
|
||||
window.maxFatigue = maxFatigue;
|
||||
window.deleteCurrentChar = deleteCurrentChar;
|
||||
window.doGrant = doGrant;
|
||||
window.loadInventory = loadInventory;
|
||||
|
||||
Reference in new issue
Block a user