mirror of
https://github.com/hanzo-io/press.git
synced 2026-10-30 18:56:50 +00:00
* refactor: revamped signup flow * fix: redirect user to relevant route on login * refactor: better sidebar hiding logic * fix: redundant site names for normal sites * refactor: use product request's plan value instead of passing it * fix: pre select site if there's only one * fix: remove unused page * fix: add skip to dashboard button * refactor: use list view for sites - show site label while signing up - other minor changes * fix: navigate user to dashboard or start center as required * fix: show start center for users with <5 sites * fix: set site label with first name only * fix: complete setup wizard for pooled sites * fix: add better empty state message in start center * refactor: Let user input the site label * feat: Webhook to sync user on creation on sites * fix: Track if user is a product trial user in team * fix: Hide notifications for product trial user * fix: Inverted condition for groups, servers and devbox * fix: hide login warning and sidebar in signup screens * refactor: Show different site list for product trial user * refactor: add app name in product site's subdomain * feat: Site login page a page for users to immediately login to their site via OTP flow * fix: only let user to login if they have verified their otp * fix: route for product login * fix: Consistent usage of verification code instead of otp * fix: Add 2 webhook record for update and create of user * refactor: Use site login page instead of start center - user can login to their site irrespective of if they have account in press, since we will store the user site map for every site - use session log dt for otp stuff - use cookies to keep session for 5 days * refactor: Use correct variable name * chore: remove start center file * fix: uncomment rate limit * chore: remove comments * chore: remove test code * fix: button label case * fix: Better subtitle in site login * refactor: Better app selector design following login card * fix: `site_session_id` -> `site_user_sid` * fix: Better title * refactor: Use max age instead of expires * fix: Add webhook for user deletion * fix: Track if otp is verified * fix: Create new session when older one is expired * fix: Don't route user to login from signup if they exist * fix: Remove cookie methods * refactor: Use LoginBox in signup flow * refactor: move site user under press module * fix: mark team as product user on signup * fix: Update route to dashboard for in desk login * fix: don't set user to admin on creating site * fix: Create a webhook on site created * fix: otp cheat code * feat: fallback to sync site user map * fix: Expire OTP after 5 minutes * fix: Allow unique site labels only * refactor: Use LoginBox in site login page * fix: Remove extra brace * fix: Bigger space between checkbox and inputs * chore: remove dead code * fix: Welcome flow for users who dropped in between signup flow - also reuse is_saas_user field instead of a new one * fix: Update app trial page url * fix: Make site label team wise unique * fix: show site label and site name * fix: typo * fix: Allow resending otp after 30 seconds * fix: add loading state before loading app data * fix: Don't allow users to resend otp before 30s pass * refactor: improved payment flow - handhold user to add payment mode and take them back to site's page - fix an issue where duplicate account requests are created * fix: muted powered by fc text * refactor: remove weird condition for subtitle * fix: remove print statements * refactor: `site_label` -> `label` * fix: render subtitle * refactor: better var name * refactor: better dev setup check * fix: use explicit field to track otp generated time * revert: unneeded change * fix: remove show normal site list view for all users since we have /site-login page for site login * fix: remove commented out routes
50 lines
1.2 KiB
Vue
50 lines
1.2 KiB
Vue
<template>
|
|
<div class="px-5 py-10" v-if="$team?.doc">
|
|
<Onboarding @payment-mode-added="routeToSourcePage" />
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { getTeam } from '../data/team';
|
|
import Onboarding from '../components/Onboarding.vue';
|
|
import OnboardingWithoutPayment from '../components/OnboardingWithoutPayment.vue';
|
|
export default {
|
|
name: 'Welcome',
|
|
components: {
|
|
Onboarding,
|
|
OnboardingWithoutPayment,
|
|
},
|
|
data() {
|
|
return {
|
|
from: {},
|
|
};
|
|
},
|
|
mounted() {
|
|
this.from = window.from;
|
|
},
|
|
beforeRouteEnter: (to, from, next) => {
|
|
// adding to window object so that it can be accessed in mounted
|
|
// since beforeRouteEnter is called before mounted
|
|
window.from = from;
|
|
|
|
let $team = getTeam();
|
|
window.$team = $team;
|
|
if ($team.doc.onboarding.complete && $team.doc.onboarding.site_created) {
|
|
next({ name: 'Site List' });
|
|
} else if (to.query.is_redirect && $team.doc.onboarding.site_created) {
|
|
next({ name: 'Site List' });
|
|
} else {
|
|
next();
|
|
}
|
|
},
|
|
methods: {
|
|
routeToSourcePage() {
|
|
if (this.from.name) {
|
|
this.$router.push({ name: this.from.name, params: this.from.params });
|
|
} else {
|
|
this.$router.push({ name: 'Site List' });
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|