Merge branch 'main' into chore/sass-cleanup
This commit is contained in:
commit
2f1e349e17
4 changed files with 41 additions and 20 deletions
|
@ -224,11 +224,14 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
)}
|
)}
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<a
|
<a
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
title={i18n.t("support_lemmy")}
|
title={i18n.t("support_lemmy")}
|
||||||
href={donateLemmyUrl}
|
href={donateLemmyUrl}
|
||||||
>
|
>
|
||||||
<Icon icon="heart" classes="small" />
|
<Icon icon="heart" classes="small" />
|
||||||
|
<span className="d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("support_lemmy")}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -236,22 +239,28 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
<li id="navSearch" className="nav-item">
|
<li id="navSearch" className="nav-item">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/search"
|
to="/search"
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
title={i18n.t("search")}
|
title={i18n.t("search")}
|
||||||
onMouseUp={linkEvent(this, handleCollapseClick)}
|
onMouseUp={linkEvent(this, handleCollapseClick)}
|
||||||
>
|
>
|
||||||
<Icon icon="search" />
|
<Icon icon="search" />
|
||||||
|
<span className="d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("search")}
|
||||||
|
</span>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
{amAdmin() && (
|
{amAdmin() && (
|
||||||
<li id="navAdmin" className="nav-item">
|
<li id="navAdmin" className="nav-item">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/admin"
|
to="/admin"
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
title={i18n.t("admin_settings")}
|
title={i18n.t("admin_settings")}
|
||||||
onMouseUp={linkEvent(this, handleCollapseClick)}
|
onMouseUp={linkEvent(this, handleCollapseClick)}
|
||||||
>
|
>
|
||||||
<Icon icon="settings" />
|
<Icon icon="settings" />
|
||||||
|
<span className="d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("admin_settings")}
|
||||||
|
</span>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
|
@ -259,7 +268,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
<>
|
<>
|
||||||
<li id="navMessages" className="nav-item">
|
<li id="navMessages" className="nav-item">
|
||||||
<NavLink
|
<NavLink
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
to="/inbox"
|
to="/inbox"
|
||||||
title={i18n.t("unread_messages", {
|
title={i18n.t("unread_messages", {
|
||||||
count: Number(this.unreadInboxCount),
|
count: Number(this.unreadInboxCount),
|
||||||
|
@ -268,6 +277,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
onMouseUp={linkEvent(this, handleCollapseClick)}
|
onMouseUp={linkEvent(this, handleCollapseClick)}
|
||||||
>
|
>
|
||||||
<Icon icon="bell" />
|
<Icon icon="bell" />
|
||||||
|
<span className="badge badge-light d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("unread_messages", {
|
||||||
|
count: Number(this.unreadInboxCount),
|
||||||
|
formattedCount: numToSI(this.unreadInboxCount),
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
{this.unreadInboxCount > 0 && (
|
{this.unreadInboxCount > 0 && (
|
||||||
<span className="mx-1 badge badge-light">
|
<span className="mx-1 badge badge-light">
|
||||||
{numToSI(this.unreadInboxCount)}
|
{numToSI(this.unreadInboxCount)}
|
||||||
|
@ -278,7 +293,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
{this.moderatesSomething && (
|
{this.moderatesSomething && (
|
||||||
<li id="navModeration" className="nav-item">
|
<li id="navModeration" className="nav-item">
|
||||||
<NavLink
|
<NavLink
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
to="/reports"
|
to="/reports"
|
||||||
title={i18n.t("unread_reports", {
|
title={i18n.t("unread_reports", {
|
||||||
count: Number(this.unreadReportCount),
|
count: Number(this.unreadReportCount),
|
||||||
|
@ -287,6 +302,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
onMouseUp={linkEvent(this, handleCollapseClick)}
|
onMouseUp={linkEvent(this, handleCollapseClick)}
|
||||||
>
|
>
|
||||||
<Icon icon="shield" />
|
<Icon icon="shield" />
|
||||||
|
<span className="badge badge-light d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("unread_reports", {
|
||||||
|
count: Number(this.unreadReportCount),
|
||||||
|
formattedCount: numToSI(this.unreadReportCount),
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
{this.unreadReportCount > 0 && (
|
{this.unreadReportCount > 0 && (
|
||||||
<span className="mx-1 badge badge-light">
|
<span className="mx-1 badge badge-light">
|
||||||
{numToSI(this.unreadReportCount)}
|
{numToSI(this.unreadReportCount)}
|
||||||
|
@ -299,7 +320,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
<li id="navApplications" className="nav-item">
|
<li id="navApplications" className="nav-item">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/registration_applications"
|
to="/registration_applications"
|
||||||
className="nav-link"
|
className="nav-link d-inline-flex align-items-center d-md-inline-block"
|
||||||
title={i18n.t("unread_registration_applications", {
|
title={i18n.t("unread_registration_applications", {
|
||||||
count: Number(this.unreadApplicationCount),
|
count: Number(this.unreadApplicationCount),
|
||||||
formattedCount: numToSI(this.unreadApplicationCount),
|
formattedCount: numToSI(this.unreadApplicationCount),
|
||||||
|
@ -307,6 +328,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
||||||
onMouseUp={linkEvent(this, handleCollapseClick)}
|
onMouseUp={linkEvent(this, handleCollapseClick)}
|
||||||
>
|
>
|
||||||
<Icon icon="clipboard" />
|
<Icon icon="clipboard" />
|
||||||
|
<span className="badge badge-light d-inline ml-1 d-md-none ml-md-0">
|
||||||
|
{i18n.t("unread_registration_applications", {
|
||||||
|
count: Number(this.unreadApplicationCount),
|
||||||
|
formattedCount: numToSI(this.unreadApplicationCount),
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
{this.unreadApplicationCount > 0 && (
|
{this.unreadApplicationCount > 0 && (
|
||||||
<span className="mx-1 badge badge-light">
|
<span className="mx-1 badge badge-light">
|
||||||
{numToSI(this.unreadApplicationCount)}
|
{numToSI(this.unreadApplicationCount)}
|
||||||
|
|
|
@ -210,7 +210,7 @@ export class MarkdownTextArea extends Component<
|
||||||
<textarea
|
<textarea
|
||||||
id={this.id}
|
id={this.id}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"form-control border-0 rounded-bottom",
|
"form-control border-0 rounded-top-0 rounded-bottom",
|
||||||
{
|
{
|
||||||
"d-none": this.state.previewMode,
|
"d-none": this.state.previewMode,
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,16 +107,6 @@ export class PersonDetails extends Component<PersonDetailsProps, any> {
|
||||||
setupTippy();
|
setupTippy();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO wut?
|
|
||||||
// componentDidUpdate(lastProps: UserDetailsProps) {
|
|
||||||
// for (const key of Object.keys(lastProps)) {
|
|
||||||
// if (lastProps[key] !== this.props[key]) {
|
|
||||||
// this.fetchUserData();
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -73,10 +73,14 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
||||||
const avatar = this.props.person.avatar;
|
const avatar = this.props.person.avatar;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{avatar &&
|
{!this.props.hideAvatar &&
|
||||||
!this.props.hideAvatar &&
|
|
||||||
!this.props.person.banned &&
|
!this.props.person.banned &&
|
||||||
showAvatars() && <PictrsImage src={avatar} icon />}
|
showAvatars() && (
|
||||||
|
<PictrsImage
|
||||||
|
src={avatar ?? "/static/assets/icons/icon-96x96.png"}
|
||||||
|
icon
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<span>{displayName}</span>
|
<span>{displayName}</span>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue