Skip to content

Commit 0d17daa

Browse files
committed
feat(side-nav): add Help button to open GitHub issues page
- Introduced a new Help button in the side navigation that opens the GitHub issues page when clicked. - Utilized CircleHelp icon from lucide-react for the Help button. - Implemented functionality to invoke the hide_panel command after opening the URL for improved user experience.
1 parent 0605d4b commit 0d17daa

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/components/side-nav.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Settings } from "lucide-react"
1+
import { CircleHelp, Settings } from "lucide-react"
2+
import { openUrl } from "@tauri-apps/plugin-opener"
3+
import { invoke } from "@tauri-apps/api/core"
24

35
function GaugeIcon({ className }: { className?: string }) {
46
return (
@@ -104,6 +106,18 @@ export function SideNav({ activeView, onViewChange, plugins }: SideNavProps) {
104106
{/* Spacer */}
105107
<div className="flex-1" />
106108

109+
{/* Help */}
110+
<NavButton
111+
isActive={false}
112+
onClick={() => {
113+
openUrl("https://github.com/robinebers/openusage/issues").catch(console.error)
114+
invoke("hide_panel").catch(console.error)
115+
}}
116+
aria-label="Help"
117+
>
118+
<CircleHelp className="size-6" />
119+
</NavButton>
120+
107121
{/* Settings */}
108122
<NavButton
109123
isActive={activeView === "settings"}

0 commit comments

Comments
 (0)