Skip to content

Commit

Permalink
Show preview
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Nov 15, 2023
1 parent 483bf07 commit 4ede4b6
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/components/ConvertEafModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ class ConvertEafModal extends React.Component {
additionalEntries: true,
additionalEntriesAll: true,
useAdditionalMarkup: false,
additionalMarkupInfo: null
additionalMarkupInfo: null,
preview: {}
};
this.convert = this.convert.bind(this);
this.handleModeChange = this.handleModeChange.bind(this);
Expand Down Expand Up @@ -337,7 +338,8 @@ class ConvertEafModal extends React.Component {
selection_count,
total_count,
markup_entity_id_list
}
},
preview: is_valid_list[0]
});
},
error => {
Expand Down Expand Up @@ -455,7 +457,8 @@ class ConvertEafModal extends React.Component {
additionalEntries,
additionalEntriesAll,
useAdditionalMarkup,
additionalMarkupInfo
additionalMarkupInfo,
preview
} = this.state;

const dictMap = {};
Expand Down Expand Up @@ -578,6 +581,14 @@ class ConvertEafModal extends React.Component {
</div>
{mode === "new" && (
<div style={{ minHeight: "500px" }}>
<div style={{ width: "80%", marginBottom: "2em" }}>
{ [ 'text', 'transcription', 'word', 'other text' ].map(tier => (
<span hidden = {!(tier in preview)}>
<label style={{ float: "left", width: "100px", fontWeight: "bold" }}>{tier}</label>
{preview[tier]}<br/>
</span>
))}
</div>
<div>
<Header>{this.context("Add one or more translations")}</Header>
<Translations
Expand Down

0 comments on commit 4ede4b6

Please sign in to comment.