From 7a4a76c6bcd89899addf606bd97207417fc0b26b Mon Sep 17 00:00:00 2001 From: versx Date: Sun, 19 Jun 2022 13:55:34 -0700 Subject: [PATCH] Add custom pvp leagues support --- src/config.example.json | 7 +++++++ src/data/default.js | 8 +++----- src/views/pvp/edit.mustache | 2 +- src/views/pvp/new.mustache | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/config.example.json b/src/config.example.json index 6c96d9c..edde1d1 100644 --- a/src/config.example.json +++ b/src/config.example.json @@ -83,5 +83,12 @@ }, "map": "", "paypal": "" + }, + "pvp": { + "leagues": [ + "Little", + "Great", + "Ultra" + ] } } diff --git a/src/data/default.js b/src/data/default.js index 5f16502..8a6c1e8 100644 --- a/src/data/default.js +++ b/src/data/default.js @@ -14,11 +14,9 @@ data.genders = [ { 'id': 'm', 'name': 'Male' }, { 'id': 'f', 'name': 'Female', } ]; -data.leagues = [ - { 'id': 'great', 'name': 'Great' }, - { 'id': 'ultra', 'name': 'Ultra' }, - //{ 'id': 'master', 'name': 'Master' }, -]; +data.leagues = config.pvp.leagues.map(league => { + return { 'name': league }; +}); data.icon_styles = config.iconStyles; data.enable_geofence_roles = config.enableGeofenceRoles; data.hide_phone_number = config.hidePhoneNumber; diff --git a/src/views/pvp/edit.mustache b/src/views/pvp/edit.mustache index 5a4010f..0aa3c8e 100644 --- a/src/views/pvp/edit.mustache +++ b/src/views/pvp/edit.mustache @@ -12,7 +12,7 @@
-
{{Description}}: PvP subscriptions are based on the desired final PvP ranked Pokemon and not the wild Pokemon found.
+
{{Description}}: PvP subscriptions can be based on the desired final PvP ranked Pokemon or the wild Pokemon found.

diff --git a/src/views/pvp/new.mustache b/src/views/pvp/new.mustache index b1a12a6..da4a7bf 100644 --- a/src/views/pvp/new.mustache +++ b/src/views/pvp/new.mustache @@ -12,7 +12,7 @@
-
{{Description}}: PvP subscriptions are based on the desired final PvP ranked Pokemon and not the wild Pokemon found.
+
{{Description}}: PvP subscriptions can be based on the desired final PvP ranked Pokemon or the wild Pokemon found.