feat: plugin docs and env manifest fields, in-app docs links, SDK 1.0.3

This commit is contained in:
LukeGus committed 2026-10-08 00:34:50 -05:00
1 parent 7fcda3bb01
commit cfab6f764c
65 files changed
+1665 -294

No files matched your search

+3 -16
View File
@@ -10,6 +10,7 @@ import { toast } from "sonner";
import { AccordionSection } from "./AdminSettingsShared";
import type { AdminUser } from "./AdminManagementSections";
import { Select2 } from "@/components/select2";
import { DocsLink } from "@/components/docs-link";
type AdminApiKeysSectionProps = {
open: boolean;
@@ -66,24 +67,10 @@ export function AdminApiKeysSection({
<div className="flex items-center justify-between py-2 border-b border-border">
<span className="text-[10px] text-muted-foreground">
{t("admin.apiKeysCount", { count: apiKeys.length })}{" "}
<a
href="https://docs.termix.site/features/api/api-keys"
target="_blank"
rel="noreferrer"
className="text-accent-brand hover:underline"
>
{t("admin.apiKeysDocsLink")}
</a>
<DocsLink core="apiKeys">{t("admin.apiKeysDocsLink")}</DocsLink>
<br />
{t("admin.apiKeysCliHint")}{" "}
<a
href="https://docs.termix.site/cli"
target="_blank"
rel="noreferrer"
className="text-accent-brand hover:underline"
>
{t("admin.apiKeysCliLink")}
</a>
<DocsLink core="cli">{t("admin.apiKeysCliLink")}</DocsLink>
</span>
<div className="flex items-center gap-1">
<Button
+2 -8
View File
@@ -8,6 +8,7 @@ import { AccordionSection, AdminToggle } from "./AdminSettingsShared";
import { AdminHostTags } from "./AdminHostTags";
import { AdminPluginDeveloperMode } from "./AdminPluginDeveloperMode";
import type { TlsStatus } from "@/api/tls-api";
import { DocsLink } from "@/components/docs-link";
type GeneralSettingsSectionProps = {
open: boolean;
@@ -423,14 +424,7 @@ export function AdminSSLSection({
<div className="flex flex-col gap-3 pt-3">
<span className="text-[10px] text-muted-foreground">
{t("admin.sslDescription")}{" "}
<a
href="https://docs.termix.site/features/networking/ssl"
target="_blank"
rel="noreferrer"
className="text-accent-brand hover:underline"
>
{t("admin.sslDocsLink")}
</a>
<DocsLink core="https">{t("admin.sslDocsLink")}</DocsLink>
</span>
<div className="flex flex-col gap-0.5 p-2 border border-border bg-background/50">
+2
View File
@@ -55,6 +55,7 @@ import type { AdminSession, AdminUser } from "./AdminManagementSections";
import { TabStrip } from "./HostManagerTabs";
import { BackButton, PanelShell } from "@/components/panel-layout";
import { useActionSlot } from "@/hooks/use-action-slot";
import { docsUrl } from "@/lib/docs";
type ApiErrorLike = {
response?: {
@@ -338,6 +339,7 @@ export function AdminUserManagePanel({
<PanelShell
leading={<BackButton onClick={close} />}
title={t("admin.manageEditorBack", { username: user.username })}
docs={docsUrl("users")}
status={
editor.kind === "host"
? (editor.host?.name ?? t("manage.newHost"))
+2 -8
View File
@@ -32,6 +32,7 @@ import {
import { getUserList, type AccessRecord } from "@/main-axios";
import type { Credential } from "@/types/ui-types";
import { getErrorMessage } from "@/lib/error-message";
import { DocsLink } from "@/components/docs-link";
const PERMISSION_LEVELS: CredentialPermissionLevel[] = ["use", "manage"];
@@ -268,14 +269,7 @@ export function CredentialShareModal({
<Users className="size-3.5" />
{t("hosts.sharing.shareWithSection")}
</div>
<a
href="https://docs.termix.site/features/authentication/rbac"
target="_blank"
rel="noreferrer"
className="text-[10px] text-accent-brand hover:underline shrink-0"
>
{t("hosts.docsLink")}
</a>
<DocsLink core="sharing">{t("hosts.docsLink")}</DocsLink>
</div>
<p className="text-[11px] text-muted-foreground leading-snug">
+2 -10
View File
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";
import {
ArrowUpDown,
Check,
ExternalLink,
Filter,
GripVertical,
Plus,
@@ -29,6 +28,7 @@ import {
DropdownMenuTrigger,
} from "@/components/dropdown-menu";
import type { CredentialSortKey } from "@/types/credential-sidebar-preferences";
import { DocsLink } from "@/components/docs-link";
export function CredentialsPanel({
active: _active = true,
@@ -269,15 +269,7 @@ export function CredentialsPanel({
</DropdownMenuContent>
</DropdownMenu>
<div className="w-px self-stretch bg-border" />
<a
href="https://docs.termix.site/features/files-and-hosts/credentials"
target="_blank"
rel="noreferrer"
title={t("hosts.docsLink")}
className="flex items-center justify-center size-7 text-muted-foreground hover:text-foreground shrink-0 transition-colors"
>
<ExternalLink className="size-3.5" />
</a>
<DocsLink core="credentials" variant="icon" />
</div>
<div className="flex items-center border border-border shrink-0">
<button
+2 -8
View File
@@ -22,6 +22,7 @@ import {
HostDefaultBadge,
HostOnly,
} from "@/lib/host-defaults-context";
import { DocsLink } from "@/components/docs-link";
type HostEditorSetField = <K extends keyof HostEditorForm>(
key: K,
@@ -402,14 +403,7 @@ export function HostEditorGeneralTab({
{t("hosts.portKnockingSequence")}
</span>
<HostDefaultBadge settingKey="core.portKnockSequence" />
<a
href="https://docs.termix.site/features/networking/port-knocking"
target="_blank"
rel="noreferrer"
className="text-[10px] text-accent-brand hover:underline"
>
{t("hosts.docsLink")}
</a>
<DocsLink core="portKnocking">{t("hosts.docsLink")}</DocsLink>
</div>
<Button
variant="outline"
+2 -8
View File
@@ -39,6 +39,7 @@ import {
} from "@/main-axios";
import type { Host } from "@/types/ui-types";
import { Select2 } from "@/components/select2";
import { DocsLink } from "@/components/docs-link";
const PERMISSION_LEVELS: SharePermissionLevel[] = [
"connect",
@@ -307,14 +308,7 @@ export function HostShareModal({
<Users className="size-3.5" />
{t("hosts.sharing.shareWithSection")}
</div>
<a
href="https://docs.termix.site/features/authentication/rbac"
target="_blank"
rel="noreferrer"
className="text-[10px] text-accent-brand hover:underline shrink-0"
>
{t("hosts.docsLink")}
</a>
<DocsLink core="sharing">{t("hosts.docsLink")}</DocsLink>
</div>
<div className="flex gap-1.5">
+2 -1
View File
@@ -76,6 +76,7 @@ import {
useFeatureSettings,
type FeatureSectionId,
} from "@/settings/FeatureSettingsSections";
import { docsUrl } from "@/lib/docs";
type UserProfileSection =
| "account"
@@ -1345,7 +1346,7 @@ export function UserProfilePanel({
</span>
</div>
<a
href="https://docs.termix.site/cli"
href={docsUrl("cli")}
target="_blank"
rel="noopener noreferrer"
className="shrink-0 ml-3 flex items-center gap-1 text-[10px] font-bold uppercase tracking-widest border border-border px-2 py-1.5 hover:bg-muted/40 transition-colors"