Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Add about & support link

Dave Earley6d47866e9d59
diff --git a/LICENCE b/LICENCE
index 34cba43a0..79f3ddb95 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,3 +1,14 @@
+Hi.Events is licensed under the GNU Affero General Public License (AGPL) version 3.
+In accordance with Section 7(b) of the AGPL, you are required to retain the
+"Powered by Hi.Events" attribution at the footer of all web pages and emails
+generated by this software. If you modify Hi.Events, you may rephrase the attribution
+to reflect your changes, for example, "Powered by [Your Company] based on Hi.Events,"
+but the link must always direct to https://hi.events. If you wish to remove this
+attribution, a commercial license is available. For more details, please refer to
+our licensing page: https://hi.events/licensing.
+
+The full text of the GNU Affero General Public License version 3 is provided below.
+
GNU Affero General Public License
=================================
@@ -648,4 +659,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a “copyright disclaimer” for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-&lt;<http://www.gnu.org/licenses/>&gt;.
\ No newline at end of file
+&lt;<http://www.gnu.org/licenses/>&gt;.
diff --git a/frontend/src/components/common/GlobalMenu/index.tsx b/frontend/src/components/common/GlobalMenu/index.tsx
index b156b60f1..d473854cc 100644
--- a/frontend/src/components/common/GlobalMenu/index.tsx
+++ b/frontend/src/components/common/GlobalMenu/index.tsx
@@ -1,71 +1,77 @@
import {Avatar, Menu, UnstyledButton} from "@mantine/core";
import {getInitials} from "../../../utilites/helpers.ts";
-import {IconLifebuoy, IconLogout, IconSettingsCog, IconSpeakerphone, IconUser} from "@tabler/icons-react";
+import {IconLifebuoy, IconLogout, IconSettingsCog, IconUser,} from "@tabler/icons-react";
import {useGetMe} from "../../../queries/useGetMe.ts";
import {NavLink} from "react-router-dom";
import {t} from "@lingui/macro";
import {authClient} from "../../../api/auth.client.ts";
+import {useDisclosure} from "@mantine/hooks";
+import {AboutModal} from "../../modals/AboutModal/index.tsx";
+import {getConfig} from "../../../utilites/config.ts";
export const GlobalMenu = () => {
const {data: me} = useGetMe();
+ const [aboutModalOpen, {open: openAboutModal, close: closeAboutModal}] =
+ useDisclosure(false);
const links = [
{
label: t`My Profile`,
icon: IconUser,
- link: '/manage/profile',
+ link: "/manage/profile",
},
{
label: t`Account Settings`,
icon: IconSettingsCog,
link: `/account/settings`,
},
- {
- label: t`Help & Support`,
- icon: IconLifebuoy,
- link: 'https://hi.events/docs?utm_source=app-top-menu-help-support',
- target: '_blank',
- },
- {
- label: t`Feedback`,
- icon: IconSpeakerphone,
- link: 'mailto:[email protected]?subject=Feedback',
- target: '_blank',
- },
{
label: t`Logout`,
icon: IconLogout,
onClick: (event: any) => {
event.preventDefault();
authClient.logout();
- localStorage.removeItem('token');
- window.location.href = '/auth/login';
- }
- }
+ localStorage.removeItem("token");
+ window.location.href = "/auth/login";
+ },
+ },
];
+ if (!getConfig("VITE_HIDE_ABOUT_LINK")) {
+ links.push({
+ label: `About & Support`,
+ icon: IconLifebuoy,
+ onClick: openAboutModal,
+ });
+ }
+
return (
- <Menu shadow="md" width={200}>
- <Menu.Target>
- <UnstyledButton>
- <Avatar color={'pink'} radius="xl">
- {me
- ? getInitials(me.first_name + ' ' + me.last_name)
- : '..'}
- </Avatar>
- </UnstyledButton>
- </Menu.Target>
+ <>
+ <Menu shadow="md" width={200}>
+ <Menu.Target>
+ <UnstyledButton>
+ <Avatar color={"pink"} radius="xl">
+ {me ? getInitials(me.first_name + " " + me.last_name) : ".."}
+ </Avatar>
+ </UnstyledButton>
+ </Menu.Target>
- <Menu.Dropdown>
- {links.map((link) => {
- return (
- <NavLink onClick={link.onClick} to={link.link ?? '#'} key={link.label}
- target={link.target ?? ''}>
- <Menu.Item component={'div'} leftSection={<link.icon/>}>{link.label}</Menu.Item>
+ <Menu.Dropdown>
+ {links.map((link) => (
+ <NavLink
+ onClick={link.onClick}
+ to={link.link ?? "#"}
+ key={link.label}
+ target={link.target ?? ""}
+ >
+ <Menu.Item component={"div"} leftSection={<link.icon/>}>
+ {link.label}
+ </Menu.Item>
</NavLink>
- );
- })}
- </Menu.Dropdown>
- </Menu>
+ ))}
+ </Menu.Dropdown>
+ </Menu>
+ {aboutModalOpen && <AboutModal onClose={closeAboutModal}/>}
+ </>
);
-}
+};
diff --git a/frontend/src/components/modals/AboutModal/AboutModal.module.scss b/frontend/src/components/modals/AboutModal/AboutModal.module.scss
new file mode 100644
index 000000000..99dc5ca8c
--- /dev/null
+++ b/frontend/src/components/modals/AboutModal/AboutModal.module.scss
@@ -0,0 +1,16 @@
+.aboutIframe {
+ width: 100%;
+ border: none;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ min-height: 500px;
+}
+
+.aboutContainer {
+ min-height: 500px;
+}
diff --git a/frontend/src/components/modals/AboutModal/index.tsx b/frontend/src/components/modals/AboutModal/index.tsx
new file mode 100644
index 000000000..9540abd27
--- /dev/null
+++ b/frontend/src/components/modals/AboutModal/index.tsx
@@ -0,0 +1,18 @@
+import {Modal} from "../../common/Modal";
+import {GenericModalProps} from "../../../types.ts";
+import classes from "./AboutModal.module.scss";
+
+export const AboutModal = ({onClose}: GenericModalProps) => {
+ return (
+ <Modal onClose={onClose} opened>
+ <div className={classes.aboutContainer}>
+ <iframe src={'https://hi.' +
+ 'events/about-embedded'}
+ className={classes.aboutIframe}
+ title="About"
+ allowFullScreen
+ />
+ </div>
+ </Modal>
+ );
+}