diff --git a/app/app/urls.py b/app/app/urls.py index 475aa3f18f0..d30df69286c 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -78,7 +78,7 @@ # board re_path(r'^dashboard/?', dashboard.views.board, name='dashboard'), - # personal_tokens + # personal_tokens (now called Time Tokens) re_path(r'^ptoken/quickstart/?', ptokens.views.quickstart, name='ptoken_quickstart'), re_path(r'^ptoken/faq/?', ptokens.views.faq, name='ptokens_faq'), path('ptokens/redemptions//', ptokens.views.ptoken_redemption, name='token_redemption'), diff --git a/app/assets/v2/js/board.js b/app/assets/v2/js/board.js index e0c15778041..dcd9c6a997f 100644 --- a/app/assets/v2/js/board.js +++ b/app/assets/v2/js/board.js @@ -1,4 +1,9 @@ -// Personal token constants +// Time token constants +// Note: "Time Tokens" used to be called "Personal Tokens". To simplify the renaming process, +// variables, classes, and contracts continue to use the old name, but user-facing text uses the +// new name. Personal tokens and Time tokens are the same thing, so you will likely see those two +// phrases used interchangeably throughout the codebase + // Note that this address is also duplicated in profile_tokens.js and app/ptokens/models.py const factoryAddress = document.contxt.ptoken_factory_address; @@ -425,7 +430,7 @@ Vue.mixin({ change_price(pTokenId, price, transactionHash, network); document.ptoken.price = price; - const successMsg = 'The price of your personal token has successfully been updated!'; + const successMsg = 'The price of your time token has successfully been updated!'; const errorMsg = 'Oops, something went wrong changing your token price. Please try again or contact support@gitcoin.co'; await updatePtokenStatusinDatabase(transactionHash, successMsg, errorMsg); @@ -450,7 +455,7 @@ Vue.mixin({ document.ptoken.supply = supply; document.ptoken.available = supply - (document.ptoken.purchases - document.ptoken.redemptions); - const successMsg = 'The supply of your personal token has successfully been increased!'; + const successMsg = 'The supply of your time token has successfully been increased!'; const errorMsg = 'Oops, something went wrong increasing your token supply. Please try again or contact support@gitcoin.co'; await updatePtokenStatusinDatabase(transactionHash, successMsg, errorMsg); @@ -470,7 +475,7 @@ Vue.mixin({ document.ptoken.supply = supply; document.ptoken.available = supply - (document.ptoken.purchases - document.ptoken.redemptions); - const successMsg = 'The supply of your personal token has successfully been decreased!'; + const successMsg = 'The supply of your time token has successfully been decreased!'; const errorMsg = 'Oops, something went wrong decreased your token supply. Please try again or contact support@gitcoin.co'; await updatePtokenStatusinDatabase(transactionHash, successMsg, errorMsg); @@ -536,8 +541,8 @@ Vue.mixin({ vm.user_has_token = true; console.log('Token saved in database', ptokenReponse); - const successMsg = 'Congratulations, your personal token has been created successfully!'; - const errorMsg = 'Oops, something went wrong trying to create your personal token. Please try again or contact support@gitcoin.co'; + const successMsg = 'Congratulations, your time token has been created successfully!'; + const errorMsg = 'Oops, something went wrong trying to create your time token. Please try again or contact support@gitcoin.co'; await updatePtokenStatusinDatabase(transactionHash, successMsg, errorMsg); }).on('error', function(err) { diff --git a/app/assets/v2/js/pages/profile_tokens.js b/app/assets/v2/js/pages/profile_tokens.js index 9cdbbb0cb11..f1dacf427ff 100644 --- a/app/assets/v2/js/pages/profile_tokens.js +++ b/app/assets/v2/js/pages/profile_tokens.js @@ -1,4 +1,9 @@ -// Personal token constants +// Time token constants +// Note: "Time Tokens" used to be called "Personal Tokens". To simplify the renaming process, +// variables, classes, and contracts continue to use the old name, but user-facing text uses the +// new name. Personal tokens and Time tokens are the same thing, so you will likely see those two +// phrases used interchangeably throughout the codebase + // Note that this address is also duplicated in board.js const factoryAddress = document.contxt.ptoken_factory_address; const purchaseTokenName = 'DAI'; diff --git a/app/dashboard/migrations/0169_auto_20210202_0726.py b/app/dashboard/migrations/0169_auto_20210202_0726.py new file mode 100644 index 00000000000..2b03192a273 --- /dev/null +++ b/app/dashboard/migrations/0169_auto_20210202_0726.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.4 on 2021-02-02 07:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dashboard', '0168_auto_20201216_2058'), + ] + + operations = [ + migrations.AlterField( + model_name='activity', + name='activity_type', + field=models.CharField(blank=True, choices=[('wall_post', 'Wall Post'), ('status_update', 'Update status'), ('hypercharge_bounty', 'Hypercharged bounty'), ('new_bounty', 'New Bounty'), ('start_work', 'Work Started'), ('stop_work', 'Work Stopped'), ('work_submitted', 'Work Submitted'), ('work_done', 'Work Done'), ('worker_approved', 'Worker Approved'), ('worker_rejected', 'Worker Rejected'), ('worker_applied', 'Worker Applied'), ('increased_bounty', 'Increased Funding'), ('killed_bounty', 'Canceled Bounty'), ('new_tip', 'New Tip'), ('receive_tip', 'Tip Received'), ('bounty_abandonment_escalation_to_mods', 'Escalated checkin from @gitcoinbot about bounty status'), ('bounty_abandonment_warning', 'Checkin from @gitcoinbot about bounty status'), ('bounty_removed_slashed_by_staff', 'Dinged and Removed from Bounty by Staff'), ('bounty_removed_by_staff', 'Removed from Bounty by Staff'), ('bounty_removed_by_funder', 'Removed from Bounty by Funder'), ('new_crowdfund', 'New Crowdfund Contribution'), ('new_grant', 'New Grant'), ('update_grant', 'Updated Grant'), ('killed_grant', 'Cancelled Grant'), ('negative_contribution', 'Negative Grant Contribution'), ('new_grant_contribution', 'Contributed to Grant'), ('new_grant_subscription', 'Subscribed to Grant'), ('killed_grant_contribution', 'Cancelled Grant Contribution'), ('new_kudos', 'New Kudos'), ('created_kudos', 'Created Kudos'), ('receive_kudos', 'Receive Kudos'), ('joined', 'Joined Gitcoin'), ('played_quest', 'Played Quest'), ('beat_quest', 'Beat Quest'), ('created_quest', 'Created Quest'), ('updated_avatar', 'Updated Avatar'), ('mini_clr_payout', 'Mini CLR Payout'), ('leaderboard_rank', 'Leaderboard Rank'), ('consolidated_leaderboard_rank', 'Consolidated Leaderboard Rank'), ('consolidated_mini_clr_payout', 'Consolidated CLR Payout'), ('hackathon_registration', 'Hackathon Registration'), ('hackathon_new_hacker', 'Hackathon Registration'), ('new_hackathon_project', 'New Hackathon Project'), ('flagged_grant', 'Flagged Grant'), ('create_ptoken', 'Create time token'), ('mint_ptoken', 'Mint time token'), ('edit_price_ptoken', 'Edit time token price'), ('buy_ptoken', 'Edit time token price'), ('accept_redemption_ptoken', 'Accepts a redemption request of ptoken'), ('denies_redemption_ptoken', 'Denies a redemption request of ptoken'), ('complete_redemption_ptoken', 'Completes an outgoing redemption'), ('incoming_redemption_ptoken', 'Has an incoming redemption finalized by the Buyer')], db_index=True, max_length=50), + ), + ] diff --git a/app/dashboard/models.py b/app/dashboard/models.py index f085cfc6e5c..b938234fff5 100644 --- a/app/dashboard/models.py +++ b/app/dashboard/models.py @@ -2286,11 +2286,11 @@ class Activity(SuperModel): ('hackathon_new_hacker', 'Hackathon Registration'), ('new_hackathon_project', 'New Hackathon Project'), ('flagged_grant', 'Flagged Grant'), - # ptokens - ('create_ptoken', 'Create personal token'), - ('mint_ptoken', 'Mint personal token'), - ('edit_price_ptoken', 'Edit personal token price'), - ('buy_ptoken', 'Edit personal token price'), + # ptokens (formerly called personal tokens, now called time tokens) + ('create_ptoken', 'Create time token'), + ('mint_ptoken', 'Mint time token'), + ('edit_price_ptoken', 'Edit time token price'), + ('buy_ptoken', 'Edit time token price'), ('accept_redemption_ptoken', 'Accepts a redemption request of ptoken'), ('denies_redemption_ptoken', 'Denies a redemption request of ptoken'), ('complete_redemption_ptoken', 'Completes an outgoing redemption'), diff --git a/app/dashboard/templates/board/index.html b/app/dashboard/templates/board/index.html index 2432a853689..8036e6699df 100644 --- a/app/dashboard/templates/board/index.html +++ b/app/dashboard/templates/board/index.html @@ -38,7 +38,7 @@ Funder Contributor {% if is_staff %} - Personal Tokens + Time Tokens {% endif %} diff --git a/app/dashboard/templates/board/ptokens.html b/app/dashboard/templates/board/ptokens.html index e72c2a985de..0e493afad2a 100644 --- a/app/dashboard/templates/board/ptokens.html +++ b/app/dashboard/templates/board/ptokens.html @@ -14,6 +14,11 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not,see . + + Note: "Time Tokens" used to be called "Personal Tokens". To simplify the renaming process, + variables, classes, and contracts continue to use the old name, but user-facing text uses the + new name. Personal tokens and Time tokens are the same thing, so you will likely see those two + phrases used interchangeably throughout the codebase {% endcomment %} {% load i18n static add_url_schema avatar_tags %} @@ -64,7 +69,7 @@