interface PostFormProps {
post_view: Option<PostView>; // If a post is given, that means this is an edit
allLanguages: Language[];
+ siteLanguages: number[];
communities: Option<CommunityView[]>;
params: Option<PostFormParams>;
onCancel?(): any;
render() {
let selectedLangs = this.state.postForm.language_id
- .or(myFirstDiscussionLanguageId(UserService.Instance.myUserInfo))
+ .or(
+ myFirstDiscussionLanguageId(
+ this.props.allLanguages,
+ this.props.siteLanguages,
+ UserService.Instance.myUserInfo
+ )
+ )
.map(Array.of);
return (
enableDownvotes={this.props.enableDownvotes}
enableNsfw={this.props.enableNsfw}
allLanguages={this.props.allLanguages}
+ siteLanguages={this.props.siteLanguages}
/>
</>
),
enableDownvotes={this.props.enableDownvotes}
enableNsfw={this.props.enableNsfw}
allLanguages={this.props.allLanguages}
+ siteLanguages={this.props.siteLanguages}
/>
</>
),
buttonTitle={None}
maxLength={None}
allLanguages={this.props.allLanguages}
+ siteLanguages={this.props.siteLanguages}
/>
</div>
</div>
)}
<LanguageSelect
allLanguages={this.props.allLanguages}
+ siteLanguages={this.props.siteLanguages}
selectedLanguageIds={selectedLangs}
multiple={false}
onChange={this.handleLanguageChange}
i.state.postForm.url = Some(url);
i.setState({ imageLoading: false });
pictrsDeleteToast(
- i18n.t("click_to_delete_picture"),
- i18n.t("picture_deleted"),
+ `${i18n.t("click_to_delete_picture")}: ${file.name}`,
+ `${i18n.t("picture_deleted")}: ${file.name}`,
+ `${i18n.t("failed_to_delete_picture")}: ${file.name}`,
deleteUrl
);
} else {