poi-plugin-remodel-assistant 1.2.6-beta.1 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,34 +1,42 @@
1
1
  # 改修助手
2
2
 
3
- Poi 用舰队 Collection 装备改修规划插件。结合当前库存与随包数据,把长期改修目标拆成“今天改什么”、具体起点、完整升级路线、秘书舰条件和材料消耗。
3
+ Poi plugin for planning Kantai Collection equipment improvements.
4
4
 
5
- Beta preview channel. Beta and Stable share the npm package name `poi-plugin-remodel-assistant`; Beta uses the `beta` dist-tag and Stable uses `latest`.
5
+ Tell the plugin the equipment you ultimately want, the target improvement level, and quantity. It will combine that goal with your current inventory to organize routes, intermediate equipment, material requirements, and what you can improve today.
6
6
 
7
7
  ## Features
8
8
 
9
- - Use **Today** as the execution list for unfinished plans, with current equipment, assistant ships, available days, current-step materials, and the remaining equipment-star route in one detail view.
10
- - Use **Equipment library** to search equipment, review owned copies, add explicit target-star/quantity plans, compare total cost, and manage each plan route.
11
- - Keep route choices explicit: one valid complete route is used directly, while multiple valid routes wait for the user to choose instead of being silently auto-ranked.
12
- - Review acquisition sources when a route requires equipment you do not own, including development, quest, and ship initial/remodel sources when available.
13
- - Compare expected and guaranteed material needs, with development materials and improvement materials presented separately.
14
- - Customize ordinary detail sections by visibility and order, while required unresolved/action sections remain visible.
15
- - Use category filters, sorting, and low-priority equipment to narrow recommendations without removing valid plans or routes.
9
+ - Create improvement plans directly from **Equipment library**.
10
+ - Match plans against your current inventory to determine the practical starting point.
11
+ - Manage complete improvement routes, with explicit user choice when more than one valid route exists.
12
+ - Review acquisition sources for missing prerequisite equipment, including development, quests, and ship initial/remodel equipment when available.
13
+ - Use **Today** to see plans that can be advanced now, together with assistant ships, available days, materials, and remaining routes.
14
+ - Filter and sort equipment, manage low-priority equipment, and customize ordinary detail sections.
15
+ - Back up and restore plans, route choices, and interface settings.
16
16
 
17
17
  ## Quick Start
18
18
 
19
- 1. Open **Equipment library**, select an equipment, and add a plan with the target improvement level and quantity.
20
- 2. If the plan has more than one complete valid route, choose the route you want; if the starting equipment is missing, open its acquisition details.
21
- 3. Open **Today** and follow the current equipment, assistant ship, available day, material requirement, and remaining route shown in the detail pane.
19
+ 1. Open **Equipment library** and select your target equipment.
20
+ 2. Set the target improvement level and quantity, then create a plan.
21
+ 3. If more than one route is available, choose the route you want.
22
+ 4. Open **Today** and follow the current guidance.
22
23
 
23
- The in-plugin **Help** entry contains this workflow, detailed category/low-priority guides, data-source information, and user-facing release notes.
24
+ The in-plugin **Help** entry contains illustrated guides.
24
25
 
25
- ## Installation
26
+ ## Data Sources
26
27
 
27
- Install `poi-plugin-remodel-assistant` from the Poi plugin manager.
28
+ Improvement information is based on:
29
+
30
+ - Akashi-List
31
+ - wikiwiki.jp
32
+ - KcWiki-Api
33
+ - KC3
28
34
 
29
- ## Data
35
+ The plugin uses the latest available data and shows the active data version and update time in **Help**.
30
36
 
31
- Improvement data is based on Akashi-List, wikiwiki.jp, KcWiki-Api, and KC3. Data is updated with the packaged plugin data and is not fetched in real time while the plugin is running.
37
+ ## Installation
38
+
39
+ Install `poi-plugin-remodel-assistant` from the Poi plugin manager.
32
40
 
33
41
  ## License
34
42
 
