添加文案
This commit is contained in:
parent
c6a24f81eb
commit
775a5f4992
@ -20,6 +20,8 @@ const DEFAULT_TASK_NOTES = {
|
|||||||
transport: "(Only the highest-level bonuses may be awarded)",
|
transport: "(Only the highest-level bonuses may be awarded)",
|
||||||
quota: "(Only invited users who reach the required recharge amount count as valid invites)",
|
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 = {
|
const DEFAULTS = {
|
||||||
view: "invite",
|
view: "invite",
|
||||||
@ -613,6 +615,11 @@ function currentInviteShareURL() {
|
|||||||
return buildInviteShareURL(state.inviteLink, state.inviteCode);
|
return buildInviteShareURL(state.inviteLink, state.inviteCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function currentInviteShareCopyText() {
|
||||||
|
const inviteURL = trimValue(currentInviteShareURL());
|
||||||
|
return inviteURL ? `${INVITE_SHARE_COPY_PREFIX} ${inviteURL}` : "";
|
||||||
|
}
|
||||||
|
|
||||||
function renderStats() {
|
function renderStats() {
|
||||||
els.inviteLinkText.textContent = trimValue(currentInviteShareURL()) || "--";
|
els.inviteLinkText.textContent = trimValue(currentInviteShareURL()) || "--";
|
||||||
els.inviteCodeText.textContent = trimValue(state.inviteCode) || "--";
|
els.inviteCodeText.textContent = trimValue(state.inviteCode) || "--";
|
||||||
@ -1211,7 +1218,7 @@ function bindEvents() {
|
|||||||
els.copyButtons.forEach((button) => {
|
els.copyButtons.forEach((button) => {
|
||||||
button.addEventListener("click", async () => {
|
button.addEventListener("click", async () => {
|
||||||
const target = button.getAttribute("data-copy-target");
|
const target = button.getAttribute("data-copy-target");
|
||||||
const value = target === "invite-code" ? state.inviteCode : currentInviteShareURL();
|
const value = target === "invite-code" ? state.inviteCode : currentInviteShareCopyText();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await copyText(trimValue(value));
|
await copyText(trimValue(value));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user