Skip to content

Commit

Permalink
✨ 重新开启邀请码功能,现在创建必须注册满七天的账户才能创建邀请码
Browse files Browse the repository at this point in the history
  • Loading branch information
cfdxkk committed Aug 4, 2024
1 parent 292f903 commit 9c62baa
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions pages/settings/invitation-code.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
async function createInvitationCode() {
const createInvitationCodeResult = await api.user.createInvitationCode();
if (!createInvitationCodeResult.isCoolingDown) {
if (createInvitationCodeResult.isCoolingDown) {
useToast("邀请码生成器正在冷却中,请稍后再试。", "warning", 5000); // TODO: 使用多语言
return;
}
Expand Down Expand Up @@ -52,16 +52,6 @@
if (loginStatus)
await getMyInvitationCode();
});
/**
* 临时的创建邀请码
*/
function createInvitationCodeTemp() {
if (selfUserInfoStore.role !== "admin")
useToast("暂时不能创建新的邀请码了哦,请等待开放QWQ", "error");
else
createInvitationCode();
}
</script>

<template>
Expand All @@ -85,7 +75,7 @@
</div> -->
</div>

<SoftButton v-tooltip:bottom="t.create" class="create-button" icon="add" @click="createInvitationCodeTemp" />
<SoftButton v-tooltip:bottom="t.create" class="create-button" icon="add" @click="createInvitationCode" />

<div class="user-info chip">
<SettingsChipItem
Expand Down

0 comments on commit 9c62baa

Please sign in to comment.