mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2025-01-01 13:08:09 +00:00
Merge pull request #1125 from skspade/1078-language-select-disable-warning
fix: Adds ability to hide language warning
This commit is contained in:
commit
6227b63ad0
|
@ -16,6 +16,7 @@ interface LanguageSelectProps {
|
||||||
showSite?: boolean;
|
showSite?: boolean;
|
||||||
iconVersion?: boolean;
|
iconVersion?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
showLanguageWarning?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
|
@ -49,7 +50,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
this.selectBtn
|
this.selectBtn
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
{this.props.multiple && (
|
{this.props.multiple && this.props.showLanguageWarning && (
|
||||||
<div className="alert alert-warning" role="alert">
|
<div className="alert alert-warning" role="alert">
|
||||||
{i18n.t("undetermined_language_warning")}
|
{i18n.t("undetermined_language_warning")}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -604,6 +604,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
siteLanguages={this.state.siteRes.discussion_languages}
|
siteLanguages={this.state.siteRes.discussion_languages}
|
||||||
selectedLanguageIds={selectedLangs}
|
selectedLanguageIds={selectedLangs}
|
||||||
multiple={true}
|
multiple={true}
|
||||||
|
showLanguageWarning={true}
|
||||||
showSite
|
showSite
|
||||||
onChange={this.handleDiscussionLanguageChange}
|
onChange={this.handleDiscussionLanguageChange}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue