Merge branch 'main' into prettier_css

This commit is contained in:
Dessalines 2023-05-03 22:07:29 -04:00 committed by GitHub
commit f8f9ea64df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 7 deletions

2
.github/CODEOWNERS vendored
View file

@ -1 +1 @@
* @dessalines * @dessalines @SleeplessOne1917

View file

@ -256,6 +256,10 @@ hr {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.text-xs-center {
text-align: center;
}
.overflow-wrap-anywhere { .overflow-wrap-anywhere {
overflow-wrap: anywhere; overflow-wrap: anywhere;
} }

View file

@ -262,7 +262,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
<li className="list-inline-item"> <li className="list-inline-item">
<Link <Link
className="badge badge-primary" className="badge badge-primary"
to={`/modlog/community/${this.props.community_view.community.id}`} to={`/modlog/${this.props.community_view.community.id}`}
> >
{i18n.t("modlog")} {i18n.t("modlog")}
</Link> </Link>

View file

@ -1,5 +1,6 @@
import { NoOptionI18nKeys } from "i18next"; import { NoOptionI18nKeys } from "i18next";
import { Component, linkEvent } from "inferno"; import { Component, linkEvent } from "inferno";
import { T } from "inferno-i18next-dess";
import { Link } from "inferno-router"; import { Link } from "inferno-router";
import { RouteComponentProps } from "inferno-router/dist/Route"; import { RouteComponentProps } from "inferno-router/dist/Route";
import { import {
@ -57,7 +58,7 @@ import {
wsSubscribe, wsSubscribe,
} from "../utils"; } from "../utils";
import { HtmlTags } from "./common/html-tags"; import { HtmlTags } from "./common/html-tags";
import { Spinner } from "./common/icon"; import { Icon, Spinner } from "./common/icon";
import { MomentTime } from "./common/moment-time"; import { MomentTime } from "./common/moment-time";
import { Paginator } from "./common/paginator"; import { Paginator } from "./common/paginator";
import { SearchableSelect } from "./common/searchable-select"; import { SearchableSelect } from "./common/searchable-select";
@ -782,6 +783,19 @@ export class Modlog extends Component<
/> />
<div> <div>
<div
className="alert alert-warning text-sm-start text-xs-center"
role="alert"
>
<Icon
icon="alert-triangle"
inline
classes="mr-sm-2 mx-auto d-sm-inline d-block"
/>
<T i18nKey="modlog_content_warning" class="d-inline">
#<strong>#</strong>#
</T>
</div>
<h5> <h5>
{communityName && ( {communityName && (
<Link className="text-body" to={`/c/${communityName}`}> <Link className="text-body" to={`/c/${communityName}`}>

View file

@ -423,7 +423,9 @@ export class Search extends Component<any, SearchState> {
{this.selects} {this.selects}
{this.searchForm} {this.searchForm}
{this.displayResults(type)} {this.displayResults(type)}
{this.resultsCount === 0 && <span>{i18n.t("no_results")}</span>} {this.resultsCount === 0 && !this.state.searchLoading && (
<span>{i18n.t("no_results")}</span>
)}
<Paginator page={page} onChange={this.handlePageChange} /> <Paginator page={page} onChange={this.handlePageChange} />
</div> </div>
); );
@ -1002,7 +1004,7 @@ export class Search extends Component<any, SearchState> {
} }
checkFinishedLoading() { checkFinishedLoading() {
if (this.state.searchResponse && this.state.resolveObjectResponse) { if (this.state.searchResponse || this.state.resolveObjectResponse) {
this.setState({ searchLoading: false }); this.setState({ searchLoading: false });
} }
} }

View file

@ -92,12 +92,12 @@ export const routes: IRoutePropsWithFetch[] = [
component: Settings, component: Settings,
}, },
{ {
path: `/modlog`, path: `/modlog/:communityId`,
component: Modlog, component: Modlog,
fetchInitialData: Modlog.fetchInitialData, fetchInitialData: Modlog.fetchInitialData,
}, },
{ {
path: `/modlog/:communityId`, path: `/modlog`,
component: Modlog, component: Modlog,
fetchInitialData: Modlog.fetchInitialData, fetchInitialData: Modlog.fetchInitialData,
}, },