Skip to content

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.

feat: improvements on ui

Paulo Castellanob03ff582c0c6
diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php
index eeb39bc4b..114103ab0 100644
--- a/app/Http/Controllers/Auth/RegisteredUserController.php
+++ b/app/Http/Controllers/Auth/RegisteredUserController.php
@@ -40,6 +40,7 @@ class RegisteredUserController extends Controller
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
'password' => ['required', Rules\Password::defaults()],
+ 'timezone' => ['nullable', 'string', 'timezone'],
]);
// Check if registering via invite link (redirect contains /invites/)
@@ -61,7 +62,7 @@ class RegisteredUserController extends Controller
$workspace = Workspace::create([
'user_id' => $user->id,
'name' => $user->name."'s Workspace",
- 'timezone' => 'UTC',
+ 'timezone' => $request->input('timezone', 'UTC'),
]);
// Add user as owner member
diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue
index 0c4d38ffa..34a1d58cc 100644
--- a/resources/js/components/AppSidebar.vue
+++ b/resources/js/components/AppSidebar.vue
@@ -32,6 +32,7 @@ import {
SidebarMenuButton,
SidebarMenuItem,
SidebarRail,
+ useSidebar,
} from '@/components/ui/sidebar';
import { useAppearance } from '@/composables/useAppearance';
import { useInitials } from '@/composables/useInitials';
@@ -60,6 +61,7 @@ const workspaces = computed<Workspace[]>(() => page.props.workspaces as Workspac
const { getInitials } = useInitials();
const { appearance, updateAppearance } = useAppearance();
+const { state: sidebarState } = useSidebar();
const themeLabels: Record<string, string> = {
light: 'Light',
@@ -209,7 +211,7 @@ function handleLogout() {
<div class="grid flex-1 text-left text-sm leading-tight">
<span class="truncate font-semibold">{{ auth.user.name }}</span>
<span class="truncate text-xs text-muted-foreground">{{ auth.user.email
- }}</span>
+ }}</span>
</div>
</div>
</DropdownMenuLabel>
@@ -304,9 +306,9 @@ function handleLogout() {
<!-- Create Post Button -->
<div v-if="currentWorkspace" class="px-2 py-2">
<Link :href="createPost.url()">
- <Button class="w-full">
- <IconPlus class="mr-2 size-4" />
- Create post
+ <Button :size="sidebarState === 'collapsed' ? 'icon' : 'default'" class="w-full">
+ <IconPlus class="size-4" />
+ <span v-if="sidebarState === 'expanded'">Create post</span>
</Button>
</Link>
</div>
diff --git a/resources/js/pages/auth/Register.vue b/resources/js/pages/auth/Register.vue
index 647f49161..a73cb6d1b 100644
--- a/resources/js/pages/auth/Register.vue
+++ b/resources/js/pages/auth/Register.vue
@@ -15,6 +15,9 @@ defineProps<{
email?: string | null;
redirect?: string | null;
}>();
+
+// Get user's timezone from browser
+const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
</script>
<template>
@@ -31,6 +34,7 @@ defineProps<{
class="flex flex-col gap-6"
>
<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">Name</Label>
diff --git a/resources/js/pages/posts/Calendar.vue b/resources/js/pages/posts/Calendar.vue
index 316b6a78b..4c22bb3a0 100644
--- a/resources/js/pages/posts/Calendar.vue
+++ b/resources/js/pages/posts/Calendar.vue
@@ -224,7 +224,7 @@ const formatTime = (scheduledAt: string): string => {
</Tabs>
<Link :href="createPost.url()">
<Button>
- <IconPlus class="mr-2 h-4 w-4" />
+ <IconPlus class="h-4 w-4" />
New Post
</Button>
</Link>
diff --git a/resources/js/pages/posts/Edit.vue b/resources/js/pages/posts/Edit.vue
index 11bf71e37..2f6e1de77 100644
--- a/resources/js/pages/posts/Edit.vue
+++ b/resources/js/pages/posts/Edit.vue
@@ -770,21 +770,20 @@ const deletePost = () => {
<span class="text-muted-foreground">|</span>
<Button type="button" variant="outline" size="icon-sm" @click="deletePost"
- :disabled="isSaving || isSubmitting"
- class="text-muted-foreground hover:text-destructive">
+ :disabled="isSaving || isSubmitting" class="text-muted-foreground hover:text-destructive">
<IconTrash class="h-4 w-4" />
</Button>
- <Button type="button" variant="secondary" size="sm" :disabled="!canSubmit || isSubmitting || isSaving"
- @click="submit('scheduled')">
- <IconClock class="mr-2 h-4 w-4" />
- Schedule
+ <Button type="button" variant="secondary" size="icon-sm" class="xl:w-auto xl:px-3"
+ :disabled="!canSubmit || isSubmitting || isSaving" @click="submit('scheduled')">
+ <IconClock class="h-4 w-4" />
+ <span class="hidden xl:inline">Schedule</span>
</Button>
- <Button type="button" size="sm" :disabled="!canSubmit || isSubmitting || isSaving"
- @click="submit('publishing')">
- <IconSend class="mr-2 h-4 w-4" />
- Publish
+ <Button type="button" size="icon-sm" class="xl:w-auto xl:px-3"
+ :disabled="!canSubmit || isSubmitting || isSaving" @click="submit('publishing')">
+ <IconSend class="h-4 w-4" />
+ <span class="hidden xl:inline">Publish</span>
</Button>
</div>
@@ -1012,10 +1011,8 @@ const deletePost = () => {
<div v-else class="h-10 w-10 rounded-full bg-muted flex items-center justify-center">
<span class="text-sm font-medium">{{ pp.social_account.display_name?.charAt(0) }}</span>
</div>
- <div
- class="absolute -bottom-1 -right-1 h-5 w-5 rounded-full bg-background ring-2 ring-background flex items-center justify-center">
- <component :is="getPlatformIcon(pp.platform)" class="h-4 w-4 text-neutral-600" />
- </div>
+ <img :src="getPlatformLogo(pp.platform)" :alt="pp.platform"
+ class="absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full ring-2 ring-background" />
</div>
<div class="min-w-0">
<p class="font-medium text-sm truncate">{{ pp.social_account.display_name }}</p>
diff --git a/resources/js/pages/posts/Index.vue b/resources/js/pages/posts/Index.vue
index 253f93132..b0833ab66 100644
--- a/resources/js/pages/posts/Index.vue
+++ b/resources/js/pages/posts/Index.vue
@@ -148,6 +148,7 @@ const handleDelete = (post: Post) => {
</script>
<template>
+
<Head :title="pageTitle" />
<AppLayout :breadcrumbs="breadcrumbs">
@@ -181,11 +182,12 @@ const handleDelete = (post: Post) => {
<IconFileText class="h-12 w-12 text-muted-foreground" />
<h3 class="mt-4 text-lg font-semibold">No posts found</h3>
<p class="mt-2 text-sm text-muted-foreground">
- {{ currentStatus ? `No ${currentStatus} posts yet.` : 'Start by creating your first post.' }}
+ {{ currentStatus ? `No ${currentStatus} posts yet.` : 'Start by creating your first post.'
+ }}
</p>
<Link v-if="!currentStatus" :href="createPost.url()" class="mt-4">
<Button>
- <IconPlus class="mr-2 h-4 w-4" />
+ <IconPlus class="h-4 w-4" />
Create Post
</Button>
</Link>
@@ -214,15 +216,12 @@ const handleDelete = (post: Post) => {
<div class="flex items-center gap-2">
<div class="flex -space-x-2">
- <img
- v-for="pp in getEnabledPlatforms(post).slice(0, 5)"
- :key="pp.id"
- :src="getPlatformLogo(pp.platform)"
- :alt="pp.platform"
- class="h-6 w-6 rounded-full ring-2 ring-background"
- />
+ <img v-for="pp in getEnabledPlatforms(post).slice(0, 5)" :key="pp.id"
+ :src="getPlatformLogo(pp.platform)" :alt="pp.platform"
+ class="h-6 w-6 rounded-full ring-2 ring-background" />
</div>
- <span v-if="getEnabledPlatforms(post).length > 5" class="text-xs text-muted-foreground">
+ <span v-if="getEnabledPlatforms(post).length > 5"
+ class="text-xs text-muted-foreground">
+{{ getEnabledPlatforms(post).length - 5 }}
</span>
<span class="text-xs text-muted-foreground ml-2">
@@ -242,12 +241,7 @@ const handleDelete = (post: Post) => {
<IconPencil class="h-4 w-4" />
</Button>
</Link>
- <Button
- v-if="canEdit(post)"
- variant="ghost"
- size="icon"
- @click="handleDelete(post)"
- >
+ <Button v-if="canEdit(post)" variant="ghost" size="icon" @click="handleDelete(post)">
<IconTrash class="h-4 w-4 text-red-500" />
</Button>
</div>
@@ -285,4 +279,4 @@ const handleDelete = (post: Post) => {
</div>
</div>
</AppLayout>
-</template>
+</template>
\ No newline at end of file
diff --git a/tests/Feature/Auth/RegistrationTest.php b/tests/Feature/Auth/RegistrationTest.php
index 5409bd371..449799dae 100644
--- a/tests/Feature/Auth/RegistrationTest.php
+++ b/tests/Feature/Auth/RegistrationTest.php
@@ -32,6 +32,21 @@ test('new users get a default workspace on registration', function () {
expect($user)->not->toBeNull();
expect($user->workspaces)->toHaveCount(1);
expect($user->workspaces->first()->name)->toBe("Test User's Workspace");
+ expect($user->workspaces->first()->timezone)->toBe('UTC');
+});
+
+test('new users workspace uses provided timezone', function () {
+ $this->post(route('register.store'), [
+ 'name' => 'Test User',
+ 'email' => '[email protected]',
+ 'password' => 'Password123!',
+ 'timezone' => 'America/Sao_Paulo',
+ ]);
+
+ $user = User::where('email', '[email protected]')->first();
+
+ expect($user)->not->toBeNull();
+ expect($user->workspaces->first()->timezone)->toBe('America/Sao_Paulo');
});
test('new users do not have verified email by default', function () {