mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 15:51:14 +00:00
Merge pull request #1421 from djvs/feat/component-classes-v2
Component classes v2
This commit is contained in:
commit
91908d2872
61 changed files with 109 additions and 70 deletions
|
@ -415,7 +415,7 @@ br.big {
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoji-picker {
|
#emoji-picker {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class ErrorPage extends Component<any, any> {
|
||||||
const { errorPageData } = this.isoData;
|
const { errorPageData } = this.isoData;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg text-center">
|
<div className="error-page container-lg text-center">
|
||||||
<h1>
|
<h1>
|
||||||
{errorPageData
|
{errorPageData
|
||||||
? i18n.t("error_page_title")
|
? i18n.t("error_page_title")
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class Footer extends Component<FooterProps, any> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<footer className="container-lg navbar navbar-expand-md navbar-light navbar-bg p-3">
|
<footer className="app-footer container-lg navbar navbar-expand-md navbar-light navbar-bg p-3">
|
||||||
<div className="navbar-collapse">
|
<div className="navbar-collapse">
|
||||||
<ul className="navbar-nav ms-auto">
|
<ul className="navbar-nav ms-auto">
|
||||||
{this.props.site?.version !== VERSION && (
|
{this.props.site?.version !== VERSION && (
|
||||||
|
|
|
@ -41,7 +41,11 @@ export class CommentForm extends Component<CommentFormProps, any> {
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={["mb-3", this.props.containerClass].join(" ")}>
|
<div
|
||||||
|
className={["comment-form", "mb-3", this.props.containerClass].join(
|
||||||
|
" "
|
||||||
|
)}
|
||||||
|
>
|
||||||
{UserService.Instance.myUserInfo ? (
|
{UserService.Instance.myUserInfo ? (
|
||||||
<MarkdownTextArea
|
<MarkdownTextArea
|
||||||
initialContent={initialContent}
|
initialContent={initialContent}
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class CommentReport extends Component<
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="comment-report">
|
||||||
<CommentNode
|
<CommentNode
|
||||||
node={node}
|
node={node}
|
||||||
viewType={CommentViewType.Flat}
|
viewType={CommentViewType.Flat}
|
||||||
|
|
|
@ -26,7 +26,7 @@ const isSiteAggregates = (
|
||||||
|
|
||||||
export const Badges = ({ counts, communityId }: BadgesProps) => {
|
export const Badges = ({ counts, communityId }: BadgesProps) => {
|
||||||
return (
|
return (
|
||||||
<ul className="my-1 list-inline">
|
<ul className="badges my-1 list-inline">
|
||||||
<li
|
<li
|
||||||
className="list-inline-item badge text-bg-secondary pointer"
|
className="list-inline-item badge text-bg-secondary pointer"
|
||||||
data-tippy-content={i18n.t("active_users_in_the_last_day", {
|
data-tippy-content={i18n.t("active_users_in_the_last_day", {
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class BannerIconHeader extends Component<BannerIconHeaderProps, any> {
|
||||||
const icon = this.props.icon;
|
const icon = this.props.icon;
|
||||||
return (
|
return (
|
||||||
(banner || icon) && (
|
(banner || icon) && (
|
||||||
<div className="position-relative mb-2">
|
<div className="banner-icon-header position-relative mb-2">
|
||||||
{banner && <PictrsImage src={banner} banner alt="" />}
|
{banner && <PictrsImage src={banner} banner alt="" />}
|
||||||
{icon && (
|
{icon && (
|
||||||
<PictrsImage
|
<PictrsImage
|
||||||
|
|
|
@ -40,7 +40,7 @@ export class CommentSortSelect extends Component<
|
||||||
name={this.id}
|
name={this.id}
|
||||||
value={this.state.sort}
|
value={this.state.sort}
|
||||||
onChange={linkEvent(this, this.handleSortChange)}
|
onChange={linkEvent(this, this.handleSortChange)}
|
||||||
className="form-select d-inline-block w-auto me-2 mb-2"
|
className="sort-select form-select d-inline-block w-auto me-2 mb-2"
|
||||||
aria-label={i18n.t("sort_type")}
|
aria-label={i18n.t("sort_type")}
|
||||||
>
|
>
|
||||||
<option disabled aria-hidden="true">
|
<option disabled aria-hidden="true">
|
||||||
|
@ -52,7 +52,7 @@ export class CommentSortSelect extends Component<
|
||||||
<option value={"Old"}>{i18n.t("old")}</option>
|
<option value={"Old"}>{i18n.t("old")}</option>
|
||||||
</select>
|
</select>
|
||||||
<a
|
<a
|
||||||
className="text-muted"
|
className="sort-select-help text-muted"
|
||||||
href={sortingHelpUrl}
|
href={sortingHelpUrl}
|
||||||
rel={relTags}
|
rel={relTags}
|
||||||
title={i18n.t("sorting_help")}
|
title={i18n.t("sorting_help")}
|
||||||
|
|
|
@ -31,7 +31,7 @@ export class DataTypeSelect extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="btn-group btn-group-toggle flex-wrap">
|
<div className="data-type-select btn-group btn-group-toggle flex-wrap">
|
||||||
<label
|
<label
|
||||||
className={`pointer btn btn-outline-secondary
|
className={`pointer btn btn-outline-secondary
|
||||||
${this.state.type_ == DataType.Post && "active"}
|
${this.state.type_ == DataType.Post && "active"}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export class EmojiPicker extends Component<EmojiPickerProps, EmojiPickerState> {
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span className="emoji-picker">
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm text-muted"
|
className="btn btn-sm text-muted"
|
||||||
data-tippy-content={i18n.t("emoji")}
|
data-tippy-content={i18n.t("emoji")}
|
||||||
|
|
|
@ -59,7 +59,7 @@ export class PurgeWarning extends Component<any, any> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="mt-2 alert alert-danger" role="alert">
|
<div className="purge-warning mt-2 alert alert-danger" role="alert">
|
||||||
<Icon icon="alert-triangle" classes="icon-inline me-2" />
|
<Icon icon="alert-triangle" classes="icon-inline me-2" />
|
||||||
{i18n.t("purge_warning")}
|
{i18n.t("purge_warning")}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class ImageUploadForm extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<form className="d-inline">
|
<form className="image-upload-form d-inline">
|
||||||
<label
|
<label
|
||||||
htmlFor={this.id}
|
htmlFor={this.id}
|
||||||
className="pointer text-muted small font-weight-bold"
|
className="pointer text-muted small font-weight-bold"
|
||||||
|
|
|
@ -49,7 +49,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
return this.props.iconVersion ? (
|
return this.props.iconVersion ? (
|
||||||
this.selectBtn
|
this.selectBtn
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div className="language-select">
|
||||||
{this.props.multiple && this.props.showLanguageWarning && (
|
{this.props.multiple && this.props.showLanguageWarning && (
|
||||||
<div className="alert alert-warning" role="alert">
|
<div className="alert alert-warning" role="alert">
|
||||||
{i18n.t("undetermined_language_warning")}
|
{i18n.t("undetermined_language_warning")}
|
||||||
|
|
|
@ -39,7 +39,7 @@ export class ListingTypeSelect extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="btn-group btn-group-toggle flex-wrap">
|
<div className="listing-type-select btn-group btn-group-toggle flex-wrap">
|
||||||
{this.props.showSubscribed && (
|
{this.props.showSubscribed && (
|
||||||
<label
|
<label
|
||||||
title={i18n.t("subscribed_description")}
|
title={i18n.t("subscribed_description")}
|
||||||
|
|
|
@ -136,7 +136,11 @@ export class MarkdownTextArea extends Component<
|
||||||
// message={i18n.t("block_leaving")}
|
// message={i18n.t("block_leaving")}
|
||||||
// />
|
// />
|
||||||
return (
|
return (
|
||||||
<form id={this.formId} onSubmit={linkEvent(this, this.handleSubmit)}>
|
<form
|
||||||
|
className="markdown-textarea"
|
||||||
|
id={this.formId}
|
||||||
|
onSubmit={linkEvent(this, this.handleSubmit)}
|
||||||
|
>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={
|
when={
|
||||||
!this.props.hideNavigationWarnings &&
|
!this.props.hideNavigationWarnings &&
|
||||||
|
|
|
@ -36,7 +36,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
data-tippy-content={this.createdAndModifiedTimes()}
|
data-tippy-content={this.createdAndModifiedTimes()}
|
||||||
className="font-italics pointer unselectable"
|
className="moment-time font-italics pointer unselectable"
|
||||||
>
|
>
|
||||||
<Icon icon="edit-2" classes="icon-inline me-1" />
|
<Icon icon="edit-2" classes="icon-inline me-1" />
|
||||||
{moment.utc(this.props.updated).fromNow(!this.props.showAgo)}
|
{moment.utc(this.props.updated).fromNow(!this.props.showAgo)}
|
||||||
|
@ -46,7 +46,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
|
||||||
const published = this.props.published;
|
const published = this.props.published;
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
className="pointer unselectable"
|
className="moment-time pointer unselectable"
|
||||||
data-tippy-content={this.format(published)}
|
data-tippy-content={this.format(published)}
|
||||||
>
|
>
|
||||||
{moment.utc(published).fromNow(!this.props.showAgo)}
|
{moment.utc(published).fromNow(!this.props.showAgo)}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class Paginator extends Component<PaginatorProps, any> {
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="my-2">
|
<div className="paginator my-2">
|
||||||
<button
|
<button
|
||||||
className="btn btn-secondary me-2"
|
className="btn btn-secondary me-2"
|
||||||
disabled={this.props.page == 1}
|
disabled={this.props.page == 1}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<picture className="d-inline-block overflow-hidden">
|
<picture className="pictrs-image d-inline-block overflow-hidden">
|
||||||
<source srcSet={this.src("webp")} type="image/webp" />
|
<source srcSet={this.src("webp")} type="image/webp" />
|
||||||
<source srcSet={this.props.src} />
|
<source srcSet={this.props.src} />
|
||||||
<source srcSet={this.src("jpg")} type="image/jpeg" />
|
<source srcSet={this.src("jpg")} type="image/jpeg" />
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class RegistrationApplication extends Component<
|
||||||
const accepted = a.creator_local_user.accepted_application;
|
const accepted = a.creator_local_user.accepted_application;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="registration-application">
|
||||||
<div>
|
<div>
|
||||||
{i18n.t("applicant")}: <PersonListing person={a.creator} />
|
{i18n.t("applicant")}: <PersonListing person={a.creator} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -102,7 +102,7 @@ export class SearchableSelect extends Component<
|
||||||
const { searchText, selectedIndex, loadingEllipses } = this.state;
|
const { searchText, selectedIndex, loadingEllipses } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dropdown">
|
<div className="searchable-select dropdown">
|
||||||
<button
|
<button
|
||||||
id={id}
|
id={id}
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -39,7 +39,7 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
|
||||||
name={this.id}
|
name={this.id}
|
||||||
value={this.state.sort}
|
value={this.state.sort}
|
||||||
onChange={linkEvent(this, this.handleSortChange)}
|
onChange={linkEvent(this, this.handleSortChange)}
|
||||||
className="form-select d-inline-block w-auto me-2"
|
className="sort-select form-select d-inline-block w-auto me-2"
|
||||||
aria-label={i18n.t("sort_type")}
|
aria-label={i18n.t("sort_type")}
|
||||||
>
|
>
|
||||||
<option disabled aria-hidden="true">
|
<option disabled aria-hidden="true">
|
||||||
|
@ -73,7 +73,7 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
|
||||||
<option value={"TopAll"}>{i18n.t("top_all")}</option>
|
<option value={"TopAll"}>{i18n.t("top_all")}</option>
|
||||||
</select>
|
</select>
|
||||||
<a
|
<a
|
||||||
className="text-muted"
|
className="sort-select-icon text-muted"
|
||||||
href={sortingHelpUrl}
|
href={sortingHelpUrl}
|
||||||
rel={relTags}
|
rel={relTags}
|
||||||
title={i18n.t("sorting_help")}
|
title={i18n.t("sorting_help")}
|
||||||
|
|
|
@ -208,7 +208,7 @@ export class Communities extends Component<any, CommunitiesState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="communities container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -85,7 +85,10 @@ export class CommunityForm extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}>
|
<form
|
||||||
|
className="community-form"
|
||||||
|
onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}
|
||||||
|
>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={
|
when={
|
||||||
!this.props.loading &&
|
!this.props.loading &&
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
|
||||||
return !this.props.realLink ? (
|
return !this.props.realLink ? (
|
||||||
<Link
|
<Link
|
||||||
title={apubName}
|
title={apubName}
|
||||||
className={`${this.props.muted ? "text-muted" : ""}`}
|
className={`community-link ${this.props.muted ? "text-muted" : ""}`}
|
||||||
to={link}
|
to={link}
|
||||||
>
|
>
|
||||||
{this.avatarAndName(displayName)}
|
{this.avatarAndName(displayName)}
|
||||||
|
@ -45,7 +45,7 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
|
||||||
) : (
|
) : (
|
||||||
<a
|
<a
|
||||||
title={apubName}
|
title={apubName}
|
||||||
className={`${this.props.muted ? "text-muted" : ""}`}
|
className={`community-link ${this.props.muted ? "text-muted" : ""}`}
|
||||||
href={link}
|
href={link}
|
||||||
rel={relTags}
|
rel={relTags}
|
||||||
>
|
>
|
||||||
|
|
|
@ -358,7 +358,9 @@ export class Community extends Component<
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div className="container-lg">{this.renderCommunity()}</div>;
|
return (
|
||||||
|
<div className="community container-lg">{this.renderCommunity()}</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebar(res: GetCommunityResponse) {
|
sidebar(res: GetCommunityResponse) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class CreateCommunity extends Component<any, CreateCommunityState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="create-community container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -109,7 +109,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="community-sidebar">
|
||||||
{!this.state.showEdit ? (
|
{!this.state.showEdit ? (
|
||||||
this.sidebar()
|
this.sidebar()
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -120,7 +120,7 @@ export class AdminSettings extends Component<any, AdminSettingsState> {
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="admin-settings container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class EmojiForm extends Component<EmojiFormProps, EmojiFormState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="col-12">
|
<div className="home-emojis-form col-12">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -375,7 +375,7 @@ export class Home extends Component<any, HomeState> {
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="home container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -109,7 +109,7 @@ export class Instances extends Component<any, InstancesState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="home-instances container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export class Legal extends Component<any, LegalState> {
|
||||||
render() {
|
render() {
|
||||||
const legal = this.state.siteRes.site_view.local_site.legal_information;
|
const legal = this.state.siteRes.site_view.local_site.legal_information;
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="legal container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -49,7 +49,7 @@ export class Login extends Component<any, State> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="login container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -133,7 +133,10 @@ export default class RateLimitsForm extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, submitRateLimitForm)}>
|
<form
|
||||||
|
className="rate-limit-form"
|
||||||
|
onSubmit={linkEvent(this, submitRateLimitForm)}
|
||||||
|
>
|
||||||
<h5>{i18n.t("rate_limit_header")}</h5>
|
<h5>{i18n.t("rate_limit_header")}</h5>
|
||||||
<Tabs
|
<Tabs
|
||||||
tabs={rateLimitTypes.map(rateLimitType => ({
|
tabs={rateLimitTypes.map(rateLimitType => ({
|
||||||
|
|
|
@ -60,7 +60,7 @@ export class Setup extends Component<any, State> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="home-setup container-lg">
|
||||||
<Helmet title={this.documentTitle} />
|
<Helmet title={this.documentTitle} />
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12 offset-lg-3 col-lg-6">
|
<div className="col-12 offset-lg-3 col-lg-6">
|
||||||
|
|
|
@ -127,7 +127,7 @@ export class Signup extends Component<any, State> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="home-signup container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -120,7 +120,10 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
|
||||||
render() {
|
render() {
|
||||||
const siteSetup = this.props.siteRes.site_view.local_site.site_setup;
|
const siteSetup = this.props.siteRes.site_view.local_site.site_setup;
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handleSaveSiteSubmit)}>
|
<form
|
||||||
|
className="site-form"
|
||||||
|
onSubmit={linkEvent(this, this.handleSaveSiteSubmit)}
|
||||||
|
>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={
|
when={
|
||||||
!this.props.loading &&
|
!this.props.loading &&
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="accordion">
|
<div className="site-sidebar accordion">
|
||||||
<section id="sidebarInfo" className="card border-secondary mb-3">
|
<section id="sidebarInfo" className="card border-secondary mb-3">
|
||||||
<header
|
<header
|
||||||
className="card-header d-flex align-items-center"
|
className="card-header d-flex align-items-center"
|
||||||
|
|
|
@ -31,7 +31,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="col-12">
|
<div className="tagline-form col-12">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -742,7 +742,7 @@ export class Modlog extends Component<
|
||||||
const { actionType, modId, userId } = getModlogQueryParams();
|
const { actionType, modId, userId } = getModlogQueryParams();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="modlog container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -10,7 +10,7 @@ export class CakeDay extends Component<CakeDayProps, any> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`mx-2 d-inline-block unselectable pointer`}
|
className={`cake-day mx-2 d-inline-block unselectable pointer`}
|
||||||
data-tippy-content={this.cakeDayTippy()}
|
data-tippy-content={this.cakeDayTippy()}
|
||||||
>
|
>
|
||||||
<Icon icon="cake" classes="icon-inline" />
|
<Icon icon="cake" classes="icon-inline" />
|
||||||
|
|
|
@ -216,7 +216,7 @@ export class Inbox extends Component<any, InboxState> {
|
||||||
const auth = myAuth();
|
const auth = myAuth();
|
||||||
const inboxRss = auth ? `/feeds/inbox/${auth}.xml` : undefined;
|
const inboxRss = auth ? `/feeds/inbox/${auth}.xml` : undefined;
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="inbox container-lg">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
|
|
|
@ -40,7 +40,7 @@ export class PasswordChange extends Component<any, State> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="password-change container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -109,7 +109,7 @@ export class PersonDetails extends Component<PersonDetailsProps, any> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="person-details">
|
||||||
{this.viewSelector(this.props.view)}
|
{this.viewSelector(this.props.view)}
|
||||||
|
|
||||||
<Paginator page={this.props.page} onChange={this.handlePageChange} />
|
<Paginator page={this.props.page} onChange={this.handlePageChange} />
|
||||||
|
|
|
@ -49,10 +49,13 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
||||||
{!this.props.realLink ? (
|
{!this.props.realLink ? (
|
||||||
<Link
|
<Link
|
||||||
title={apubName}
|
title={apubName}
|
||||||
className={classNames("d-inline-flex align-items-baseline", {
|
className={classNames(
|
||||||
|
"person-listing d-inline-flex align-items-baseline",
|
||||||
|
{
|
||||||
"text-muted": this.props.muted,
|
"text-muted": this.props.muted,
|
||||||
"text-info": !this.props.muted,
|
"text-info": !this.props.muted,
|
||||||
})}
|
}
|
||||||
|
)}
|
||||||
to={link}
|
to={link}
|
||||||
>
|
>
|
||||||
{this.avatarAndName(displayName)}
|
{this.avatarAndName(displayName)}
|
||||||
|
@ -60,7 +63,7 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
||||||
) : (
|
) : (
|
||||||
<a
|
<a
|
||||||
title={apubName}
|
title={apubName}
|
||||||
className={`d-inline-flex align-items-baseline ${
|
className={`person-listing d-inline-flex align-items-baseline ${
|
||||||
this.props.muted ? "text-muted" : "text-info"
|
this.props.muted ? "text-muted" : "text-info"
|
||||||
}`}
|
}`}
|
||||||
href={link}
|
href={link}
|
||||||
|
|
|
@ -389,7 +389,11 @@ export class Profile extends Component<
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div className="container-lg">{this.renderPersonRes()}</div>;
|
return (
|
||||||
|
<div className="person-profile container-lg">
|
||||||
|
{this.renderPersonRes()}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get viewRadios() {
|
get viewRadios() {
|
||||||
|
|
|
@ -117,7 +117,11 @@ export class RegistrationApplications extends Component<
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div className="container-lg">{this.renderApps()}</div>;
|
return (
|
||||||
|
<div className="registration-applications container-lg">
|
||||||
|
{this.renderApps()}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unreadOrAllRadios() {
|
unreadOrAllRadios() {
|
||||||
|
|
|
@ -142,7 +142,7 @@ export class Reports extends Component<any, ReportsState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="person-reports container-lg">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
|
|
|
@ -240,7 +240,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="person-settings container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -52,7 +52,7 @@ export class VerifyEmail extends Component<any, State> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="verfy-email container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class CreatePost extends Component<
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="create-post container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class MetadataCard extends Component<
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!this.state.expanded && post.embed_title && post.url && (
|
{!this.state.expanded && post.embed_title && post.url && (
|
||||||
<div className="card border-secondary mt-3 mb-2">
|
<div className="post-metadata-card card border-secondary mt-3 mb-2">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
|
@ -75,7 +75,10 @@ export class MetadataCard extends Component<
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{this.state.expanded && post.embed_video_url && (
|
{this.state.expanded && post.embed_video_url && (
|
||||||
<iframe src={post.embed_video_url}></iframe>
|
<iframe
|
||||||
|
className="post-metadata-iframe"
|
||||||
|
src={post.embed_video_url}
|
||||||
|
></iframe>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -193,7 +193,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
// !!this.state.form.name || !!this.state.form.url || !!this.state.form.body;
|
// !!this.state.form.name || !!this.state.form.url || !!this.state.form.body;
|
||||||
// <Prompt when={promptCheck} message={i18n.t("block_leaving")} />
|
// <Prompt when={promptCheck} message={i18n.t("block_leaving")} />
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handlePostSubmit)}>
|
<form
|
||||||
|
className="post-form"
|
||||||
|
onSubmit={linkEvent(this, this.handlePostSubmit)}
|
||||||
|
>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={
|
when={
|
||||||
!!(
|
!!(
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class PostListings extends Component<PostListingsProps, any> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="post-listings">
|
||||||
{this.posts.length > 0 ? (
|
{this.posts.length > 0 ? (
|
||||||
this.posts.map((post_view, idx) => (
|
this.posts.map((post_view, idx) => (
|
||||||
<>
|
<>
|
||||||
|
|
|
@ -60,7 +60,7 @@ export class PostReport extends Component<PostReportProps, PostReportState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="post-report">
|
||||||
<PostListing
|
<PostListing
|
||||||
post_view={pv}
|
post_view={pv}
|
||||||
showCommunity={true}
|
showCommunity={true}
|
||||||
|
|
|
@ -424,7 +424,7 @@ export class Post extends Component<any, PostState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div className="container-lg">{this.renderPostRes()}</div>;
|
return <div className="post container-lg">{this.renderPostRes()}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
sortRadios() {
|
sortRadios() {
|
||||||
|
|
|
@ -134,7 +134,7 @@ export class CreatePrivateMessage extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="create-private-message container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
|
@ -73,7 +73,10 @@ export class PrivateMessageForm extends Component<
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<form onSubmit={linkEvent(this, this.handlePrivateMessageSubmit)}>
|
<form
|
||||||
|
className="private-message-form"
|
||||||
|
onSubmit={linkEvent(this, this.handlePrivateMessageSubmit)}
|
||||||
|
>
|
||||||
<NavigationPrompt
|
<NavigationPrompt
|
||||||
when={
|
when={
|
||||||
!this.state.loading && !!this.state.content && !this.state.submitted
|
!this.state.loading && !!this.state.content && !this.state.submitted
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class PrivateMessageReport extends Component<Props, State> {
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="private-message-report">
|
||||||
<div>
|
<div>
|
||||||
{i18n.t("creator")}:{" "}
|
{i18n.t("creator")}:{" "}
|
||||||
<PersonListing person={r.private_message_creator} />
|
<PersonListing person={r.private_message_creator} />
|
||||||
|
|
|
@ -88,7 +88,7 @@ export class PrivateMessage extends Component<
|
||||||
: message_view.creator;
|
: message_view.creator;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border-top border-light">
|
<div className="private-message border-top border-light">
|
||||||
<div>
|
<div>
|
||||||
<ul className="list-inline mb-0 text-muted small">
|
<ul className="list-inline mb-0 text-muted small">
|
||||||
{/* TODO refactor this */}
|
{/* TODO refactor this */}
|
||||||
|
|
|
@ -455,7 +455,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
const { type, page } = getSearchQueryParams();
|
const { type, page } = getSearchQueryParams();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container-lg">
|
<div className="search container-lg">
|
||||||
<HtmlTags
|
<HtmlTags
|
||||||
title={this.documentTitle}
|
title={this.documentTitle}
|
||||||
path={this.context.router.route.match.url}
|
path={this.context.router.route.match.url}
|
||||||
|
|
Loading…
Reference in a new issue