添加文案

This commit is contained in:
170-carry 2026-04-28 13:33:19 +08:00
parent c6a24f81eb
commit 775a5f4992

View File

@ -20,6 +20,8 @@ const DEFAULT_TASK_NOTES = {
transport: "(Only the highest-level bonuses may be awarded)",
quota: "(Only invited users who reach the required recharge amount count as valid invites)",
};
const INVITE_SHARE_COPY_PREFIX =
"Download the app, invite your friends to join, and earn 100,000 coins plus a special welcome gift!";
const DEFAULTS = {
view: "invite",
@ -613,6 +615,11 @@ function currentInviteShareURL() {
return buildInviteShareURL(state.inviteLink, state.inviteCode);
}
function currentInviteShareCopyText() {
const inviteURL = trimValue(currentInviteShareURL());
return inviteURL ? `${INVITE_SHARE_COPY_PREFIX} ${inviteURL}` : "";
}
function renderStats() {
els.inviteLinkText.textContent = trimValue(currentInviteShareURL()) || "--";
els.inviteCodeText.textContent = trimValue(state.inviteCode) || "--";
@ -1211,7 +1218,7 @@ function bindEvents() {
els.copyButtons.forEach((button) => {
button.addEventListener("click", async () => {
const target = button.getAttribute("data-copy-target");
const value = target === "invite-code" ? state.inviteCode : currentInviteShareURL();
const value = target === "invite-code" ? state.inviteCode : currentInviteShareCopyText();
try {
await copyText(trimValue(value));