feat: allow manager center VIP5 grants

This commit is contained in:
zhx 2026-07-04 02:19:20 +08:00
parent 54e49a9bf5
commit 9d9842d88f
2 changed files with 4 additions and 2 deletions

View File

@ -523,6 +523,6 @@
<script src="../../common/params.js?v=20260608-manager-real"></script> <script src="../../common/params.js?v=20260608-manager-real"></script>
<script src="../../common/jsbridge.js"></script> <script src="../../common/jsbridge.js"></script>
<script src="../../common/i18n.js?v=20260608"></script> <script src="../../common/i18n.js?v=20260608"></script>
<script src="./script.js?v=20260624-manager-badge-country"></script> <script src="./script.js?v=20260704-manager-vip5"></script>
</body> </body>
</html> </html>

View File

@ -35,6 +35,7 @@
{ label: '90 days', ms: 90 * DAY_MS }, { label: '90 days', ms: 90 * DAY_MS },
]; ];
var DEFAULT_RESOURCE_GRANT_DURATION_MS = RESOURCE_GRANT_DURATIONS[0].ms; var DEFAULT_RESOURCE_GRANT_DURATION_MS = RESOURCE_GRANT_DURATIONS[0].ms;
var VIP_GRANT_LEVELS = [1, 2, 3, 4, 5];
var TRACK_LABELS = { var TRACK_LABELS = {
wealth: 'Wealth', wealth: 'Wealth',
charm: 'Charm', charm: 'Charm',
@ -897,7 +898,8 @@
} }
if (grantState.action === 'send-vip') { if (grantState.action === 'send-vip') {
$('grantOptionTitle').textContent = 'Select VIP level'; $('grantOptionTitle').textContent = 'Select VIP level';
[1, 2, 3].forEach(function (level) { // VIP grants must stay on the explicit product allow-list so the UI never sends a level the backend has not opened.
VIP_GRANT_LEVELS.forEach(function (level) {
var button = createNode('button', '', 'VIP ' + level); var button = createNode('button', '', 'VIP ' + level);
button.type = 'button'; button.type = 'button';
button.classList.toggle( button.classList.toggle(