Files
cloud/dashboard/src2/components/OnboardingWithoutPayment.vue
SuhailandGitHub c5d1ead858 refactor: Revamped signup flow (#2372)
* 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
2025-02-04 10:20:14 +05:30

66 lines
1.4 KiB
Vue

<template>
<div class="relative h-full">
<div class="relative z-10 mx-auto pt-8 sm:pt-16">
<!-- logo -->
<div
class="flex flex-col items-center"
@dblclick="redirectForFrappeioAuth"
>
<FCLogo class="inline-block h-12 w-12" />
</div>
<!-- card -->
<div
class="mx-auto w-full bg-white px-4 py-8 sm:mt-6 sm:w-3/6 sm:rounded-2xl sm:px-6 sm:py-6 sm:shadow-2xl"
>
<!-- title -->
<div class="mb-7.5 text-center">
<p
class="text-center text-lg font-medium leading-5 tracking-tight text-gray-900"
>
Choose an app below to create your first site.
</p>
</div>
<div
v-if="$resources.availableApps.loading"
class="flex justify-center"
>
<LoadingText />
</div>
<OnboardingAppSelector v-else :apps="$resources.availableApps.data" />
</div>
</div>
<div class="flex w-full">
<Button
class="mx-auto mt-4"
label="Skip to Dashboard"
variant="ghost"
icon-right="arrow-right"
:route="{ name: 'Site List' }"
/>
</div>
</div>
</template>
<script>
import OnboardingAppSelector from './OnboardingAppSelector.vue';
export default {
name: 'Onboarding',
components: {
OnboardingAppSelector,
},
resources: {
availableApps() {
return {
url: 'press.api.marketplace.get_marketplace_apps_for_onboarding',
auto: true,
};
},
},
methods: {
redirectForFrappeioAuth() {
window.location = '/f-login';
},
},
};
</script>