package/assets/main.css CHANGED
@@ -11011,13 +11011,13 @@ body.decision-modal-is-dragging * {
11011
11011
 
11012
11012
  #item-improvement .decision-detail-related-plan-group-label {
11013
11013
  width: fit-content;
11014
- padding: 1px 7px;
11014
+ padding: 2px 8px;
11015
11015
  border-radius: 999px;
11016
11016
  background: rgba(103, 198, 193, 0.09);
11017
11017
  color: #67c6c1;
11018
- font-size: var(--improvement-font-caption);
11018
+ font-size: var(--improvement-font-small);
11019
11019
  font-weight: 700;
11020
- line-height: 1.55;
11020
+ line-height: 1.5;
11021
11021
  }
11022
11022
 
11023
11023
  #item-improvement .decision-detail-related-plan-list {
@@ -11057,11 +11057,13 @@ body.decision-modal-is-dragging * {
11057
11057
  display: flex;
11058
11058
  align-items: center;
11059
11059
  gap: 5px;
11060
- padding-left: 8px;
11060
+ padding: 2px 8px 0 10px;
11061
11061
  color: #c8d2d7;
11062
- font-size: var(--improvement-font-body);
11062
+ font-size: var(--improvement-font-body-large);
11063
11063
  font-weight: 650;
11064
- white-space: nowrap;
11064
+ line-height: 1.45;
11065
+ white-space: normal;
11066
+ overflow-wrap: anywhere;
11065
11067
  }
11066
11068
 
11067
11069
  #item-improvement .decision-detail-related-plan-parent-arrow {
package/i18n/en-US.json CHANGED
@@ -1596,8 +1596,8 @@
1596
1596
  "data.Backup summary %p plans %r routes %l low priority": "%p plans · %r routes · %l low-priority equipment",
1597
1597
  "equipment.Search equipment name": "Search equipment name",
1598
1598
  "workbench.Search equipment name": "Search equipment name",
1599
- "app.changelog_1_2_6_1": "Optimized plan calculation and startup flow to reduce redundant work on local changes and make the interface available sooner after startup.",
1600
- "app.changelog_1_2_6_2": "Fixed cases where user Plans and consumable Plans were handled together, improving consistency in Plan counts, equipment allocation, and diagnostics.",
1599
+ "app.changelog_1_2_6_1": "Improved plan calculation and startup speed.",
1600
+ "app.changelog_1_2_6_2": "Fixed plan-count and equipment-allocation issues that could occur in rare edge cases.",
1601
1601
  "shared.Show parent plans": "Show parent plans",
1602
- "app.changelog_1_2_6_3": "Improved related-Plan and consumable-Plan details with unified target buttons and clearer parent-Plan relationships for better readability."
1602
+ "app.changelog_1_2_6_3": "Improved related-plan and consumable-plan display for better readability."
1603
1603
  }
package/i18n/ja-JP.json CHANGED
@@ -1596,8 +1596,8 @@
1596
1596
  "data.Backup summary %p plans %r routes %l low priority": "プラン %p · ルート %r · 低優先装備 %l",
1597
1597
  "equipment.Search equipment name": "装備名を検索",
1598
1598
  "workbench.Search equipment name": "装備名を検索",
1599
- "app.changelog_1_2_6_1": "計画計算と起動処理を最適化し、局所的な変更時の重複計算を減らして、起動後に画面をより早く利用できるようにしました。",
1600
- "app.changelog_1_2_6_2": "一部の状況でユーザー計画と消耗品計画が混在して処理される問題を修正し、計画数・装備割り当て・異常検出の整合性を改善しました。",
1599
+ "app.changelog_1_2_6_1": "計画計算と起動速度を改善しました。",
1600
+ "app.changelog_1_2_6_2": "ごくまれな条件で計画数や装備割り当てが正しくならない問題を修正しました。",
1601
1601
  "shared.Show parent plans": "親計画を表示",
1602
- "app.changelog_1_2_6_3": "関連計画と消耗品計画の詳細表示を改善し、計画目標ボタンを統一するとともに親計画との関係を明確化して、可読性を高めました。"
1602
+ "app.changelog_1_2_6_3": "関連計画と消耗品計画の表示を改善し、読みやすくしました。"
1603
1603
  }
