add: developer pass
This commit is contained in:
parent
636ecce9f4
commit
02f3d08926
14 changed files with 355 additions and 101 deletions
|
@ -118,7 +118,7 @@
|
|||
("class" "hidden lowered card w-full no_p_margin")
|
||||
("ui_ident" "purchase_help")
|
||||
(b (text "What does \"Purchase account\" mean?"))
|
||||
(p (text "Your account will be created, but you cannot use it until you activate it for {{ config.stripe.supporter_price_text }}."))
|
||||
(p (text "Your account will be created, but you cannot use it until you activate it for {{ config.stripe.price_texts.supporter }}."))
|
||||
(p (text "Alternatively, you can provide an invite code to create your account for free.")))
|
||||
(text "{%- endif %}")
|
||||
(button
|
||||
|
|
|
@ -1452,7 +1452,9 @@
|
|||
});
|
||||
})();"))
|
||||
|
||||
(text "{%- endmacro %} {% macro supporter_ad(body=\"\") -%} {% if config.stripe and not is_supporter %}")
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro supporter_ad(body=\"\") -%} {% if config.stripe and not is_supporter %}")
|
||||
(div
|
||||
("class" "card w-full supporter_ad")
|
||||
("ui_ident" "supporter_ad")
|
||||
|
@ -1472,8 +1474,9 @@
|
|||
(text "{{ icon \"heart\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.become_supporter\" }}")))))
|
||||
(text "{%- endif %} {%- endmacro %}")
|
||||
|
||||
(text "{%- endif %} {%- endmacro %} {% macro create_post_options() -%}")
|
||||
(text "{% macro create_post_options() -%}")
|
||||
(div
|
||||
("class" "flex gap-2 flex-wrap")
|
||||
(text "{{ components::emoji_picker(element_id=\"content\", render_dialog=true) }} {% if not quoting -%} {% if is_supporter -%} {{ components::file_picker(files_list_id=\"files_list\") }} {%- endif %} {%- endif %}")
|
||||
|
@ -2358,10 +2361,6 @@
|
|||
(text "Save infinite post drafts"))
|
||||
(li
|
||||
(text "Ability to search through all posts"))
|
||||
(li
|
||||
(text "Ability to create forges"))
|
||||
(li
|
||||
(text "Create more than 1 app"))
|
||||
(li
|
||||
(text "Create up to 10 stack blocks"))
|
||||
(li
|
||||
|
@ -2388,15 +2387,13 @@
|
|||
("href" "{{ config.stripe.payment_links.supporter }}?client_reference_id={{ user.id }}")
|
||||
("class" "button")
|
||||
("target" "_blank")
|
||||
(text "Become a supporter ({{ config.stripe.supporter_price_text }})"))
|
||||
(text "Become a supporter ({{ config.stripe.price_texts.supporter }})"))
|
||||
(span
|
||||
("class" "fade")
|
||||
(text "Please use your")
|
||||
(b
|
||||
(text " real email "))
|
||||
(text "when
|
||||
completing payment. It is required to manage
|
||||
your billing settings."))
|
||||
(text "when completing payment. It is required to manage your billing settings."))
|
||||
|
||||
(text "{% if config.security.enable_invite_codes -%}")
|
||||
(span
|
||||
|
@ -2405,3 +2402,46 @@
|
|||
(b (text "1: ")) (text "After your account is at least 1 month old"))
|
||||
(text "{%- endif %}")
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro get_developer_pass_button() -%}")
|
||||
(p
|
||||
(text "You currently do not hold a developer pass. With a developer pass, you'll get:"))
|
||||
(ul
|
||||
("style" "margin-bottom: var(--pad-4)")
|
||||
(li
|
||||
(text "Increased app storage limit (500 KB->5 MB)"))
|
||||
(li
|
||||
(text "Ability to create forges"))
|
||||
(li
|
||||
(text "Ability to create more than 1 app"))
|
||||
(li
|
||||
(text "Developer pass profile badge")))
|
||||
(a
|
||||
("href" "{{ config.stripe.payment_links.dev_pass }}?client_reference_id={{ user.id }}")
|
||||
("class" "button")
|
||||
("target" "_blank")
|
||||
(text "Continue ({{ config.stripe.price_texts.dev_pass }})"))
|
||||
(span
|
||||
("class" "fade")
|
||||
(text "Please use your")
|
||||
(b
|
||||
(text " real email "))
|
||||
(text "when completing payment. It is required to manage your billing settings. If you're already a supporter, please use the same email you used there."))
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro developer_pass_ad(body) -%} {% if config.stripe and not has_developer_pass %}")
|
||||
(div
|
||||
("class" "card w-full supporter_ad")
|
||||
("ui_ident" "supporter_ad")
|
||||
("onclick" "window.location.href = '/settings#/account/billing'")
|
||||
(div
|
||||
("class" "card w-full flex flex-wrap items-center gap-2 justify-between")
|
||||
(b
|
||||
(text "{{ body }}"))
|
||||
(a
|
||||
("href" "/settings#/account/billing")
|
||||
("class" "button small")
|
||||
(icon (text "arrow-right"))
|
||||
(span
|
||||
(str (text "dialog:action.continue"))))))
|
||||
(text "{%- endif %} {%- endmacro %}")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
; create new
|
||||
(text "{% if user.permissions|has_supporter -%}")
|
||||
(text "{% if user.secondary_permissions|has_dev_pass -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
(div
|
||||
|
@ -32,7 +32,7 @@
|
|||
(button
|
||||
(text "{{ text \"communities:action.create\" }}"))))
|
||||
(text "{% else %}")
|
||||
(text "{{ components::supporter_ad(body=\"Become a supporter to create forges!\") }}")
|
||||
(text "{{ components::developer_pass_ad(body=\"Get a developer pass to create forges!\") }}")
|
||||
(text "{%- endif %}")
|
||||
|
||||
; forge listing
|
||||
|
|
|
@ -72,19 +72,25 @@
|
|||
("style" "color: var(--color-primary);")
|
||||
("class" "flex items-center")
|
||||
(text "{{ icon \"badge-check\" }}"))
|
||||
(text "{%- endif %} {% if profile.permissions|has_supporter -%}")
|
||||
(text "{%- endif %} {% if profile.permissions|has_supporter -%}")
|
||||
(span
|
||||
("title" "Supporter")
|
||||
("style" "color: var(--color-primary);")
|
||||
("class" "flex items-center")
|
||||
(text "{{ icon \"star\" }}"))
|
||||
(text "{%- endif %} {% if profile.permissions|has_staff_badge -%}")
|
||||
(text "{%- endif %} {% if profile.secondary_permissions|has_dev_pass -%}")
|
||||
(span
|
||||
("title" "Developer pass")
|
||||
("style" "color: var(--color-primary);")
|
||||
("class" "flex items-center")
|
||||
(text "{{ icon \"id-card-lanyard\" }}"))
|
||||
(text "{%- endif %} {% if profile.permissions|has_staff_badge -%}")
|
||||
(span
|
||||
("title" "Staff")
|
||||
("style" "color: var(--color-primary);")
|
||||
("class" "flex items-center")
|
||||
(text "{{ icon \"shield-user\" }}"))
|
||||
(text "{%- endif %} {% if profile.permissions|has_banned -%}")
|
||||
(text "{%- endif %} {% if profile.permissions|has_banned -%}")
|
||||
(span
|
||||
("title" "Banned")
|
||||
("style" "color: var(--color-primary);")
|
||||
|
|
|
@ -823,6 +823,29 @@
|
|||
(div
|
||||
("class" "card flex flex-col gap-2 secondary")
|
||||
(text "{% if config.stripe -%}")
|
||||
(text "{% if has_developer_pass or is_supporter -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("ui_ident" "supporter_card")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
(icon (text "credit-card"))
|
||||
(b
|
||||
(text "Manage billing")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
(p
|
||||
(text "You currently have a subscription! You can manage your billing information below. ")
|
||||
(b
|
||||
(text "Please use your email address you supplied when paying to log into the billing portal."))
|
||||
(text " You can manage all of your active subscriptions through this page."))
|
||||
(a
|
||||
("href" "{{ config.stripe.billing_portal_url }}")
|
||||
("class" "button lowered")
|
||||
("target" "_blank")
|
||||
(text "Manage billing"))))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("ui_ident" "supporter_card")
|
||||
|
@ -832,28 +855,33 @@
|
|||
(b
|
||||
(text "Supporter status")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex-col gap-2 no_p_margin")
|
||||
(text "{% if is_supporter -%}")
|
||||
(p
|
||||
(text "You ")
|
||||
(b
|
||||
(text "are "))
|
||||
(text "a supporter! Thank you for all
|
||||
that you do. You can manage your billing
|
||||
information below.")
|
||||
(b
|
||||
(text "Please use your email address you supplied
|
||||
when paying to login to the billing
|
||||
portal.")))
|
||||
(a
|
||||
("href" "{{ config.stripe.billing_portal_url }}")
|
||||
("class" "button lowered")
|
||||
("target" "_blank")
|
||||
(text "Manage billing"))
|
||||
(b (text "are "))
|
||||
(text "a supporter! Thank you for all that you do."))
|
||||
(text "{% else %}")
|
||||
(text "{{ components::become_supporter_button() }}")
|
||||
(text "{%- endif %}")))
|
||||
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("ui_ident" "supporter_card")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
(icon (text "id-card-lanyard"))
|
||||
(b
|
||||
(text "Developer pass status")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2 no_p_margin")
|
||||
(text "{% if has_developer_pass -%}")
|
||||
(p
|
||||
(text "You currently have a developer pass!"))
|
||||
(text "{% else %}")
|
||||
(text "{{ components::get_developer_pass_button() }}")
|
||||
(text "{%- endif %}")))
|
||||
|
||||
(text "{% if user.was_purchased and user.invite_code == 0 -%}")
|
||||
(form
|
||||
("class" "card w-full lowered flex flex-col gap-2")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue