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 design

Paulo Castellano56c257dc7d17
diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php
index 3ebb5036e..a93a85d10 100644
--- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php
+++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php
@@ -20,8 +20,6 @@ class AuthenticatedSessionController extends Controller
public function create(Request $request): Response
{
return Inertia::render('auth/Login', [
- 'canResetPassword' => true,
- 'canRegister' => true,
'status' => session('status'),
'email' => $request->query('email'),
'redirect' => $request->query('redirect'),
diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php
index 36b9c4d95..39ea8fbe3 100644
--- a/app/Http/Controllers/PostController.php
+++ b/app/Http/Controllers/PostController.php
@@ -18,7 +18,7 @@ use Inertia\Response;
class PostController extends Controller
{
- public function index(Request $request): Response|RedirectResponse
+ public function index(Request $request, ?string $status = null): Response|RedirectResponse
{
$workspace = $request->user()->currentWorkspace;
@@ -28,16 +28,25 @@ class PostController extends Controller
$this->authorize('view', $workspace);
- $posts = $workspace->posts()
+ $query = $workspace->posts()
->with(['postPlatforms' => function ($query) {
$query->where('enabled', true)->with('socialAccount');
- }, 'user'])
- ->latest('scheduled_at')
- ->paginate(20);
+ }, 'user']);
+
+ // Apply status filter if provided
+ if ($status) {
+ $query = match ($status) {
+ 'draft' => $query->draft(),
+ 'scheduled' => $query->scheduled(),
+ 'published' => $query->published(),
+ default => $query,
+ };
+ }
return Inertia::render('posts/Index', [
'workspace' => $workspace,
- 'posts' => $posts,
+ 'posts' => Inertia::scroll(fn () => $query->latest('scheduled_at')->paginate(15)),
+ 'currentStatus' => $status,
]);
}
diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php
index 5746e574c..0fcc690bc 100644
--- a/app/Http/Middleware/HandleInertiaRequests.php
+++ b/app/Http/Middleware/HandleInertiaRequests.php
@@ -37,13 +37,25 @@ class HandleInertiaRequests extends Middleware
{
$user = $request->user();
+ $currentWorkspace = $user?->currentWorkspace;
+ $currentRole = null;
+
+ if ($user && $currentWorkspace) {
+ $currentRole = $user->workspaces()
+ ->where('workspaces.id', $currentWorkspace->id)
+ ->first()
+ ?->pivot
+ ?->role;
+ }
+
return [
...parent::share($request),
'name' => config('app.name'),
'auth' => [
'user' => $user,
+ 'role' => $currentRole,
],
- 'currentWorkspace' => $user?->currentWorkspace,
+ 'currentWorkspace' => $currentWorkspace,
'workspaces' => $user ? $user->workspaces()->select('workspaces.id', 'workspaces.name')->get() : [],
'sidebarOpen' => ! $request->hasCookie('sidebar_state') || $request->cookie('sidebar_state') === 'true',
'flash' => $request->session()->get('flash', []),
diff --git a/lang/php_en.json b/lang/php_en.json
deleted file mode 100644
index 0ef12bdac..000000000
--- a/lang/php_en.json
+++ /dev/null
@@ -1 +0,0 @@
-{"auth.failed":"These credentials do not match our records.","auth.password":"The provided password is incorrect.","auth.throttle":"Too many login attempts. Please try again in :seconds seconds.","pagination.previous":"« Previous","pagination.next":"Next »","passwords.reset":"Your password has been reset.","passwords.sent":"We have emailed your password reset link.","passwords.throttled":"Please wait before retrying.","passwords.token":"This password reset token is invalid.","passwords.user":"We can't find a user with that email address.","validation.accepted":"The :attribute field must be accepted.","validation.accepted_if":"The :attribute field must be accepted when :other is :value.","validation.active_url":"The :attribute field must be a valid URL.","validation.after":"The :attribute field must be a date after :date.","validation.after_or_equal":"The :attribute field must be a date after or equal to :date.","validation.alpha":"The :attribute field must only contain letters.","validation.alpha_dash":"The :attribute field must only contain letters, numbers, dashes, and underscores.","validation.alpha_num":"The :attribute field must only contain letters and numbers.","validation.any_of":"The :attribute field is invalid.","validation.array":"The :attribute field must be an array.","validation.ascii":"The :attribute field must only contain single-byte alphanumeric characters and symbols.","validation.before":"The :attribute field must be a date before :date.","validation.before_or_equal":"The :attribute field must be a date before or equal to :date.","validation.between.array":"The :attribute field must have between :min and :max items.","validation.between.file":"The :attribute field must be between :min and :max kilobytes.","validation.between.numeric":"The :attribute field must be between :min and :max.","validation.between.string":"The :attribute field must be between :min and :max characters.","validation.boolean":"The :attribute field must be true or false.","validation.can":"The :attribute field contains an unauthorized value.","validation.confirmed":"The :attribute field confirmation does not match.","validation.contains":"The :attribute field is missing a required value.","validation.current_password":"The password is incorrect.","validation.date":"The :attribute field must be a valid date.","validation.date_equals":"The :attribute field must be a date equal to :date.","validation.date_format":"The :attribute field must match the format :format.","validation.decimal":"The :attribute field must have :decimal decimal places.","validation.declined":"The :attribute field must be declined.","validation.declined_if":"The :attribute field must be declined when :other is :value.","validation.different":"The :attribute field and :other must be different.","validation.digits":"The :attribute field must be :digits digits.","validation.digits_between":"The :attribute field must be between :min and :max digits.","validation.dimensions":"The :attribute field has invalid image dimensions.","validation.distinct":"The :attribute field has a duplicate value.","validation.doesnt_contain":"The :attribute field must not contain any of the following: :values.","validation.doesnt_end_with":"The :attribute field must not end with one of the following: :values.","validation.doesnt_start_with":"The :attribute field must not start with one of the following: :values.","validation.email":"The :attribute field must be a valid email address.","validation.encoding":"The :attribute field must be encoded in :encoding.","validation.ends_with":"The :attribute field must end with one of the following: :values.","validation.enum":"The selected :attribute is invalid.","validation.exists":"The selected :attribute is invalid.","validation.extensions":"The :attribute field must have one of the following extensions: :values.","validation.file":"The :attribute field must be a file.","validation.filled":"The :attribute field must have a value.","validation.gt.array":"The :attribute field must have more than :value items.","validation.gt.file":"The :attribute field must be greater than :value kilobytes.","validation.gt.numeric":"The :attribute field must be greater than :value.","validation.gt.string":"The :attribute field must be greater than :value characters.","validation.gte.array":"The :attribute field must have :value items or more.","validation.gte.file":"The :attribute field must be greater than or equal to :value kilobytes.","validation.gte.numeric":"The :attribute field must be greater than or equal to :value.","validation.gte.string":"The :attribute field must be greater than or equal to :value characters.","validation.hex_color":"The :attribute field must be a valid hexadecimal color.","validation.image":"The :attribute field must be an image.","validation.in":"The selected :attribute is invalid.","validation.in_array":"The :attribute field must exist in :other.","validation.in_array_keys":"The :attribute field must contain at least one of the following keys: :values.","validation.integer":"The :attribute field must be an integer.","validation.ip":"The :attribute field must be a valid IP address.","validation.ipv4":"The :attribute field must be a valid IPv4 address.","validation.ipv6":"The :attribute field must be a valid IPv6 address.","validation.json":"The :attribute field must be a valid JSON string.","validation.list":"The :attribute field must be a list.","validation.lowercase":"The :attribute field must be lowercase.","validation.lt.array":"The :attribute field must have less than :value items.","validation.lt.file":"The :attribute field must be less than :value kilobytes.","validation.lt.numeric":"The :attribute field must be less than :value.","validation.lt.string":"The :attribute field must be less than :value characters.","validation.lte.array":"The :attribute field must not have more than :value items.","validation.lte.file":"The :attribute field must be less than or equal to :value kilobytes.","validation.lte.numeric":"The :attribute field must be less than or equal to :value.","validation.lte.string":"The :attribute field must be less than or equal to :value characters.","validation.mac_address":"The :attribute field must be a valid MAC address.","validation.max.array":"The :attribute field must not have more than :max items.","validation.max.file":"The :attribute field must not be greater than :max kilobytes.","validation.max.numeric":"The :attribute field must not be greater than :max.","validation.max.string":"The :attribute field must not be greater than :max characters.","validation.max_digits":"The :attribute field must not have more than :max digits.","validation.mimes":"The :attribute field must be a file of type: :values.","validation.mimetypes":"The :attribute field must be a file of type: :values.","validation.min.array":"The :attribute field must have at least :min items.","validation.min.file":"The :attribute field must be at least :min kilobytes.","validation.min.numeric":"The :attribute field must be at least :min.","validation.min.string":"The :attribute field must be at least :min characters.","validation.min_digits":"The :attribute field must have at least :min digits.","validation.missing":"The :attribute field must be missing.","validation.missing_if":"The :attribute field must be missing when :other is :value.","validation.missing_unless":"The :attribute field must be missing unless :other is :value.","validation.missing_with":"The :attribute field must be missing when :values is present.","validation.missing_with_all":"The :attribute field must be missing when :values are present.","validation.multiple_of":"The :attribute field must be a multiple of :value.","validation.not_in":"The selected :attribute is invalid.","validation.not_regex":"The :attribute field format is invalid.","validation.numeric":"The :attribute field must be a number.","validation.password.letters":"The :attribute field must contain at least one letter.","validation.password.mixed":"The :attribute field must contain at least one uppercase and one lowercase letter.","validation.password.numbers":"The :attribute field must contain at least one number.","validation.password.symbols":"The :attribute field must contain at least one symbol.","validation.password.uncompromised":"The given :attribute has appeared in a data leak. Please choose a different :attribute.","validation.present":"The :attribute field must be present.","validation.present_if":"The :attribute field must be present when :other is :value.","validation.present_unless":"The :attribute field must be present unless :other is :value.","validation.present_with":"The :attribute field must be present when :values is present.","validation.present_with_all":"The :attribute field must be present when :values are present.","validation.prohibited":"The :attribute field is prohibited.","validation.prohibited_if":"The :attribute field is prohibited when :other is :value.","validation.prohibited_if_accepted":"The :attribute field is prohibited when :other is accepted.","validation.prohibited_if_declined":"The :attribute field is prohibited when :other is declined.","validation.prohibited_unless":"The :attribute field is prohibited unless :other is in :values.","validation.prohibits":"The :attribute field prohibits :other from being present.","validation.regex":"The :attribute field format is invalid.","validation.required":"The :attribute field is required.","validation.required_array_keys":"The :attribute field must contain entries for: :values.","validation.required_if":"The :attribute field is required when :other is :value.","validation.required_if_accepted":"The :attribute field is required when :other is accepted.","validation.required_if_declined":"The :attribute field is required when :other is declined.","validation.required_unless":"The :attribute field is required unless :other is in :values.","validation.required_with":"The :attribute field is required when :values is present.","validation.required_with_all":"The :attribute field is required when :values are present.","validation.required_without":"The :attribute field is required when :values is not present.","validation.required_without_all":"The :attribute field is required when none of :values are present.","validation.same":"The :attribute field must match :other.","validation.size.array":"The :attribute field must contain :size items.","validation.size.file":"The :attribute field must be :size kilobytes.","validation.size.numeric":"The :attribute field must be :size.","validation.size.string":"The :attribute field must be :size characters.","validation.starts_with":"The :attribute field must start with one of the following: :values.","validation.string":"The :attribute field must be a string.","validation.timezone":"The :attribute field must be a valid timezone.","validation.unique":"The :attribute has already been taken.","validation.uploaded":"The :attribute failed to upload.","validation.uppercase":"The :attribute field must be uppercase.","validation.url":"The :attribute field must be a valid URL.","validation.ulid":"The :attribute field must be a valid ULID.","validation.uuid":"The :attribute field must be a valid UUID.","validation.custom.attribute-name.rule-name":"custom-message"}
\ No newline at end of file
diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue
index 217964f68..e62ec6abd 100644
--- a/resources/js/components/AppSidebar.vue
+++ b/resources/js/components/AppSidebar.vue
@@ -1,6 +1,8 @@
<script setup lang="ts">
import { Link, router, usePage } from '@inertiajs/vue3';
-import { Calendar, Check, ChevronsUpDown, Hash, LogOut, Plus, Settings, Share2, Tag } from 'lucide-vue-next';
+import { IconCalendar, IconCheck, IconSelector, IconFileText, IconHash, IconLogout, IconPlus, IconSettings, IconShare2, IconPencil, IconFileCheck, IconTag, IconUser, IconClock, IconMessageCircle, IconGift, IconBell, IconBook, IconSun, IconMoon, IconDeviceDesktop } from '@tabler/icons-vue';
+import { Button } from '@/components/ui/button';
+import { create as createPost } from '@/actions/App/Http/Controllers/PostController';
import { computed } from 'vue';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
@@ -10,13 +12,18 @@ import {
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
+ DropdownMenuPortal,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
DropdownMenuSeparator,
+ DropdownMenuSub,
+ DropdownMenuSubContent,
+ DropdownMenuSubTrigger,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import {
Sidebar,
SidebarContent,
- SidebarFooter,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
@@ -26,10 +33,12 @@ import {
SidebarMenuItem,
SidebarRail,
} from '@/components/ui/sidebar';
+import { useAppearance } from '@/composables/useAppearance';
import { useInitials } from '@/composables/useInitials';
import { accounts, calendar, logout } from '@/routes';
import { index as hashtags } from '@/routes/hashtags';
import { index as labels } from '@/routes/labels';
+import { index as postsIndex } from '@/actions/App/Http/Controllers/PostController';
import { edit as editProfile } from '@/routes/profile';
import { settings as workspaceSettings } from '@/routes/workspace';
import { create as createWorkspaceRoute, switchMethod } from '@/routes/workspaces';
@@ -50,32 +59,94 @@ const currentWorkspace = computed<Workspace | null>(() => page.props.currentWork
const workspaces = computed<Workspace[]>(() => page.props.workspaces as Workspace[]);
const { getInitials } = useInitials();
+const { appearance, updateAppearance } = useAppearance();
-const mainNavItems: NavItem[] = [
+const themeLabels: Record<string, string> = {
+ light: 'Light',
+ dark: 'Dark',
+ system: 'System',
+};
+
+const postsNavItems: NavItem[] = [
{
title: 'Calendar',
href: calendar.url(),
- icon: Calendar,
+ icon: IconCalendar,
},
{
- title: 'Accounts',
- href: accounts.url(),
- icon: Share2,
+ title: 'All',
+ href: postsIndex.url(),
+ icon: IconFileText,
},
{
- title: 'Hashtags',
- href: hashtags.url(),
- icon: Hash,
+ title: 'Scheduled',
+ href: postsIndex.url('scheduled'),
+ icon: IconClock,
},
{
- title: 'Labels',
- href: labels.url(),
- icon: Tag,
+ title: 'Posted',
+ href: postsIndex.url('published'),
+ icon: IconFileCheck,
},
{
- title: 'Settings',
- href: workspaceSettings.url(),
- icon: Settings,
+ title: 'Drafts',
+ href: postsIndex.url('draft'),
+ icon: IconPencil,
+ },
+];
+
+const canManageWorkspace = computed(() => auth.value.role !== 'member');
+
+const configNavItems = computed(() => {
+ const items: NavItem[] = [
+ {
+ title: 'Connections',
+ href: accounts.url(),
+ icon: IconShare2,
+ },
+ {
+ title: 'Hashtags',
+ href: hashtags.url(),
+ icon: IconHash,
+ },
+ {
+ title: 'Labels',
+ href: labels.url(),
+ icon: IconTag,
+ },
+ ];
+
+ if (canManageWorkspace.value) {
+ items.push({
+ title: 'Settings',
+ href: workspaceSettings.url(),
+ icon: IconSettings,
+ });
+ }
+
+ return items;
+});
+
+const supportNavItems: NavItem[] = [
+ {
+ title: 'Share feedback',
+ href: 'mailto:[email protected]',
+ icon: IconMessageCircle,
+ },
+ {
+ title: 'Earn 30% referral',
+ href: '/referral',
+ icon: IconGift,
+ },
+ {
+ title: 'Stay updated',
+ href: 'https://x.com/trypostit',
+ icon: IconBell,
+ },
+ {
+ title: 'Docs',
+ href: 'https://docs.trypost.it',
+ icon: IconBook,
},
];
@@ -105,140 +176,120 @@ function handleLogout() {
<SidebarMenuItem>
<DropdownMenu>
<DropdownMenuTrigger as-child>
- <SidebarMenuButton
- size="lg"
- class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
- >
- <img
- :src="currentWorkspace?.logo.url"
- :alt="currentWorkspace?.name"
- class="size-8 rounded-full object-cover"
- />
- <div class="grid flex-1 text-left text-sm leading-tight">
- <span class="truncate font-semibold">{{ currentWorkspace?.name || 'Select workspace' }}</span>
- <span class="truncate text-xs text-muted-foreground">Workspace</span>
- </div>
- <ChevronsUpDown class="ml-auto size-4" />
- </SidebarMenuButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- class="w-[--reka-dropdown-menu-trigger-width] min-w-56 rounded-lg"
- align="start"
- side="bottom"
- :side-offset="4"
- >
- <DropdownMenuLabel class="text-xs text-muted-foreground">
- Workspaces
- </DropdownMenuLabel>
- <DropdownMenuItem
- v-for="workspace in workspaces"
- :key="workspace.id"
- class="cursor-pointer gap-2 p-2"
- @click="switchWorkspace(workspace)"
- >
- <img
- :src="workspace.logo.url"
- :alt="workspace.name"
- class="size-6 rounded-sm object-cover"
- />
- <span class="truncate">{{ workspace.name }}</span>
- <Check v-if="currentWorkspace?.id === workspace.id" class="ml-auto size-4" />
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem class="cursor-pointer gap-2 p-2" @click="createWorkspace">
- <div class="flex size-6 items-center justify-center rounded-md border bg-background">
- <Plus class="size-4" />
- </div>
- <span class="font-medium">Create workspace</span>
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- </SidebarMenuItem>
- </SidebarMenu>
- </SidebarHeader>
-
- <SidebarContent>
- <SidebarGroup v-if="currentWorkspace">
- <SidebarGroupLabel>Menu</SidebarGroupLabel>
- <SidebarGroupContent>
- <SidebarMenu>
- <SidebarMenuItem v-for="item in mainNavItems" :key="item.title">
- <SidebarMenuButton
- as-child
- :tooltip="item.title"
- :is-active="isActive(item.href as string)"
- >
- <Link :href="item.href">
- <component v-if="item.icon" :is="item.icon" />
- <span>{{ item.title }}</span>
- </Link>
- </SidebarMenuButton>
- </SidebarMenuItem>
- </SidebarMenu>
- </SidebarGroupContent>
- </SidebarGroup>
- </SidebarContent>
-
- <SidebarFooter>
- <SidebarMenu>
- <SidebarMenuItem>
- <DropdownMenu>
- <DropdownMenuTrigger as-child>
- <SidebarMenuButton
- size="lg"
- class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
- >
- <Avatar class="h-8 w-8 rounded-lg">
- <AvatarImage v-if="auth.user.avatar?.url" :src="auth.user.avatar?.url" :alt="auth.user.name" />
- <AvatarFallback class="rounded-lg">
+ <SidebarMenuButton size="lg"
+ class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground">
+ <Avatar class="h-9 w-9 rounded-full shrink-0">
+ <AvatarImage v-if="auth.user.avatar?.url" :src="auth.user.avatar?.url"
+ :alt="auth.user.name" />
+ <AvatarFallback class="rounded-full text-xs">
{{ getInitials(auth.user.name) }}
</AvatarFallback>
</Avatar>
<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 class="truncate text-xs text-muted-foreground">{{ currentWorkspace?.name ||
+ 'Select workspace' }}</span>
</div>
- <ChevronsUpDown class="ml-auto size-4" />
+ <IconSelector class="ml-auto size-4" />
</SidebarMenuButton>
</DropdownMenuTrigger>
- <DropdownMenuContent
- class="w-[--reka-dropdown-menu-trigger-width] min-w-56 rounded-lg"
- side="bottom"
- align="end"
- :side-offset="4"
- >
+ <DropdownMenuContent class="w-[--reka-dropdown-menu-trigger-width] min-w-56 rounded-lg"
+ align="start" side="bottom" :side-offset="4">
+ <!-- User Info -->
<DropdownMenuLabel class="p-0 font-normal">
- <div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
- <Avatar class="h-8 w-8 rounded-lg">
- <AvatarImage v-if="auth.user.avatar?.url" :src="auth.user.avatar?.url" :alt="auth.user.name" />
- <AvatarFallback class="rounded-lg">
+ <div class="flex items-center gap-2 px-2 py-2 text-left text-sm">
+ <Avatar class="h-8 w-8 rounded-full">
+ <AvatarImage v-if="auth.user.avatar?.url" :src="auth.user.avatar?.url"
+ :alt="auth.user.name" />
+ <AvatarFallback class="rounded-full">
{{ getInitials(auth.user.name) }}
</AvatarFallback>
</Avatar>
<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 class="truncate text-xs text-muted-foreground">{{ auth.user.email
+ }}</span>
</div>
</div>
</DropdownMenuLabel>
<DropdownMenuSeparator />
+
+ <!-- Workspaces -->
+ <DropdownMenuSub>
+ <DropdownMenuSubTrigger>
+ <img v-if="currentWorkspace?.logo.url" :src="currentWorkspace.logo.url"
+ :alt="currentWorkspace.name" class="mr-2 size-4 rounded-full object-cover" />
+ <span>Workspace: {{ currentWorkspace?.name || 'Select' }}</span>
+ </DropdownMenuSubTrigger>
+ <DropdownMenuPortal>
+ <DropdownMenuSubContent>
+ <DropdownMenuRadioGroup :model-value="currentWorkspace?.id"
+ @update:model-value="(id: string) => switchWorkspace(workspaces.find(w => w.id === id)!)">
+ <DropdownMenuRadioItem v-for="workspace in workspaces" :key="workspace.id"
+ :value="workspace.id">
+ <img :src="workspace.logo.url" :alt="workspace.name"
+ class="mr-2 size-4 rounded-full object-cover" />
+ <span>{{ workspace.name }}</span>
+ </DropdownMenuRadioItem>
+ </DropdownMenuRadioGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem class="cursor-pointer gap-2" @click="createWorkspace">
+ <IconPlus class="size-4" />
+ <span>Create workspace</span>
+ </DropdownMenuItem>
+ </DropdownMenuSubContent>
+ </DropdownMenuPortal>
+ </DropdownMenuSub>
+
+ <DropdownMenuSeparator />
+
+ <!-- Theme -->
+ <DropdownMenuSub>
+ <DropdownMenuSubTrigger>
+ <IconSun v-if="appearance === 'light'" class="mr-2 size-4" />
+ <IconMoon v-else-if="appearance === 'dark'" class="mr-2 size-4" />
+ <IconDeviceDesktop v-else class="mr-2 size-4" />
+ <span>Theme: {{ themeLabels[appearance] }}</span>
+ </DropdownMenuSubTrigger>
+ <DropdownMenuPortal>
+ <DropdownMenuSubContent>
+ <DropdownMenuRadioGroup :model-value="appearance"
+ @update:model-value="updateAppearance">
+ <DropdownMenuRadioItem value="light">
+ <IconSun class="mr-2 size-4" />
+ <span>Light</span>
+ </DropdownMenuRadioItem>
+ <DropdownMenuRadioItem value="dark">
+ <IconMoon class="mr-2 size-4" />
+ <span>Dark</span>
+ </DropdownMenuRadioItem>
+ <DropdownMenuRadioItem value="system">
+ <IconDeviceDesktop class="mr-2 size-4" />
+ <span>System</span>
+ </DropdownMenuRadioItem>
+ </DropdownMenuRadioGroup>
+ </DropdownMenuSubContent>
+ </DropdownMenuPortal>
+ </DropdownMenuSub>
+
+ <DropdownMenuSeparator />
+
+ <!-- User Actions -->
<DropdownMenuGroup>
<DropdownMenuItem as-child>
<Link class="cursor-pointer" :href="editProfile()">
- <Settings class="mr-2 size-4" />
- Settings
+ <IconUser class="mr-2 size-4" />
+ Profile
</Link>
</DropdownMenuItem>
</DropdownMenuGroup>
+
<DropdownMenuSeparator />
+
+
<DropdownMenuItem as-child>
- <Link
- class="cursor-pointer"
- :href="logout()"
- @click="handleLogout"
- as="button"
- >
- <LogOut class="mr-2 size-4" />
+ <Link class="w-full cursor-pointer" :href="logout()" @click="handleLogout" as="button">
+ <IconLogout class="mr-2 size-4" />
Log out
</Link>
</DropdownMenuItem>
@@ -246,8 +297,71 @@ function handleLogout() {
</DropdownMenu>
</SidebarMenuItem>
</SidebarMenu>
- </SidebarFooter>
+ </SidebarHeader>
+
+ <SidebarContent>
+ <!-- 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>
+ </Link>
+ </div>
+
+ <SidebarGroup v-if="currentWorkspace">
+ <SidebarGroupLabel>Posts</SidebarGroupLabel>
+ <SidebarGroupContent>
+ <SidebarMenu>
+ <SidebarMenuItem v-for="item in postsNavItems" :key="item.title">
+ <SidebarMenuButton as-child :tooltip="item.title"
+ :is-active="isActive(item.href as string)">
+ <Link :href="item.href">
+ <component v-if="item.icon" :is="item.icon" />
+ <span>{{ item.title }}</span>
+ </Link>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ </SidebarMenu>
+ </SidebarGroupContent>
+ </SidebarGroup>
+
+ <SidebarGroup v-if="currentWorkspace">
+ <SidebarGroupLabel>Configuration</SidebarGroupLabel>
+ <SidebarGroupContent>
+ <SidebarMenu>
+ <SidebarMenuItem v-for="item in configNavItems" :key="item.title">
+ <SidebarMenuButton as-child :tooltip="item.title"
+ :is-active="isActive(item.href as string)">
+ <Link :href="item.href">
+ <component v-if="item.icon" :is="item.icon" />
+ <span>{{ item.title }}</span>
+ </Link>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ </SidebarMenu>
+ </SidebarGroupContent>
+ </SidebarGroup>
+
+ <SidebarGroup v-if="currentWorkspace">
+ <SidebarGroupLabel>Support</SidebarGroupLabel>
+ <SidebarGroupContent>
+ <SidebarMenu>
+ <SidebarMenuItem v-for="item in supportNavItems" :key="item.title">
+ <SidebarMenuButton as-child :tooltip="item.title">
+ <a :href="item.href"
+ :target="(item.href as string).startsWith('http') ? '_blank' : undefined">
+ <component v-if="item.icon" :is="item.icon" />
+ <span>{{ item.title }}</span>
+ </a>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ </SidebarMenu>
+ </SidebarGroupContent>
+ </SidebarGroup>
+ </SidebarContent>
<SidebarRail />
</Sidebar>
-</template>
+</template>
\ No newline at end of file
diff --git a/resources/js/components/AppearanceTabs.vue b/resources/js/components/AppearanceTabs.vue
deleted file mode 100644
index be26479cd..000000000
--- a/resources/js/components/AppearanceTabs.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<script setup lang="ts">
-import { Monitor, Moon, Sun } from 'lucide-vue-next';
-
-import { useAppearance } from '@/composables/useAppearance';
-
-const { appearance, updateAppearance } = useAppearance();
-
-const tabs = [
- { value: 'light', Icon: Sun, label: 'Light' },
- { value: 'dark', Icon: Moon, label: 'Dark' },
- { value: 'system', Icon: Monitor, label: 'System' },
-] as const;
-</script>
-
-<template>
- <div
- class="inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800"
- >
- <button
- v-for="{ value, Icon, label } in tabs"
- :key="value"
- @click="updateAppearance(value)"
- :class="[
- 'flex items-center rounded-md px-3.5 py-1.5 transition-colors',
- appearance === value
- ? 'bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100'
- : 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60',
- ]"
- >
- <component :is="Icon" class="-ml-1 h-4 w-4" />
- <span class="ml-1.5 text-sm">{{ label }}</span>
- </button>
- </div>
-</template>
diff --git a/resources/js/layouts/settings/Layout.vue b/resources/js/layouts/settings/Layout.vue
index 26ba51c38..0d387c2a6 100644
--- a/resources/js/layouts/settings/Layout.vue
+++ b/resources/js/layouts/settings/Layout.vue
@@ -6,7 +6,6 @@ import Heading from '@/components/Heading.vue';
import { useActiveUrl } from '@/composables/useActiveUrl';
import { toUrl } from '@/lib/utils';
import { members } from '@/routes';
-import { edit as editAppearance } from '@/routes/appearance';
import { index as billing } from '@/routes/billing';
import { edit as editProfile } from '@/routes/profile';
import { edit as editPassword } from '@/routes/user-password';
@@ -14,6 +13,8 @@ import { settings as workspaceSettings } from '@/routes/workspace';
import { type NavItem, type SharedData } from '@/types';
const page = usePage<SharedData>();
+const auth = computed(() => page.props.auth);
+const canManageWorkspace = computed(() => auth.value.role !== 'member');
const navItems = computed<NavItem[]>(() => {
const items: NavItem[] = [
@@ -25,25 +26,26 @@ const navItems = computed<NavItem[]>(() => {
title: 'Password',
href: editPassword(),
},
- {
- title: 'Appearance',
- href: editAppearance(),
- },
- {
- title: 'Workspace',
- href: workspaceSettings(),
- },
- {
- title: 'Members',
- href: members(),
- },
];
- if (!page.props.selfHosted) {
- items.push({
- title: 'Billing',
- href: billing(),
- });
+ if (canManageWorkspace.value) {
+ items.push(
+ {
+ title: 'Workspace',
+ href: workspaceSettings(),
+ },
+ {
+ title: 'Members',
+ href: members(),
+ },
+ );
+
+ if (!page.props.selfHosted) {
+ items.push({
+ title: 'Billing',
+ href: billing(),
+ });
+ }
}
return items;
diff --git a/resources/js/pages/auth/Login.vue b/resources/js/pages/auth/Login.vue
index ac3bc6457..4b385665a 100644
--- a/resources/js/pages/auth/Login.vue
+++ b/resources/js/pages/auth/Login.vue
@@ -15,72 +15,40 @@ import { request } from '@/routes/password';
defineProps<{
status?: string;
- canResetPassword: boolean;
- canRegister: boolean;
email?: string | null;
redirect?: string | null;
}>();
</script>
<template>
- <AuthBase
- title="Log in to your account"
- description="Enter your email and password below to log in"
- >
+ <AuthBase title="Log in to your account" description="Enter your email and password below to log in">
+
<Head title="Log in" />
- <div
- v-if="status"
- class="mb-4 text-center text-sm font-medium text-green-600"
- >
+ <div v-if="status" class="mb-4 text-center text-sm font-medium text-green-600">
{{ status }}
</div>
- <Form
- v-bind="store.form()"
- :reset-on-success="['password']"
- v-slot="{ errors, processing }"
- class="flex flex-col gap-6"
- >
+ <Form v-bind="store.form()" :reset-on-success="['password']" v-slot="{ errors, processing }"
+ class="flex flex-col gap-6">
<input v-if="redirect" type="hidden" name="redirect" :value="redirect" />
<div class="grid gap-6">
<div class="grid gap-2">
<Label for="email">Email address</Label>
- <Input
- id="email"
- type="email"
- name="email"
- required
- autofocus
- :tabindex="1"
- autocomplete="email"
- placeholder="[email protected]"
- :default-value="email ?? ''"
- />
+ <Input id="email" type="email" name="email" required autofocus :tabindex="1" autocomplete="email"
+ placeholder="[email protected]" :default-value="email ?? ''" />
<InputError :message="errors.email" />
</div>
<div class="grid gap-2">
<div class="flex items-center justify-between">
<Label for="password">Password</Label>
- <TextLink
- v-if="canResetPassword"
- :href="request()"
- class="text-sm"
- :tabindex="5"
- >
+ <TextLink :href="request()" class="text-sm" :tabindex="5">
Forgot password?
</TextLink>
</div>
- <Input
- id="password"
- type="password"
- name="password"
- required
- :tabindex="2"
- autocomplete="current-password"
- placeholder="Password"
- />
+ <Input id="password" type="password" name="password" required :tabindex="2"
+ autocomplete="current-password" placeholder="Password" />
<InputError :message="errors.password" />
</div>
@@ -91,25 +59,16 @@ defineProps<{
</Label>
</div>
- <Button
- type="submit"
- class="mt-4 w-full"
- :tabindex="4"
- :disabled="processing"
- data-test="login-button"
- >
+ <Button type="submit" class="mt-4 w-full" :tabindex="4" :disabled="processing" data-test="login-button">
<Spinner v-if="processing" />
Log in
</Button>
</div>
- <div
- class="text-center text-sm text-muted-foreground"
- v-if="canRegister"
- >
+ <div class="text-center text-sm text-muted-foreground">
Don't have an account?
<TextLink :href="register()" :tabindex="5">Sign up</TextLink>
</div>
</Form>
</AuthBase>
-</template>
+</template>
\ No newline at end of file
diff --git a/resources/js/pages/posts/Index.vue b/resources/js/pages/posts/Index.vue
index c0c0be227..299224555 100644
--- a/resources/js/pages/posts/Index.vue
+++ b/resources/js/pages/posts/Index.vue
@@ -1,14 +1,16 @@
<script setup lang="ts">
-import { Head, Link, router } from '@inertiajs/vue3';
-import { Clock, CheckCircle, AlertCircle, Loader2, FileText, Plus, Eye, Pencil, Trash2 } from 'lucide-vue-next';
+import { Head, Link, router, InfiniteScroll } from '@inertiajs/vue3';
+import { IconClock, IconCircleCheck, IconAlertCircle, IconLoader2, IconFileText, IconPlus, IconEye, IconPencil, IconTrash } from '@tabler/icons-vue';
+import { computed } from 'vue';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Card, CardContent } from '@/components/ui/card';
+import { Skeleton } from '@/components/ui/skeleton';
import dayjs from '@/dayjs';
import AppLayout from '@/layouts/AppLayout.vue';
import { calendar } from '@/routes';
-import { index as postsIndex, create as createPost, show as showPost, edit as editPost, destroy as destroyPost } from '@/routes/posts';
+import { index as postsIndex, create as createPost, show as showPost, edit as editPost, destroy as destroyPost } from '@/actions/App/Http/Controllers/PostController';
import { type BreadcrumbItemType } from '@/types';
interface SocialAccount {
@@ -43,21 +45,10 @@ interface Post {
user: User;
}
-interface PaginatedPosts {
+interface ScrollPosts {
data: Post[];
- links: {
- first: string | null;
- last: string | null;
- prev: string | null;
- next: string | null;
- };
meta: {
- current_page: number;
- from: number | null;
- last_page: number;
- per_page: number;
- to: number | null;
- total: number;
+ hasNextPage: boolean;
};
}
@@ -69,11 +60,32 @@ interface Workspace {
interface Props {
workspace: Workspace;
- posts: PaginatedPosts;
+ posts: ScrollPosts;
+ currentStatus: string | null;
}
const props = defineProps<Props>();
+const statusLabels: Record<string, string> = {
+ draft: 'Draft',
+ scheduled: 'Scheduled',
+ published: 'Published',
+};
+
+const pageTitle = computed(() => {
+ if (props.currentStatus && statusLabels[props.currentStatus]) {
+ return `Posts - ${statusLabels[props.currentStatus]}`;
+ }
+ return 'All Posts';
+});
+
+const pageDescription = computed(() => {
+ if (props.currentStatus === 'draft') return 'Posts waiting to be scheduled';
+ if (props.currentStatus === 'scheduled') return 'Posts scheduled for publishing';
+ if (props.currentStatus === 'published') return 'Posts already published';
+ return 'Manage all your posts';
+});
+
const breadcrumbs: BreadcrumbItemType[] = [
{ title: 'Posts', href: postsIndex.url() },
];
@@ -96,13 +108,13 @@ const getPlatformLogo = (platform: string): string => {
};
const getStatusConfig = (status: string) => {
- const configs: Record<string, { label: string; color: string; icon: typeof FileText }> = {
- 'draft': { label: 'Rascunho', color: 'bg-gray-100 text-gray-800', icon: FileText },
- 'scheduled': { label: 'Agendado', color: 'bg-blue-100 text-blue-800', icon: Clock },
- 'publishing': { label: 'Publicando', color: 'bg-yellow-100 text-yellow-800', icon: Loader2 },
- 'published': { label: 'Publicado', color: 'bg-green-100 text-green-800', icon: CheckCircle },
- 'partially_published': { label: 'Parcialmente Publicado', color: 'bg-orange-100 text-orange-800', icon: AlertCircle },
- 'failed': { label: 'Falhou', color: 'bg-red-100 text-red-800', icon: AlertCircle },
+ const configs: Record<string, { label: string; color: string; icon: typeof IconFileText }> = {
+ 'draft': { label: 'Draft', color: 'bg-gray-100 text-gray-800', icon: IconFileText },
+ 'scheduled': { label: 'Scheduled', color: 'bg-blue-100 text-blue-800', icon: IconClock },
+ 'publishing': { label: 'Publishing', color: 'bg-yellow-100 text-yellow-800', icon: IconLoader2 },
+ 'published': { label: 'Published', color: 'bg-green-100 text-green-800', icon: IconCircleCheck },
+ 'partially_published': { label: 'Partially Published', color: 'bg-orange-100 text-orange-800', icon: IconAlertCircle },
+ 'failed': { label: 'Failed', color: 'bg-red-100 text-red-800', icon: IconAlertCircle },
};
return configs[status] || configs['draft'];
};
@@ -118,10 +130,10 @@ const getEnabledPlatforms = (post: Post) => {
const getPostPreview = (post: Post): string => {
const enabledPlatforms = getEnabledPlatforms(post);
- if (enabledPlatforms.length === 0) return 'Sem conteudo';
+ if (enabledPlatforms.length === 0) return 'No content';
const firstPlatform = enabledPlatforms[0];
const content = firstPlatform.content || '';
- return content.length > 100 ? content.substring(0, 100) + '...' : content || 'Sem conteudo';
+ return content.length > 100 ? content.substring(0, 100) + '...' : content || 'No content';
};
const canEdit = (post: Post): boolean => {
@@ -129,35 +141,35 @@ const canEdit = (post: Post): boolean => {
};
const handleDelete = (post: Post) => {
- if (confirm('Tem certeza que deseja excluir este post?')) {
+ if (confirm('Are you sure you want to delete this post?')) {
router.delete(destroyPost.url(post.id));
}
};
</script>
<template>
- <Head title="Posts" />
+ <Head :title="pageTitle" />
<AppLayout :breadcrumbs="breadcrumbs">
<div class="flex flex-col gap-6 p-6">
<div class="flex items-center justify-between">
<div>
- <h1 class="text-2xl font-bold tracking-tight">Posts</h1>
+ <h1 class="text-2xl font-bold tracking-tight">{{ pageTitle }}</h1>
<p class="text-muted-foreground">
- Gerencie todos os seus posts
+ {{ pageDescription }}
</p>
</div>
<div class="flex gap-2">
<Link :href="calendar.url()">
<Button variant="outline">
- <Clock class="mr-2 h-4 w-4" />
- Calendario
+ <IconClock class="mr-2 h-4 w-4" />
+ Calendar
</Button>
</Link>
<Link :href="createPost.url()">
<Button>
- <Plus class="mr-2 h-4 w-4" />
- Novo Post
+ <IconPlus class="mr-2 h-4 w-4" />
+ New Post
</Button>
</Link>
</div>
@@ -166,15 +178,15 @@ const handleDelete = (post: Post) => {
<div v-if="posts.data.length === 0">
<Card>
<CardContent class="flex flex-col items-center justify-center py-12">
- <FileText class="h-12 w-12 text-muted-foreground" />
- <h3 class="mt-4 text-lg font-semibold">Nenhum post ainda</h3>
+ <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">
- Comece criando seu primeiro post.
+ {{ currentStatus ? `No ${currentStatus} posts yet.` : 'Start by creating your first post.' }}
</p>
- <Link :href="createPost.url()" class="mt-4">
+ <Link v-if="!currentStatus" :href="createPost.url()" class="mt-4">
<Button>
- <Plus class="mr-2 h-4 w-4" />
- Criar Post
+ <IconPlus class="mr-2 h-4 w-4" />
+ Create Post
</Button>
</Link>
</CardContent>
@@ -214,7 +226,7 @@ const handleDelete = (post: Post) => {
+{{ getEnabledPlatforms(post).length - 5 }}
</span>
<span class="text-xs text-muted-foreground ml-2">
- por {{ post.user.name }}
+ by {{ post.user.name }}
</span>
</div>
</div>
@@ -222,12 +234,12 @@ const handleDelete = (post: Post) => {
<div class="flex items-center gap-1">
<Link :href="showPost.url(post.id)">
<Button variant="ghost" size="icon">
- <Eye class="h-4 w-4" />
+ <IconEye class="h-4 w-4" />
</Button>
</Link>
<Link v-if="canEdit(post)" :href="editPost.url(post.id)">
<Button variant="ghost" size="icon">
- <Pencil class="h-4 w-4" />
+ <IconPencil class="h-4 w-4" />
</Button>
</Link>
<Button
@@ -236,38 +248,40 @@ const handleDelete = (post: Post) => {
size="icon"
@click="handleDelete(post)"
>
- <Trash2 class="h-4 w-4 text-red-500" />
+ <IconTrash class="h-4 w-4 text-red-500" />
</Button>
</div>
</div>
</CardContent>
</Card>
- <div v-if="posts.meta.last_page > 1" class="flex items-center justify-between">
- <p class="text-sm text-muted-foreground">
- Mostrando {{ posts.meta.from }} a {{ posts.meta.to }} de {{ posts.meta.total }} posts
- </p>
- <div class="flex gap-2">
- <Link
- v-if="posts.links.prev"
- :href="posts.links.prev"
- preserve-scroll
- >
- <Button variant="outline" size="sm">
- Anterior
- </Button>
- </Link>
- <Link
- v-if="posts.links.next"
- :href="posts.links.next"
- preserve-scroll
- >
- <Button variant="outline" size="sm">
- Proximo
- </Button>
- </Link>
+ <InfiniteScroll data="posts" #default="{ loading }">
+ <div v-if="loading" class="space-y-4">
+ <Card v-for="i in 3" :key="i">
+ <CardContent class="p-4">
+ <div class="flex items-start gap-4">
+ <div class="flex-1 space-y-3">
+ <div class="flex items-center gap-2">
+ <Skeleton class="h-5 w-20" />
+ <Skeleton class="h-4 w-32" />
+ </div>
+ <Skeleton class="h-4 w-full" />
+ <Skeleton class="h-4 w-3/4" />
+ <div class="flex items-center gap-2">
+ <Skeleton class="h-6 w-6 rounded-full" />
+ <Skeleton class="h-6 w-6 rounded-full" />
+ <Skeleton class="h-4 w-24" />
+ </div>
+ </div>
+ <div class="flex gap-1">
+ <Skeleton class="h-8 w-8" />
+ <Skeleton class="h-8 w-8" />
+ </div>
+ </div>
+ </CardContent>
+ </Card>
</div>
- </div>
+ </InfiniteScroll>
</div>
</div>
</AppLayout>
diff --git a/resources/js/pages/settings/Appearance.vue b/resources/js/pages/settings/Appearance.vue
deleted file mode 100644
index a9f58e88b..000000000
--- a/resources/js/pages/settings/Appearance.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-<script setup lang="ts">
-import { Head } from '@inertiajs/vue3';
-
-import AppearanceTabs from '@/components/AppearanceTabs.vue';
-import HeadingSmall from '@/components/HeadingSmall.vue';
-import AppLayout from '@/layouts/AppLayout.vue';
-import SettingsLayout from '@/layouts/settings/Layout.vue';
-import { edit } from '@/routes/appearance';
-import { type BreadcrumbItem } from '@/types';
-
-const breadcrumbItems: BreadcrumbItem[] = [
- {
- title: 'Appearance settings',
- href: edit().url,
- },
-];
-</script>
-
-<template>
- <AppLayout :breadcrumbs="breadcrumbItems">
- <Head title="Appearance settings" />
-
- <h1 class="sr-only">Appearance Settings</h1>
-
- <SettingsLayout>
- <div class="space-y-6">
- <HeadingSmall
- title="Appearance settings"
- description="Update your account's appearance settings"
- />
- <AppearanceTabs />
- </div>
- </SettingsLayout>
- </AppLayout>
-</template>
diff --git a/resources/js/pages/settings/Profile.vue b/resources/js/pages/settings/Profile.vue
index 854bf45cd..6e5ed063e 100644
--- a/resources/js/pages/settings/Profile.vue
+++ b/resources/js/pages/settings/Profile.vue
@@ -65,7 +65,7 @@ const breadcrumbItems: BreadcrumbItem[] = [
:photo="user.avatar"
collection="avatar"
:reload-only="['auth']"
- rounded="lg"
+ rounded="full"
/>
</div>
diff --git a/resources/js/pages/settings/Workspace.vue b/resources/js/pages/settings/Workspace.vue
index f0fa6a29e..b58ccc476 100644
--- a/resources/js/pages/settings/Workspace.vue
+++ b/resources/js/pages/settings/Workspace.vue
@@ -69,6 +69,7 @@ const submit = () => {
:photo="workspace.logo"
collection="logo"
:reload-only="['workspace']"
+ rounded="full"
/>
</div>
diff --git a/resources/js/types/index.d.ts b/resources/js/types/index.d.ts
index 8b3ea5a31..cfed513e9 100644
--- a/resources/js/types/index.d.ts
+++ b/resources/js/types/index.d.ts
@@ -3,6 +3,7 @@ import type { LucideIcon } from 'lucide-vue-next';
export interface Auth {
user: User;
+ role: 'owner' | 'admin' | 'member' | null;
}
export interface BreadcrumbItem {
diff --git a/routes/settings.php b/routes/settings.php
index b5f39cee3..2357d82a2 100644
--- a/routes/settings.php
+++ b/routes/settings.php
@@ -18,8 +18,4 @@ Route::middleware(['auth', 'verified'])->group(function () {
Route::put('settings/password', [PasswordController::class, 'update'])
->middleware('throttle:6,1')
->name('user-password.update');
-
- Route::get('settings/appearance', function () {
- return Inertia::render('settings/Appearance');
- })->name('appearance.edit');
});
diff --git a/routes/web.php b/routes/web.php
index ce7307ea1..e1464fce6 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -109,8 +109,8 @@ Route::middleware(['auth', 'verified', 'subscribed', EnsureUserSetupIsComplete::
Route::get('calendar', [PostController::class, 'calendar'])->name('calendar');
// Posts
- Route::get('posts', [PostController::class, 'index'])->name('posts.index');
Route::get('posts/create', [PostController::class, 'create'])->name('posts.create');
+ Route::get('posts/{status?}', [PostController::class, 'index'])->name('posts.index')->where('status', 'draft|scheduled|published');
Route::post('posts', [PostController::class, 'store'])->name('posts.store');
Route::get('posts/{post}', [PostController::class, 'show'])->name('posts.show');
Route::get('posts/{post}/edit', [PostController::class, 'edit'])->name('posts.edit');