mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
* chore: Move plugin-specific integration code into plugins Core no longer imports from or names the settings of individual plugins. Plugins now register mention providers, issue status icons, instance URLs, settings keys, settings and import schemas, and OAuth clients through hooks. * fix: Recompute embed instance URLs after plugins load and match legacy issue icons by URL * fix: Skip logo upload jobs queued without a settings path * chore: Choose issue status icons from the unfurl state
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
import React from "react";
|
|
import type { BaseIconProps } from ".";
|
|
|
|
/**
|
|
* A status icon for issue trackers that do not register their own.
|
|
*
|
|
* @param props the issue state and display options.
|
|
* @returns the icon, or null for an unknown state.
|
|
*/
|
|
export function DefaultIssueStatusIcon(props: BaseIconProps) {
|
|
const { state, className, size = 16 } = props;
|
|
|
|
switch (state.name) {
|
|
case "opened":
|
|
case "open":
|
|
return (
|
|
<svg
|
|
viewBox="0 0 16 16"
|
|
width={size}
|
|
height={size}
|
|
fill={state.color}
|
|
className={className}
|
|
>
|
|
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" />
|
|
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z" />
|
|
</svg>
|
|
);
|
|
case "completed":
|
|
case "closed":
|
|
return (
|
|
<svg
|
|
viewBox="0 0 16 16"
|
|
width={size}
|
|
height={size}
|
|
fill={state.color}
|
|
className={className}
|
|
>
|
|
<path d="M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z" />
|
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z" />
|
|
</svg>
|
|
);
|
|
case "canceled":
|
|
return (
|
|
<svg
|
|
viewBox="0 0 16 16"
|
|
width={size}
|
|
height={size}
|
|
fill={state.color}
|
|
className={className}
|
|
>
|
|
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm9.78-2.22-5.5 5.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l5.5-5.5a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z" />
|
|
</svg>
|
|
);
|
|
default:
|
|
return null;
|
|
}
|
|
}
|