fix(definitions): add doc slugs for gotify and archiveTeamWarrior
Merging dev introduced the Gotify integration and ArchiveTeam Warrior widget/integration, which require entries in the doc-slug maps and the generated documentation sitemap. Also remove a misplaced non-null assertion in the group members page flagged by oxlint.
This commit is contained in:
4 files changed
+12
-40
No files matched your search
@@ -1,17 +1,5 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import {
|
||||
Alert,
|
||||
Anchor,
|
||||
Center,
|
||||
Group,
|
||||
Stack,
|
||||
Table,
|
||||
TableTbody,
|
||||
TableTd,
|
||||
TableTr,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { Alert, Anchor, Center, Group, Stack, Table, TableTbody, TableTd, TableTr, Text, Title } from "@mantine/core";
|
||||
import { IconExclamationCircle } from "@tabler/icons-react";
|
||||
|
||||
import type { RouterOutputs } from "@homarr/api";
|
||||
@@ -53,13 +41,9 @@ export default async function GroupsDetailPage(props: GroupsDetailPageProps) {
|
||||
const group = await api.group.getById({ id: params.id });
|
||||
const isReserved = group.name === everyoneGroup;
|
||||
|
||||
const filteredMembers = searchParams.search
|
||||
? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
group.members.filter((member) =>
|
||||
member.name
|
||||
?.toLowerCase()
|
||||
.includes(searchParams.search!.trim().toLowerCase()),
|
||||
)
|
||||
const searchTerm = searchParams.search?.trim().toLowerCase();
|
||||
const filteredMembers = searchTerm
|
||||
? group.members.filter((member) => member.name?.toLowerCase().includes(searchTerm))
|
||||
: group.members;
|
||||
|
||||
// "local" = every enabled provider managed locally, "external" = none, "mixed" = some.
|
||||
@@ -75,21 +59,14 @@ export default async function GroupsDetailPage(props: GroupsDetailPageProps) {
|
||||
<ReservedGroupAlert />
|
||||
) : (
|
||||
managementType !== "local" && (
|
||||
<Alert
|
||||
variant="light"
|
||||
color="yellow"
|
||||
icon={<IconExclamationCircle size="1rem" stroke={1.5} />}
|
||||
>
|
||||
<Alert variant="light" color="yellow" icon={<IconExclamationCircle size="1rem" stroke={1.5} />}>
|
||||
{t(`group.memberNotice.${managementType}`)}
|
||||
</Alert>
|
||||
)
|
||||
)}
|
||||
|
||||
<Group justify="space-between">
|
||||
<SearchInput
|
||||
placeholder={`${tMembers("search")}...`}
|
||||
defaultValue={searchParams.search}
|
||||
/>
|
||||
<SearchInput placeholder={`${tMembers("search")}...`} defaultValue={searchParams.search} />
|
||||
{canManageMembers && !isReserved && (
|
||||
<AddGroupMember
|
||||
groupId={group.id}
|
||||
@@ -108,12 +85,7 @@ export default async function GroupsDetailPage(props: GroupsDetailPageProps) {
|
||||
<Table striped highlightOnHover>
|
||||
<TableTbody>
|
||||
{filteredMembers.map((member) => (
|
||||
<Row
|
||||
key={group.id}
|
||||
member={member}
|
||||
groupId={group.id}
|
||||
disabled={isReserved}
|
||||
/>
|
||||
<Row key={group.id} member={member} groupId={group.id} disabled={isReserved} />
|
||||
))}
|
||||
</TableTbody>
|
||||
</Table>
|
||||
@@ -140,11 +112,7 @@ const Row = ({ member, groupId, disabled }: RowProps) => {
|
||||
</Anchor>
|
||||
</Group>
|
||||
</TableTd>
|
||||
<TableTd w={100}>
|
||||
{canBeRemoved && !disabled && (
|
||||
<RemoveGroupMember user={member} groupId={groupId} />
|
||||
)}
|
||||
</TableTd>
|
||||
<TableTd w={100}>{canBeRemoved && !disabled && <RemoveGroupMember user={member} groupId={groupId} />}</TableTd>
|
||||
</TableTr>
|
||||
);
|
||||
};
|
||||
@@ -323,6 +323,7 @@ export type HomarrDocumentationPath =
|
||||
| "/docs/integrations/github-containerregistry"
|
||||
| "/docs/integrations/quay"
|
||||
| "/docs/integrations/ntfy"
|
||||
| "/docs/integrations/gotify"
|
||||
| "/docs/integrations/ical"
|
||||
| "/docs/integrations/anchor"
|
||||
| "/docs/integrations/truenas"
|
||||
|
||||
@@ -40,6 +40,7 @@ export const integrationDocSlugs: Record<IntegrationKind, string | null> = {
|
||||
gitHubContainerRegistry: "github-containerregistry",
|
||||
quay: "quay",
|
||||
ntfy: "ntfy",
|
||||
gotify: "gotify",
|
||||
ical: "ical",
|
||||
anchor: "anchor",
|
||||
truenas: "truenas",
|
||||
@@ -56,5 +57,6 @@ export const integrationDocSlugs: Record<IntegrationKind, string | null> = {
|
||||
umami: "umami",
|
||||
peaNut: "peanut",
|
||||
beszel: "beszel",
|
||||
archiveTeamWarrior: null,
|
||||
mock: null,
|
||||
};
|
||||
@@ -44,6 +44,7 @@ export const widgetDocSlugs: Record<WidgetKind, string | null> = {
|
||||
audioStats: "audio-stats",
|
||||
umami: "umami",
|
||||
ups: "ups",
|
||||
archiveTeamWarrior: null,
|
||||
beszelSystemTable: "beszel-system-table",
|
||||
beszelSystemGrid: "beszel-system-grid",
|
||||
beszelAlerts: "beszel-alerts",
|
||||
|
||||
Reference in new issue
Block a user