mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user