Skip to content

Commit eb6126e

Browse files
committed
fix: add help link in sidebar
1 parent de44fab commit eb6126e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/consts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const ZHC_RELEASE_TAG_URL = "https://github.com/Koenkk/zigbee-herdsman-co
6868

6969
export const ZH_RELEASE_TAG_URL = "https://github.com/Koenkk/zigbee-herdsman/releases/tag/v";
7070

71+
export const HELP_URL = "https://github.com/Nerivec/zigbee2mqtt-windfront/wiki";
7172
export const CONTRIBUTE_TRANSLATION_URL = "https://github.com/Nerivec/zigbee2mqtt-windfront/issues/199";
7273
export const CONTRIBUTE_WINDFRONT_URL = "https://github.com/Nerivec/zigbee2mqtt-windfront/blob/main/CONTRIBUTING.md";
7374
export const CONTRIBUTE_Z2M_URL = "https://github.com/Koenkk/zigbee2mqtt/blob/master/CONTRIBUTING.md";

src/layout/AppLayout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ import {
1212
faList,
1313
faMobileVibrate,
1414
faPlug,
15+
faQuestionCircle,
1516
faTableCellsLarge,
1617
faTableColumns,
1718
faWaveSquare,
1819
} from "@fortawesome/free-solid-svg-icons";
1920
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
2021
import { type JSX, memo, useEffect, useMemo, useRef, useState } from "react";
2122
import { useTranslation } from "react-i18next";
22-
import { NavLink, type NavLinkRenderProps } from "react-router";
23+
import { Link, NavLink, type NavLinkRenderProps } from "react-router";
2324
import store2 from "store2";
2425
import LanguageSwitcher from "../components/LanguageSwitcher.js";
2526
import Notifications from "../components/Notifications.js";
2627
import PermitJoinButton from "../components/PermitJoinButton.js";
2728
import ThemeSwitcher from "../components/ThemeSwitcher.js";
29+
import { HELP_URL } from "../consts.js";
2830
import { SIDEBAR_COLLAPSED_KEY } from "../localStoreConsts.js";
2931
import NavBar from "./NavBar.js";
3032
import { NavBarProvider } from "./NavBarContext.js";
@@ -147,6 +149,9 @@ const AppLayout = memo(({ children }: AppLayoutProps) => {
147149
<PermitJoinButton sidebarCollapsed={sidebarCollapsed} />
148150

149151
<div className={`menu w-full p-2 gap-2 flex-row justify-center p-2 gap-2 ${sidebarCollapsed ? "hidden lg:hidden" : ""}`}>
152+
<Link to={HELP_URL} className="btn btn-outline btn-primary" target="_blank" rel="noopener noreferrer">
153+
<FontAwesomeIcon icon={faQuestionCircle} />
154+
</Link>
150155
<LanguageSwitcher />
151156
<ThemeSwitcher />
152157
</div>

0 commit comments

Comments
 (0)