Skip to content

Commit 6fead79

Browse files
committed
chore: add GitHub links to UserButton menu for open source and support access
1 parent 84aa4c7 commit 6fead79

File tree

2 files changed

+88
-8
lines changed

2 files changed

+88
-8
lines changed

src/components/folders/index.tsx

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,48 @@ export default function FolderPanel({
297297
}}
298298
afterSignOutUrl="/"
299299
>
300-
{hasPassword && (
301-
<UserButton.MenuItems>
300+
<UserButton.MenuItems>
301+
<UserButton.Action
302+
label="Typelets Open Source"
303+
labelIcon={
304+
<svg
305+
xmlns="http://www.w3.org/2000/svg"
306+
width="16"
307+
height="16"
308+
viewBox="0 0 24 24"
309+
fill="none"
310+
stroke="currentColor"
311+
strokeWidth="2"
312+
strokeLinecap="round"
313+
strokeLinejoin="round"
314+
>
315+
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>
316+
</svg>
317+
}
318+
onClick={() => window.open('https://github.com/typelets/typelets-app', '_blank')}
319+
/>
320+
<UserButton.Action
321+
label="Support"
322+
labelIcon={
323+
<svg
324+
xmlns="http://www.w3.org/2000/svg"
325+
width="16"
326+
height="16"
327+
viewBox="0 0 24 24"
328+
fill="none"
329+
stroke="currentColor"
330+
strokeWidth="2"
331+
strokeLinecap="round"
332+
strokeLinejoin="round"
333+
>
334+
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
335+
<path d="M12 17h.01"></path>
336+
<circle cx="12" cy="12" r="10"></circle>
337+
</svg>
338+
}
339+
onClick={() => window.open('https://github.com/typelets/typelets-app/issues', '_blank')}
340+
/>
341+
{hasPassword && (
302342
<UserButton.Action
303343
label="Change Master Password"
304344
labelIcon={
@@ -326,8 +366,8 @@ export default function FolderPanel({
326366
}
327367
onClick={() => setShowChangePassword(true)}
328368
/>
329-
</UserButton.MenuItems>
330-
)}
369+
)}
370+
</UserButton.MenuItems>
331371
</UserButton>
332372
<div className="min-w-0 flex-1">
333373
<div className="text-foreground truncate text-sm font-medium">

src/components/layout/MobileLayout.tsx

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,48 @@ export function MobileLayout({
115115
}}
116116
afterSignOutUrl="/"
117117
>
118-
{hasPassword && (
119-
<UserButton.MenuItems>
118+
<UserButton.MenuItems>
119+
<UserButton.Action
120+
label="Typelets Open Source"
121+
labelIcon={
122+
<svg
123+
xmlns="http://www.w3.org/2000/svg"
124+
width="16"
125+
height="16"
126+
viewBox="0 0 24 24"
127+
fill="none"
128+
stroke="currentColor"
129+
strokeWidth="2"
130+
strokeLinecap="round"
131+
strokeLinejoin="round"
132+
>
133+
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>
134+
</svg>
135+
}
136+
onClick={() => window.open('https://github.com/typelets/typelets-app', '_blank')}
137+
/>
138+
<UserButton.Action
139+
label="Support"
140+
labelIcon={
141+
<svg
142+
xmlns="http://www.w3.org/2000/svg"
143+
width="16"
144+
height="16"
145+
viewBox="0 0 24 24"
146+
fill="none"
147+
stroke="currentColor"
148+
strokeWidth="2"
149+
strokeLinecap="round"
150+
strokeLinejoin="round"
151+
>
152+
<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
153+
<path d="M12 17h.01"></path>
154+
<circle cx="12" cy="12" r="10"></circle>
155+
</svg>
156+
}
157+
onClick={() => window.open('https://github.com/typelets/typelets-app/issues', '_blank')}
158+
/>
159+
{hasPassword && (
120160
<UserButton.Action
121161
label="Change Master Password"
122162
labelIcon={
@@ -144,8 +184,8 @@ export function MobileLayout({
144184
}
145185
onClick={() => setShowChangePassword(true)}
146186
/>
147-
</UserButton.MenuItems>
148-
)}
187+
)}
188+
</UserButton.MenuItems>
149189
</UserButton>
150190
</div>
151191
</div>

0 commit comments

Comments
 (0)