Skip to content

Commit 304c340

Browse files
committed
Add help text for bulk update
1 parent 399f586 commit 304c340

File tree

2 files changed

+54
-8
lines changed

2 files changed

+54
-8
lines changed

src/components/super-actions.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ import {
3737
DialogHeader,
3838
DialogTitle,
3939
} from "./ui/dialog";
40-
import { DialogClose, DialogTrigger } from "@radix-ui/react-dialog";
40+
import {
41+
DialogClose,
42+
DialogDescription,
43+
DialogTrigger,
44+
} from "@radix-ui/react-dialog";
4145
import { Input } from "./ui/input";
4246
import { Label } from "./ui/label";
47+
import usageText from "@/lib/usage-text";
4348

4449
export default function SuperActionsMenu() {
4550
const { information, tailflareState, setInformation } = useTailflare();
@@ -260,6 +265,9 @@ export default function SuperActionsMenu() {
260265
<DialogContent>
261266
<DialogHeader>
262267
<DialogTitle>Changing all added subdomains</DialogTitle>
268+
<DialogDescription>
269+
{usageText.bulkChangeSubdomains}
270+
</DialogDescription>
263271
</DialogHeader>
264272
<div className="gap-2 grid">
265273
<div className="items-center gap-1 grid grid-cols-[1fr_2fr]">

src/lib/usage-text.tsx

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,51 @@
11
const usageText = {
2-
tailnetOrg: <span>You can get your Tailnet organization name on this page, under the <b>Organization</b> section. <a href="https://login.tailscale.com/admin/settings/general">Link</a>.</span>,
2+
tailflareState: {
3+
tailnetOrg: (
4+
<span>
5+
You can get your Tailnet organization name on this page, under the{" "}
6+
<b>Organization</b> section.{" "}
7+
<a href="https://login.tailscale.com/admin/settings/general">Link</a>.
8+
</span>
9+
),
310

4-
tailscaleApiKey: <span>API access token is needed to fetch your Tailnet devices and can be generated here. <a href="https://login.tailscale.com/admin/settings/keys">Link</a>.</span>,
11+
tailscaleApiKey: (
12+
<span>
13+
API access token is needed to fetch your Tailnet devices and can be
14+
generated here.{" "}
15+
<a href="https://login.tailscale.com/admin/settings/keys">Link</a>.
16+
</span>
17+
),
518

6-
cloudflareEmail: <span>The email you use to log in to your Cloudflare dashboard and manage zones.</span>,
19+
cloudflareEmail: (
20+
<span>
21+
The email you use to log in to your Cloudflare dashboard and manage
22+
zones.
23+
</span>
24+
),
725

8-
cloudflareApiKey: <span>You can either use the Global API Key or generate an API token with the Zone.DNS permissions and All zones scope. <a href="https://dash.cloudflare.com/profile/api-tokens">Link</a>.</span>,
26+
cloudflareApiKey: (
27+
<span>
28+
You can either use the Global API Key or generate an API token with the
29+
Zone.DNS permissions and All zones scope.{" "}
30+
<a href="https://dash.cloudflare.com/profile/api-tokens">Link</a>.
31+
</span>
32+
),
933

10-
subdomain: <span>The subdomain you want to organize your hosts. For example, <code>anguyen-1.engineering.aaanh.to</code> Generally, access control is handled by Tailscale ACLs, so subdomains on Cloudflare is only superficial.</span>
11-
}
34+
subdomain: (
35+
<span>
36+
The subdomain you want to organize your hosts. For example,{" "}
37+
<code>anguyen-1.engineering.aaanh.to</code> Generally, access control is
38+
handled by Tailscale ACLs, so subdomains on Cloudflare is only
39+
superficial.
40+
</span>
41+
),
42+
},
1243

13-
export default usageText
44+
bulkChangeSubdomains: (
45+
<span>
46+
{`Use '*' to update every matched record. Leave empty to match <hostname>.<domain>.<tld>.`}
47+
</span>
48+
),
49+
};
50+
51+
export default usageText;

0 commit comments

Comments
 (0)