This repository was archived by the owner on Jul 31, 2025. It is now read-only.
forked from dkaser/unraid-tailscale-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelp.php
More file actions
45 lines (32 loc) · 1.25 KB
/
Help.php
File metadata and controls
45 lines (32 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace Tailscale;
use EDACerton\PluginUtils\Translator;
if ( ! defined(__NAMESPACE__ . '\PLUGIN_ROOT') || ! defined(__NAMESPACE__ . '\PLUGIN_NAME')) {
throw new \RuntimeException("Common file not loaded.");
}
$tr = $tr ?? new Translator(PLUGIN_ROOT);
function help_block(string $section, Translator $tr, string $header = "h3"): string
{
$title = $tr->tr("settings.{$section}");
$body = $tr->tr("help.{$section}");
return <<<END
<{$header}>{$title}</{$header}>
<p>{$body}</p>
END;
}
?>
<h2><?= $tr->tr("help.initial"); ?></h2>
<p><?= $tr->tr("help.key_expiration"); ?></p>
<h2><?= $tr->tr("settings.system_settings"); ?></h2>
<?= help_block('unraid_listen', $tr); ?>
<?= help_block('ip_forward', $tr); ?>
<?= help_block('taildrop', $tr); ?>
<h3><?= $tr->tr("settings.usage"); ?></h3>
<?= $tr->tr("settings.context.usage"); ?>
<?= help_block('outbound_network', $tr, "h2"); ?>
<?= help_block('subnets', $tr); ?>
<?= help_block('dns', $tr); ?>
<h2><?= $tr->tr("help.support"); ?></h2>
<?= $tr->tr("help.support_forums"); ?>
<p><a href="https://forums.unraid.net/topic/136889-plugin-tailscale">https://forums.unraid.net/topic/136889-plugin-tailscale/</a></p>
<p><strong><?= $tr->tr("help.support_advanced"); ?></strong></p>