diff --git a/migrations/users/summer-splash-orcas.js b/migrations/archive/2018/20180724_summer_splash_orcas.js similarity index 100% rename from migrations/users/summer-splash-orcas.js rename to migrations/archive/2018/20180724_summer_splash_orcas.js diff --git a/migrations/users/naming-day.js b/migrations/archive/2018/20180731_naming_day.js similarity index 100% rename from migrations/users/naming-day.js rename to migrations/archive/2018/20180731_naming_day.js diff --git a/migrations/users/generate-usernames.js b/migrations/archive/2018/20181001_generate_usernames.js similarity index 100% rename from migrations/users/generate-usernames.js rename to migrations/archive/2018/20181001_generate_usernames.js diff --git a/migrations/users/20181023_veteran_pet_ladder.js b/migrations/archive/2018/20181023_veteran_pet_ladder.js similarity index 100% rename from migrations/users/20181023_veteran_pet_ladder.js rename to migrations/archive/2018/20181023_veteran_pet_ladder.js diff --git a/migrations/users/20181030_habitoween_ladder.js b/migrations/archive/2018/20181030_habitoween_ladder.js similarity index 100% rename from migrations/users/20181030_habitoween_ladder.js rename to migrations/archive/2018/20181030_habitoween_ladder.js diff --git a/migrations/users/20181122_turkey_day.js b/migrations/archive/2018/20181122_turkey_day.js similarity index 100% rename from migrations/users/20181122_turkey_day.js rename to migrations/archive/2018/20181122_turkey_day.js diff --git a/migrations/users/bulk-email.js b/migrations/users/bulk-email.js new file mode 100644 index 0000000000..69b8a23990 --- /dev/null +++ b/migrations/users/bulk-email.js @@ -0,0 +1,61 @@ +/* eslint-disable no-console */ +import { sendTxn } from '../../../website/server/libs/email'; +import { model as User } from '../../website/server/models/user'; +import moment from 'moment'; +import nconf from 'nconf'; +const BASE_URL = nconf.get('BASE_URL'); +const EMAIL_SLUG = 'mandrill-email-slug'; // Set email template to send +const MIGRATION_NAME = 'bulk-email'; + +const progressCount = 1000; +let count = 0; + +async function updateUser (user) { + count++; + + if (count % progressCount === 0) console.warn(`${count} ${user._id}`); + + sendTxn( + user, + EMAIL_SLUG, + [{name: 'BASE_URL', content: BASE_URL}] // Add variables from template + ); + + return await User.update({_id: user._id}, {$set: {migration: MIGRATION_NAME}}).exec(); +} + +module.exports = async function processUsers () { + let query = { + migration: {$ne: MIGRATION_NAME}, + 'auth.timestamps.loggedin': {$gt: moment().subtract(2, 'weeks').toDate()}, // customize or remove to target different populations + }; + + const fields = { + _id: 1, + auth: 1, + preferences: 1, + profile: 1, + }; + + while (true) { // eslint-disable-line no-constant-condition + const users = await User // eslint-disable-line no-await-in-loop + .find(query) + .limit(250) + .sort({_id: 1}) + .select(fields) + .lean() + .exec(); + + if (users.length === 0) { + console.warn('All appropriate users found and modified.'); + console.warn(`\n${count} users processed\n`); + break; + } else { + query._id = { + $gt: users[users.length - 1], + }; + } + + await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop + } +}; diff --git a/website/client/assets/images/basilist.png b/website/client/assets/images/basilist.png deleted file mode 100644 index 366f0ac1d5..0000000000 Binary files a/website/client/assets/images/basilist.png and /dev/null differ diff --git a/website/client/assets/images/basilist@2x.png b/website/client/assets/images/basilist@2x.png deleted file mode 100644 index 698a83b059..0000000000 Binary files a/website/client/assets/images/basilist@2x.png and /dev/null differ diff --git a/website/client/assets/images/basilist@3x.png b/website/client/assets/images/basilist@3x.png deleted file mode 100644 index cf24b5e79d..0000000000 Binary files a/website/client/assets/images/basilist@3x.png and /dev/null differ diff --git a/website/client/assets/images/group@3x.png b/website/client/assets/images/group@3x.png new file mode 100644 index 0000000000..3340c087fd Binary files /dev/null and b/website/client/assets/images/group@3x.png differ diff --git a/website/client/assets/images/party@2x.png b/website/client/assets/images/party@2x.png deleted file mode 100644 index 415c850b70..0000000000 Binary files a/website/client/assets/images/party@2x.png and /dev/null differ diff --git a/website/client/assets/images/party@3x.png b/website/client/assets/images/party@3x.png deleted file mode 100644 index 3af908c1d8..0000000000 Binary files a/website/client/assets/images/party@3x.png and /dev/null differ diff --git a/website/client/components/groups/createPartyModal.vue b/website/client/components/groups/createPartyModal.vue index 42d168bafc..6e0ea2956a 100644 --- a/website/client/components/groups/createPartyModal.vue +++ b/website/client/components/groups/createPartyModal.vue @@ -1,100 +1,61 @@ - diff --git a/website/common/locales/en/groups.json b/website/common/locales/en/groups.json index 876b4e1886..71ba01ceb0 100644 --- a/website/common/locales/en/groups.json +++ b/website/common/locales/en/groups.json @@ -45,6 +45,7 @@ "LFG": "To advertise your new Party or find one to join, go to the <%= linkStart %>Party Wanted (Looking for Group)<%= linkEnd %> Guild.", "wantExistingParty": "Want to join an existing Party? Go to the <%= linkStart %>Party Wanted Guild<%= linkEnd %> and post this User ID:", "joinExistingParty": "Join Someone Else's Party", + "usernameCopied": "Username copied to clipboard.", "needPartyToStartQuest": "Whoops! You need to create or join a Party before you can start a quest!", "createGroupPlan": "Create", "create": "Create", @@ -417,9 +418,8 @@ "playInPartyDescription": "Take on amazing quests with friends or on your own. Battle monsters, create Challenges, and help yourself stay accountable through Parties.", "startYourOwnPartyTitle": "Start your own Party", "startYourOwnPartyDescription": "Battle monsters solo or invite as many of your friends as you'd like!", - "shartUserId": "Share User ID", "wantToJoinPartyTitle": "Want to join a Party?", - "wantToJoinPartyDescription": "Give your User ID to a friend who already has a Party, or head to the Party Wanted Guild to meet potential comrades!", + "wantToJoinPartyDescription": "Give your username to a friend who already has a Party, or head to the Party Wanted Guild to meet potential comrades!", "copy": "Copy", "inviteToPartyOrQuest": "Invite Party to Quest", "inviteInformation": "Clicking \"Invite\" will send an invitation to your Party members. When all members have accepted or denied, the Quest begins.",