1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-11 02:13:48 +09:00

JS-3461: empty state

This commit is contained in:
Andrew Simachev 2023-12-04 13:36:24 +01:00
parent 9f215d1f23
commit a960c414af
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
2 changed files with 5 additions and 6 deletions

View file

@ -529,7 +529,7 @@
"blockEmbedLatexPlaceholder": "Enter text in format LaTeX",
"blockEmbedLatexTemplate": "Template formula",
"blockEmbedLatexEmpty": "Here your equation will be rendered with <span class='icon text'></span>. Click to edit",
"blockEmbedEmpty": "%s embed block is empty. Click to edit.",
"blockEmbedSource": "Source",
"blockTableOfContentsAdd": "Add headings to create a table of contents",

View file

@ -5,7 +5,7 @@ import raf from 'raf';
import mermaid from 'mermaid';
import { observer } from 'mobx-react';
import { Icon, Label, Button } from 'Component';
import { I, keyboard, UtilCommon, C, focus, Renderer, translate, UtilEmbed } from 'Lib';
import { I, C, keyboard, UtilCommon, UtilMenu, focus, Renderer, translate, UtilEmbed } from 'Lib';
import { menuStore, commonStore, blockStore } from 'Store';
import { getRange, setRange } from 'selection-ranges';
import Constant from 'json/constant.json';
@ -67,14 +67,13 @@ const BlockEmbed = observer(class BlockEmbedIndex extends React.Component<I.Bloc
empty = translate('blockEmbedLatexEmpty');
break;
};
case I.EmbedProcessor.Mermaid: {
break;
};
};
if (processor != I.EmbedProcessor.Latex) {
const menuItem = UtilMenu.getBlockEmbed().find(it => it.id == processor);
button = <Button className="source c28" text={translate('blockEmbedSource')} onClick={this.onEdit} />;
empty = UtilCommon.sprintf(translate('blockEmbedEmpty'), menuItem.name);
};
return (