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.

fix(sidebar): open the workspace menu to the side on desktop with a matching icon

Paulo Castellanof63286efd4b8
diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue
index 24a33ad4c..3f3163341 100644
--- a/resources/js/components/AppSidebar.vue
+++ b/resources/js/components/AppSidebar.vue
@@ -17,6 +17,7 @@ import {
IconPhoto,
IconPencil,
IconPlus,
+ IconSelector,
IconSettings,
IconTag,
} from '@tabler/icons-vue';
@@ -45,6 +46,7 @@ import {
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
+ useSidebar,
} from '@/components/ui/sidebar';
import { useActiveUrl } from '@/composables/useActiveUrl';
import { useWorkspaceRole } from '@/composables/useWorkspaceRole';
@@ -70,6 +72,10 @@ const subscriptionPastDue = computed<boolean>(() => Boolean(page.props.auth.subs
const { canCreatePost, canManageAccounts, canManageAutomations, canCreateWorkspace } = useWorkspaceRole();
+// Open the workspace menu to the side on desktop (like the user menu) but keep
+// it below the trigger on mobile, where the sidebar is an overlay sheet.
+const { isMobile } = useSidebar();
+
const mainNavItems = computed<NavItem[]>(() => [
{
title: trans('sidebar.posts.calendar'),
@@ -196,11 +202,11 @@ const handleCreateWorkspace = () => {
{{ currentWorkspace?.name ?? $t('sidebar.select_workspace') }}
</span>
</div>
- <IconChevronRight class="ml-auto size-4" />
+ <component :is="isMobile ? IconSelector : IconChevronRight" class="ml-auto size-4" />
</SidebarMenuButton>
</DropdownMenuTrigger>
<DropdownMenuContent class="w-(--reka-dropdown-menu-trigger-width) min-w-56"
- align="start" side="bottom" :side-offset="4">
+ align="start" :side="isMobile ? 'bottom' : 'right'" :side-offset="4">
<DropdownMenuLabel>
{{ $t('sidebar.workspaces') }}
</DropdownMenuLabel>
diff --git a/resources/js/components/NavUser.vue b/resources/js/components/NavUser.vue
index 349b273a2..8253dbf42 100644
--- a/resources/js/components/NavUser.vue
+++ b/resources/js/components/NavUser.vue
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { usePage } from '@inertiajs/vue3';
-import { IconChevronRight } from '@tabler/icons-vue';
+import { IconChevronRight, IconSelector } from '@tabler/icons-vue';
import { computed } from 'vue';
import NotificationBell from '@/components/NotificationBell.vue';
@@ -38,7 +38,7 @@ const { isMobile } = useSidebar();
data-test="sidebar-menu-button"
>
<UserInfo :user="user" />
- <IconChevronRight class="ml-auto size-4" />
+ <component :is="isMobile ? IconSelector : IconChevronRight" class="ml-auto size-4" />
</SidebarMenuButton>
</DropdownMenuTrigger>
<DropdownMenuContent