Merge branch 'main' into 1117-jump-to-main-content

This commit is contained in:
SleeplessOne1917 2023-06-17 02:19:59 +00:00 committed by GitHub
commit 9165433282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 248 additions and 219 deletions

View File

@ -46,7 +46,7 @@
} }
.md-div p:last-child { .md-div p:last-child {
margin-bottom: 0px; margin-bottom: 0;
} }
.md-div img { .md-div img {
@ -371,7 +371,7 @@ br.big {
} }
.tribute-container li { .tribute-container li {
padding: 5px 5px; padding: 5px;
cursor: pointer; cursor: pointer;
} }
@ -410,14 +410,8 @@ br.big {
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.lang-select-action {
width: 100px;
}
.lang-select-action:focus { .emoji-picker {
width: auto;
}
em-emoji-picker {
width: 100%; width: 100%;
} }

View File

@ -19,6 +19,7 @@
--warning: #f39c12; --warning: #f39c12;
--danger: #e74c3c; --danger: #e74c3c;
--light: #303030; --light: #303030;
--medium-light: var(--secondary);
--dark: #dee2e6; --dark: #dee2e6;
--breakpoint-xs: 0; --breakpoint-xs: 0;
--breakpoint-sm: 576px; --breakpoint-sm: 576px;

View File

@ -19,6 +19,7 @@
--warning: #ffc107; --warning: #ffc107;
--danger: #873208; --danger: #873208;
--light: #f8f9fa; --light: #f8f9fa;
--medium-light: var(--bs-gray-300);
--dark: #343a40; --dark: #343a40;
--breakpoint-xs: 0; --breakpoint-xs: 0;
--breakpoint-sm: 576px; --breakpoint-sm: 576px;

View File

@ -32,7 +32,7 @@ export class App extends Component<any, any> {
return ( return (
<> <>
<Provider i18next={i18n}> <Provider i18next={i18n}>
<div id="app"> <div id="app" className="lemmy-site">
<a <a
className="skip-link bg-light text-dark p-2 text-decoration-none position-absolute start-0 z-3" className="skip-link bg-light text-dark p-2 text-decoration-none position-absolute start-0 z-3"
onClick={linkEvent(this, this.handleJumpToContent)} onClick={linkEvent(this, this.handleJumpToContent)}

View File

@ -16,7 +16,7 @@ export class Footer extends Component<FooterProps, any> {
render() { render() {
return ( return (
<nav className="container-lg navbar navbar-expand-md navbar-light navbar-bg p-3"> <footer className="container-lg navbar navbar-expand-md navbar-light navbar-bg p-3">
<div className="navbar-collapse"> <div className="navbar-collapse">
<ul className="navbar-nav ml-auto"> <ul className="navbar-nav ml-auto">
{this.props.site?.version !== VERSION && ( {this.props.site?.version !== VERSION && (
@ -63,7 +63,7 @@ export class Footer extends Component<FooterProps, any> {
</li> </li>
</ul> </ul>
</div> </div>
</nav> </footer>
); );
} }
} }

View File

@ -86,8 +86,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
const siteView = this.props.siteRes?.site_view; const siteView = this.props.siteRes?.site_view;
const person = UserService.Instance.myUserInfo?.local_user_view.person; const person = UserService.Instance.myUserInfo?.local_user_view.person;
return ( return (
<nav className="navbar navbar-expand-md navbar-light shadow-sm p-0 px-3 container-lg"> <nav
className="navbar navbar-expand-md navbar-light shadow-sm p-0 px-3 container-lg"
id="navbar"
>
<NavLink <NavLink
id="navTitle"
to="/" to="/"
title={siteView?.site.description ?? siteView?.site.name} title={siteView?.site.description ?? siteView?.site.name}
className="d-flex align-items-center navbar-brand mr-md-3" className="d-flex align-items-center navbar-brand mr-md-3"
@ -100,10 +104,10 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</NavLink> </NavLink>
{person && ( {person && (
<ul className="navbar-nav d-flex flex-row ml-auto d-md-none"> <ul className="navbar-nav d-flex flex-row ml-auto d-md-none">
<li className="nav-item"> <li id="navMessages" className="nav-item nav-item-icon">
<NavLink <NavLink
to="/inbox" to="/inbox"
className="p-1 nav-link border-0" className="p-1 nav-link border-0 nav-messages"
title={i18n.t("unread_messages", { title={i18n.t("unread_messages", {
count: Number(this.state.unreadApplicationCountRes.state), count: Number(this.state.unreadApplicationCountRes.state),
formattedCount: numToSI(this.unreadInboxCount), formattedCount: numToSI(this.unreadInboxCount),
@ -119,7 +123,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</NavLink> </NavLink>
</li> </li>
{this.moderatesSomething && ( {this.moderatesSomething && (
<li className="nav-item"> <li className="nav-item nav-item-icon">
<NavLink <NavLink
to="/reports" to="/reports"
className="p-1 nav-link border-0" className="p-1 nav-link border-0"
@ -139,7 +143,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</li> </li>
)} )}
{amAdmin() && ( {amAdmin() && (
<li className="nav-item"> <li className="nav-item nav-item-icon">
<NavLink <NavLink
to="/registration_applications" to="/registration_applications"
className="p-1 nav-link border-0" className="p-1 nav-link border-0"
@ -178,7 +182,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
id="navbarDropdown" id="navbarDropdown"
ref={this.mobileMenuRef} ref={this.mobileMenuRef}
> >
<ul className="mr-auto navbar-nav"> <ul id="navbarLinks" className="mr-auto navbar-nav">
<li className="nav-item"> <li className="nav-item">
<NavLink <NavLink
to="/communities" to="/communities"
@ -228,8 +232,8 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</a> </a>
</li> </li>
</ul> </ul>
<ul className="navbar-nav"> <ul id="navbarIcons" className="navbar-nav">
<li className="nav-item"> <li id="navSearch" className="nav-item">
<NavLink <NavLink
to="/search" to="/search"
className="nav-link" className="nav-link"
@ -240,7 +244,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</NavLink> </NavLink>
</li> </li>
{amAdmin() && ( {amAdmin() && (
<li className="nav-item"> <li id="navAdmin" className="nav-item">
<NavLink <NavLink
to="/admin" to="/admin"
className="nav-link" className="nav-link"
@ -253,7 +257,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
)} )}
{person ? ( {person ? (
<> <>
<li className="nav-item"> <li id="navMessages" className="nav-item">
<NavLink <NavLink
className="nav-link" className="nav-link"
to="/inbox" to="/inbox"
@ -272,7 +276,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</NavLink> </NavLink>
</li> </li>
{this.moderatesSomething && ( {this.moderatesSomething && (
<li className="nav-item"> <li id="navModeration" className="nav-item">
<NavLink <NavLink
className="nav-link" className="nav-link"
to="/reports" to="/reports"
@ -292,7 +296,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</li> </li>
)} )}
{amAdmin() && ( {amAdmin() && (
<li className="nav-item"> <li id="navApplications" className="nav-item">
<NavLink <NavLink
to="/registration_applications" to="/registration_applications"
className="nav-link" className="nav-link"
@ -312,7 +316,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
</li> </li>
)} )}
{person && ( {person && (
<div className="dropdown"> <div id="dropdownUser" className="dropdown">
<button <button
className="btn dropdown-toggle" className="btn dropdown-toggle"
role="button" role="button"

View File

@ -21,6 +21,7 @@ interface CommentFormProps {
onReplyCancel?(): void; onReplyCancel?(): void;
allLanguages: Language[]; allLanguages: Language[];
siteLanguages: number[]; siteLanguages: number[];
containerClass?: string;
onUpsertComment(form: EditComment | CreateComment): void; onUpsertComment(form: EditComment | CreateComment): void;
} }
@ -40,7 +41,7 @@ export class CommentForm extends Component<CommentFormProps, any> {
: undefined; : undefined;
return ( return (
<div className="mb-3"> <div className={["mb-3", this.props.containerClass].join(" ")}>
{UserService.Instance.myUserInfo ? ( {UserService.Instance.myUserInfo ? (
<MarkdownTextArea <MarkdownTextArea
initialContent={initialContent} initialContent={initialContent}

View File

@ -282,7 +282,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
return ( return (
<li className="comment" role="comment"> <li className="comment" role="comment">
<div <article
id={`comment-${cv.comment.id}`} id={`comment-${cv.comment.id}`}
className={classNames(`details comment-node py-2`, { className={classNames(`details comment-node py-2`, {
"border-top border-light": !this.props.noBorder, "border-top border-light": !this.props.noBorder,
@ -400,6 +400,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
focus focus
allLanguages={this.props.allLanguages} allLanguages={this.props.allLanguages}
siteLanguages={this.props.siteLanguages} siteLanguages={this.props.siteLanguages}
containerClass="comment-comment-container"
onUpsertComment={this.props.onEditComment} onUpsertComment={this.props.onEditComment}
/> />
)} )}
@ -512,7 +513,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</button> </button>
{!this.state.showAdvanced ? ( {!this.state.showAdvanced ? (
<button <button
className="btn btn-link btn-animate text-muted" className="btn btn-link btn-animate text-muted btn-more"
onClick={linkEvent(this, this.handleShowAdvanced)} onClick={linkEvent(this, this.handleShowAdvanced)}
data-tippy-content={i18n.t("more")} data-tippy-content={i18n.t("more")}
aria-label={i18n.t("more")} aria-label={i18n.t("more")}
@ -944,7 +945,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</div> </div>
)} )}
</div> </div>
</div> </article>
{showMoreChildren && ( {showMoreChildren && (
<div <div
className={classNames("details ml-1 comment-node py-2", { className={classNames("details ml-1 comment-node py-2", {
@ -1143,6 +1144,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
focus focus
allLanguages={this.props.allLanguages} allLanguages={this.props.allLanguages}
siteLanguages={this.props.siteLanguages} siteLanguages={this.props.siteLanguages}
containerClass="comment-comment-container"
onUpsertComment={this.props.onCreateComment} onUpsertComment={this.props.onCreateComment}
/> />
)} )}

View File

@ -100,12 +100,9 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
return ( return (
<select <select
className={classNames( className={classNames("lang-select-action", {
"lang-select-action", "form-control custom-select": !this.props.iconVersion,
this.props.iconVersion })}
? "btn btn-sm text-muted"
: "form-control custom-select"
)}
id={this.id} id={this.id}
onChange={linkEvent(this, this.handleLanguageChange)} onChange={linkEvent(this, this.handleLanguageChange)}
aria-label={i18n.t("language_select_placeholder")} aria-label={i18n.t("language_select_placeholder")}

View File

@ -1,4 +1,5 @@
import autosize from "autosize"; import autosize from "autosize";
import classNames from "classnames";
import { NoOptionI18nKeys } from "i18next"; import { NoOptionI18nKeys } from "i18next";
import { Component, linkEvent } from "inferno"; import { Component, linkEvent } from "inferno";
import { Language } from "lemmy-js-client"; import { Language } from "lemmy-js-client";
@ -63,8 +64,9 @@ export class MarkdownTextArea extends Component<
MarkdownTextAreaProps, MarkdownTextAreaProps,
MarkdownTextAreaState MarkdownTextAreaState
> { > {
private id = `comment-textarea-${randomStr()}`; private id = `markdown-textarea-${randomStr()}`;
private formId = `comment-form-${randomStr()}`; private formId = `markdown-form-${randomStr()}`;
private tribute: any; private tribute: any;
state: MarkdownTextAreaState = { state: MarkdownTextAreaState = {
@ -143,47 +145,19 @@ export class MarkdownTextArea extends Component<
} }
/> />
<div className="form-group row"> <div className="form-group row">
<div className={`col-sm-12`}> <div className="col-12">
<textarea
id={this.id}
className={`form-control ${this.state.previewMode && "d-none"}`}
value={this.state.content}
onInput={linkEvent(this, this.handleContentChange)}
onPaste={linkEvent(this, this.handleImageUploadPaste)}
onKeyDown={linkEvent(this, this.handleKeyBinds)}
required
disabled={this.isDisabled}
rows={2}
maxLength={this.props.maxLength ?? markdownFieldCharacterLimit}
placeholder={this.props.placeholder}
/>
{this.state.previewMode && this.state.content && (
<div <div
className="card border-secondary card-body md-div" className="rounded bg-light overflow-hidden"
dangerouslySetInnerHTML={mdToHtml(this.state.content)} style={{
/> border: "1px solid var(--medium-light)",
)} }}
{this.state.imageUploadStatus && >
this.state.imageUploadStatus.total > 1 && ( <div
<ProgressBar className="d-flex flex-wrap"
className="mt-2" style={{
striped "border-bottom": "1px solid var(--medium-light)",
animated }}
value={this.state.imageUploadStatus.uploaded} >
max={this.state.imageUploadStatus.total}
text={i18n.t("pictures_uploded_progess", {
uploaded: this.state.imageUploadStatus.uploaded,
total: this.state.imageUploadStatus.total,
})}
/>
)}
</div>
<label className="sr-only" htmlFor={this.id}>
{i18n.t("body")}
</label>
</div>
<div className="row">
<div className="col-sm-12 d-flex flex-wrap">
{this.getFormatButton("bold", this.handleInsertBold)} {this.getFormatButton("bold", this.handleInsertBold)}
{this.getFormatButton("italic", this.handleInsertItalic)} {this.getFormatButton("italic", this.handleInsertItalic)}
{this.getFormatButton("link", this.handleInsertLink)} {this.getFormatButton("link", this.handleInsertLink)}
@ -212,7 +186,9 @@ export class MarkdownTextArea extends Component<
name="file" name="file"
className="d-none" className="d-none"
multiple multiple
disabled={!UserService.Instance.myUserInfo || this.isDisabled} disabled={
!UserService.Instance.myUserInfo || this.isDisabled
}
onChange={linkEvent(this, this.handleImageUpload)} onChange={linkEvent(this, this.handleImageUpload)}
/> />
</form> </form>
@ -225,7 +201,10 @@ export class MarkdownTextArea extends Component<
{this.getFormatButton("list", this.handleInsertList)} {this.getFormatButton("list", this.handleInsertList)}
{this.getFormatButton("code", this.handleInsertCode)} {this.getFormatButton("code", this.handleInsertCode)}
{this.getFormatButton("subscript", this.handleInsertSubscript)} {this.getFormatButton("subscript", this.handleInsertSubscript)}
{this.getFormatButton("superscript", this.handleInsertSuperscript)} {this.getFormatButton(
"superscript",
this.handleInsertSuperscript
)}
{this.getFormatButton("spoiler", this.handleInsertSpoiler)} {this.getFormatButton("spoiler", this.handleInsertSpoiler)}
<a <a
href={markdownHelpUrl} href={markdownHelpUrl}
@ -237,7 +216,52 @@ export class MarkdownTextArea extends Component<
</a> </a>
</div> </div>
<div className="col-sm-12 d-flex align-items-center flex-wrap"> <div>
<textarea
id={this.id}
className={classNames("form-control border-0 rounded-0", {
"d-none": this.state.previewMode,
})}
value={this.state.content}
onInput={linkEvent(this, this.handleContentChange)}
onPaste={linkEvent(this, this.handleImageUploadPaste)}
onKeyDown={linkEvent(this, this.handleKeyBinds)}
required
disabled={this.isDisabled}
rows={2}
maxLength={
this.props.maxLength ?? markdownFieldCharacterLimit
}
placeholder={this.props.placeholder}
/>
{this.state.previewMode && this.state.content && (
<div
className="card border-secondary card-body md-div"
dangerouslySetInnerHTML={mdToHtml(this.state.content)}
/>
)}
{this.state.imageUploadStatus &&
this.state.imageUploadStatus.total > 1 && (
<ProgressBar
className="mt-2"
striped
animated
value={this.state.imageUploadStatus.uploaded}
max={this.state.imageUploadStatus.total}
text={i18n.t("pictures_uploded_progess", {
uploaded: this.state.imageUploadStatus.uploaded,
total: this.state.imageUploadStatus.total,
})}
/>
)}
</div>
<label className="sr-only" htmlFor={this.id}>
{i18n.t("body")}
</label>
</div>
</div>
<div className="col-12 d-flex align-items-center flex-wrap mt-2">
{this.props.showLanguage && ( {this.props.showLanguage && (
<LanguageSelect <LanguageSelect
iconVersion iconVersion
@ -257,7 +281,7 @@ export class MarkdownTextArea extends Component<
{this.props.buttonTitle && ( {this.props.buttonTitle && (
<button <button
type="submit" type="submit"
className="btn btn-sm btn-secondary mr-2" className="btn btn-sm btn-secondary ml-2"
disabled={this.isDisabled} disabled={this.isDisabled}
> >
{this.state.loading ? ( {this.state.loading ? (
@ -270,7 +294,7 @@ export class MarkdownTextArea extends Component<
{this.props.replyType && ( {this.props.replyType && (
<button <button
type="button" type="button"
className="btn btn-sm btn-secondary mr-2" className="btn btn-sm btn-secondary ml-2"
onClick={linkEvent(this, this.handleReplyCancel)} onClick={linkEvent(this, this.handleReplyCancel)}
> >
{i18n.t("cancel")} {i18n.t("cancel")}
@ -278,7 +302,7 @@ export class MarkdownTextArea extends Component<
)} )}
{this.state.content && ( {this.state.content && (
<button <button
className={`btn btn-sm btn-secondary mr-2 ${ className={`btn btn-sm btn-secondary ml-2 ${
this.state.previewMode && "active" this.state.previewMode && "active"
}`} }`}
onClick={linkEvent(this, this.handlePreviewToggle)} onClick={linkEvent(this, this.handlePreviewToggle)}

View File

@ -131,8 +131,9 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
const myUSerInfo = UserService.Instance.myUserInfo; const myUSerInfo = UserService.Instance.myUserInfo;
const { name, actor_id } = this.props.community_view.community; const { name, actor_id } = this.props.community_view.community;
return ( return (
<div> <aside className="mb-3">
<div className="card border-secondary mb-3"> <div id="sidebarContainer">
<section id="sidebarMain" className="card border-secondary mb-3">
<div className="card-body"> <div className="card-body">
{this.communityTitle()} {this.communityTitle()}
{this.props.editable && this.adminButtons()} {this.props.editable && this.adminButtons()}
@ -153,15 +154,16 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
</div> </div>
)} )}
</div> </div>
</div> </section>
<div className="card border-secondary mb-3"> <section id="sidebarInfo" className="card border-secondary mb-3">
<div className="card-body"> <div className="card-body">
{this.description()} {this.description()}
{this.badges()} {this.badges()}
{this.mods()} {this.mods()}
</div> </div>
</section>
</div> </div>
</div> </aside>
); );
} }

View File

@ -419,9 +419,8 @@ export class Home extends Component<any, HomeState> {
} = this.state; } = this.state;
return ( return (
<div> <div id="sidebarContainer">
<div> <section id="sidebarMain" className="card border-secondary mb-3">
<div className="card border-secondary mb-3">
<div className="card-body"> <div className="card-body">
{this.trendingCommunities()} {this.trendingCommunities()}
{canCreateCommunity(this.state.siteRes) && ( {canCreateCommunity(this.state.siteRes) && (
@ -435,7 +434,7 @@ export class Home extends Component<any, HomeState> {
translationKey="explore_communities" translationKey="explore_communities"
/> />
</div> </div>
</div> </section>
<SiteSidebar <SiteSidebar
site={site} site={site}
admins={admins} admins={admins}
@ -443,12 +442,14 @@ export class Home extends Component<any, HomeState> {
showLocal={showLocal(this.isoData)} showLocal={showLocal(this.isoData)}
/> />
{this.hasFollows && ( {this.hasFollows && (
<div className="card border-secondary mb-3"> <section
id="sidebarSubscribed"
className="card border-secondary mb-3"
>
<div className="card-body">{this.subscribedCommunities}</div> <div className="card-body">{this.subscribedCommunities}</div>
</div> </section>
)} )}
</div> </div>
</div>
); );
} }

View File

@ -172,7 +172,7 @@ export class Login extends Component<any, State> {
toast(i18n.t("enter_two_factor_code"), "info"); toast(i18n.t("enter_two_factor_code"), "info");
} }
i.setState({ loginRes: { state: "empty" } }); i.setState({ loginRes: { state: "failed", msg: loginRes.msg } });
break; break;
} }

View File

@ -29,7 +29,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
render() { render() {
return ( return (
<div className="card border-secondary mb-3"> <section id="sidebarInfo" className="card border-secondary mb-3">
<div className="card-body"> <div className="card-body">
<div> <div>
<div className="mb-2">{this.siteName()}</div> <div className="mb-2">{this.siteName()}</div>
@ -41,7 +41,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
)} )}
</div> </div>
</div> </div>
</div> </section>
); );
} }

View File

@ -166,7 +166,10 @@ export class CreatePost extends Component<
</h5> </h5>
) : ( ) : (
<div className="row"> <div className="row">
<div className="col-12 col-lg-6 offset-lg-3 mb-4"> <div
id="createPostForm"
className="col-12 col-lg-6 offset-lg-3 mb-4"
>
<h5>{i18n.t("create_post")}</h5> <h5>{i18n.t("create_post")}</h5>
<PostForm <PostForm
onCreate={this.handlePostCreate} onCreate={this.handlePostCreate}

View File

@ -230,13 +230,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
body() { body() {
const body = this.postView.post.body; const body = this.postView.post.body;
return body ? ( return body ? (
<div className="col-12 card my-2 p-2"> <article id="postContent" className="col-12 card my-2 p-2">
{this.state.viewSource ? ( {this.state.viewSource ? (
<pre>{body}</pre> <pre>{body}</pre>
) : ( ) : (
<div className="md-div" dangerouslySetInnerHTML={mdToHtml(body)} /> <div className="md-div" dangerouslySetInnerHTML={mdToHtml(body)} />
)} )}
</div> </article>
) : ( ) : (
<></> <></>
); );
@ -464,7 +464,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</button> </button>
{showScores() ? ( {showScores() ? (
<div <div
className={`unselectable pointer font-weight-bold text-muted px-1`} className={`unselectable pointer font-weight-bold text-muted px-1 post-score`}
data-tippy-content={this.pointsTippy} data-tippy-content={this.pointsTippy}
> >
{numToSI(this.postView.counts.score)} {numToSI(this.postView.counts.score)}
@ -631,7 +631,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
const post = this.postView.post; const post = this.postView.post;
return ( return (
<div className="d-flex justify-content-start flex-wrap text-muted font-weight-bold mb-1"> <div className="d-flex align-items-center justify-content-start flex-wrap text-muted font-weight-bold mb-1">
{this.commentsButton} {this.commentsButton}
{canShare() && ( {canShare() && (
<button <button
@ -1398,7 +1398,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
{/* The mobile view*/} {/* The mobile view*/}
<div className="d-block d-sm-none"> <div className="d-block d-sm-none">
<div className="row"> <article className="row post-container">
<div className="col-12"> <div className="col-12">
{this.createdLine()} {this.createdLine()}
@ -1413,14 +1413,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
{this.duplicatesLine()} {this.duplicatesLine()}
{this.removeAndBanDialogs()} {this.removeAndBanDialogs()}
</div> </div>
</div> </article>
</div> </div>
{/* The larger view*/} {/* The larger view*/}
<div className="d-none d-sm-block"> <div className="d-none d-sm-block">
<div className="row"> <article className="row post-container">
{!this.props.viewOnly && this.voteBar()} {!this.props.viewOnly && this.voteBar()}
<div className="col-sm-2 pr-0"> <div className="col-sm-2 pr-0 post-media">
<div className="">{this.thumbnail()}</div> <div className="">{this.thumbnail()}</div>
</div> </div>
<div className="col-12 col-sm-9"> <div className="col-12 col-sm-9">
@ -1435,7 +1435,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</div> </div>
</div> </div>
</div> </div>
</div> </article>
</div> </div>
</> </>
); );

View File

@ -384,6 +384,7 @@ export class Post extends Component<any, PostState> {
disabled={res.post_view.post.locked} disabled={res.post_view.post.locked}
allLanguages={this.state.siteRes.all_languages} allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages} siteLanguages={this.state.siteRes.discussion_languages}
containerClass="post-comment-container"
onUpsertComment={this.handleCreateComment} onUpsertComment={this.handleCreateComment}
finished={this.state.finished.get(0)} finished={this.state.finished.get(0)}
/> />
@ -547,7 +548,6 @@ export class Post extends Component<any, PostState> {
const res = this.state.postRes; const res = this.state.postRes;
if (res.state === "success") { if (res.state === "success") {
return ( return (
<div className="mb-3">
<Sidebar <Sidebar
community_view={res.data.community_view} community_view={res.data.community_view}
moderators={res.data.moderators} moderators={res.data.moderators}
@ -564,7 +564,6 @@ export class Post extends Component<any, PostState> {
onBlockCommunity={this.handleBlockCommunity} onBlockCommunity={this.handleBlockCommunity}
onEditCommunity={this.handleEditCommunity} onEditCommunity={this.handleEditCommunity}
/> />
</div>
); );
} }
} }