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
17 changes: 16 additions & 1 deletion frontend/app/components/shared/layout/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,18 @@ SPDX-License-Identifier: MIT
{{ link.name }}
</a>
</template>
<button
v-else-if="link.intercom"
type="button"
class="text-sm leading-7 text-white hover:underline self-start text-left"
@click="openIntercom"
>
{{ link.name }}
</button>
<template v-else>
<button
type="button"
class="text-sm leading-7 text-white hover:underline -ml-1 self-start text-left"
class="text-sm leading-7 text-white hover:underline self-start text-left"
@click="link.action"
>
{{ link.name }}
Expand Down Expand Up @@ -90,11 +98,18 @@ SPDX-License-Identifier: MIT

<script setup lang="ts">
import { nextTick, ref } from 'vue';
import { useIntercom } from '~/composables/useIntercom';
import { lfxFooterMenu } from '~/config/menu/footer';
import { AppRoute } from '~/config/routes';

const lfxFooterRef = ref<HTMLElement | null>(null);

const { show } = useIntercom();

function openIntercom() {
show();
}

onMounted(async () => {
await nextTick();
const el = document.querySelector('.lfx-footer-wc') as HTMLElement;
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/config/menu/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const lfxFooterMenu: FooterMenuSection[] = [
},
},
{ name: 'About', link: AppRoute.About },
{ name: 'Documentation', link: '/docs' },
{ name: 'Contact support', intercom: true },
],
},
{
Expand Down
1 change: 1 addition & 0 deletions frontend/app/config/menu/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const lfxHeaderMenu: HeaderMenuItem[] = [
{ label: 'For Projects', icon: 'laptop-code', to: AppRoute.ForProjects },
{ label: 'For Companies', icon: 'buildings', to: AppRoute.ForCompanies },
{ label: 'About', icon: 'circle-info', to: AppRoute.About },
{ label: 'Documentation', icon: 'book-open', to: '/docs' },
],
},
];
5 changes: 3 additions & 2 deletions frontend/app/types/footer.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// SPDX-License-Identifier: MIT

export type FooterMenuLink =
| { name: string; link: string; action?: never }
| { name: string; action: () => void; link?: never };
| { name: string; link: string; action?: never; intercom?: never }
| { name: string; action: () => void; link?: never; intercom?: never }
| { name: string; intercom: true; link?: never; action?: never };

export interface FooterMenuSection {
title: string;
Expand Down
Loading