refactor(sidebar): move Settings from the sidebar footer into the user menu

Settings lived on its own fixed row at the bottom of the sidebar. It's a
secondary destination, so it now sits inside the user dropdown (above Profile),
where it groups naturally with Profile / Language / Log out and frees a fixed
row of sidebar space.

- UserMenuContent: Settings item added above Profile.
- AppSidebar: footer Settings block removed, along with the now-unused
  IconSettings, settingsHub and useActiveUrl/urlIsActive.
This commit is contained in:
Paulo Sérgio Dantas 2026-07-01 02:08:05 -03:00
parent bfa018a4cd
commit e5658f7d06
2 changed files with 9 additions and 19 deletions

View file

@ -17,7 +17,6 @@ import {
IconPhoto,
IconPencil,
IconPlus,
IconSettings,
IconTag,
} from '@tabler/icons-vue';
import { trans } from 'laravel-vue-i18n';
@ -46,9 +45,8 @@ import {
SidebarMenuButton,
SidebarMenuItem,
} from '@/components/ui/sidebar';
import { useActiveUrl } from '@/composables/useActiveUrl';
import { useWorkspaceRole } from '@/composables/useWorkspaceRole';
import { accounts, analytics, calendar, settings as settingsHub } from '@/routes/app';
import { accounts, analytics, calendar } from '@/routes/app';
import { index as assets } from '@/routes/app/assets';
import { index as automations } from '@/routes/app/automations';
import { portal } from '@/routes/app/billing';
@ -172,8 +170,6 @@ const switchWorkspace = (workspaceId: string) => {
});
};
const { urlIsActive } = useActiveUrl();
const handleCreateWorkspace = () => {
router.visit(createWorkspaceRoute.url());
};
@ -266,20 +262,6 @@ const handleCreateWorkspace = () => {
{{ $t('billing.past_due_notice.cta') }}
</Button>
</div>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton
as-child
:tooltip="trans('sidebar.settings')"
:is-active="urlIsActive(settingsHub.url())"
>
<Link :href="settingsHub.url()">
<IconSettings />
<span>{{ $t('sidebar.settings') }}</span>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
<NavUser />
</SidebarFooter>
</Sidebar>

View file

@ -3,6 +3,7 @@ import { Link, router, usePage } from '@inertiajs/vue3';
import {
IconLanguage,
IconLogout,
IconSettings,
IconUser,
} from '@tabler/icons-vue';
import { loadLanguageAsync } from 'laravel-vue-i18n';
@ -23,6 +24,7 @@ import UserInfo from '@/components/UserInfo.vue';
import dayjs from '@/dayjs';
import posthog from '@/posthog';
import { logout } from '@/routes';
import { settings as settingsHub } from '@/routes/app';
import { edit } from '@/routes/app/profile';
import type { User } from '@/types';
@ -75,6 +77,12 @@ const handleLogout = () => {
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem :as-child="true">
<Link class="block w-full cursor-pointer" :href="settingsHub.url()" prefetch>
<IconSettings class="size-4" />
{{ $t('sidebar.settings') }}
</Link>
</DropdownMenuItem>
<DropdownMenuItem :as-child="true">
<Link class="block w-full cursor-pointer" :href="edit()" prefetch>
<IconUser class="size-4" />