From 4ce21d795e7b0a030593aae6b621aed066435d58 Mon Sep 17 00:00:00 2001 From: gangbaruby <40230962+gangbaRuby@users.noreply.github.com> Date: Tue, 11 Aug 2026 02:13:21 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=89=88=E6=9C=AC=E5=8F=B7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=87=B3=201.33.1=20=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=A5=B1=E5=92=8C=E5=BA=A6=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4 ++-- package.json | 2 +- src/core/state.js | 2 +- src/header.js | 2 +- src/index.js | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2066792..ab3d8d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "auto-max-pphpl", - "version": "1.33.0", + "version": "1.33.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "auto-max-pphpl", - "version": "1.33.0", + "version": "1.33.1", "devDependencies": { "esbuild": "^0.28.1" } diff --git a/package.json b/package.json index 7c2a0d4..e298cf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auto-max-pphpl", - "version": "1.33.0", + "version": "1.33.1", "description": "SimCompanies autoMaxPPHPL userscript", "main": "src/index.js", "scripts": { diff --git a/src/core/state.js b/src/core/state.js index 95d1187..6221e90 100644 --- a/src/core/state.js +++ b/src/core/state.js @@ -1,7 +1,7 @@ export const state = { hasNewVersion: undefined, latestVersion: undefined, - localVersion: typeof GM_info !== 'undefined' ? GM_info.script.version : '1.33.0', + localVersion: typeof GM_info !== 'undefined' ? GM_info.script.version : '1.33.1', SCXXCS: 0, PROFIT_PER_BUILDING_LEVEL: 370, RETAIL_ADJUSTMENT: { diff --git a/src/header.js b/src/header.js index a3d8f22..01af7a3 100644 --- a/src/header.js +++ b/src/header.js @@ -1,7 +1,7 @@ // ==UserScript== // @name 自动计算最大时利润 (DEV) // @namespace https://github.com/gangbaRuby -// @version 1.33.0 +// @version 1.33.1 // @license AGPL-3.0 // @description 在商店计算自动计算最大时利润,在合同、交易所展示最大时利润 // @author Rabbit House diff --git a/src/index.js b/src/index.js index 44af82e..df993fc 100644 --- a/src/index.js +++ b/src/index.js @@ -1513,14 +1513,14 @@ import { registerExportInfo, downloadExportData } from './core/exportInfo.js'; const isNarrow = isNarrowViewport(); const cellPadding = isNarrow ? '4px 5px' : '4px 8px'; const table = document.createElement("table"); - table.style.cssText = `border-collapse:collapse;margin:10px 0;background:${d ? '#333' : '#f9f9f9'};color:${d ? 'white' : '#333'};font-size:${isNarrow ? 12 : 13}px;width:100%;table-layout:fixed;`; + table.style.cssText = `border-collapse:collapse;margin:10px 0;background:${d ? '#333' : '#f9f9f9'};color:${d ? 'white' : '#333'};font-size:${isNarrow ? 12 : 13}px;width:auto;table-layout:auto;white-space:nowrap;`; const thead = document.createElement("thead"); const headerRow = document.createElement("tr"); ["物品", "质量", "饱和度"].forEach(text => { const th = document.createElement("th"); th.textContent = text; - th.style.cssText = `border:1px solid ${d ? '#666' : '#ccc'};padding:${cellPadding};overflow-wrap:anywhere;word-break:break-word;`; + th.style.cssText = `border:1px solid ${d ? '#666' : '#ccc'};padding:${cellPadding};text-align:center;vertical-align:middle;white-space:nowrap;`; headerRow.appendChild(th); }); thead.appendChild(headerRow); @@ -1533,7 +1533,7 @@ import { registerExportInfo, downloadExportData } from './core/exportInfo.js'; [name, item.quality ?? "-", String(item.saturation)].forEach(text => { const td = document.createElement("td"); td.textContent = text; - td.style.cssText = `border:1px solid ${d ? '#666' : '#ccc'};padding:${cellPadding};text-align:center;overflow-wrap:anywhere;word-break:break-word;`; + td.style.cssText = `border:1px solid ${d ? '#666' : '#ccc'};padding:${cellPadding};text-align:center;vertical-align:middle;white-space:nowrap;`; row.appendChild(td); }); tbody.appendChild(row); @@ -1553,7 +1553,7 @@ import { registerExportInfo, downloadExportData } from './core/exportInfo.js'; const d = DM(); const isNarrow = isNarrowViewport(); const containerPadding = isNarrow ? 8 : 12; - const containerMaxHeight = isNarrow ? 'calc(100vh - 70px)' : '400px'; + const containerMaxHeight = isNarrow ? '320px' : '400px'; const titleFont = isNarrow ? 13 : 14; const subFont = isNarrow ? 12 : 13; const list = data.ResourcesRetailInfo; @@ -1579,7 +1579,7 @@ import { registerExportInfo, downloadExportData } from './core/exportInfo.js'; position:fixed; left:10px; top:50px; z-index:9998; box-sizing:border-box; background:${d ? '#2c2c2c' : '#fff'}; color:${d ? '#fff' : '#333'}; padding:${containerPadding}px; border-radius:8px; max-height:${containerMaxHeight}; overflow:auto; - width:auto; max-width: calc(100vw - 20px); + width:max-content; max-width: calc(100vw - 20px); box-shadow:0 4px 15px rgba(0,0,0,0.5); font-family:Arial, sans-serif; `;