mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-09-18 19:55:20 +00:00
Merge branch 'main' into broken-logo-2
This commit is contained in:
commit
4b6436ec68
|
@ -145,7 +145,7 @@
|
|||
"sortpack"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@9.5.0",
|
||||
"packageManager": "pnpm@9.6.0",
|
||||
"engineStrict": true,
|
||||
"importSort": {
|
||||
".js, .jsx, .ts, .tsx": {
|
||||
|
|
|
@ -294,7 +294,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
|||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="comment-bottom-btns d-flex justify-content-between justify-content-lg-start flex-wrap text-muted fw-bold mt-1">
|
||||
<div className="comment-bottom-btns d-flex justify-content-start column-gap-1.5 flex-wrap text-muted fw-bold mt-1 align-items-center">
|
||||
{this.props.showContext && this.getLinkButton()}
|
||||
{this.props.markable && (
|
||||
<button
|
||||
|
|
|
@ -203,6 +203,9 @@ export class CreatePost extends Component<
|
|||
title: locationState.name,
|
||||
url: locationState.url,
|
||||
body: locationState.body,
|
||||
altText: locationState.altText,
|
||||
nsfw: locationState.nsfw,
|
||||
languageId: locationState.languageId,
|
||||
});
|
||||
this.setState(s => ({ resetCounter: s.resetCounter + 1 }));
|
||||
}
|
||||
|
@ -234,6 +237,7 @@ export class CreatePost extends Component<
|
|||
title,
|
||||
nsfw,
|
||||
url,
|
||||
altText,
|
||||
} = this.props;
|
||||
|
||||
const params: PostFormParams = {
|
||||
|
@ -244,6 +248,7 @@ export class CreatePost extends Component<
|
|||
custom_thumbnail: customThumbnailUrl,
|
||||
language_id: languageId,
|
||||
nsfw: nsfw === "true",
|
||||
alt_text: altText,
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -278,6 +283,7 @@ export class CreatePost extends Component<
|
|||
onUrlBlur={this.handleUrlBlur}
|
||||
onThumbnailUrlBlur={this.handleThumbnailUrlBlur}
|
||||
onNsfwChange={this.handleNsfwChange}
|
||||
onAltTextBlur={this.handleAltTextBlur}
|
||||
onCopySuggestedTitle={this.handleCopySuggestedTitle}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -878,7 +878,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
}
|
||||
|
||||
get crossPostParams(): CrossPostParams {
|
||||
const { name, url } = this.postView.post;
|
||||
const { name, url, alt_text, nsfw, language_id } = this.postView.post;
|
||||
const crossPostParams: CrossPostParams = { name };
|
||||
|
||||
if (url) {
|
||||
|
@ -890,6 +890,18 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
crossPostParams.body = crossPostBody;
|
||||
}
|
||||
|
||||
if (alt_text) {
|
||||
crossPostParams.altText = alt_text;
|
||||
}
|
||||
|
||||
if (nsfw) {
|
||||
crossPostParams.nsfw = nsfw ? "true" : "false";
|
||||
}
|
||||
|
||||
if (language_id !== undefined) {
|
||||
crossPostParams.languageId = language_id;
|
||||
}
|
||||
|
||||
return crossPostParams;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
import StringBoolean from "./string-boolean";
|
||||
|
||||
export default interface CrossPostParams {
|
||||
name: string;
|
||||
url?: string;
|
||||
body?: string;
|
||||
altText?: string;
|
||||
nsfw?: StringBoolean;
|
||||
languageId?: number;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue