feat(tasker): localize NODE.DC workspace seed

This commit is contained in:
DCCONSTRUCTIONS
2026-05-10 19:59:03 +03:00
parent e49840341b
commit d55d182648
30 changed files with 196 additions and 123 deletions
@@ -32,11 +32,14 @@ export function CustomCalloutBlock(props: CustomCalloutNodeViewProps) {
const [isColorPickerOpen, setIsColorPickerOpen] = useState(false);
// derived values
const activeBackgroundColor = COLORS_LIST.find((c) => node.attrs["data-background"] === c.key)?.backgroundColor;
const isLogoHidden = node.attrs["data-logo-in-use"] === "none";
return (
<NodeViewWrapper
key={node.attrs[ECalloutAttributeNames.ID]}
className="editor-callout-component group/callout-node relative my-2 flex items-start gap-4 rounded-lg bg-layer-3 p-4 break-words text-primary transition-colors duration-500"
className={`editor-callout-component group/callout-node relative my-2 flex items-start rounded-lg bg-layer-3 p-4 break-words text-primary transition-colors duration-500 ${
isLogoHidden ? "gap-0" : "gap-4"
}`}
style={{
backgroundColor: activeBackgroundColor,
}}
@@ -56,11 +56,11 @@ export const CustomCalloutExtensionConfig: CustomCalloutExtensionType = Node.cre
state.write(
`> <img src="${attrs["data-emoji-url"]}" alt="${attrs["data-emoji-unicode"]}" width="30px" />\n`
);
} else {
state.write("> \n");
} else if (logoInUse === "icon") {
state.write(`> <icon>${attrs["data-icon-name"]} icon</icon>\n`);
state.write("> \n");
}
// add an empty line after the logo
state.write("> \n");
// add '> ' before each line of the callout content
state.wrapBlock("> ", null, node, () => state.renderContent(node));
state.closeBlock(node);
@@ -24,6 +24,8 @@ type Props = {
export function CalloutBlockLogoSelector(props: Props) {
const { blockAttributes, disabled, handleOpen, isOpen, updateAttributes } = props;
if (blockAttributes["data-logo-in-use"] === "none") return null;
const logoValue: TLogoProps = {
in_use: blockAttributes["data-logo-in-use"],
icon: {
@@ -29,7 +29,7 @@ export type TCalloutBlockEmojiAttributes = {
export type TCalloutBlockAttributes = {
[ECalloutAttributeNames.ID]: string | null;
[ECalloutAttributeNames.LOGO_IN_USE]: "emoji" | "icon";
[ECalloutAttributeNames.LOGO_IN_USE]: "emoji" | "icon" | "none";
[ECalloutAttributeNames.BACKGROUND]: string | undefined;
[ECalloutAttributeNames.BLOCK_TYPE]: "callout-component";
} & TCalloutBlockIconAttributes &