+
+
+
+
+ {{ formatCompactNumber(post.replies) }}
+
+
+ {{ `${formatCompactNumber(post.replies)} ${$t('components.PostActions.replies', post.replies ?? 0)}` }}
+
+
+
-
-
-
-
- {{ formatCompactAtomics(post.likes_burnt, fractionalDigits) }}
-
-
- {{ Decimal.fromAtomics(post.likes_burnt ?? '0', fractionalDigits).toString() }} PHOTON
-
-
-
+
+
+
+
+ {{ formatCompactAtomics(post.likes_burnt, fractionalDigits) }}
+
+
+ {{ Decimal.fromAtomics(post.likes_burnt ?? '0', fractionalDigits).toString() }} PHOTON
+
+
+
-
-
-
-
- {{ formatCompactAtomics(post.dislikes_burnt, fractionalDigits) }}
-
-
- {{ Decimal.fromAtomics(post.dislikes_burnt ?? '0', fractionalDigits).toString() }} PHOTON
-
-
+
+
+
+
+ {{ formatCompactAtomics(post.dislikes_burnt, fractionalDigits) }}
+
+
+ {{ Decimal.fromAtomics(post.dislikes_burnt ?? '0', fractionalDigits).toString() }} PHOTON
+
+
+
+
+
+
+
+
+ {{ formatCompactAtomics(post.flags_burnt, fractionalDigits) }}
+
+
+ {{ Decimal.fromAtomics(post.flags_burnt ?? '0', fractionalDigits).toString() }} PHOTON
+
+
+
-
-
-
-
- {{ formatCompactAtomics(post.flags_burnt, fractionalDigits) }}
+
+
+
+
+ {{ $t('components.PostActions.promoted') }}
- {{ Decimal.fromAtomics(post.flags_burnt ?? '0', fractionalDigits).toString() }} PHOTON
+ {{ Decimal.fromAtomics(post.quantity ?? '0', fractionalDigits).toString() }} PHOTON
-
-
-
- {{ formatCompactAtomics(post.quantity, fractionalDigits) }} PHOTON
-
-
- {{ Decimal.fromAtomics(post.quantity ?? '0', fractionalDigits).toString() }} PHOTON
-
-
diff --git a/packages/frontend-main/src/components/posts/PromoteToggle.vue b/packages/frontend-main/src/components/posts/PromoteToggle.vue
new file mode 100644
index 00000000..f448258c
--- /dev/null
+++ b/packages/frontend-main/src/components/posts/PromoteToggle.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+ {{ $t('components.PromoteToggle.willSend') }}
+ {{ currentAmountDisplay }} PHOTON
+
+
+
+
+
+
+
+
+
+ {{ $t('components.PromoteToggle.sendExplainTitle') }}
+
+
+ {{ $t('components.PromoteToggle.sendExplainDescription') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('components.PromoteToggle.popoverTitle') }}
+
+
+ {{ $t('components.PromoteToggle.popoverDescription', { amount: promotionSendDisplay }) }}
+
+
+
+
+
+
+
+ {{ $t('components.PromoteToggle.enablePromotion') }}
+ {{ promotionSendDisplay }} PHOTON
+
+
+
+
+
+
+
+
diff --git a/packages/frontend-main/src/localization/index.ts b/packages/frontend-main/src/localization/index.ts
index 0e73076b..be917825 100644
--- a/packages/frontend-main/src/localization/index.ts
+++ b/packages/frontend-main/src/localization/index.ts
@@ -59,6 +59,21 @@ export const messages = {
placeholder: 'Type amount',
remaining: 'remaining',
},
+ PromoteToggle: {
+ willSend: 'This will send',
+ learnMore: 'Learn more',
+ sendExplainTitle: 'Where does this PHOTON go?',
+ sendExplainDescription: 'PHOTON is sent to the community wallet to support the network and prioritize your content.',
+ promoteButton: 'Promote',
+ popoverTitle: 'Promote your post',
+ popoverDescription: 'Send {amount} PHOTON to boost your post and increase its visibility in the feed.',
+ regularAmount: 'Regular amount',
+ promotionBoost: 'Promotion boost',
+ total: 'Total',
+ enablePromotion: 'Enable Promotion',
+ promotionEnabled: 'Promotion enabled',
+ remove: 'Remove',
+ },
PopupTitles: {
likePost: 'Like Post',
dislikePost: 'Dislike Post',
@@ -150,6 +165,7 @@ export const messages = {
},
PostActions: {
replies: 'reply | replies',
+ promoted: 'Promoted',
},
PostEditorToolbar: {
insertImageTitle: 'Insert Image URL',
diff --git a/packages/frontend-main/src/stores/useConfigStore.ts b/packages/frontend-main/src/stores/useConfigStore.ts
index 72c74267..ac998b4e 100644
--- a/packages/frontend-main/src/stores/useConfigStore.ts
+++ b/packages/frontend-main/src/stores/useConfigStore.ts
@@ -10,6 +10,8 @@ interface Config {
envConfigs: typeof envConfigs;
defaultAmountAtomics: string;
defaultAmountEnabled: boolean;
+ regularSendAmountAtomics: string;
+ promotionSendAmountAtomics: string;
}
const defaultConfig: Config = {
@@ -17,6 +19,8 @@ const defaultConfig: Config = {
selectedChain: import.meta.env.VITE_ENVIRONMENT_TYPE ?? 'mainnet',
defaultAmountAtomics: Decimal.fromUserInput('0.1', fractionalDigits).atomics,
defaultAmountEnabled: false,
+ regularSendAmountAtomics: import.meta.env.VITE_DEFAULT_SEND_AMOUNT_ATOMICS,
+ promotionSendAmountAtomics: import.meta.env.VITE_PROMOTION_SEND_AMOUNT_ATOMICS,
};
// deep clone the default config to avoid mutating the original object