File tree Expand file tree Collapse file tree 3 files changed +25
-14
lines changed
Expand file tree Collapse file tree 3 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 ArrowLeftOnRectangleIcon ,
1515 ChatBubbleLeftRightIcon ,
1616} from ' @heroicons/vue/24/solid' ;
17+ import { openFeedback } from ' @/utils/feedback' ;
1718
1819const page = usePage <{
1920 has_services_extension? : boolean ;
@@ -34,16 +35,6 @@ const page = usePage<{
3435const logout = () => {
3536 router .post (route (' logout' ));
3637};
37-
38- const openFeedback = () => {
39- if (
40- typeof window !== ' undefined' &&
41- ' showChatWindow' in window &&
42- typeof window .showChatWindow === ' function'
43- ) {
44- window .showChatWindow ();
45- }
46- };
4738 </script >
4839<template >
4940 <div class =" relative" >
@@ -53,7 +44,7 @@ const openFeedback = () => {
5344 as-child >
5445 <button data-testid =" current_user_button" >
5546 <img
56- class =" h-8 w-8 rounded-full object-cover"
47+ class =" h-7 w-7 rounded-full object-cover"
5748 :src =" page.props.auth.user.profile_photo_url"
5849 :alt =" page.props.auth.user.name" />
5950 </button >
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ import { api } from '@/packages/api/src';
4747import { getCurrentOrganizationId } from ' @/utils/useUser' ;
4848import LoadingSpinner from ' @/packages/ui/src/LoadingSpinner.vue' ;
4949import { twMerge } from ' tailwind-merge' ;
50+ import Button from ' @/Components/ui/button/Button.vue' ;
51+ import { openFeedback } from ' @/utils/feedback' ;
5052
5153defineProps ({
5254 title: String ,
@@ -94,8 +96,8 @@ onMounted(async () => {
9496 }, 100 );
9597 };
9698});
97-
9899const page = usePage <{
100+ has_services_extension? : boolean ;
99101 auth: {
100102 user: User ;
101103 };
@@ -242,14 +244,23 @@ const page = usePage<{
242244 <div class =" justify-self-end" >
243245 <UpdateSidebarNotification ></UpdateSidebarNotification >
244246 <ul
245- class =" border-t border-default-background-separator pt-3 flex justify-between pr-4 items-center" >
247+ class =" border-t border-default-background-separator pt-3 gap-1 pr-2 flex justify-between items-center" >
248+ <UserSettingsIcon ></UserSettingsIcon >
249+
246250 <NavigationSidebarItem
247251 class =" flex-1"
248252 title =" Profile Settings"
249253 :icon =" Cog6ToothIcon"
250254 :href =" route('profile.show')" ></NavigationSidebarItem >
251255
252- <UserSettingsIcon ></UserSettingsIcon >
256+ <Button
257+ v-if =" page.props.has_services_extension"
258+ variant =" outline"
259+ size =" xs"
260+ class =" rounded-full ml-2 flex h-6 w-6 items-center text-xs text-icon-default justify-center"
261+ @click =" openFeedback" >
262+ ?
263+ </Button >
253264 </ul >
254265 </div >
255266 </div >
Original file line number Diff line number Diff line change 1+ export function openFeedback ( ) : void {
2+ if (
3+ typeof window !== 'undefined' &&
4+ 'showChatWindow' in window &&
5+ typeof window . showChatWindow === 'function'
6+ ) {
7+ window . showChatWindow ( ) ;
8+ }
9+ }
You can’t perform that action at this time.
0 commit comments