Skip to content
Open
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
23 changes: 22 additions & 1 deletion src/layout/AppTopbar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<script setup>
import { useLayout } from '@/layout/composables/layout';
import Menu from 'primevue/menu';
import { ref } from 'vue';
import AppConfigurator from './AppConfigurator.vue';

const profileMenu = ref(null); // Corrected ref name
const profileMenuItems = ref([
{ label: 'Profile', icon: 'pi pi-user', command: () => { /* Handle profile action */ } },
{ label: 'Settings', icon: 'pi pi-cog', command: () => { /* Handle settings action */ } },
{ label: 'Calendar', icon: 'pi pi-calendar', command: () => { /* Handle calendar action */ } },
{ label: 'Inbox', icon: 'pi pi-inbox', command: () => { /* Handle inbox action */ } },
{ label: 'Log out', icon: 'pi pi-power-off', command: () => { /* Handle logout action */ } },
]);

const toggleProfileMenu = (event) => {
profileMenu.value.toggle(event);
};

const { toggleMenu, toggleDarkMode, isDarkTheme } = useLayout();
</script>

Expand Down Expand Up @@ -68,10 +83,16 @@ const { toggleMenu, toggleDarkMode, isDarkTheme } = useLayout();
<i class="pi pi-inbox"></i>
<span>Messages</span>
</button>
<button type="button" class="layout-topbar-action">
<button type="button" class="layout-topbar-action notification-button" @click="toggleNotifications">
<span class="w-2 h-2 rounded-full bg-red-500 absolute top-2 right-2.5"></span>
<i class="pi pi-bell"></i>
<span>Notifications</span>
</button>
<button type="button" class="layout-topbar-action" @click="toggleProfileMenu">
<i class="pi pi-user"></i>
<span>Profile</span>
</button>
<Menu ref="profileMenu" :model="profileMenuItems" :popup="true" />
</div>
</div>
</div>
Expand Down