Files
ark-stronghold-protocol/public/js/ui/rewardOverlay.js
T
sganggs 01a44cd288 卫戍协议:盟约 web remake — initial import
Online co-op browser remake of Arknights' Stronghold Protocol: Alliance
(client-simulated combat, official waves/bonds/items/strategies, 3D board,
facing wheel, operator loadout, official emotes, deployment scripts).
2026-09-29 16:21:31 +08:00

18 lines
955 B
JavaScript

// Merge reward reminder (research 00 §3): the reward cards themselves live in the shop bar (shopBar.js RewardCards —
// after a promotion they replace the bar's operator cards, like the original). When the player puts the pick off
// (稍后选择) this pill above the bar brings the cards back; it disappears once the server clears `shop.rewardOffer`
// (picked, or the round ended).
import { html, Icon, TierChip } from './components.js';
/**
* @param {{ priv:any, minimized:boolean, onMinimize:(m:boolean)=>void }} props
*/
export function RewardOverlay({ priv, minimized, onMinimize }) {
const offer = priv?.shop?.rewardOffer;
if (!offer || !Array.isArray(offer.slots) || !offer.slots.length || !minimized) return null;
return html`<button type="button" class="rewardpill" onClick=${() => onMinimize(false)}>
<${Icon} name="crown" /><span>晋升奖励待选择</span><${TierChip} tier=${offer.tier || 1} size="sm" />
</button>`;
}