1
0
forked from test/crm

fix: added docs link in sidebar

This commit is contained in:
Shariq Ansari 2024-03-31 23:34:15 +05:30
parent deac626596
commit 548b1d9489
2 changed files with 30 additions and 16 deletions

View File

@ -76,11 +76,18 @@
</Section> </Section>
</div> </div>
</div> </div>
<div class="m-2 flex flex-col gap-1">
<SidebarLink
label="Docs"
:isCollapsed="isSidebarCollapsed"
icon="book-open"
@click="() => openDocs()"
/>
<SidebarLink <SidebarLink
:label="isSidebarCollapsed ? 'Expand' : 'Collapse'" :label="isSidebarCollapsed ? 'Expand' : 'Collapse'"
:isCollapsed="isSidebarCollapsed" :isCollapsed="isSidebarCollapsed"
@click="isSidebarCollapsed = !isSidebarCollapsed" @click="isSidebarCollapsed = !isSidebarCollapsed"
class="m-2" class=""
> >
<template #icon> <template #icon>
<span class="grid h-5 w-6 flex-shrink-0 place-items-center"> <span class="grid h-5 w-6 flex-shrink-0 place-items-center">
@ -91,6 +98,7 @@
</span> </span>
</template> </template>
</SidebarLink> </SidebarLink>
</div>
<Notifications /> <Notifications />
</div> </div>
</template> </template>
@ -113,6 +121,7 @@ import SidebarLink from '@/components/SidebarLink.vue'
import Notifications from '@/components/Notifications.vue' import Notifications from '@/components/Notifications.vue'
import { viewsStore } from '@/stores/views' import { viewsStore } from '@/stores/views'
import { notificationsStore } from '@/stores/notifications' import { notificationsStore } from '@/stores/notifications'
import { FeatherIcon } from 'frappe-ui'
import { useStorage } from '@vueuse/core' import { useStorage } from '@vueuse/core'
import { computed } from 'vue' import { computed } from 'vue'
@ -222,4 +231,8 @@ function getIcon(routeName) {
return PinIcon return PinIcon
} }
} }
function openDocs() {
window.open('https://docs.frappe.io/crm', '_blank')
}
</script> </script>

View File

@ -12,7 +12,8 @@
<Tooltip :text="label" placement="right"> <Tooltip :text="label" placement="right">
<slot name="icon"> <slot name="icon">
<span class="grid h-5 w-6 flex-shrink-0 place-items-center"> <span class="grid h-5 w-6 flex-shrink-0 place-items-center">
<component :is="icon" class="h-4 w-4 text-gray-700" /> <FeatherIcon v-if="typeof icon == 'string'" :name="icon" class="h-4 w-4 text-gray-700" />
<component v-else :is="icon" class="h-4 w-4 text-gray-700" />
</span> </span>
</slot> </slot>
</Tooltip> </Tooltip>