Group plan landing page (#10222)

* Updated task page styles

* Added initial page styles

* Added login and payments

* Updated more styles

* Added white header

* Added group plan overview modal

* Updated copy

* Fixed location

* Style updates

* Added analytics

* More style updates

* Added locales

* Removed duplicate key
This commit is contained in:
Keith Holliday
2018-04-03 11:26:08 -05:00
committed by GitHub
parent 690d3e3fd2
commit ab14312368
30 changed files with 1263 additions and 80 deletions

View File

@@ -24,6 +24,7 @@
</style>
<script>
import * as Analytics from 'client/libs/analytics';
import axios from 'axios';
import { mapState } from 'client/libs/store';
@@ -222,6 +223,21 @@ export default {
let newGroup = response.data.data;
if (newGroup && newGroup._id) {
// Handle new user signup
if (!this.$store.state.isUserLoggedIn) {
const habiticaUrl = `${location.protocol}//${location.host}`;
Analytics.track({
hitType: 'event',
eventCategory: 'group-plans-static',
eventAction: 'view',
eventLabel: 'paid-with-amazon',
});
location.href = `${habiticaUrl}/group-plans/${newGroup._id}/task-information?showGroupOverview=true`;
return;
}
// @TODO: Just append? or $emit?
this.$router.push(`/group-plans/${newGroup._id}/task-information`);
this.user.guilds.push(newGroup._id);