mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: treat deprecation messages as markdown (#11562)
This commit is contained in:
@@ -230,7 +230,8 @@ export const Deprecated: Story = {
|
||||
template: {
|
||||
...Mocks.MockTemplate,
|
||||
deprecated: true,
|
||||
deprecation_message: "Template deprecated due to reasons",
|
||||
deprecation_message:
|
||||
"Template deprecated due to reasons. [Learn more](#)",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ import { SidebarIconButton } from "components/FullPageLayout/Sidebar";
|
||||
import HubOutlined from "@mui/icons-material/HubOutlined";
|
||||
import { ResourcesSidebar } from "./ResourcesSidebar";
|
||||
import { ResourceCard } from "components/Resources/ResourceCard";
|
||||
import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
|
||||
|
||||
export type WorkspaceError =
|
||||
| "getBuildsError"
|
||||
@@ -363,8 +364,14 @@ export const Workspace: FC<WorkspaceProps> = ({
|
||||
|
||||
{template?.deprecated && (
|
||||
<Alert severity="warning">
|
||||
<AlertTitle>Workspace using deprecated template</AlertTitle>
|
||||
<AlertDetail>{template?.deprecation_message}</AlertDetail>
|
||||
<AlertTitle>
|
||||
This workspace uses a deprecated template
|
||||
</AlertTitle>
|
||||
<AlertDetail>
|
||||
<MemoizedInlineMarkdown>
|
||||
{template?.deprecation_message}
|
||||
</MemoizedInlineMarkdown>
|
||||
</AlertDetail>
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user