add: increase invite code limits
This commit is contained in:
parent
38ddf6cde1
commit
dc74c5d63c
3 changed files with 7 additions and 4 deletions
|
@ -256,6 +256,9 @@
|
||||||
MANAGE_STACKS: 1 << 26,
|
MANAGE_STACKS: 1 << 26,
|
||||||
STAFF_BADGE: 1 << 27,
|
STAFF_BADGE: 1 << 27,
|
||||||
MANAGE_APPS: 1 << 28,
|
MANAGE_APPS: 1 << 28,
|
||||||
|
MANAGE_JOURNALS: 1 << 29,
|
||||||
|
MANAGE_NOTES: 1 << 30,
|
||||||
|
MANAGE_INVITES: 1 << 31,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -536,7 +536,7 @@
|
||||||
(icon (text "plus"))
|
(icon (text "plus"))
|
||||||
(str (text "settings:label.generate_invite")))
|
(str (text "settings:label.generate_invite")))
|
||||||
|
|
||||||
(text "{{ components::supporter_ad(body=\"Become a supporter to generate up to 24 invite codes! You can currently have 2 maximum.\") }} {% for code in invites %}")
|
(text "{{ components::supporter_ad(body=\"Become a supporter to generate up to 48 invite codes! You can currently have 2 maximum.\") }} {% for code in invites %}")
|
||||||
(div
|
(div
|
||||||
("class" "card flex flex-col gap-2")
|
("class" "card flex flex-col gap-2")
|
||||||
(text "{% if code[1].is_used -%}")
|
(text "{% if code[1].is_used -%}")
|
||||||
|
@ -673,7 +673,7 @@
|
||||||
|
|
||||||
(text "{% if config.security.enable_invite_codes -%}")
|
(text "{% if config.security.enable_invite_codes -%}")
|
||||||
(li
|
(li
|
||||||
(text "Create up to 24 invite codes"))
|
(text "Create up to 48 invite codes"))
|
||||||
(text "{%- endif %}"))
|
(text "{%- endif %}"))
|
||||||
(a
|
(a
|
||||||
("href" "{{ config.stripe.payment_link }}?client_reference_id={{ user.id }}")
|
("href" "{{ config.stripe.payment_link }}?client_reference_id={{ user.id }}")
|
||||||
|
|
|
@ -68,8 +68,8 @@ impl DataManager {
|
||||||
Ok(out)
|
Ok(out)
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAXIMUM_FREE_INVITE_CODES: usize = 2;
|
const MAXIMUM_FREE_INVITE_CODES: usize = 4;
|
||||||
const MAXIMUM_SUPPORTER_INVITE_CODES: usize = 24;
|
const MAXIMUM_SUPPORTER_INVITE_CODES: usize = 48;
|
||||||
const MINIMUM_ACCOUNT_AGE_FOR_FREE_INVITE_CODES: usize = 2_629_800_000; // 1mo
|
const MINIMUM_ACCOUNT_AGE_FOR_FREE_INVITE_CODES: usize = 2_629_800_000; // 1mo
|
||||||
|
|
||||||
/// Create a new invite_code in the database.
|
/// Create a new invite_code in the database.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue