Skip to content

Commit

Permalink
Disable language selection on computing
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Feb 17, 2025
1 parent 3942694 commit 94864c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/CognateAnalysisModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ class SLSelection extends React.Component {
render() {
const {
mode,
computing,
perspective_list,
perspectiveSelectionList,
transcriptionFieldIdStrList,
Expand All @@ -517,7 +518,7 @@ class SLSelection extends React.Component {
const p_max_count = perspectiveSelectionCountMap["_max"];

return (
<div>
<div disabled={computing}>
<div className="lingvo-cognate-checkbox lingvo-cognate-checkbox_all-langs">
<Checkbox
label={this.context("Select/deselect all dictionaries")}
Expand Down Expand Up @@ -988,7 +989,7 @@ class MLSelection extends React.Component {
const p_max_count = perspectiveSelectionCountMap["_max"];

return (
<div>
<div disabled={computing}>
<div className="lingvo-cognate-checkbox lingvo-cognate-checkbox_all-langs">
<Checkbox
label={this.context("Select/deselect all dictionaries")}
Expand Down Expand Up @@ -1095,7 +1096,6 @@ class MLSelection extends React.Component {
icon={<i className="lingvo-icon lingvo-icon_arrow" />}
fluid
placeholder={this.context("Add language")}
disabled={computing}
search
selection
options={available_language_list
Expand Down Expand Up @@ -2686,12 +2686,13 @@ class CognateAnalysisModal extends React.Component {
/>
</h2>

{this.grouping_field_render()}
{this.props.mode !== "neuro_suggestions" && this.grouping_field_render()}

<div>
{this.perspective_list.length > 1 && (
<SLSelection
mode={this.props.mode}
computing={this.state.computing}
perspective_list={this.perspective_list}
perspectiveSelectionList={perspectiveSelectionList}
transcriptionFieldIdStrList={transcriptionFieldIdStrList}
Expand Down Expand Up @@ -2736,7 +2737,7 @@ class CognateAnalysisModal extends React.Component {

return (
<Modal.Content>
{this.grouping_field_render()}
{this.props.mode !== "multi_neuro_suggestions" && this.grouping_field_render()}

<MLSelection
mode={this.props.mode}
Expand Down Expand Up @@ -3542,7 +3543,7 @@ class CognateAnalysisModal extends React.Component {
CognateAnalysisModal.contextType = TranslationContext;

CognateAnalysisModal.propTypes = {
perspectiveId: PropTypes.array.isRequired,
perspectiveId: PropTypes.array,
closeModal: PropTypes.func.isRequired,
resultFile: PropTypes.string,
computeCognateAnalysis: PropTypes.func.isRequired,
Expand Down
6 changes: 6 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
font-style: normal;
}

div[disabled]
{
pointer-events: none;
opacity: 0.3;
}

body {
font-family: Rubik, Arial, sans-serif;
font-weight: normal;
Expand Down

0 comments on commit 94864c5

Please sign in to comment.