Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
feat(auth): social-first register screen
Paulo Castellanob628f30f1b98
diff --git a/lang/en/auth.php b/lang/en/auth.phpindex 9662c88d6..18dd53c10 100644--- a/lang/en/auth.php+++ b/lang/en/auth.php@@ -52,6 +52,7 @@ return [],'or_continue_with' => 'Or continue with',+ 'or_continue_with_email' => 'Or continue with email','google_login' => 'Log in with Google','google_signup' => 'Sign up with Google','github_login' => 'Log in with GitHub',@@ -78,9 +79,10 @@ return [],'register' => [- 'title' => 'Create an account',- 'description' => 'Enter your details below to create your account',+ 'title' => 'Your whole social calendar, in one place',+ 'description' => 'Create your account and start scheduling posts across every network.','page_title' => 'Register',+ 'signup_with_email' => 'Sign up with email','name' => 'Name','name_placeholder' => 'Full name','email' => 'Email address',diff --git a/lang/es/auth.php b/lang/es/auth.phpindex 383fb2ba1..4acdad969 100644--- a/lang/es/auth.php+++ b/lang/es/auth.php@@ -40,6 +40,7 @@ return [],'or_continue_with' => 'O continuar con',+ 'or_continue_with_email' => 'O continúa con correo','google_login' => 'Iniciar sesión con Google','google_signup' => 'Registrarse con Google','github_login' => 'Iniciar sesión con GitHub',@@ -66,9 +67,10 @@ return [],'register' => [- 'title' => 'Crear una cuenta',- 'description' => 'Introduce tus datos para crear tu cuenta',+ 'title' => 'Todo tu calendario social en un solo lugar',+ 'description' => 'Crea tu cuenta y empieza a programar publicaciones en todas las redes.','page_title' => 'Registro',+ 'signup_with_email' => 'Registrarse con correo','name' => 'Nombre','name_placeholder' => 'Nombre completo','email' => 'Correo electrónico',diff --git a/lang/pt-BR/auth.php b/lang/pt-BR/auth.phpindex 192cbe0bb..6ce4dcb46 100644--- a/lang/pt-BR/auth.php+++ b/lang/pt-BR/auth.php@@ -52,6 +52,7 @@ return [],'or_continue_with' => 'Ou continue com',+ 'or_continue_with_email' => 'Ou continue com e-mail','google_login' => 'Entrar com Google','google_signup' => 'Cadastrar com Google','github_login' => 'Entrar com GitHub',@@ -78,9 +79,10 @@ return [],'register' => [- 'title' => 'Criar uma conta',- 'description' => 'Digite seus dados abaixo para criar sua conta',+ 'title' => 'Todo o seu calendário social num só lugar',+ 'description' => 'Crie sua conta e comece a agendar posts em todas as redes.','page_title' => 'Cadastro',+ 'signup_with_email' => 'Cadastrar com e-mail','name' => 'Nome','name_placeholder' => 'Nome completo','email' => 'Endereço de email',diff --git a/resources/js/components/auth/SocialLogin.vue b/resources/js/components/auth/SocialLogin.vueindex ca396868f..b6d196e65 100644--- a/resources/js/components/auth/SocialLogin.vue+++ b/resources/js/components/auth/SocialLogin.vue@@ -6,9 +6,13 @@ import { Button } from '@/components/ui/button';import { redirect as githubRedirect } from '@/routes/auth/github';import { redirect as googleRedirect } from '@/routes/auth/google';-defineProps<{- mode: 'login' | 'signup';-}>();+withDefaults(+ defineProps<{+ mode: 'login' | 'signup';+ hideDivider?: boolean;+ }>(),+ { hideDivider: false },+);const page = usePage();const googleEnabled = computed(() => Boolean(page.props.googleAuthEnabled));@@ -31,6 +35,7 @@ const hasSocial = computed(() => googleEnabled.value || githubEnabled.value);</div><div+ v-if="!hideDivider"class="relative text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border"><span class="relative z-10 bg-background px-2 text-muted-foreground">{{ $t('auth.or_continue_with') }}</span>diff --git a/resources/js/pages/auth/Register.vue b/resources/js/pages/auth/Register.vueindex 9d115483e..fe57097be 100644--- a/resources/js/pages/auth/Register.vue+++ b/resources/js/pages/auth/Register.vue@@ -1,6 +1,6 @@<script setup lang="ts">import { Form, Head, usePage } from '@inertiajs/vue3';-import { IconEye, IconEyeOff } from '@tabler/icons-vue';+import { IconEye, IconEyeOff, IconMail } from '@tabler/icons-vue';import { computed, ref } from 'vue';import SocialLogin from '@/components/auth/SocialLogin.vue';@@ -26,11 +26,21 @@ defineProps<{}>();const showPassword = ref(false);+const showEmailForm = ref(false);const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;const page = usePage();const isSelfHosted = computed(() => Boolean(page.props.selfHosted));+const hasSocial = computed(+ () =>+ Boolean(page.props.googleAuthEnabled) ||+ Boolean(page.props.githubAuthEnabled),+);++// With no social providers the email form is the only way to sign up, so it+// stays visible; otherwise it is revealed by the "Sign up with email" toggle.+const emailFormVisible = computed(() => !hasSocial.value || showEmailForm.value);</script><template>@@ -41,7 +51,21 @@ const isSelfHosted = computed(() => Boolean(page.props.selfHosted));<Head :title="$t('auth.register.page_title')" /><div class="flex flex-col gap-6">- <SocialLogin mode="signup" />+ <div v-if="hasSocial" class="flex flex-col gap-2">+ <SocialLogin mode="signup" hide-divider />++ <Button+ v-if="!showEmailForm"+ type="button"+ variant="outline"+ class="w-full"+ dusk="register-email-toggle"+ @click="showEmailForm = true"+ >+ <IconMail class="size-4" />+ {{ $t('auth.register.signup_with_email') }}+ </Button>+ </div><Formv-bind="store.form()"@@ -51,81 +75,95 @@ const isSelfHosted = computed(() => Boolean(page.props.selfHosted));><input v-if="redirect" type="hidden" name="redirect" :value="redirect" /><input type="hidden" name="timezone" :value="timezone" />- <div class="grid gap-6">- <div class="grid gap-2">- <Label for="name">{{ $t('auth.register.name') }}</Label>- <Input- id="name"- type="text"- autofocus- :tabindex="1"- autocomplete="name"- name="name"- :placeholder="$t('auth.register.name_placeholder')"- />- <InputError :message="errors.name" />- </div>- <div class="grid gap-2">- <Label for="email">{{ $t('auth.register.email') }}</Label>- <Input- id="email"- type="email"- :tabindex="2"- autocomplete="email"- name="email"- placeholder="[email protected]"- :default-value="email ?? ''"- />- <InputError :message="errors.email" />- </div>+ <div+ v-if="hasSocial && showEmailForm"+ class="relative text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border"+ >+ <span class="relative z-10 bg-background px-2 text-muted-foreground">{{ $t('auth.or_continue_with_email') }}</span>+ </div>- <div class="grid gap-2">- <Label for="password">{{ $t('auth.register.password') }}</Label>- <div class="relative">+ <Transition+ enter-active-class="transition-all duration-300 ease-out"+ enter-from-class="-translate-y-2 opacity-0"+ enter-to-class="translate-y-0 opacity-100"+ >+ <div v-if="emailFormVisible" class="grid gap-6">+ <div class="grid gap-2">+ <Label for="name">{{ $t('auth.register.name') }}</Label><Input- id="password"- :type="showPassword ? 'text' : 'password'"- :tabindex="3"- autocomplete="new-password"- name="password"- :placeholder="$t('auth.register.password')"+ id="name"+ type="text"+ autofocus+ :tabindex="1"+ autocomplete="name"+ name="name"+ :placeholder="$t('auth.register.name_placeholder')"/>- <div class="absolute inset-y-0 end-0 flex items-center pe-3">- <TooltipProvider>- <Tooltip>- <TooltipTrigger as-child>- <button- type="button"- :tabindex="-1"- class="cursor-pointer text-muted-foreground hover:text-foreground"- @click="showPassword = !showPassword"- >- <IconEyeOff v-if="showPassword" class="size-4" />- <IconEye v-else class="size-4" />- </button>- </TooltipTrigger>- <TooltipContent>- <p>{{ showPassword ? $t('auth.register.hide_password') : $t('auth.register.show_password') }}</p>- </TooltipContent>- </Tooltip>- </TooltipProvider>+ <InputError :message="errors.name" />+ </div>++ <div class="grid gap-2">+ <Label for="email">{{ $t('auth.register.email') }}</Label>+ <Input+ id="email"+ type="email"+ :tabindex="2"+ autocomplete="email"+ name="email"+ placeholder="[email protected]"+ :default-value="email ?? ''"+ />+ <InputError :message="errors.email" />+ </div>++ <div class="grid gap-2">+ <Label for="password">{{ $t('auth.register.password') }}</Label>+ <div class="relative">+ <Input+ id="password"+ :type="showPassword ? 'text' : 'password'"+ :tabindex="3"+ autocomplete="new-password"+ name="password"+ :placeholder="$t('auth.register.password')"+ />+ <div class="absolute inset-y-0 end-0 flex items-center pe-3">+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger as-child>+ <button+ type="button"+ :tabindex="-1"+ class="cursor-pointer text-muted-foreground hover:text-foreground"+ @click="showPassword = !showPassword"+ >+ <IconEyeOff v-if="showPassword" class="size-4" />+ <IconEye v-else class="size-4" />+ </button>+ </TooltipTrigger>+ <TooltipContent>+ <p>{{ showPassword ? $t('auth.register.hide_password') : $t('auth.register.show_password') }}</p>+ </TooltipContent>+ </Tooltip>+ </TooltipProvider>+ </div></div>+ <InputError :message="errors.password" /></div>- <InputError :message="errors.password" />- </div>- <Button- type="submit"- class="mt-2 w-full"- tabindex="4"- :disabled="processing"- data-test="register-user-button"- >- <Spinner v-if="processing" />- {{ $t('auth.register.submit') }}- </Button>- </div>+ <Button+ type="submit"+ class="mt-2 w-full"+ tabindex="4"+ :disabled="processing"+ data-test="register-user-button"+ >+ <Spinner v-if="processing" />+ {{ $t('auth.register.submit') }}+ </Button>+ </div>+ </Transition><div class="text-center text-sm text-muted-foreground">{{ $t('auth.register.has_account') }}