package/i18n/zh-CN.json CHANGED
@@ -1596,8 +1596,8 @@
1596
1596
  "data.Backup summary %p plans %r routes %l low priority": "计划 %p · 路线 %r · 低优先装备 %l",
1597
1597
  "equipment.Search equipment name": "搜索装备名称",
1598
1598
  "workbench.Search equipment name": "搜索装备名称",
1599
- "app.changelog_1_2_6_1": "优化计划计算与启动流程,减少局部变化时的重复计算,并加快启动后的界面可用速度。",
1600
- "app.changelog_1_2_6_2": "修复用户计划与耗材计划在部分情况下混合处理的问题,改善计划数量、装备分配与异常检测的一致性。",
1599
+ "app.changelog_1_2_6_1": "优化计划计算与启动速度。",
1600
+ "app.changelog_1_2_6_2": "修复极端情况下计划数量和装备分配异常的问题。",
1601
1601
  "shared.Show parent plans": "显示父计划",
1602
- "app.changelog_1_2_6_3": "优化相关计划与耗材计划详情显示,统一计划目标按钮,并补充父计划关系,提升信息可读性。"
1602
+ "app.changelog_1_2_6_3": "优化相关计划与耗材计划的显示,提高可读性。"
1603
1603
  }
package/i18n/zh-TW.json CHANGED
@@ -1596,8 +1596,8 @@
1596
1596
  "data.Backup summary %p plans %r routes %l low priority": "計畫 %p · 路線 %r · 低優先裝備 %l",
1597
1597
  "equipment.Search equipment name": "搜尋裝備名稱",
1598
1598
  "workbench.Search equipment name": "搜尋裝備名稱",
1599
- "app.changelog_1_2_6_1": "最佳化計畫計算與啟動流程,減少局部變化時的重複計算,並加快啟動後的介面可用速度。",
1600
- "app.changelog_1_2_6_2": "修復使用者計畫與耗材計畫在部分情況下混合處理的問題,改善計畫數量、裝備分配與異常檢測的一致性。",
1599
+ "app.changelog_1_2_6_1": "最佳化計畫計算與啟動速度。",
1600
+ "app.changelog_1_2_6_2": "修復極端情況下計畫數量與裝備分配異常的問題。",
1601
1601
  "shared.Show parent plans": "顯示父計畫",
1602
- "app.changelog_1_2_6_3": "最佳化相關計畫與耗材計畫詳情顯示,統一計畫目標按鈕,並補充父計畫關係,提升資訊可讀性。"
1602
+ "app.changelog_1_2_6_3": "最佳化相關計畫與耗材計畫的顯示,提高可讀性。"
1603
1603
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-remodel-assistant",
3
- "version": "1.2.6-beta.1",
3
+ "version": "1.2.6",
4
4
  "description": "View enhanced KanColle improvement data, manage improvement plans, and receive improvement recommendations.",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -27,7 +27,7 @@
27
27
  "icon": "fa/wrench",
28
28
  "id": "poi-plugin-remodel-assistant",
29
29
  "priority": 50,
30
- "releaseChannel": "beta",
30
+ "releaseChannel": "stable",
31
31
  "title": "改修助手",
