sidebar tags

This commit is contained in:
typescreep
2025-06-27 15:40:22 +03:00
parent c579c14de6
commit df06e2f985
7 changed files with 44 additions and 7 deletions

View File

@@ -24,9 +24,15 @@ type TManageableSidebarProps = {
instanceName?: string
projectName?: string
idToCompare: string
currentTags?: string[]
}
export const ManageableSidebar: FC<TManageableSidebarProps> = ({ projectName, instanceName, idToCompare }) => {
export const ManageableSidebar: FC<TManageableSidebarProps> = ({
projectName,
instanceName,
idToCompare,
currentTags,
}) => {
const { pathname } = useLocation()
const params = useParams()
const clusterName = params?.clusterName || ''
@@ -86,6 +92,7 @@ export const ManageableSidebar: FC<TManageableSidebarProps> = ({ projectName, in
}}
pathname={pathname}
idToCompare={idToCompare}
currentTags={currentTags}
noMarginTop
/>
</Styled.Container>

View File

@@ -56,7 +56,12 @@ export const FormApiPage: FC<TFormApiPageProps> = ({ forcedTheme, inside }) => {
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
/>
</Col>
<FlexCol flex="auto">
{entryName ? (

View File

@@ -54,7 +54,12 @@ export const FormBuiltinPage: FC<TFormBuiltinPageProps> = ({ forcedTheme, inside
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[typeName]}
/>
</Col>
<FlexCol flex="auto">
{entryName ? (

View File

@@ -56,7 +56,12 @@ export const FormCrdPage: FC<TFormCrdPageProps> = ({ forcedTheme, inside }) => {
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
/>
</Col>
<FlexCol flex="auto">
{entryName ? (

View File

@@ -59,7 +59,12 @@ export const TableApiPage: FC<TTableApiPageProps> = ({ forcedTheme, inside }) =>
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
/>
</Col>
<FlexCol flex="auto">
{typeName && apiGroup && apiVersion && (

View File

@@ -48,7 +48,12 @@ export const TableBuiltinPage: FC<TTableBuiltinPageProps> = ({ forcedTheme, insi
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[`${typeName}`]}
/>
</Col>
<FlexCol flex="auto">
{typeName && (

View File

@@ -50,7 +50,12 @@ export const TableCrdPage: FC<TTableCrdPageProps> = ({ forcedTheme, inside }) =>
<ContentCard flexGrow={1} displayFlex flexFlow="column">
<RowFlexGrow wrap={false}>
<Col span="auto">
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
<ManageableSidebar
instanceName={possibleInstance}
projectName={possibleProject}
idToCompare={sidebarId}
currentTags={[`${apiGroup}/${apiVersion}/${crdName}`]}
/>
</Col>
<FlexCol flex="auto">
{crdName && apiGroup && apiVersion && apiExtensionVersion && (