feat(manager-center): support badge gifts
This commit is contained in:
parent
4c0e3b2918
commit
7ed1ec7e00
@ -144,6 +144,7 @@
|
|||||||
<button type="button" role="option" data-value="RIDE" data-i18n="prop_type_ride">Ride</button>
|
<button type="button" role="option" data-value="RIDE" data-i18n="prop_type_ride">Ride</button>
|
||||||
<button type="button" role="option" data-value="NOBLE_VIP" data-i18n="prop_type_noble_vip">Noble VIP</button>
|
<button type="button" role="option" data-value="NOBLE_VIP" data-i18n="prop_type_noble_vip">Noble VIP</button>
|
||||||
<button type="button" role="option" data-value="AVATAR_FRAME" data-i18n="prop_type_avatar_frame">Avatar Frame</button>
|
<button type="button" role="option" data-value="AVATAR_FRAME" data-i18n="prop_type_avatar_frame">Avatar Frame</button>
|
||||||
|
<button type="button" role="option" data-value="BADGE" data-i18n="prop_type_badge">Badge</button>
|
||||||
<button type="button" role="option" data-value="CHAT_BUBBLE" data-i18n="prop_type_chat_bubble">Chat Bubble</button>
|
<button type="button" role="option" data-value="CHAT_BUBBLE" data-i18n="prop_type_chat_bubble">Chat Bubble</button>
|
||||||
<button type="button" role="option" data-value="DATA_CARD" data-i18n="prop_type_data_card">Profile Card</button>
|
<button type="button" role="option" data-value="DATA_CARD" data-i18n="prop_type_data_card">Profile Card</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
"prop_type_ride": "مركبة",
|
"prop_type_ride": "مركبة",
|
||||||
"prop_type_noble_vip": "VIP نبيل",
|
"prop_type_noble_vip": "VIP نبيل",
|
||||||
"prop_type_avatar_frame": "إطار الصورة",
|
"prop_type_avatar_frame": "إطار الصورة",
|
||||||
|
"prop_type_badge": "شارة",
|
||||||
"prop_type_chat_bubble": "فقاعة الدردشة",
|
"prop_type_chat_bubble": "فقاعة الدردشة",
|
||||||
"prop_type_data_card": "بطاقة الملف",
|
"prop_type_data_card": "بطاقة الملف",
|
||||||
"no_giftable_props": "لا توجد عناصر قابلة للإهداء",
|
"no_giftable_props": "لا توجد عناصر قابلة للإهداء",
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
"prop_type_ride": "Ride",
|
"prop_type_ride": "Ride",
|
||||||
"prop_type_noble_vip": "Noble VIP",
|
"prop_type_noble_vip": "Noble VIP",
|
||||||
"prop_type_avatar_frame": "Avatar Frame",
|
"prop_type_avatar_frame": "Avatar Frame",
|
||||||
|
"prop_type_badge": "Badge",
|
||||||
"prop_type_chat_bubble": "Chat Bubble",
|
"prop_type_chat_bubble": "Chat Bubble",
|
||||||
"prop_type_data_card": "Profile Card",
|
"prop_type_data_card": "Profile Card",
|
||||||
"no_giftable_props": "No giftable props",
|
"no_giftable_props": "No giftable props",
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
"prop_type_ride": "Kendaraan",
|
"prop_type_ride": "Kendaraan",
|
||||||
"prop_type_noble_vip": "Noble VIP",
|
"prop_type_noble_vip": "Noble VIP",
|
||||||
"prop_type_avatar_frame": "Bingkai Avatar",
|
"prop_type_avatar_frame": "Bingkai Avatar",
|
||||||
|
"prop_type_badge": "Lencana",
|
||||||
"prop_type_chat_bubble": "Gelembung Chat",
|
"prop_type_chat_bubble": "Gelembung Chat",
|
||||||
"prop_type_data_card": "Kartu Profil",
|
"prop_type_data_card": "Kartu Profil",
|
||||||
"no_giftable_props": "Tidak ada properti yang dapat dikirim",
|
"no_giftable_props": "Tidak ada properti yang dapat dikirim",
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
"prop_type_ride": "Araç",
|
"prop_type_ride": "Araç",
|
||||||
"prop_type_noble_vip": "Noble VIP",
|
"prop_type_noble_vip": "Noble VIP",
|
||||||
"prop_type_avatar_frame": "Avatar Çerçevesi",
|
"prop_type_avatar_frame": "Avatar Çerçevesi",
|
||||||
|
"prop_type_badge": "Rozet",
|
||||||
"prop_type_chat_bubble": "Sohbet Balonu",
|
"prop_type_chat_bubble": "Sohbet Balonu",
|
||||||
"prop_type_data_card": "Profil Kartı",
|
"prop_type_data_card": "Profil Kartı",
|
||||||
"no_giftable_props": "Gönderilebilir eşya yok",
|
"no_giftable_props": "Gönderilebilir eşya yok",
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
prop_type_ride: "Ride",
|
prop_type_ride: "Ride",
|
||||||
prop_type_noble_vip: "Noble VIP",
|
prop_type_noble_vip: "Noble VIP",
|
||||||
prop_type_avatar_frame: "Avatar Frame",
|
prop_type_avatar_frame: "Avatar Frame",
|
||||||
|
prop_type_badge: "Badge",
|
||||||
prop_type_chat_bubble: "Chat Bubble",
|
prop_type_chat_bubble: "Chat Bubble",
|
||||||
prop_type_data_card: "Profile Card",
|
prop_type_data_card: "Profile Card",
|
||||||
no_giftable_props: "No giftable props",
|
no_giftable_props: "No giftable props",
|
||||||
@ -84,6 +85,7 @@
|
|||||||
prop_type_ride: "مركبة",
|
prop_type_ride: "مركبة",
|
||||||
prop_type_noble_vip: "VIP نبيل",
|
prop_type_noble_vip: "VIP نبيل",
|
||||||
prop_type_avatar_frame: "إطار الصورة",
|
prop_type_avatar_frame: "إطار الصورة",
|
||||||
|
prop_type_badge: "شارة",
|
||||||
prop_type_chat_bubble: "فقاعة الدردشة",
|
prop_type_chat_bubble: "فقاعة الدردشة",
|
||||||
prop_type_data_card: "بطاقة الملف",
|
prop_type_data_card: "بطاقة الملف",
|
||||||
no_giftable_props: "لا توجد عناصر قابلة للإهداء",
|
no_giftable_props: "لا توجد عناصر قابلة للإهداء",
|
||||||
@ -138,6 +140,7 @@
|
|||||||
prop_type_ride: "Araç",
|
prop_type_ride: "Araç",
|
||||||
prop_type_noble_vip: "Noble VIP",
|
prop_type_noble_vip: "Noble VIP",
|
||||||
prop_type_avatar_frame: "Avatar Çerçevesi",
|
prop_type_avatar_frame: "Avatar Çerçevesi",
|
||||||
|
prop_type_badge: "Rozet",
|
||||||
prop_type_chat_bubble: "Sohbet Balonu",
|
prop_type_chat_bubble: "Sohbet Balonu",
|
||||||
prop_type_data_card: "Profil Kartı",
|
prop_type_data_card: "Profil Kartı",
|
||||||
no_giftable_props: "Gönderilebilir eşya yok",
|
no_giftable_props: "Gönderilebilir eşya yok",
|
||||||
@ -192,6 +195,7 @@
|
|||||||
prop_type_ride: "Kendaraan",
|
prop_type_ride: "Kendaraan",
|
||||||
prop_type_noble_vip: "Noble VIP",
|
prop_type_noble_vip: "Noble VIP",
|
||||||
prop_type_avatar_frame: "Bingkai Avatar",
|
prop_type_avatar_frame: "Bingkai Avatar",
|
||||||
|
prop_type_badge: "Lencana",
|
||||||
prop_type_chat_bubble: "Gelembung Chat",
|
prop_type_chat_bubble: "Gelembung Chat",
|
||||||
prop_type_data_card: "Kartu Profil",
|
prop_type_data_card: "Kartu Profil",
|
||||||
no_giftable_props: "Tidak ada properti yang dapat dikirim",
|
no_giftable_props: "Tidak ada properti yang dapat dikirim",
|
||||||
@ -659,6 +663,12 @@
|
|||||||
return message("days", "{count} days").replace("{count}", String(days || 0));
|
return message("days", "{count} days").replace("{count}", String(days || 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function giftDays(item) {
|
||||||
|
const days = Number(item?.days);
|
||||||
|
if (Number.isFinite(days) && days > 0) return days;
|
||||||
|
return String(item?.type || state.propsType).toUpperCase() === "NOBLE_VIP" ? 3 : 7;
|
||||||
|
}
|
||||||
|
|
||||||
function renderManager(manager) {
|
function renderManager(manager) {
|
||||||
$("#managerName").textContent = displayName(manager);
|
$("#managerName").textContent = displayName(manager);
|
||||||
$("#managerUid").textContent = userIDText(manager);
|
$("#managerUid").textContent = userIDText(manager);
|
||||||
@ -743,7 +753,7 @@
|
|||||||
|
|
||||||
const days = document.createElement("span");
|
const days = document.createElement("span");
|
||||||
days.className = "prop-days";
|
days.className = "prop-days";
|
||||||
days.textContent = formatDays(item.days);
|
days.textContent = formatDays(giftDays(item));
|
||||||
|
|
||||||
button.append(cover, copy, days);
|
button.append(cover, copy, days);
|
||||||
button.addEventListener("click", () => {
|
button.addEventListener("click", () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user