Skip to content

Commit 4cb88bd

Browse files
deadlyjackAjit Kumar
andauthored
fix: plugin price display (#2120)
* fix: plugin price display * fix: currency rendering * bump version to 1.12.2 (972) --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail>
1 parent 6205407 commit 4cb88bd

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="com.foxdebug.acode" android-versionCode="971" version="1.12.1"
2+
<widget id="com.foxdebug.acode" android-versionCode="972" version="1.12.2"
33
xmlns="http://www.w3.org/ns/widgets"
44
xmlns:android="http://schemas.android.com/apk/res/android"
55
xmlns:cdv="http://cordova.apache.org/ns/1.0">

src/pages/plugin/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default async function PluginInclude(
171171

172172
isPaid = remotePlugin.price > 0;
173173
purchased = remotePlugin.owned;
174-
price = `${remotePlugin.price}`;
174+
price = `${remotePlugin.currencySymbol ?? ""}${remotePlugin.price}`;
175175
isSupported = ["all", config.SUPPORTED_EDITOR].includes(
176176
remotePlugin.supported_editor,
177177
);

src/pages/plugins/item.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import pluginIcon from "./plugin-icon.png";
1212
* @param {boolean} [param0.installed]
1313
* @param {boolean} [param0.enabled]
1414
* @param {function} [param0.onToggleEnabled]
15+
* @param {string} [param0.currencySymbol]
1516
* @returns
1617
*/
1718
export default function Item({
@@ -22,6 +23,7 @@ export default function Item({
2223
license,
2324
author,
2425
price,
26+
currencySymbol,
2527
author_verified,
2628
downloads,
2729
installed,
@@ -95,7 +97,10 @@ export default function Item({
9597
</div>
9698
</div>
9799
{price !== null && price !== undefined && price !== 0 ? (
98-
<span className="plugin-price">{price}</span>
100+
<span className="plugin-price">
101+
{currencySymbol}
102+
{price}
103+
</span>
99104
) : null}
100105
{installed && !updates ? (
101106
<span

0 commit comments

Comments
 (0)