mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-09 18:05:09 +00:00
Merge branch 'main' into add-post-shortcut
This commit is contained in:
commit
c48c1d8bd1
|
@ -120,6 +120,7 @@
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"webpack-dev-server": "4.15.0"
|
"webpack-dev-server": "4.15.0"
|
||||||
},
|
},
|
||||||
|
"packageManager": "yarn@1.22.19",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9.0"
|
"node": ">=8.9.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -346,7 +346,7 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html ${helmet.htmlAttributes.toString()} lang="en">
|
<html ${helmet.htmlAttributes.toString()}>
|
||||||
<head>
|
<head>
|
||||||
<script>window.isoData = ${sanitize(JSON.stringify(isoData))}</script>
|
<script>window.isoData = ${sanitize(JSON.stringify(isoData))}</script>
|
||||||
<script>window.lemmyConfig = ${serialize(config)}</script>
|
<script>window.lemmyConfig = ${serialize(config)}</script>
|
||||||
|
|
|
@ -234,6 +234,17 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="d-flex flex-wrap align-items-center text-muted small">
|
<div className="d-flex flex-wrap align-items-center text-muted small">
|
||||||
|
<button
|
||||||
|
className="btn btn-sm text-muted mr-2"
|
||||||
|
onClick={linkEvent(this, this.handleCommentCollapse)}
|
||||||
|
aria-label={this.expandText}
|
||||||
|
data-tippy-content={this.expandText}
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
icon={`${this.state.collapsed ? "plus" : "minus"}-square`}
|
||||||
|
classes="icon-inline"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
<span className="mr-2">
|
<span className="mr-2">
|
||||||
<PersonListing person={cv.creator} />
|
<PersonListing person={cv.creator} />
|
||||||
</span>
|
</span>
|
||||||
|
@ -270,18 +281,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<button
|
|
||||||
className="btn btn-sm text-muted"
|
|
||||||
onClick={linkEvent(this, this.handleCommentCollapse)}
|
|
||||||
aria-label={this.expandText}
|
|
||||||
data-tippy-content={this.expandText}
|
|
||||||
>
|
|
||||||
{this.state.collapsed ? (
|
|
||||||
<Icon icon="plus-square" classes="icon-inline" />
|
|
||||||
) : (
|
|
||||||
<Icon icon="minus-square" classes="icon-inline" />
|
|
||||||
)}
|
|
||||||
</button>
|
|
||||||
{this.linkBtn(true)}
|
{this.linkBtn(true)}
|
||||||
{cv.comment.language_id !== 0 && (
|
{cv.comment.language_id !== 0 && (
|
||||||
<span className="badge d-none d-sm-inline mr-2">
|
<span className="badge d-none d-sm-inline mr-2">
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { htmlToText } from "html-to-text";
|
||||||
import { Component } from "inferno";
|
import { Component } from "inferno";
|
||||||
import { Helmet } from "inferno-helmet";
|
import { Helmet } from "inferno-helmet";
|
||||||
import { httpExternalPath } from "../../env";
|
import { httpExternalPath } from "../../env";
|
||||||
import { md } from "../../utils";
|
import { getLanguages, md } from "../../utils";
|
||||||
|
|
||||||
interface HtmlTagsProps {
|
interface HtmlTagsProps {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -17,9 +17,12 @@ export class HtmlTags extends Component<HtmlTagsProps, any> {
|
||||||
const url = httpExternalPath(this.props.path);
|
const url = httpExternalPath(this.props.path);
|
||||||
const desc = this.props.description;
|
const desc = this.props.description;
|
||||||
const image = this.props.image;
|
const image = this.props.image;
|
||||||
|
const lang = getLanguages()[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Helmet title={this.props.title}>
|
<Helmet title={this.props.title}>
|
||||||
|
<html lang={lang == "browser" ? "en" : lang} />
|
||||||
|
|
||||||
{["title", "og:title", "twitter:title"].map(t => (
|
{["title", "og:title", "twitter:title"].map(t => (
|
||||||
<meta key={t} property={t} content={this.props.title} />
|
<meta key={t} property={t} content={this.props.title} />
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -1421,7 +1421,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.setState({ showEdit: false });
|
this.setState({ showEdit: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
// The actual editing is done in the recieve for post
|
// The actual editing is done in the receive for post
|
||||||
handleEditPost() {
|
handleEditPost() {
|
||||||
this.setState({ showEdit: false });
|
this.setState({ showEdit: false });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue