Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions resources/js/components/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
IconPhoto,
IconPencil,
IconPlus,
IconSettings,
IconTag,
} from '@tabler/icons-vue';
import { trans } from 'laravel-vue-i18n';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -172,8 +170,6 @@ const switchWorkspace = (workspaceId: string) => {
});
};

const { urlIsActive } = useActiveUrl();

const handleCreateWorkspace = () => {
router.visit(createWorkspaceRoute.url());
};
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 8 additions & 0 deletions resources/js/components/UserMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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" />
Expand Down