Skip to content

Commit 5b9dbb6

Browse files
committed
Update logout button text and refactor navbar for improved styling and functionality
1 parent 23b2139 commit 5b9dbb6

File tree

2 files changed

+44
-19
lines changed

2 files changed

+44
-19
lines changed

resources/js/Components/Modals/DynamicMenuModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const handleLogout = () => {
202202
arrow_forward
203203
</span>
204204
</button>
205-
<div>Log out</div>
205+
<div>Sign out</div>
206206
</div>
207207
</form>
208208
</div>

resources/js/Components/Navbars/LoggedInNavbar.vue

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SlideOverPrimaryMenu from "@/Components/Sidebars/SlideOverPrimaryMenu.vue
44
import { onMounted, ref } from "vue";
55
import SearchAnythingModal from "@/Components/Modals/SearchAnythingModal.vue";
66
import ThumbnailSmallImageSlider from "@/Components/ImageSliders/ThumbnailSmallImageSlider.vue";
7-
import { usePage } from "@inertiajs/vue3";
7+
import { router } from "@inertiajs/vue3";
88
99
import DynamicMenuModal from "@/Components/Modals/DynamicMenuModal.vue";
1010
@@ -79,6 +79,10 @@ const goToHome = function () {
7979
}
8080
};
8181
82+
const handleLogout = () => {
83+
router.post(route("logout"));
84+
};
85+
8286
onMounted(() => {
8387
appFrontendUrl.value = import.meta.env.VITE_FRONTEND_APP_URL;
8488
});
@@ -107,7 +111,7 @@ onMounted(() => {
107111
</DynamicMenuModal>
108112
<!-- search anything - start -->
109113

110-
<div class="flex flex-1">
114+
<div class="flex flex-1 border-r border-myPrimaryLightMediumGrayColor">
111115
<div class="ml-4 flex items-center md:ml-6 gap-8">
112116
<form class="w-full flex md:ml-0" @submit.prevent>
113117
<div
@@ -133,19 +137,20 @@ onMounted(() => {
133137
</div>
134138
</div>
135139
<!-- search anything - end -->
136-
<header class="w-6/1 text-sm">
140+
<header class="w-6/1 text-sm flex justify-between overflow-x-auto">
137141
<nav
138-
class="mx-auto flex gap-4 max-w-7xl items-center justify-end px-6 lg:px-8"
142+
class="mx-auto flex gap-4 max-w-7xl items-center justify-end px-6 lg:px-8 mt-2"
139143
aria-label="Global"
140144
>
141-
<button @click="goToHome" type="button">
142-
<div
143-
class="h-10 w-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white hover:fill-white focus-visible:ring-0 text-myPrimaryDarkGrayColor"
144-
>
145-
<span class="myMediumIcon material-symbols-outlined">
146-
home
147-
</span>
148-
</div>
145+
<button
146+
@click="goToHome"
147+
type="button"
148+
class="myPrimaryMenuTextButton text-[12.5px] gap-2 text-nowrap pl-2 pr-3 w-full h-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
149+
>
150+
<span class="myMediumIcon material-symbols-outlined">
151+
home
152+
</span>
153+
<span> Start </span>
149154
</button>
150155

151156
<button
@@ -156,7 +161,7 @@ onMounted(() => {
156161
"
157162
type="button"
158163
@click="handleMenuUserTeamModal"
159-
class="h-10 w-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
164+
class="flex justify-center items-center py-0.5 border-2 border-myPrimaryLinkColor hover:bg-myPrimaryLinkColor hover:bg-opacity-10 myPrimaryMenuTextButton text-[12.5px] gap-2 text-nowrap pl-2 pr-3"
160165
>
161166
<div class="h-10 w-10 flex-shrink-0">
162167
<ThumbnailSmallImageSlider
@@ -167,6 +172,7 @@ onMounted(() => {
167172
:roundedFull="true"
168173
></ThumbnailSmallImageSlider>
169174
</div>
175+
<span> Account </span>
170176
</button>
171177
<button
172178
v-if="
@@ -176,24 +182,43 @@ onMounted(() => {
176182
"
177183
@click="handleMenuUserTeamModal"
178184
type="button"
179-
class="h-10 w-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
185+
class="flex justify-center items-center py-0.5 border-2 border-myPrimaryLinkColor hover:bg-myPrimaryLinkColor hover:bg-opacity-10 myPrimaryMenuTextButton text-[12.5px] gap-2 text-nowrap pl-2 pr-3"
180186
>
181-
<span class="myMediumIcon material-symbols-outlined">
182-
person
183-
</span>
187+
<div
188+
class="h-10 min-h-10 max-h-10 w-10 min-w-10 max-w-10 flex justify-center items-center mx-4"
189+
>
190+
<span class="myMediumIcon material-symbols-outlined">
191+
person
192+
</span>
193+
<span> Account </span>
194+
</div>
184195
</button>
185196

186197
<button
187198
@click="handleNotificationsSlideOver"
188199
type="button"
189-
class="h-10 w-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 aspect-square hover:bg-myPrimaryLinkColor hover:text-white hover:fill-white focus-visible:ring-0 text-myPrimaryDarkGrayColor"
200+
class="myPrimaryMenuTextButton text-[12.5px] gap-2 text-nowrap pl-2 pr-3 w-full h-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
190201
>
191202
<span class="sr-only">View notifications</span>
192203
<span class="myMediumIcon material-symbols-outlined">
193204
notifications
194205
</span>
206+
<span> Notifications </span>
195207
</button>
196208

209+
<form @submit.prevent="handleLogout">
210+
<button
211+
@click="handleLogout"
212+
type="button"
213+
class="myPrimaryMenuTextButton text-[12.5px] gap-2 text-nowrap pl-2 pr-3 w-full h-10 cursor-pointer rounded-full flex items-center border-none justify-center bg-gray-50 hover:bg-myPrimaryLinkColor hover:text-white focus-visible:ring-0"
214+
>
215+
<span class="myMediumIcon material-symbols-outlined">
216+
arrow_forward
217+
</span>
218+
<span> Sign out </span>
219+
</button>
220+
</form>
221+
197222
<button
198223
@click="handlePrimaryMenuSlideOver"
199224
type="button"

0 commit comments

Comments
 (0)