32
32
  "runtimeFlags": {
33
33
  "forceFullDecisionRebuild": false,
@@ -49,6 +49,8 @@ const __ = (key, ...args) => translate(`equipment.${key}`, ...args);
49
49
 
50
50
  const localizedName = name => window.i18n.resources.__(name || '');
51
51
 
52
+ const PLAN_ADD_QUEUE_STEP_MS = 180;
53
+
52
54
  const inventoryEntries = levels => {
53
55
  const counts = {};
54
56
  const normalizedLevels = levels || [];
@@ -97,8 +99,12 @@ class EquipmentPlanSection extends _react.default.Component {
97
99
  this.state = {
98
100
  observedItemId: Number(props.item && props.item.id) || null,
99
101
  star: allowed.includes(10) ? 10 : allowed[0] || 0,
100
- count: 1
102
+ count: 1,
103
+ addPendingCount: 0
101
104
  };
105
+ this.addPlanQueue = [];
106
+ this.addPlanProcessing = false;
107
+ this.addPlanDrainTimer = null;
102
108
  }
103
109
 
104
110
  static getDerivedStateFromProps({
@@ -114,6 +120,10 @@ class EquipmentPlanSection extends _react.default.Component {
114
120
  };
115
121
  }
116
122
 
123
+ componentWillUnmount() {
124
+ if (this.addPlanDrainTimer) clearTimeout(this.addPlanDrainTimer);
125
+ }
126
+
117
127
  render() {
118
128
  const {
119
129
  item,
@@ -122,7 +132,8 @@ class EquipmentPlanSection extends _react.default.Component {
122
132
  } = this.props;
123
133
  const {
124
134
  star,
125
- count
135
+ count,
136
+ addPendingCount
126
137
  } = this.state;
127
138
  const rows = (0, _planManagementDomain.buildPlanOccurrenceDisplayRows)(item);
128
139
  const ownedEntries = inventoryEntries(item.levels);
@@ -209,8 +220,9 @@ class EquipmentPlanSection extends _react.default.Component {
209
220
  bsStyle: "success",
210
221
  bsSize: "small",
211
222
  disabled: !canAdd,
223
+ "aria-busy": addPendingCount > 0,
212
224
  onClick: this.handleAdd
213
- }, __('Add plan')))));
225
+ }, addPendingCount > 0 ? `${__('Add plan')} (${addPendingCount})` : __('Add plan')))));
214
226
  }
215
227
 
216
228
  }
@@ -228,14 +240,40 @@ Object.defineProperty(EquipmentPlanSection, "propTypes", {
228
240
  });
229
241
 
230
242
  var _initialiseProps = function () {
243
+ Object.defineProperty(this, "drainAddPlanQueue", {
244
+ configurable: true,
245
+ enumerable: true,
246
+ writable: true,
247
+ value: () => {
248
+ if (this.addPlanProcessing || this.addPlanQueue.length === 0) return;
249
+ const request = this.addPlanQueue.shift();
250
+ this.addPlanProcessing = true;
251
+ this.setState({
252
+ addPendingCount: this.addPlanQueue.length + 1
253
+ });
254
+
255
+ try {
256
+ (0, _planStorage.incrementEquipPlan)(request.itemId, request.star, request.count);
257
+ this.props.onPlanChanged(request.itemId, 'concrete');
258
+ } finally {
259
+ if (this.addPlanDrainTimer) clearTimeout(this.addPlanDrainTimer);
260
+ this.addPlanDrainTimer = setTimeout(() => {
261
+ this.addPlanProcessing = false;
262
+ this.addPlanDrainTimer = null;
263
+ this.setState({
264
+ addPendingCount: this.addPlanQueue.length
265
+ }, this.drainAddPlanQueue);
266
+ }, PLAN_ADD_QUEUE_STEP_MS);
267
+ }
268
+ }
269
+ });
231
270
  Object.defineProperty(this, "handleAdd", {
232
271
  configurable: true,
233
272
  enumerable: true,
234
273
  writable: true,
235
274
  value: () => {
236
275
  const {
237
- item,
238
- onPlanChanged
276
+ item
239
277
  } = this.props;
240
278
  const {
241
279
  star,
@@ -243,8 +281,15 @@ var _initialiseProps = function () {
243
281
  } = this.state;
244
282
  const allowed = item && item.planPolicy ? item.planPolicy.allowedStars || [] : [];
245
283
  if (!allowed.includes(Number(star)) || !(0, _planStorage.isValidPlanAddCount)(Number(count))) return;
246
- (0, _planStorage.incrementEquipPlan)(Number(item.id), Number(star), Number(count));
247
- onPlanChanged(Number(item.id), 'concrete');
284
+ this.addPlanQueue.push({
285
+ itemId: Number(item.id),
286
+ star: Number(star),
287
+ count: Number(count)
288
+ });
289
+ this.setState({
290
+ addPendingCount: this.addPlanQueue.length + (this.addPlanProcessing ? 1 : 0)
291
+ });
292
+ this.drainAddPlanQueue();
248
293
  }
249
294
  });
250
295
  Object.defineProperty(this, "handleClearAll", {