Show number of subscribers on subscription settings page

This commit is contained in:
silverpill 2023-01-20 20:03:30 +00:00
parent 47f158c15d
commit d1b651a83c
3 changed files with 14 additions and 4 deletions

View file

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Added
- Show number of subscribers on subscription settings page.
### Fixed ### Fixed
- Show full date and time in post timestamp tooltip. - Show full date and time in post timestamp tooltip.

View file

@ -14,11 +14,14 @@
<div class="info" v-if="subscriptionsEnabled !== null"> <div class="info" v-if="subscriptionsEnabled !== null">
<template v-if="subscriptionConfig && subscriptionOption !== null"> <template v-if="subscriptionConfig && subscriptionOption !== null">
<span>Subscriptions are enabled</span> <span>Subscriptions are enabled</span>
<div class="price"> <div class="info-item">
{{ subscriptionConfig.pricePerMonth }} {{ subscriptionConfig.pricePerMonth }}
{{ subscriptionConfig.tokenSymbol }} {{ subscriptionConfig.tokenSymbol }}
per month per month
</div> </div>
<div class="info-item">
{{ ensureCurrentUser().subscribers_count }} subscribers
</div>
</template> </template>
<template v-else> <template v-else>
Subscriptions are not enabled Subscriptions are not enabled
@ -334,7 +337,7 @@ async function onWithdrawReceived() {
gap: calc($block-inner-padding / 2); gap: calc($block-inner-padding / 2);
padding: $block-inner-padding; padding: $block-inner-padding;
.price { .info-item {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }

View file

@ -3,9 +3,12 @@
<div class="info" v-if="subscriptionOptionLoaded"> <div class="info" v-if="subscriptionOptionLoaded">
<template v-if="subscriptionOption !== null"> <template v-if="subscriptionOption !== null">
<span>Subscriptions are enabled</span> <span>Subscriptions are enabled</span>
<div class="price"> <div class="info-item">
{{ getPricePerMonth(subscriptionOption.price) }} XMR per month {{ getPricePerMonth(subscriptionOption.price) }} XMR per month
</div> </div>
<div class="info-item">
{{ ensureCurrentUser().subscribers_count }} subscribers
</div>
</template> </template>
<template v-else> <template v-else>
Subscriptions are not enabled Subscriptions are not enabled
@ -157,7 +160,7 @@ async function saveSubscriptionSettings() {
gap: calc($block-inner-padding / 2); gap: calc($block-inner-padding / 2);
padding: $block-inner-padding; padding: $block-inner-padding;
.price { .info-item {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }