Merge branch 'main' into breakout-role-utils

This commit is contained in:
Alec Armbruster 2023-06-20 10:17:52 -04:00 committed by GitHub
commit b8fd516f02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 35129 additions and 24675 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "lemmy-ui", "name": "lemmy-ui",
"version": "0.18.0-rc.2", "version": "0.18.0-beta.9",
"description": "An isomorphic UI for lemmy", "description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui", "repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0", "license": "AGPL-3.0",
@ -12,11 +12,14 @@
"build:prod": "webpack --mode=production", "build:prod": "webpack --mode=production",
"clean": "yarn run rimraf dist", "clean": "yarn run rimraf dist",
"dev": "yarn start", "dev": "yarn start",
"lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx \"src/**\" && prettier --check \"src/**/*.{ts,tsx,js,css,scss}\"", "lint": "yarn translations:generate && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx \"src/**\" && prettier --check \"src/**/*.{ts,tsx,js,css,scss}\"",
"prepare": "husky install", "prepare": "husky install",
"start": "yarn build:dev --watch", "start": "yarn build:dev --watch",
"themes:build": "sass src/assets/css/themes/:src/assets/css/themes", "themes:build": "sass src/assets/css/themes/:src/assets/css/themes",
"themes:watch": "sass --watch src/assets/css/themes/:src/assets/css/themes" "themes:watch": "sass --watch src/assets/css/themes/:src/assets/css/themes",
"translations:generate": "node generate_translations.js",
"translations:init": "git submodule init && yarn translations:update",
"translations:update": "git submodule update --remote --recursive"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,tsx,js}": [ "*.{ts,tsx,js}": [
@ -103,7 +106,6 @@
"@types/toastify-js": "^1.11.1", "@types/toastify-js": "^1.11.1",
"@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5", "@typescript-eslint/parser": "^5.59.5",
"bootstrap-v4": "npm:bootstrap@^4.6.2",
"eslint": "^8.40.0", "eslint": "^8.40.0",
"eslint-plugin-inferno": "^7.32.2", "eslint-plugin-inferno": "^7.32.2",
"eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-jsx-a11y": "^6.7.1",

View file

@ -36,7 +36,7 @@
margin-top: -10px; margin-top: -10px;
} }
.custom-select { .form-select {
-moz-appearance: none; -moz-appearance: none;
} }
@ -266,6 +266,14 @@ hr {
-ms-transform: scale(1.2); -ms-transform: scale(1.2);
} }
/**
* TODO: Fix this in markup rather than this overly specific selector:
* https://getbootstrap.com/docs/5.3/components/buttons/#block-buttons
*/
.btn.d-block + .btn.d-block {
margin-top: 0.5rem;
}
.mini-overlay { .mini-overlay {
position: absolute; position: absolute;
top: 0; top: 0;

View file

@ -4,10 +4,4 @@ $primary: $blue;
$secondary: #444; $secondary: #444;
$light: $gray-800; $light: $gray-800;
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"light": $light,
);
$link-color: $red; $link-color: $red;

View file

@ -1,3 +1,5 @@
@import "./variables";
// Colors // Colors
$white: #fff; $white: #fff;
$gray-200: #ebebeb; $gray-200: #ebebeb;
@ -8,48 +10,21 @@ $gray-700: #444;
$gray-800: #303030; $gray-800: #303030;
$gray-900: #222; $gray-900: #222;
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$grays: (
"gray-200": $gray-200,
"gray-600": $gray-600,
"gray-700": $gray-700,
"gray-800": $gray-800,
"gray-900": $gray-900,
);
$blue: #375a7f; $blue: #375a7f;
$red: #e74c3c; $red: #e74c3c;
$yellow: #f39c12; $yellow: #f39c12;
$green: #00bc8c; $green: #00bc8c;
$cyan: #3498db; $cyan: #3498db;
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$colors: (
"blue": $blue,
"red": $red,
"yellow": $yellow,
"green": $green,
"cyan": $cyan,
);
$primary: $green; $primary: $green;
$secondary: $gray-700; $secondary: $gray-700;
$success: $green; $success: $green;
$dark: $gray-300; $dark: $gray-300;
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"dark": $dark,
);
$body-color: $gray-300; $body-color: $gray-300;
$body-bg: $gray-900; $body-bg: $gray-900;
$link-color: $success; $link-color: $success;
$border-color: rgba($body-color, 0.25);
$mark-bg: #333; $mark-bg: #333;
$text-muted: $gray-600; $text-muted: $gray-600;
$yiq-contrasted-threshold: 175; $yiq-contrasted-threshold: 175;
@ -94,7 +69,6 @@ $input-group-addon-bg: $gray-700;
$hr-border-color: rgba($body-color, 0.25); $hr-border-color: rgba($body-color, 0.25);
$table-accent-bg: $gray-800;
$table-border-color: $gray-700; $table-border-color: $gray-700;
$custom-file-color: $gray-500; $custom-file-color: $gray-500;

View file

@ -2,8 +2,3 @@
$secondary: #c80000; $secondary: #c80000;
$danger: darken($primary, 24%); $danger: darken($primary, 24%);
$theme-colors: (
"secondary": $secondary,
"danger": $danger,
);

View file

@ -1,58 +1,30 @@
@import "./variables";
// Colors // Colors
$gray-100: #f8f9fa; $gray-100: #f8f9fa;
$gray-200: #e9ecef;
$gray-600: #6c757d; $gray-600: #6c757d;
$gray-700: #495057; $gray-700: #495057;
$gray-800: #343a40; $gray-800: #343a40;
$gray-900: #212529; $gray-900: #212529;
$black: #222; $black: #222;
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$grays: (
"gray-200": $gray-200,
"gray-600": $gray-600,
"gray-700": $gray-700,
"gray-800": $gray-800,
"gray-900": $gray-900,
);
$blue: #007bff; $blue: #007bff;
$indigo: #6610f2; $indigo: #6610f2;
$red: #d8486a; $red: #d8486a;
$orange: #f1641e; $orange: #f1641e;
$green: #00c853; $green: #00a846;
$cyan: #02bdc2; $cyan: #02bdc2;
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$colors: (
"red": $red,
"orange": $orange,
"cyan": $cyan,
"green": $green,
);
$primary: $orange; $primary: $orange;
$secondary: $green; $secondary: $green;
$success: $indigo; $success: $indigo;
$info: $blue; $info: $blue;
$danger: darken($primary, 25%); $danger: darken($primary, 25%);
// Writing these maps is necessary for Bootstrap theming:
// https://getbootstrap.com/docs/4.6/getting-started/introduction/
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"danger": $danger,
);
$body-color: $gray-700; $body-color: $gray-700;
$body-bg: #fff; $body-bg: #fff;
$link-color: $primary; $link-color: $primary;
$border-color: $gray-700; $border-color: rgba($body-color, 0.25);
$mark-bg: rgb(255, 252, 239); $mark-bg: rgb(255, 252, 239);
$headings-color: $gray-700; $headings-color: $gray-700;

View file

@ -0,0 +1,6 @@
$link-decoration: none;
$min-contrast-ratio: 3;
$container-max-widths: (
lg: 1140px,
);

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
@import "variables.darkly-red"; @import "variables.darkly-red";
@import "../../../../node_modules/bootstrap-v4/scss/bootstrap"; @import "../../../../node_modules/bootstrap/scss/bootstrap";

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
@import "variables.darkly"; @import "variables.darkly";
@import "../../../../node_modules/bootstrap-v4/scss/bootstrap"; @import "../../../../node_modules/bootstrap/scss/bootstrap";

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
@import "variables.litely-red"; @import "variables.litely-red";
@import "../../../../node_modules/bootstrap-v4/scss/bootstrap"; @import "../../../../node_modules/bootstrap/scss/bootstrap";

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
@import "variables.litely"; @import "variables.litely";
@import "../../../../node_modules/bootstrap-v4/scss/bootstrap"; @import "../../../../node_modules/bootstrap/scss/bootstrap";

View file

@ -18,7 +18,7 @@ export class Footer extends Component<FooterProps, any> {
return ( return (
<footer 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 ms-auto">
{this.props.site?.version !== VERSION && ( {this.props.site?.version !== VERSION && (
<li className="nav-item"> <li className="nav-item">
<span className="nav-link">UI: {VERSION}</span> <span className="nav-link">UI: {VERSION}</span>

View file

@ -93,7 +93,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
id="navTitle" 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 me-md-3"
onMouseUp={linkEvent(this, handleCollapseClick)} onMouseUp={linkEvent(this, handleCollapseClick)}
> >
{siteView?.site.icon && showAvatars() && ( {siteView?.site.icon && showAvatars() && (
@ -102,7 +102,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
{siteView?.site.name} {siteView?.site.name}
</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 ms-auto d-md-none">
<li id="navMessages" className="nav-item nav-item-icon"> <li id="navMessages" className="nav-item nav-item-icon">
<NavLink <NavLink
to="/inbox" to="/inbox"
@ -115,7 +115,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
> >
<Icon icon="bell" /> <Icon icon="bell" />
{this.unreadInboxCount > 0 && ( {this.unreadInboxCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadInboxCount)} {numToSI(this.unreadInboxCount)}
</span> </span>
)} )}
@ -134,7 +134,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
> >
<Icon icon="shield" /> <Icon icon="shield" />
{this.unreadReportCount > 0 && ( {this.unreadReportCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadReportCount)} {numToSI(this.unreadReportCount)}
</span> </span>
)} )}
@ -154,7 +154,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
> >
<Icon icon="clipboard" /> <Icon icon="clipboard" />
{this.unreadApplicationCount > 0 && ( {this.unreadApplicationCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadApplicationCount)} {numToSI(this.unreadApplicationCount)}
</span> </span>
)} )}
@ -181,7 +181,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
id="navbarDropdown" id="navbarDropdown"
ref={this.mobileMenuRef} ref={this.mobileMenuRef}
> >
<ul id="navbarLinks" className="mr-auto navbar-nav"> <ul id="navbarLinks" className="me-auto navbar-nav">
<li className="nav-item"> <li className="nav-item">
<NavLink <NavLink
to="/communities" to="/communities"
@ -228,7 +228,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
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"> <span className="d-inline ms-1 d-md-none ms-md-0">
{i18n.t("support_lemmy")} {i18n.t("support_lemmy")}
</span> </span>
</a> </a>
@ -243,7 +243,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
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"> <span className="d-inline ms-1 d-md-none ms-md-0">
{i18n.t("search")} {i18n.t("search")}
</span> </span>
</NavLink> </NavLink>
@ -257,7 +257,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
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"> <span className="d-inline ms-1 d-md-none ms-md-0">
{i18n.t("admin_settings")} {i18n.t("admin_settings")}
</span> </span>
</NavLink> </NavLink>
@ -276,14 +276,14 @@ 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"> <span className="badge text-bg-light d-inline ms-1 d-md-none ms-md-0">
{i18n.t("unread_messages", { {i18n.t("unread_messages", {
count: Number(this.unreadInboxCount), count: Number(this.unreadInboxCount),
formattedCount: numToSI(this.unreadInboxCount), formattedCount: numToSI(this.unreadInboxCount),
})} })}
</span> </span>
{this.unreadInboxCount > 0 && ( {this.unreadInboxCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadInboxCount)} {numToSI(this.unreadInboxCount)}
</span> </span>
)} )}
@ -301,14 +301,14 @@ 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"> <span className="badge text-bg-light d-inline ms-1 d-md-none ms-md-0">
{i18n.t("unread_reports", { {i18n.t("unread_reports", {
count: Number(this.unreadReportCount), count: Number(this.unreadReportCount),
formattedCount: numToSI(this.unreadReportCount), formattedCount: numToSI(this.unreadReportCount),
})} })}
</span> </span>
{this.unreadReportCount > 0 && ( {this.unreadReportCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadReportCount)} {numToSI(this.unreadReportCount)}
</span> </span>
)} )}
@ -327,14 +327,14 @@ 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"> <span className="badge text-bg-light d-inline ms-1 d-md-none ms-md-0">
{i18n.t("unread_registration_applications", { {i18n.t("unread_registration_applications", {
count: Number(this.unreadApplicationCount), count: Number(this.unreadApplicationCount),
formattedCount: numToSI(this.unreadApplicationCount), formattedCount: numToSI(this.unreadApplicationCount),
})} })}
</span> </span>
{this.unreadApplicationCount > 0 && ( {this.unreadApplicationCount > 0 && (
<span className="mx-1 badge badge-light"> <span className="mx-1 badge text-bg-light">
{numToSI(this.unreadApplicationCount)} {numToSI(this.unreadApplicationCount)}
</span> </span>
)} )}
@ -365,7 +365,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
title={i18n.t("profile")} title={i18n.t("profile")}
onMouseUp={linkEvent(this, handleCollapseClick)} onMouseUp={linkEvent(this, handleCollapseClick)}
> >
<Icon icon="user" classes="mr-1" /> <Icon icon="user" classes="me-1" />
{i18n.t("profile")} {i18n.t("profile")}
</NavLink> </NavLink>
</li> </li>
@ -376,7 +376,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
title={i18n.t("settings")} title={i18n.t("settings")}
onMouseUp={linkEvent(this, handleCollapseClick)} onMouseUp={linkEvent(this, handleCollapseClick)}
> >
<Icon icon="settings" classes="mr-1" /> <Icon icon="settings" classes="me-1" />
{i18n.t("settings")} {i18n.t("settings")}
</NavLink> </NavLink>
</li> </li>
@ -388,7 +388,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
className="dropdown-item btn btn-link px-2" className="dropdown-item btn btn-link px-2"
onClick={linkEvent(this, handleLogOut)} onClick={linkEvent(this, handleLogOut)}
> >
<Icon icon="log-out" classes="mr-1" /> <Icon icon="log-out" classes="me-1" />
{i18n.t("logout")} {i18n.t("logout")}
</button> </button>
</li> </li>

View file

@ -59,7 +59,7 @@ export class CommentForm extends Component<CommentFormProps, any> {
/> />
) : ( ) : (
<div className="alert alert-warning" role="alert"> <div className="alert alert-warning" role="alert">
<Icon icon="alert-triangle" classes="icon-inline mr-2" /> <Icon icon="alert-triangle" classes="icon-inline me-2" />
<T i18nKey="must_login" class="d-inline"> <T i18nKey="must_login" class="d-inline">
# #
<Link className="alert-link" to="/login"> <Link className="alert-link" to="/login">

View file

@ -293,12 +293,12 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
> >
<div <div
className={classNames({ className={classNames({
"ml-2": !this.props.noIndent, "ms-2": !this.props.noIndent,
})} })}
> >
<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 <button
className="btn btn-sm text-muted mr-2" className="btn btn-sm text-muted me-2"
onClick={linkEvent(this, this.handleCommentCollapse)} onClick={linkEvent(this, this.handleCommentCollapse)}
aria-label={this.expandText} aria-label={this.expandText}
data-tippy-content={this.expandText} data-tippy-content={this.expandText}
@ -308,29 +308,29 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
classes="icon-inline" classes="icon-inline"
/> />
</button> </button>
<span className="mr-2"> <span className="me-2">
<PersonListing person={cv.creator} /> <PersonListing person={cv.creator} />
</span> </span>
{cv.comment.distinguished && ( {cv.comment.distinguished && (
<Icon icon="shield" inline classes={`text-danger mr-2`} /> <Icon icon="shield" inline classes={`text-danger me-2`} />
)} )}
{this.isPostCreator && ( {this.isPostCreator && (
<div className="badge badge-light d-none d-sm-inline mr-2"> <div className="badge text-bg-light d-none d-sm-inline me-2">
{i18n.t("creator")} {i18n.t("creator")}
</div> </div>
)} )}
{isMod_ && ( {isMod_ && (
<div className="badge d-none d-sm-inline mr-2"> <div className="badge text-bg-light d-none d-sm-inline me-2">
{i18n.t("mod")} {i18n.t("mod")}
</div> </div>
)} )}
{isAdmin_ && ( {isAdmin_ && (
<div className="badge d-none d-sm-inline mr-2"> <div className="badge text-bg-light d-none d-sm-inline me-2">
{i18n.t("admin")} {i18n.t("admin")}
</div> </div>
)} )}
{cv.creator.bot_account && ( {cv.creator.bot_account && (
<div className="badge d-none d-sm-inline mr-2"> <div className="badge text-bg-light d-none d-sm-inline me-2">
{i18n.t("bot_account").toLowerCase()} {i18n.t("bot_account").toLowerCase()}
</div> </div>
)} )}
@ -339,14 +339,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<span className="mx-1">{i18n.t("to")}</span> <span className="mx-1">{i18n.t("to")}</span>
<CommunityLink community={cv.community} /> <CommunityLink community={cv.community} />
<span className="mx-2"></span> <span className="mx-2"></span>
<Link className="mr-2" to={`/post/${cv.post.id}`}> <Link className="me-2" to={`/post/${cv.post.id}`}>
{cv.post.name} {cv.post.name}
</Link> </Link>
</> </>
)} )}
{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 text-bg-light d-none d-sm-inline me-2">
{ {
this.props.allLanguages.find( this.props.allLanguages.find(
lang => lang.id === cv.comment.language_id lang => lang.id === cv.comment.language_id
@ -355,7 +355,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</span> </span>
)} )}
{/* This is an expanding spacer for mobile */} {/* This is an expanding spacer for mobile */}
<div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" /> <div className="me-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" />
{showScores() && ( {showScores() && (
<> <>
<a <a
@ -367,7 +367,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<Spinner /> <Spinner />
) : ( ) : (
<span <span
className="mr-1 font-weight-bold" className="me-1 font-weight-bold"
aria-label={i18n.t("number_of_points", { aria-label={i18n.t("number_of_points", {
count: Number(this.commentView.counts.score), count: Number(this.commentView.counts.score),
formattedCount: numToSI( formattedCount: numToSI(
@ -379,7 +379,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</span> </span>
)} )}
</a> </a>
<span className="mr-1"></span> <span className="me-1"></span>
</> </>
)} )}
<span> <span>
@ -470,7 +470,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
{showScores() && {showScores() &&
this.commentView.counts.upvotes !== this.commentView.counts.upvotes !==
this.commentView.counts.score && ( this.commentView.counts.score && (
<span className="ml-1"> <span className="ms-1">
{numToSI(this.commentView.counts.upvotes)} {numToSI(this.commentView.counts.upvotes)}
</span> </span>
)} )}
@ -497,7 +497,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
{showScores() && {showScores() &&
this.commentView.counts.upvotes !== this.commentView.counts.upvotes !==
this.commentView.counts.score && ( this.commentView.counts.score && (
<span className="ml-1"> <span className="ms-1">
{numToSI(this.commentView.counts.downvotes)} {numToSI(this.commentView.counts.downvotes)}
</span> </span>
)} )}
@ -950,7 +950,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</article> </article>
{showMoreChildren && ( {showMoreChildren && (
<div <div
className={classNames("details ml-1 comment-node py-2", { className={classNames("details ms-1 comment-node py-2", {
"border-top border-light": !this.props.noBorder, "border-top border-light": !this.props.noBorder,
})} })}
style={`border-left: 2px ${moreRepliesBorderColor} solid !important`} style={`border-left: 2px ${moreRepliesBorderColor} solid !important`}
@ -982,7 +982,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
onSubmit={linkEvent(this, this.handleRemoveComment)} onSubmit={linkEvent(this, this.handleRemoveComment)}
> >
<label <label
className="sr-only" className="visually-hidden"
htmlFor={`mod-remove-reason-${cv.comment.id}`} htmlFor={`mod-remove-reason-${cv.comment.id}`}
> >
{i18n.t("reason")} {i18n.t("reason")}
@ -990,7 +990,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<input <input
type="text" type="text"
id={`mod-remove-reason-${cv.comment.id}`} id={`mod-remove-reason-${cv.comment.id}`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.removeReason} value={this.state.removeReason}
onInput={linkEvent(this, this.handleModRemoveReasonChange)} onInput={linkEvent(this, this.handleModRemoveReasonChange)}
@ -1010,7 +1010,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
onSubmit={linkEvent(this, this.handleReportComment)} onSubmit={linkEvent(this, this.handleReportComment)}
> >
<label <label
className="sr-only" className="visually-hidden"
htmlFor={`report-reason-${cv.comment.id}`} htmlFor={`report-reason-${cv.comment.id}`}
> >
{i18n.t("reason")} {i18n.t("reason")}
@ -1019,7 +1019,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
type="text" type="text"
required required
id={`report-reason-${cv.comment.id}`} id={`report-reason-${cv.comment.id}`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.reportReason} value={this.state.reportReason}
onInput={linkEvent(this, this.handleReportReasonChange)} onInput={linkEvent(this, this.handleReportReasonChange)}
@ -1035,7 +1035,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
)} )}
{this.state.showBanDialog && ( {this.state.showBanDialog && (
<form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}> <form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}>
<div className="form-group row col-12"> <div className="mb-3 row col-12">
<label <label
className="col-form-label" className="col-form-label"
htmlFor={`mod-ban-reason-${cv.comment.id}`} htmlFor={`mod-ban-reason-${cv.comment.id}`}
@ -1045,7 +1045,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<input <input
type="text" type="text"
id={`mod-ban-reason-${cv.comment.id}`} id={`mod-ban-reason-${cv.comment.id}`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.banReason} value={this.state.banReason}
onInput={linkEvent(this, this.handleModBanReasonChange)} onInput={linkEvent(this, this.handleModBanReasonChange)}
@ -1059,12 +1059,12 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<input <input
type="number" type="number"
id={`mod-ban-expires-${cv.comment.id}`} id={`mod-ban-expires-${cv.comment.id}`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("number_of_days")} placeholder={i18n.t("number_of_days")}
value={this.state.banExpireDays} value={this.state.banExpireDays}
onInput={linkEvent(this, this.handleModBanExpireDaysChange)} onInput={linkEvent(this, this.handleModBanExpireDaysChange)}
/> />
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -1084,11 +1084,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</div> </div>
</div> </div>
{/* TODO hold off on expires until later */} {/* TODO hold off on expires until later */}
{/* <div class="form-group row"> */} {/* <div class="mb-3 row"> */}
{/* <label class="col-form-label">Expires</label> */} {/* <label class="col-form-label">Expires</label> */}
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */} {/* <input type="date" class="form-control me-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */}
{/* </div> */} {/* </div> */}
<div className="form-group row"> <div className="mb-3 row">
<button <button
type="submit" type="submit"
className="btn btn-secondary" className="btn btn-secondary"
@ -1109,7 +1109,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
{this.state.showPurgeDialog && ( {this.state.showPurgeDialog && (
<form onSubmit={linkEvent(this, this.handlePurgeBothSubmit)}> <form onSubmit={linkEvent(this, this.handlePurgeBothSubmit)}>
<PurgeWarning /> <PurgeWarning />
<label className="sr-only" htmlFor="purge-reason"> <label className="visually-hidden" htmlFor="purge-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
@ -1120,7 +1120,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
value={this.state.purgeReason} value={this.state.purgeReason}
onInput={linkEvent(this, this.handlePurgeReasonChange)} onInput={linkEvent(this, this.handlePurgeReasonChange)}
/> />
<div className="form-group row col-12"> <div className="mb-3 row col-12">
{this.state.purgeLoading ? ( {this.state.purgeLoading ? (
<Spinner /> <Spinner />
) : ( ) : (

View file

@ -28,7 +28,7 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
return ( return (
<ul className="my-1 list-inline"> <ul className="my-1 list-inline">
<li <li
className="list-inline-item badge badge-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", {
count: Number(counts.users_active_day), count: Number(counts.users_active_day),
formattedCount: numToSI(counts.users_active_day), formattedCount: numToSI(counts.users_active_day),
@ -41,7 +41,7 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
/ {i18n.t("day")} / {i18n.t("day")}
</li> </li>
<li <li
className="list-inline-item badge badge-secondary pointer" className="list-inline-item badge text-bg-secondary pointer"
data-tippy-content={i18n.t("active_users_in_the_last_week", { data-tippy-content={i18n.t("active_users_in_the_last_week", {
count: Number(counts.users_active_week), count: Number(counts.users_active_week),
formattedCount: numToSI(counts.users_active_week), formattedCount: numToSI(counts.users_active_week),
@ -54,7 +54,7 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
/ {i18n.t("week")} / {i18n.t("week")}
</li> </li>
<li <li
className="list-inline-item badge badge-secondary pointer" className="list-inline-item badge text-bg-secondary pointer"
data-tippy-content={i18n.t("active_users_in_the_last_month", { data-tippy-content={i18n.t("active_users_in_the_last_month", {
count: Number(counts.users_active_month), count: Number(counts.users_active_month),
formattedCount: numToSI(counts.users_active_month), formattedCount: numToSI(counts.users_active_month),
@ -67,7 +67,7 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
/ {i18n.t("month")} / {i18n.t("month")}
</li> </li>
<li <li
className="list-inline-item badge badge-secondary pointer" className="list-inline-item badge text-bg-secondary pointer"
data-tippy-content={i18n.t("active_users_in_the_last_six_months", { data-tippy-content={i18n.t("active_users_in_the_last_six_months", {
count: Number(counts.users_active_half_year), count: Number(counts.users_active_half_year),
formattedCount: numToSI(counts.users_active_half_year), formattedCount: numToSI(counts.users_active_half_year),
@ -81,13 +81,13 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
</li> </li>
{isSiteAggregates(counts) && ( {isSiteAggregates(counts) && (
<> <>
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge text-bg-secondary">
{i18n.t("number_of_users", { {i18n.t("number_of_users", {
count: Number(counts.users), count: Number(counts.users),
formattedCount: numToSI(counts.users), formattedCount: numToSI(counts.users),
})} })}
</li> </li>
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge text-bg-secondary">
{i18n.t("number_of_communities", { {i18n.t("number_of_communities", {
count: Number(counts.communities), count: Number(counts.communities),
formattedCount: numToSI(counts.communities), formattedCount: numToSI(counts.communities),
@ -96,20 +96,20 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
</> </>
)} )}
{isCommunityAggregates(counts) && ( {isCommunityAggregates(counts) && (
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge text-bg-secondary">
{i18n.t("number_of_subscribers", { {i18n.t("number_of_subscribers", {
count: Number(counts.subscribers), count: Number(counts.subscribers),
formattedCount: numToSI(counts.subscribers), formattedCount: numToSI(counts.subscribers),
})} })}
</li> </li>
)} )}
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge text-bg-secondary">
{i18n.t("number_of_posts", { {i18n.t("number_of_posts", {
count: Number(counts.posts), count: Number(counts.posts),
formattedCount: numToSI(counts.posts), formattedCount: numToSI(counts.posts),
})} })}
</li> </li>
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge text-bg-secondary">
{i18n.t("number_of_comments", { {i18n.t("number_of_comments", {
count: Number(counts.comments), count: Number(counts.comments),
formattedCount: numToSI(counts.comments), formattedCount: numToSI(counts.comments),
@ -117,7 +117,7 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
</li> </li>
<li className="list-inline-item"> <li className="list-inline-item">
<Link <Link
className="badge badge-primary" className="badge text-bg-primary"
to={`/modlog${communityId ? `/${communityId}` : ""}`} to={`/modlog${communityId ? `/${communityId}` : ""}`}
> >
{i18n.t("modlog")} {i18n.t("modlog")}

View file

@ -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="custom-select w-auto mr-2 mb-2" className="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">

View file

@ -31,7 +31,7 @@ export class DataTypeSelect extends Component<
render() { render() {
return ( return (
<div className="btn-group btn-group-toggle flex-wrap mb-2"> <div className="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"}
@ -39,6 +39,7 @@ export class DataTypeSelect extends Component<
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={DataType.Post} value={DataType.Post}
checked={this.state.type_ == DataType.Post} checked={this.state.type_ == DataType.Post}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}
@ -52,6 +53,7 @@ export class DataTypeSelect extends Component<
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={DataType.Comment} value={DataType.Comment}
checked={this.state.type_ == DataType.Comment} checked={this.state.type_ == DataType.Comment}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}

View file

@ -25,7 +25,7 @@ export class Icon extends Component<IconProps, any> {
<use <use
xlinkHref={`/static/assets/symbols.svg#icon-${this.props.icon}`} xlinkHref={`/static/assets/symbols.svg#icon-${this.props.icon}`}
></use> ></use>
<div className="sr-only"> <div className="visually-hidden">
<title>{this.props.icon}</title> <title>{this.props.icon}</title>
</div> </div>
</svg> </svg>
@ -60,7 +60,7 @@ export class PurgeWarning extends Component<any, any> {
render() { render() {
return ( return (
<div className="mt-2 alert alert-danger" role="alert"> <div className="mt-2 alert alert-danger" role="alert">
<Icon icon="alert-triangle" classes="icon-inline mr-2" /> <Icon icon="alert-triangle" classes="icon-inline me-2" />
{i18n.t("purge_warning")} {i18n.t("purge_warning")}
</div> </div>
); );

View file

@ -55,7 +55,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
{i18n.t("undetermined_language_warning")} {i18n.t("undetermined_language_warning")}
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<label <label
className={classNames( className={classNames(
"col-form-label", "col-form-label",
@ -73,14 +73,12 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
> >
{this.selectBtn} {this.selectBtn}
{this.props.multiple && ( {this.props.multiple && (
<div className="input-group-append">
<button <button
className="input-group-text" className="btn btn-outline-secondary"
onClick={linkEvent(this, this.handleDeselectAll)} onClick={linkEvent(this, this.handleDeselectAll)}
> >
<Icon icon="x" /> <Icon icon="x" />
</button> </button>
</div>
)} )}
</div> </div>
</div> </div>
@ -100,8 +98,8 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
return ( return (
<select <select
className={classNames("lang-select-action custom-select w-auto", { className={classNames("form-select w-auto", {
"form-control": !this.props.iconVersion, "d-inline-block": !this.props.iconVersion,
})} })}
id={this.id} id={this.id}
onChange={linkEvent(this, this.handleLanguageChange)} onChange={linkEvent(this, this.handleLanguageChange)}

View file

@ -39,7 +39,7 @@ export class ListingTypeSelect extends Component<
render() { render() {
return ( return (
<div className="btn-group btn-group-toggle flex-wrap mb-2"> <div className="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")}
@ -51,6 +51,7 @@ export class ListingTypeSelect extends Component<
<input <input
id={`${this.id}-subscribed`} id={`${this.id}-subscribed`}
type="radio" type="radio"
className="btn-check"
value={"Subscribed"} value={"Subscribed"}
checked={this.state.type_ == "Subscribed"} checked={this.state.type_ == "Subscribed"}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}
@ -69,6 +70,7 @@ export class ListingTypeSelect extends Component<
<input <input
id={`${this.id}-local`} id={`${this.id}-local`}
type="radio" type="radio"
className="btn-check"
value={"Local"} value={"Local"}
checked={this.state.type_ == "Local"} checked={this.state.type_ == "Local"}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}
@ -86,6 +88,7 @@ export class ListingTypeSelect extends Component<
<input <input
id={`${this.id}-all`} id={`${this.id}-all`}
type="radio" type="radio"
className="btn-check"
value={"All"} value={"All"}
checked={this.state.type_ == "All"} checked={this.state.type_ == "All"}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}

View file

@ -144,10 +144,10 @@ export class MarkdownTextArea extends Component<
!this.state.submitted !this.state.submitted
} }
/> />
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="rounded bg-light border border-light"> <div className="rounded bg-light border">
<div className="d-flex flex-wrap border-bottom border-light"> <div className="d-flex flex-wrap border-bottom">
{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)}
@ -248,7 +248,7 @@ export class MarkdownTextArea extends Component<
/> />
)} )}
</div> </div>
<label className="sr-only" htmlFor={this.id}> <label className="visually-hidden" htmlFor={this.id}>
{i18n.t("body")} {i18n.t("body")}
</label> </label>
</div> </div>
@ -274,7 +274,7 @@ export class MarkdownTextArea extends Component<
{this.props.buttonTitle && ( {this.props.buttonTitle && (
<button <button
type="submit" type="submit"
className="btn btn-sm btn-secondary ml-2" className="btn btn-sm btn-secondary ms-2"
disabled={this.isDisabled} disabled={this.isDisabled}
> >
{this.state.loading ? ( {this.state.loading ? (
@ -287,7 +287,7 @@ export class MarkdownTextArea extends Component<
{this.props.replyType && ( {this.props.replyType && (
<button <button
type="button" type="button"
className="btn btn-sm btn-secondary ml-2" className="btn btn-sm btn-secondary ms-2"
onClick={linkEvent(this, this.handleReplyCancel)} onClick={linkEvent(this, this.handleReplyCancel)}
> >
{i18n.t("cancel")} {i18n.t("cancel")}
@ -295,7 +295,7 @@ export class MarkdownTextArea extends Component<
)} )}
{this.state.content && ( {this.state.content && (
<button <button
className={`btn btn-sm btn-secondary ml-2 ${ className={`btn btn-sm btn-secondary ms-2 ${
this.state.previewMode && "active" this.state.previewMode && "active"
}`} }`}
onClick={linkEvent(this, this.handlePreviewToggle)} onClick={linkEvent(this, this.handlePreviewToggle)}

View file

@ -38,7 +38,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
data-tippy-content={this.createdAndModifiedTimes()} data-tippy-content={this.createdAndModifiedTimes()}
className="font-italics pointer unselectable" className="font-italics pointer unselectable"
> >
<Icon icon="edit-2" classes="icon-inline mr-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)}
</span> </span>
); );

View file

@ -14,7 +14,7 @@ export class Paginator extends Component<PaginatorProps, any> {
return ( return (
<div className="my-2"> <div className="my-2">
<button <button
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.props.page == 1} disabled={this.props.page == 1}
onClick={linkEvent(this, this.handlePrev)} onClick={linkEvent(this, this.handlePrev)}
> >

View file

@ -39,8 +39,8 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
"img-expanded slight-radius": "img-expanded slight-radius":
!this.props.thumbnail && !this.props.icon, !this.props.thumbnail && !this.props.icon,
"img-blur": this.props.thumbnail && this.props.nsfw, "img-blur": this.props.thumbnail && this.props.nsfw,
"rounded-circle img-cover img-icon mr-2": this.props.icon, "rounded-circle img-cover img-icon me-2": this.props.icon,
"ml-2 mb-0 rounded-circle img-cover avatar-overlay": "ms-2 mb-0 rounded-circle img-cover avatar-overlay":
this.props.iconOverlay, this.props.iconOverlay,
"avatar-pushup": this.props.pushup, "avatar-pushup": this.props.pushup,
})} })}

View file

@ -96,7 +96,7 @@ export class RegistrationApplication extends Component<
)} )}
{this.state.denyExpanded && ( {this.state.denyExpanded && (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label"> <label className="col-sm-2 col-form-label">
{i18n.t("deny_reason")} {i18n.t("deny_reason")}
</label> </label>
@ -113,7 +113,7 @@ export class RegistrationApplication extends Component<
)} )}
{(!ra.admin_id || (ra.admin_id && !accepted)) && ( {(!ra.admin_id || (ra.admin_id && !accepted)) && (
<button <button
className="btn btn-secondary mr-2 my-2" className="btn btn-secondary me-2 my-2"
onClick={linkEvent(this, this.handleApprove)} onClick={linkEvent(this, this.handleApprove)}
aria-label={i18n.t("approve")} aria-label={i18n.t("approve")}
> >
@ -122,7 +122,7 @@ export class RegistrationApplication extends Component<
)} )}
{(!ra.admin_id || (ra.admin_id && accepted)) && ( {(!ra.admin_id || (ra.admin_id && accepted)) && (
<button <button
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
onClick={linkEvent(this, this.handleDeny)} onClick={linkEvent(this, this.handleDeny)}
aria-label={i18n.t("deny")} aria-label={i18n.t("deny")}
> >

View file

@ -106,7 +106,7 @@ export class SearchableSelect extends Component<
<button <button
id={id} id={id}
type="button" type="button"
className="custom-select text-start" className="form-select d-inline-block text-start"
aria-haspopup="listbox" aria-haspopup="listbox"
data-bs-toggle="dropdown" data-bs-toggle="dropdown"
onClick={linkEvent(this, focusSearch)} onClick={linkEvent(this, focusSearch)}

View file

@ -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="custom-select w-auto mr-2 mb-2" className="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">

View file

@ -112,9 +112,7 @@ export class Communities extends Component<any, CommunitiesState> {
/> />
</span> </span>
</div> </div>
<div className="col-md-6"> <div className="col-md-6">{this.searchForm()}</div>
<div className="float-md-right">{this.searchForm()}</div>
</div>
</div> </div>
<div className="table-responsive"> <div className="table-responsive">
@ -222,25 +220,29 @@ export class Communities extends Component<any, CommunitiesState> {
searchForm() { searchForm() {
return ( return (
<form <form
className="form-inline" className="row justify-content-end"
onSubmit={linkEvent(this, this.handleSearchSubmit)} onSubmit={linkEvent(this, this.handleSearchSubmit)}
> >
<div className="col-auto">
<input <input
type="text" type="text"
id="communities-search" id="communities-search"
className="form-control mr-2 mb-2" className="form-control me-2 mb-2"
value={this.state.searchText} value={this.state.searchText}
placeholder={`${i18n.t("search")}...`} placeholder={`${i18n.t("search")}...`}
onInput={linkEvent(this, this.handleSearchChange)} onInput={linkEvent(this, this.handleSearchChange)}
required required
minLength={3} minLength={3}
/> />
<label className="sr-only" htmlFor="communities-search"> </div>
<div className="col-auto">
<label className="visually-hidden" htmlFor="communities-search">
{i18n.t("search")} {i18n.t("search")}
</label> </label>
<button type="submit" className="btn btn-secondary mr-2 mb-2"> <button type="submit" className="btn btn-secondary mb-2">
<span>{i18n.t("search")}</span> <span>{i18n.t("search")}</span>
</button> </button>
</div>
</form> </form>
); );
} }

View file

@ -98,14 +98,14 @@ export class CommunityForm extends Component<
} }
/> />
{!this.props.community_view && ( {!this.props.community_view && (
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-12 col-sm-2 col-form-label" className="col-12 col-sm-2 col-form-label"
htmlFor="community-name" htmlFor="community-name"
> >
{i18n.t("name")} {i18n.t("name")}
<span <span
className="position-absolute pointer unselectable ml-2 text-muted" className="position-absolute pointer unselectable ms-2 text-muted"
data-tippy-content={i18n.t("name_explain")} data-tippy-content={i18n.t("name_explain")}
> >
<Icon icon="help-circle" classes="icon-inline" /> <Icon icon="help-circle" classes="icon-inline" />
@ -126,14 +126,14 @@ export class CommunityForm extends Component<
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-12 col-sm-2 col-form-label" className="col-12 col-sm-2 col-form-label"
htmlFor="community-title" htmlFor="community-title"
> >
{i18n.t("display_name")} {i18n.t("display_name")}
<span <span
className="position-absolute pointer unselectable ml-2 text-muted" className="position-absolute pointer unselectable ms-2 text-muted"
data-tippy-content={i18n.t("display_name_explain")} data-tippy-content={i18n.t("display_name_explain")}
> >
<Icon icon="help-circle" classes="icon-inline" /> <Icon icon="help-circle" classes="icon-inline" />
@ -152,8 +152,10 @@ export class CommunityForm extends Component<
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-sm-2">{i18n.t("icon")}</label> <label className="col-12 col-sm-2 col-form-label">
{i18n.t("icon")}
</label>
<div className="col-12 col-sm-10"> <div className="col-12 col-sm-10">
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_icon")} uploadTitle={i18n.t("upload_icon")}
@ -164,8 +166,10 @@ export class CommunityForm extends Component<
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-sm-2">{i18n.t("banner")}</label> <label className="col-12 col-sm-2 col-form-label">
{i18n.t("banner")}
</label>
<div className="col-12 col-sm-10"> <div className="col-12 col-sm-10">
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_banner")} uploadTitle={i18n.t("upload_banner")}
@ -175,7 +179,7 @@ export class CommunityForm extends Component<
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-sm-2 col-form-label" htmlFor={this.id}> <label className="col-12 col-sm-2 col-form-label" htmlFor={this.id}>
{i18n.t("sidebar")} {i18n.t("sidebar")}
</label> </label>
@ -192,7 +196,7 @@ export class CommunityForm extends Component<
</div> </div>
{this.props.enableNsfw && ( {this.props.enableNsfw && (
<div className="form-group row"> <div className="mb-3 row">
<legend className="col-form-label col-sm-2 pt-0"> <legend className="col-form-label col-sm-2 pt-0">
{i18n.t("nsfw")} {i18n.t("nsfw")}
</legend> </legend>
@ -209,7 +213,7 @@ export class CommunityForm extends Component<
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<legend className="col-form-label col-6 pt-0"> <legend className="col-form-label col-6 pt-0">
{i18n.t("only_mods_can_post_in_community")} {i18n.t("only_mods_can_post_in_community")}
</legend> </legend>
@ -236,11 +240,11 @@ export class CommunityForm extends Component<
multiple={true} multiple={true}
onChange={this.handleDiscussionLanguageChange} onChange={this.handleDiscussionLanguageChange}
/> />
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<button <button
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.props.loading} disabled={this.props.loading}
> >
{this.props.loading ? ( {this.props.loading ? (

View file

@ -327,7 +327,7 @@ export class Community extends Component<
{this.communityInfo(res)} {this.communityInfo(res)}
<div className="d-block d-md-none"> <div className="d-block d-md-none">
<button <button
className="btn btn-secondary d-inline-block mb-2 mr-3" className="btn btn-secondary d-inline-block mb-2 me-3"
onClick={linkEvent(this, this.handleShowSidebarMobile)} onClick={linkEvent(this, this.handleShowSidebarMobile)}
> >
{i18n.t("sidebar")}{" "} {i18n.t("sidebar")}{" "}
@ -510,13 +510,13 @@ export class Community extends Component<
return ( return (
<div className="mb-3"> <div className="mb-3">
<span className="mr-3"> <span className="me-3">
<DataTypeSelect <DataTypeSelect
type_={dataType} type_={dataType}
onChange={this.handleDataTypeChange} onChange={this.handleDataTypeChange}
/> />
</span> </span>
<span className="mr-2"> <span className="me-2">
<SortSelect sort={sort} onChange={this.handleSortChange} /> <SortSelect sort={sort} onChange={this.handleSortChange} />
</span> </span>
{communityRss && ( {communityRss && (

View file

@ -172,19 +172,19 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
{this.props.showIcon && !community.removed && ( {this.props.showIcon && !community.removed && (
<BannerIconHeader icon={community.icon} banner={community.banner} /> <BannerIconHeader icon={community.icon} banner={community.banner} />
)} )}
<span className="mr-2"> <span className="me-2">
<CommunityLink community={community} hideAvatar /> <CommunityLink community={community} hideAvatar />
</span> </span>
{subscribed === "Subscribed" && ( {subscribed === "Subscribed" && (
<button <button
className="btn btn-secondary btn-sm mr-2" className="btn btn-secondary btn-sm me-2"
onClick={linkEvent(this, this.handleUnfollowCommunity)} onClick={linkEvent(this, this.handleUnfollowCommunity)}
> >
{this.state.followCommunityLoading ? ( {this.state.followCommunityLoading ? (
<Spinner /> <Spinner />
) : ( ) : (
<> <>
<Icon icon="check" classes="icon-inline text-success mr-1" /> <Icon icon="check" classes="icon-inline text-success me-1" />
{i18n.t("joined")} {i18n.t("joined")}
</> </>
)} )}
@ -192,7 +192,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
)} )}
{subscribed === "Pending" && ( {subscribed === "Pending" && (
<button <button
className="btn btn-warning mr-2" className="btn btn-warning me-2"
onClick={linkEvent(this, this.handleUnfollowCommunity)} onClick={linkEvent(this, this.handleUnfollowCommunity)}
> >
{this.state.followCommunityLoading ? ( {this.state.followCommunityLoading ? (
@ -203,17 +203,17 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
</button> </button>
)} )}
{community.removed && ( {community.removed && (
<small className="mr-2 text-muted font-italic"> <small className="me-2 text-muted font-italic">
{i18n.t("removed")} {i18n.t("removed")}
</small> </small>
)} )}
{community.deleted && ( {community.deleted && (
<small className="mr-2 text-muted font-italic"> <small className="me-2 text-muted font-italic">
{i18n.t("deleted")} {i18n.t("deleted")}
</small> </small>
)} )}
{community.nsfw && ( {community.nsfw && (
<small className="mr-2 text-muted font-italic"> <small className="me-2 text-muted font-italic">
{i18n.t("nsfw")} {i18n.t("nsfw")}
</small> </small>
)} )}
@ -246,7 +246,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
const cv = this.props.community_view; const cv = this.props.community_view;
return ( return (
<Link <Link
className={`btn btn-secondary btn-block mb-2 ${ className={`btn btn-secondary d-block mb-2 w-100 ${
cv.community.deleted || cv.community.removed ? "no-click" : "" cv.community.deleted || cv.community.removed ? "no-click" : ""
}`} }`}
to={`/create_post?communityId=${cv.community.id}`} to={`/create_post?communityId=${cv.community.id}`}
@ -259,10 +259,10 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
subscribe() { subscribe() {
const community_view = this.props.community_view; const community_view = this.props.community_view;
return ( return (
<div className="mb-2"> <>
{community_view.subscribed == "NotSubscribed" && ( {community_view.subscribed == "NotSubscribed" && (
<button <button
className="btn btn-secondary btn-block" className="btn btn-secondary d-block mb-2 w-100"
onClick={linkEvent(this, this.handleFollowCommunity)} onClick={linkEvent(this, this.handleFollowCommunity)}
> >
{this.state.followCommunityLoading ? ( {this.state.followCommunityLoading ? (
@ -272,7 +272,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
)} )}
</button> </button>
)} )}
</div> </>
); );
} }
@ -280,16 +280,16 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
const { subscribed, blocked } = this.props.community_view; const { subscribed, blocked } = this.props.community_view;
return ( return (
<div className="mb-2"> <>
{subscribed == "NotSubscribed" && ( {subscribed == "NotSubscribed" && (
<button <button
className="btn btn-danger btn-block" className="btn btn-danger d-block mb-2 w-100"
onClick={linkEvent(this, this.handleBlockCommunity)} onClick={linkEvent(this, this.handleBlockCommunity)}
> >
{i18n.t(blocked ? "unblock_community" : "block_community")} {i18n.t(blocked ? "unblock_community" : "block_community")}
</button> </button>
)} )}
</div> </>
); );
} }
@ -422,25 +422,25 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
</ul> </ul>
{this.state.showRemoveDialog && ( {this.state.showRemoveDialog && (
<form onSubmit={linkEvent(this, this.handleRemoveCommunity)}> <form onSubmit={linkEvent(this, this.handleRemoveCommunity)}>
<div className="form-group"> <div className="input-group mb-3">
<label className="col-form-label" htmlFor="remove-reason"> <label className="col-form-label" htmlFor="remove-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="remove-reason" id="remove-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("optional")} placeholder={i18n.t("optional")}
value={this.state.removeReason} value={this.state.removeReason}
onInput={linkEvent(this, this.handleModRemoveReasonChange)} onInput={linkEvent(this, this.handleModRemoveReasonChange)}
/> />
</div> </div>
{/* TODO hold off on expires for now */} {/* TODO hold off on expires for now */}
{/* <div class="form-group row"> */} {/* <div class="mb-3 row"> */}
{/* <label class="col-form-label">Expires</label> */} {/* <label class="col-form-label">Expires</label> */}
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.removeExpires} onInput={linkEvent(this, this.handleModRemoveExpiresChange)} /> */} {/* <input type="date" class="form-control me-2" placeholder={i18n.t('expires')} value={this.state.removeExpires} onInput={linkEvent(this, this.handleModRemoveExpiresChange)} /> */}
{/* </div> */} {/* </div> */}
<div className="form-group"> <div className="input-group mb-3">
<button type="submit" className="btn btn-secondary"> <button type="submit" className="btn btn-secondary">
{this.state.removeCommunityLoading ? ( {this.state.removeCommunityLoading ? (
<Spinner /> <Spinner />
@ -453,23 +453,23 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
)} )}
{this.state.showPurgeDialog && ( {this.state.showPurgeDialog && (
<form onSubmit={linkEvent(this, this.handlePurgeCommunity)}> <form onSubmit={linkEvent(this, this.handlePurgeCommunity)}>
<div className="form-group"> <div className="input-group mb-3">
<PurgeWarning /> <PurgeWarning />
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<label className="sr-only" htmlFor="purge-reason"> <label className="visually-hidden" htmlFor="purge-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="purge-reason" id="purge-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.purgeReason} value={this.state.purgeReason}
onInput={linkEvent(this, this.handlePurgeReasonChange)} onInput={linkEvent(this, this.handlePurgeReasonChange)}
/> />
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
{this.state.purgeCommunityLoading ? ( {this.state.purgeCommunityLoading ? (
<Spinner /> <Spinner />
) : ( ) : (

View file

@ -258,7 +258,7 @@ export class EmojiForm extends Component<EmojiFormProps, EmojiFormState> {
</table> </table>
<br /> <br />
<button <button
className="btn btn-sm btn-secondary mr-2" className="btn btn-sm btn-secondary me-2"
onClick={linkEvent(this, this.handleAddEmojiClick)} onClick={linkEvent(this, this.handleAddEmojiClick)}
> >
{i18n.t("add_custom_emoji")} {i18n.t("add_custom_emoji")}

View file

@ -194,7 +194,7 @@ const MobileButton = ({
onClick: MouseEventHandler<HTMLButtonElement>; onClick: MouseEventHandler<HTMLButtonElement>;
}) => ( }) => (
<button <button
className="btn btn-secondary d-inline-block mb-2 mr-3" className="btn btn-secondary d-inline-block mb-2 me-3"
onClick={onClick} onClick={onClick}
> >
{i18n.t(textKey)}{" "} {i18n.t(textKey)}{" "}
@ -209,7 +209,7 @@ const LinkButton = ({
path: string; path: string;
translationKey: NoOptionI18nKeys; translationKey: NoOptionI18nKeys;
}) => ( }) => (
<Link className="btn btn-secondary btn-block" to={path}> <Link className="btn btn-secondary d-block" to={path}>
{i18n.t(translationKey)} {i18n.t(translationKey)}
</Link> </Link>
); );
@ -734,25 +734,25 @@ export class Home extends Component<any, HomeState> {
const { listingType, dataType, sort } = getHomeQueryParams(); const { listingType, dataType, sort } = getHomeQueryParams();
return ( return (
<div className="mb-3"> <div className="row align-items-center mb-3 g-3">
<span className="mr-3"> <div className="col-auto">
<DataTypeSelect <DataTypeSelect
type_={dataType} type_={dataType}
onChange={this.handleDataTypeChange} onChange={this.handleDataTypeChange}
/> />
</span> </div>
<span className="mr-3"> <div className="col-auto">
<ListingTypeSelect <ListingTypeSelect
type_={listingType} type_={listingType}
showLocal={showLocal(this.isoData)} showLocal={showLocal(this.isoData)}
showSubscribed showSubscribed
onChange={this.handleListingTypeChange} onChange={this.handleListingTypeChange}
/> />
</span> </div>
<span className="mr-2"> <div className="col-auto">
<SortSelect sort={sort} onChange={this.handleSortChange} /> <SortSelect sort={sort} onChange={this.handleSortChange} />
</span> </div>
{getRss(listingType)} <div className="col-auto ps-0">{getRss(listingType)}</div>
</div> </div>
); );
} }

View file

@ -67,7 +67,7 @@ export class Login extends Component<any, State> {
<div> <div>
<form onSubmit={linkEvent(this, this.handleLoginSubmit)}> <form onSubmit={linkEvent(this, this.handleLoginSubmit)}>
<h5>{i18n.t("login")}</h5> <h5>{i18n.t("login")}</h5>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-2 col-form-label" className="col-sm-2 col-form-label"
htmlFor="login-email-or-username" htmlFor="login-email-or-username"
@ -87,7 +87,7 @@ export class Login extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="login-password"> <label className="col-sm-2 col-form-label" htmlFor="login-password">
{i18n.t("password")} {i18n.t("password")}
</label> </label>
@ -117,7 +117,7 @@ export class Login extends Component<any, State> {
</div> </div>
</div> </div>
{this.state.showTotp && ( {this.state.showTotp && (
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-6 col-form-label" className="col-sm-6 col-form-label"
htmlFor="login-totp-token" htmlFor="login-totp-token"
@ -138,7 +138,7 @@ export class Login extends Component<any, State> {
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<button type="submit" className="btn btn-secondary"> <button type="submit" className="btn btn-secondary">
{this.state.loginRes.state == "loading" ? ( {this.state.loginRes.state == "loading" ? (

View file

@ -51,30 +51,30 @@ function RateLimits({
rateLimitValue, rateLimitValue,
}: RateLimitsProps) { }: RateLimitsProps) {
return ( return (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label" htmlFor="rate-limit"> <div className="col-md-6">
{i18n.t("rate_limit")} <label htmlFor="rate-limit">{i18n.t("rate_limit")}</label>
</label>
<input <input
type="number" type="number"
id="rate-limit" id="rate-limit"
className="form-control col-12" className="form-control"
min={0} min={0}
value={rateLimitValue} value={rateLimitValue}
onInput={handleRateLimit} onInput={handleRateLimit}
/> />
<label className="col-12 col-form-label" htmlFor="rate-limit-per-second"> </div>
{i18n.t("per_second")} <div className="col-md-6">
</label> <label htmlFor="rate-limit-per-second">{i18n.t("per_second")}</label>
<input <input
type="number" type="number"
id="rate-limit-per-second" id="rate-limit-per-second"
className="form-control col-12" className="form-control"
min={0} min={0}
value={rateLimitPerSecondValue} value={rateLimitPerSecondValue}
onInput={handleRateLimitPerSecond} onInput={handleRateLimitPerSecond}
/> />
</div> </div>
</div>
); );
} }
@ -157,11 +157,10 @@ export default class RateLimitsForm extends Component<
), ),
}))} }))}
/> />
<div className="form-group row"> <div className="col-12 mb-3">
<div className="col-12">
<button <button
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.props.loading} disabled={this.props.loading}
> >
{this.props.loading ? ( {this.props.loading ? (
@ -171,7 +170,6 @@ export default class RateLimitsForm extends Component<
)} )}
</button> </button>
</div> </div>
</div>
</form> </form>
); );
} }

View file

@ -86,7 +86,7 @@ export class Setup extends Component<any, State> {
return ( return (
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}> <form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
<h5>{i18n.t("setup_admin")}</h5> <h5>{i18n.t("setup_admin")}</h5>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="username"> <label className="col-sm-2 col-form-label" htmlFor="username">
{i18n.t("username")} {i18n.t("username")}
</label> </label>
@ -103,7 +103,7 @@ export class Setup extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="email"> <label className="col-sm-2 col-form-label" htmlFor="email">
{i18n.t("email")} {i18n.t("email")}
</label> </label>
@ -120,7 +120,7 @@ export class Setup extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="password"> <label className="col-sm-2 col-form-label" htmlFor="password">
{i18n.t("password")} {i18n.t("password")}
</label> </label>
@ -138,7 +138,7 @@ export class Setup extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="verify-password"> <label className="col-sm-2 col-form-label" htmlFor="verify-password">
{i18n.t("verify_password")} {i18n.t("verify_password")}
</label> </label>
@ -156,7 +156,7 @@ export class Setup extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<button type="submit" className="btn btn-secondary"> <button type="submit" className="btn btn-secondary">
{this.state.registerRes.state == "loading" ? ( {this.state.registerRes.state == "loading" ? (

View file

@ -148,7 +148,7 @@ export class Signup extends Component<any, State> {
<h5>{this.titleName(siteView)}</h5> <h5>{this.titleName(siteView)}</h5>
{this.isLemmyMl && ( {this.isLemmyMl && (
<div className="form-group row"> <div className="mb-3 row">
<div className="mt-2 mb-0 alert alert-warning" role="alert"> <div className="mt-2 mb-0 alert alert-warning" role="alert">
<T i18nKey="lemmy_ml_registration_message"> <T i18nKey="lemmy_ml_registration_message">
#<a href={joinLemmyUrl}>#</a> #<a href={joinLemmyUrl}>#</a>
@ -157,7 +157,7 @@ export class Signup extends Component<any, State> {
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-2 col-form-label" className="col-sm-2 col-form-label"
htmlFor="register-username" htmlFor="register-username"
@ -180,7 +180,7 @@ export class Signup extends Component<any, State> {
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="register-email"> <label className="col-sm-2 col-form-label" htmlFor="register-email">
{i18n.t("email")} {i18n.t("email")}
</label> </label>
@ -204,14 +204,14 @@ export class Signup extends Component<any, State> {
this.state.form.email && this.state.form.email &&
!validEmail(this.state.form.email) && ( !validEmail(this.state.form.email) && (
<div className="mt-2 mb-0 alert alert-warning" role="alert"> <div className="mt-2 mb-0 alert alert-warning" role="alert">
<Icon icon="alert-triangle" classes="icon-inline mr-2" /> <Icon icon="alert-triangle" classes="icon-inline me-2" />
{i18n.t("no_password_reset")} {i18n.t("no_password_reset")}
</div> </div>
)} )}
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-2 col-form-label" className="col-sm-2 col-form-label"
htmlFor="register-password" htmlFor="register-password"
@ -238,7 +238,7 @@ export class Signup extends Component<any, State> {
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-2 col-form-label" className="col-sm-2 col-form-label"
htmlFor="register-verify-password" htmlFor="register-verify-password"
@ -261,10 +261,10 @@ export class Signup extends Component<any, State> {
{siteView.local_site.registration_mode == "RequireApplication" && ( {siteView.local_site.registration_mode == "RequireApplication" && (
<> <>
<div className="form-group row"> <div className="mb-3 row">
<div className="offset-sm-2 col-sm-10"> <div className="offset-sm-2 col-sm-10">
<div className="mt-2 alert alert-warning" role="alert"> <div className="mt-2 alert alert-warning" role="alert">
<Icon icon="alert-triangle" classes="icon-inline mr-2" /> <Icon icon="alert-triangle" classes="icon-inline me-2" />
{i18n.t("fill_out_application")} {i18n.t("fill_out_application")}
</div> </div>
{siteView.local_site.application_question && ( {siteView.local_site.application_question && (
@ -278,7 +278,7 @@ export class Signup extends Component<any, State> {
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-2 col-form-label" className="col-sm-2 col-form-label"
htmlFor="application_answer" htmlFor="application_answer"
@ -298,7 +298,7 @@ export class Signup extends Component<any, State> {
</> </>
)} )}
{this.renderCaptcha()} {this.renderCaptcha()}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<div className="form-check"> <div className="form-check">
<input <input
@ -324,7 +324,7 @@ export class Signup extends Component<any, State> {
value={this.state.form.honeypot} value={this.state.form.honeypot}
onInput={linkEvent(this, this.handleHoneyPotChange)} onInput={linkEvent(this, this.handleHoneyPotChange)}
/> />
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<button type="submit" className="btn btn-secondary"> <button type="submit" className="btn btn-secondary">
{this.state.registerRes.state == "loading" ? ( {this.state.registerRes.state == "loading" ? (
@ -346,9 +346,9 @@ export class Signup extends Component<any, State> {
case "success": { case "success": {
const res = this.state.captchaRes.data; const res = this.state.captchaRes.data;
return ( return (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2" htmlFor="register-captcha"> <label className="col-sm-2" htmlFor="register-captcha">
<span className="mr-2">{i18n.t("enter_code")}</span> <span className="me-2">{i18n.t("enter_code")}</span>
<button <button
type="button" type="button"
className="btn btn-secondary" className="btn btn-secondary"
@ -391,7 +391,7 @@ export class Signup extends Component<any, State> {
/> />
{captchaRes.wav && ( {captchaRes.wav && (
<button <button
className="rounded-bottom btn btn-sm btn-secondary btn-block" className="rounded-bottom btn btn-sm btn-secondary d-block"
style="border-top-right-radius: 0; border-top-left-radius: 0;" style="border-top-right-radius: 0; border-top-left-radius: 0;"
title={i18n.t("play_captcha_audio")} title={i18n.t("play_captcha_audio")}
onClick={linkEvent(this, this.handleCaptchaPlay)} onClick={linkEvent(this, this.handleCaptchaPlay)}

View file

@ -139,7 +139,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
? capitalizeFirstLetter(i18n.t("edit")) ? capitalizeFirstLetter(i18n.t("edit"))
: capitalizeFirstLetter(i18n.t("setup")) : capitalizeFirstLetter(i18n.t("setup"))
} ${i18n.t("your_site")}`}</h5> } ${i18n.t("your_site")}`}</h5>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label" htmlFor="create-site-name"> <label className="col-12 col-form-label" htmlFor="create-site-name">
{i18n.t("name")} {i18n.t("name")}
</label> </label>
@ -156,8 +156,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<label className="mr-2">{i18n.t("icon")}</label> <label className="me-2 col-form-label">{i18n.t("icon")}</label>
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_icon")} uploadTitle={i18n.t("upload_icon")}
imageSrc={this.state.siteForm.icon} imageSrc={this.state.siteForm.icon}
@ -166,8 +166,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
rounded rounded
/> />
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<label className="mr-2">{i18n.t("banner")}</label> <label className="me-2 col-form-label">{i18n.t("banner")}</label>
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_banner")} uploadTitle={i18n.t("upload_banner")}
imageSrc={this.state.siteForm.banner} imageSrc={this.state.siteForm.banner}
@ -175,7 +175,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
onRemove={this.handleBannerRemove} onRemove={this.handleBannerRemove}
/> />
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label" htmlFor="site-desc"> <label className="col-12 col-form-label" htmlFor="site-desc">
{i18n.t("description")} {i18n.t("description")}
</label> </label>
@ -190,7 +190,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label">{i18n.t("sidebar")}</label> <label className="col-12 col-form-label">{i18n.t("sidebar")}</label>
<div className="col-12"> <div className="col-12">
<MarkdownTextArea <MarkdownTextArea
@ -202,7 +202,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label"> <label className="col-12 col-form-label">
{i18n.t("legal_information")} {i18n.t("legal_information")}
</label> </label>
@ -216,7 +216,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -235,7 +235,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -254,10 +254,10 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<label <label
className="form-check-label mr-2" className="form-check-label me-2"
htmlFor="create-site-registration-mode" htmlFor="create-site-registration-mode"
> >
{i18n.t("registration_mode")} {i18n.t("registration_mode")}
@ -266,7 +266,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
id="create-site-registration-mode" id="create-site-registration-mode"
value={this.state.siteForm.registration_mode} value={this.state.siteForm.registration_mode}
onChange={linkEvent(this, this.handleSiteRegistrationModeChange)} onChange={linkEvent(this, this.handleSiteRegistrationModeChange)}
className="custom-select w-auto" className="form-select d-inline-block w-auto"
> >
<option value={"RequireApplication"}> <option value={"RequireApplication"}>
{i18n.t("require_registration_application")} {i18n.t("require_registration_application")}
@ -277,7 +277,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
{this.state.siteForm.registration_mode == "RequireApplication" && ( {this.state.siteForm.registration_mode == "RequireApplication" && (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-12 col-form-label"> <label className="col-12 col-form-label">
{i18n.t("application_questionnaire")} {i18n.t("application_questionnaire")}
</label> </label>
@ -292,7 +292,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -314,7 +314,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -336,7 +336,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -358,7 +358,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -377,10 +377,10 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<label <label
className="form-check-label mr-2" className="form-check-label me-2"
htmlFor="create-site-default-theme" htmlFor="create-site-default-theme"
> >
{i18n.t("theme")} {i18n.t("theme")}
@ -389,7 +389,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
id="create-site-default-theme" id="create-site-default-theme"
value={this.state.siteForm.default_theme} value={this.state.siteForm.default_theme}
onChange={linkEvent(this, this.handleSiteDefaultTheme)} onChange={linkEvent(this, this.handleSiteDefaultTheme)}
className="custom-select w-auto" className="form-select d-inline-block w-auto"
> >
<option value="browser">{i18n.t("browser_default")}</option> <option value="browser">{i18n.t("browser_default")}</option>
{this.props.themeList?.map(theme => ( {this.props.themeList?.map(theme => (
@ -401,8 +401,10 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
{this.props.showLocal && ( {this.props.showLocal && (
<form className="form-group row"> <form className="mb-3 row">
<label className="col-sm-3">{i18n.t("listing_type")}</label> <label className="col-sm-3 col-form-label">
{i18n.t("listing_type")}
</label>
<div className="col-sm-9"> <div className="col-sm-9">
<ListingTypeSelect <ListingTypeSelect
type_={this.state.siteForm.default_post_listing_type ?? "Local"} type_={this.state.siteForm.default_post_listing_type ?? "Local"}
@ -413,7 +415,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</form> </form>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -432,7 +434,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -451,7 +453,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-12 col-form-label" className="col-12 col-form-label"
htmlFor="create-site-slur-filter-regex" htmlFor="create-site-slur-filter-regex"
@ -478,7 +480,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
onChange={this.handleDiscussionLanguageChange} onChange={this.handleDiscussionLanguageChange}
showAll showAll
/> />
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-12 col-form-label" className="col-12 col-form-label"
htmlFor="create-site-actor-name" htmlFor="create-site-actor-name"
@ -496,7 +498,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -517,11 +519,11 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
{this.state.siteForm.federation_enabled && ( {this.state.siteForm.federation_enabled && (
<> <>
<div className="form-group row"> <div className="mb-3 row">
{this.federatedInstanceSelect("allowed_instances")} {this.federatedInstanceSelect("allowed_instances")}
{this.federatedInstanceSelect("blocked_instances")} {this.federatedInstanceSelect("blocked_instances")}
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -540,7 +542,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-12 col-form-label" className="col-12 col-form-label"
htmlFor="create-site-federation-worker-count" htmlFor="create-site-federation-worker-count"
@ -563,7 +565,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</> </>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<div className="form-check"> <div className="form-check">
<input <input
@ -583,10 +585,10 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
{this.state.siteForm.captcha_enabled && ( {this.state.siteForm.captcha_enabled && (
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<label <label
className="form-check-label mr-2" className="form-check-label me-2"
htmlFor="create-site-captcha-difficulty" htmlFor="create-site-captcha-difficulty"
> >
{i18n.t("captcha_difficulty")} {i18n.t("captcha_difficulty")}
@ -595,7 +597,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
id="create-site-captcha-difficulty" id="create-site-captcha-difficulty"
value={this.state.siteForm.captcha_difficulty} value={this.state.siteForm.captcha_difficulty}
onChange={linkEvent(this, this.handleSiteCaptchaDifficulty)} onChange={linkEvent(this, this.handleSiteCaptchaDifficulty)}
className="custom-select w-auto" className="form-select d-inline-block w-auto"
> >
<option value="easy">{i18n.t("easy")}</option> <option value="easy">{i18n.t("easy")}</option>
<option value="medium">{i18n.t("medium")}</option> <option value="medium">{i18n.t("medium")}</option>
@ -604,11 +606,11 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<button <button
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.props.loading} disabled={this.props.loading}
> >
{this.props.loading ? ( {this.props.loading ? (
@ -646,7 +648,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
/> />
<button <button
type="button" type="button"
className="btn btn-sm bg-success ml-2" className="btn btn-sm bg-success ms-2"
onClick={linkEvent(key, this.handleAddInstance)} onClick={linkEvent(key, this.handleAddInstance)}
style={"width: 2rem; height: 2rem;"} style={"width: 2rem; height: 2rem;"}
tabIndex={ tabIndex={

View file

@ -89,10 +89,10 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
))} ))}
</tbody> </tbody>
</table> </table>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<button <button
className="btn btn-sm btn-secondary mr-2" className="btn btn-sm btn-secondary me-2"
onClick={linkEvent(this, this.handleAddTaglineClick)} onClick={linkEvent(this, this.handleAddTaglineClick)}
> >
{i18n.t("add_tagline")} {i18n.t("add_tagline")}
@ -100,11 +100,11 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-12"> <div className="col-12">
<button <button
onClick={linkEvent(this, this.handleSaveClick)} onClick={linkEvent(this, this.handleSaveClick)}
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.props.loading} disabled={this.props.loading}
> >
{this.props.loading ? ( {this.props.loading ? (

View file

@ -581,8 +581,8 @@ const Filter = ({
options: Choice[]; options: Choice[];
loading: boolean; loading: boolean;
}) => ( }) => (
<div className="col-sm-6 form-group"> <div className="col-sm-6 mb-3">
<label className="col-form-label" htmlFor={`filter-${filterType}`}> <label className="mb-2" htmlFor={`filter-${filterType}`}>
{i18n.t(`filter_by_${filterType}` as NoOptionI18nKeys)} {i18n.t(`filter_by_${filterType}` as NoOptionI18nKeys)}
</label> </label>
<SearchableSelect <SearchableSelect
@ -753,7 +753,7 @@ export class Modlog extends Component<
<Icon <Icon
icon="alert-triangle" icon="alert-triangle"
inline inline
classes="mr-sm-2 mx-auto d-sm-inline d-block" classes="me-sm-2 mx-auto d-sm-inline d-block"
/> />
<T i18nKey="modlog_content_warning" class="d-inline"> <T i18nKey="modlog_content_warning" class="d-inline">
#<strong>#</strong># #<strong>#</strong>#
@ -770,11 +770,12 @@ export class Modlog extends Component<
<span>{i18n.t("modlog")}</span> <span>{i18n.t("modlog")}</span>
</h5> </h5>
)} )}
<div className="form-row"> <div className="row mb-2">
<div className="col-sm-6">
<select <select
value={actionType} value={actionType}
onChange={linkEvent(this, this.handleFilterActionChange)} onChange={linkEvent(this, this.handleFilterActionChange)}
className="custom-select col-sm-6" className="form-select"
aria-label="action" aria-label="action"
> >
<option disabled aria-hidden="true"> <option disabled aria-hidden="true">
@ -785,11 +786,15 @@ export class Modlog extends Component<
<option value={"ModLockPost"}>Locking Posts</option> <option value={"ModLockPost"}>Locking Posts</option>
<option value={"ModFeaturePost"}>Featuring Posts</option> <option value={"ModFeaturePost"}>Featuring Posts</option>
<option value={"ModRemoveComment"}>Removing Comments</option> <option value={"ModRemoveComment"}>Removing Comments</option>
<option value={"ModRemoveCommunity"}>Removing Communities</option> <option value={"ModRemoveCommunity"}>
Removing Communities
</option>
<option value={"ModBanFromCommunity"}> <option value={"ModBanFromCommunity"}>
Banning From Communities Banning From Communities
</option> </option>
<option value={"ModAddCommunity"}>Adding Mod to Community</option> <option value={"ModAddCommunity"}>
Adding Mod to Community
</option>
<option value={"ModTransferCommunity"}> <option value={"ModTransferCommunity"}>
Transferring Communities Transferring Communities
</option> </option>
@ -797,7 +802,8 @@ export class Modlog extends Component<
<option value={"ModBan"}>Banning From Site</option> <option value={"ModBan"}>Banning From Site</option>
</select> </select>
</div> </div>
<div className="form-row mb-2"> </div>
<div className="row mb-2">
<Filter <Filter
filterType="user" filterType="user"
onChange={this.handleUserChange} onChange={this.handleUserChange}

View file

@ -228,7 +228,7 @@ export class Inbox extends Component<any, InboxState> {
{inboxRss && ( {inboxRss && (
<small> <small>
<a href={inboxRss} title="RSS" rel={relTags}> <a href={inboxRss} title="RSS" rel={relTags}>
<Icon icon="rss" classes="ml-2 text-muted small" /> <Icon icon="rss" classes="ms-2 text-muted small" />
</a> </a>
<link <link
rel="alternate" rel="alternate"
@ -292,6 +292,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.Unread} value={UnreadOrAll.Unread}
checked={this.state.unreadOrAll == UnreadOrAll.Unread} checked={this.state.unreadOrAll == UnreadOrAll.Unread}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -305,6 +306,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.All} value={UnreadOrAll.All}
checked={this.state.unreadOrAll == UnreadOrAll.All} checked={this.state.unreadOrAll == UnreadOrAll.All}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -325,6 +327,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.All} value={MessageType.All}
checked={this.state.messageType == MessageType.All} checked={this.state.messageType == MessageType.All}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -338,6 +341,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.Replies} value={MessageType.Replies}
checked={this.state.messageType == MessageType.Replies} checked={this.state.messageType == MessageType.Replies}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -351,6 +355,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.Mentions} value={MessageType.Mentions}
checked={this.state.messageType == MessageType.Mentions} checked={this.state.messageType == MessageType.Mentions}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -364,6 +369,7 @@ export class Inbox extends Component<any, InboxState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.Messages} value={MessageType.Messages}
checked={this.state.messageType == MessageType.Messages} checked={this.state.messageType == MessageType.Messages}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -377,8 +383,8 @@ export class Inbox extends Component<any, InboxState> {
selects() { selects() {
return ( return (
<div className="mb-2"> <div className="mb-2">
<span className="mr-3">{this.unreadOrAllRadios()}</span> <span className="me-3">{this.unreadOrAllRadios()}</span>
<span className="mr-3">{this.messageTypeRadios()}</span> <span className="me-3">{this.messageTypeRadios()}</span>
<CommentSortSelect <CommentSortSelect
sort={this.state.sort} sort={this.state.sort}
onChange={this.handleSortChange} onChange={this.handleSortChange}

View file

@ -58,7 +58,7 @@ export class PasswordChange extends Component<any, State> {
passwordChangeForm() { passwordChangeForm() {
return ( return (
<form onSubmit={linkEvent(this, this.handlePasswordChangeSubmit)}> <form onSubmit={linkEvent(this, this.handlePasswordChangeSubmit)}>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="new-password"> <label className="col-sm-2 col-form-label" htmlFor="new-password">
{i18n.t("new_password")} {i18n.t("new_password")}
</label> </label>
@ -74,7 +74,7 @@ export class PasswordChange extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="verify-password"> <label className="col-sm-2 col-form-label" htmlFor="verify-password">
{i18n.t("verify_password")} {i18n.t("verify_password")}
</label> </label>
@ -90,7 +90,7 @@ export class PasswordChange extends Component<any, State> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<button type="submit" className="btn btn-secondary"> <button type="submit" className="btn btn-secondary">
{this.state.passwordChangeRes.state == "loading" ? ( {this.state.passwordChangeRes.state == "loading" ? (
@ -140,7 +140,7 @@ export class PasswordChange extends Component<any, State> {
UserService.Instance.myUserInfo = site.data.my_user; UserService.Instance.myUserInfo = site.data.my_user;
} }
this.props.history.replace("/"); i.props.history.replace("/");
} }
} }
} }

View file

@ -412,6 +412,7 @@ export class Profile extends Component<
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={view} value={view}
checked={active} checked={active}
onChange={linkEvent(this, this.handleViewChange)} onChange={linkEvent(this, this.handleViewChange)}
@ -429,7 +430,7 @@ export class Profile extends Component<
return ( return (
<div className="mb-2"> <div className="mb-2">
<span className="mr-3">{this.viewRadios}</span> <span className="me-3">{this.viewRadios}</span>
<SortSelect <SortSelect
sort={sort} sort={sort}
onChange={this.handleSortChange} onChange={this.handleSortChange}
@ -478,22 +479,22 @@ export class Profile extends Component<
/> />
</li> </li>
{isBanned(pv.person) && ( {isBanned(pv.person) && (
<li className="list-inline-item badge badge-danger"> <li className="list-inline-item badge text-bg-danger">
{i18n.t("banned")} {i18n.t("banned")}
</li> </li>
)} )}
{pv.person.deleted && ( {pv.person.deleted && (
<li className="list-inline-item badge badge-danger"> <li className="list-inline-item badge text-bg-danger">
{i18n.t("deleted")} {i18n.t("deleted")}
</li> </li>
)} )}
{pv.person.admin && ( {pv.person.admin && (
<li className="list-inline-item badge badge-light"> <li className="list-inline-item badge text-bg-light">
{i18n.t("admin")} {i18n.t("admin")}
</li> </li>
)} )}
{pv.person.bot_account && ( {pv.person.bot_account && (
<li className="list-inline-item badge badge-light"> <li className="list-inline-item badge text-bg-light">
{i18n.t("bot_account").toLowerCase()} {i18n.t("bot_account").toLowerCase()}
</li> </li>
)} )}
@ -504,7 +505,7 @@ export class Profile extends Component<
{!this.amCurrentUser && UserService.Instance.myUserInfo && ( {!this.amCurrentUser && UserService.Instance.myUserInfo && (
<> <>
<a <a
className={`d-flex align-self-start btn btn-secondary mr-2 ${ className={`d-flex align-self-start btn btn-secondary me-2 ${
!pv.person.matrix_user_id && "invisible" !pv.person.matrix_user_id && "invisible"
}`} }`}
rel={relTags} rel={relTags}
@ -514,7 +515,7 @@ export class Profile extends Component<
</a> </a>
<Link <Link
className={ className={
"d-flex align-self-start btn btn-secondary mr-2" "d-flex align-self-start btn btn-secondary me-2"
} }
to={`/create_private_message/${pv.person.id}`} to={`/create_private_message/${pv.person.id}`}
> >
@ -523,7 +524,7 @@ export class Profile extends Component<
{personBlocked ? ( {personBlocked ? (
<button <button
className={ className={
"d-flex align-self-start btn btn-secondary mr-2" "d-flex align-self-start btn btn-secondary me-2"
} }
onClick={linkEvent( onClick={linkEvent(
pv.person.id, pv.person.id,
@ -535,7 +536,7 @@ export class Profile extends Component<
) : ( ) : (
<button <button
className={ className={
"d-flex align-self-start btn btn-secondary mr-2" "d-flex align-self-start btn btn-secondary me-2"
} }
onClick={linkEvent( onClick={linkEvent(
pv.person.id, pv.person.id,
@ -554,7 +555,7 @@ export class Profile extends Component<
(!isBanned(pv.person) ? ( (!isBanned(pv.person) ? (
<button <button
className={ className={
"d-flex align-self-start btn btn-secondary mr-2" "d-flex align-self-start btn btn-secondary me-2"
} }
onClick={linkEvent(this, this.handleModBanShow)} onClick={linkEvent(this, this.handleModBanShow)}
aria-label={i18n.t("ban")} aria-label={i18n.t("ban")}
@ -564,7 +565,7 @@ export class Profile extends Component<
) : ( ) : (
<button <button
className={ className={
"d-flex align-self-start btn btn-secondary mr-2" "d-flex align-self-start btn btn-secondary me-2"
} }
onClick={linkEvent(this, this.handleModBanSubmit)} onClick={linkEvent(this, this.handleModBanSubmit)}
aria-label={i18n.t("unban")} aria-label={i18n.t("unban")}
@ -583,13 +584,13 @@ export class Profile extends Component<
)} )}
<div> <div>
<ul className="list-inline mb-2"> <ul className="list-inline mb-2">
<li className="list-inline-item badge badge-light"> <li className="list-inline-item badge text-bg-light">
{i18n.t("number_of_posts", { {i18n.t("number_of_posts", {
count: Number(pv.counts.post_count), count: Number(pv.counts.post_count),
formattedCount: numToSI(pv.counts.post_count), formattedCount: numToSI(pv.counts.post_count),
})} })}
</li> </li>
<li className="list-inline-item badge badge-light"> <li className="list-inline-item badge text-bg-light">
{i18n.t("number_of_comments", { {i18n.t("number_of_comments", {
count: Number(pv.counts.comment_count), count: Number(pv.counts.comment_count),
formattedCount: numToSI(pv.counts.comment_count), formattedCount: numToSI(pv.counts.comment_count),
@ -607,7 +608,7 @@ export class Profile extends Component<
</div> </div>
<div className="d-flex align-items-center text-muted mb-2"> <div className="d-flex align-items-center text-muted mb-2">
<Icon icon="cake" /> <Icon icon="cake" />
<span className="ml-2"> <span className="ms-2">
{i18n.t("cake_day_title")}{" "} {i18n.t("cake_day_title")}{" "}
{moment {moment
.utc(pv.person.published) .utc(pv.person.published)
@ -633,14 +634,14 @@ export class Profile extends Component<
return ( return (
showBanDialog && ( showBanDialog && (
<form onSubmit={linkEvent(this, this.handleModBanSubmit)}> <form onSubmit={linkEvent(this, this.handleModBanSubmit)}>
<div className="form-group row col-12"> <div className="mb-3 row col-12">
<label className="col-form-label" htmlFor="profile-ban-reason"> <label className="col-form-label" htmlFor="profile-ban-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="profile-ban-reason" id="profile-ban-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.banReason} value={this.state.banReason}
onInput={linkEvent(this, this.handleModBanReasonChange)} onInput={linkEvent(this, this.handleModBanReasonChange)}
@ -651,12 +652,12 @@ export class Profile extends Component<
<input <input
type="number" type="number"
id={`mod-ban-expires`} id={`mod-ban-expires`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("number_of_days")} placeholder={i18n.t("number_of_days")}
value={this.state.banExpireDays} value={this.state.banExpireDays}
onInput={linkEvent(this, this.handleModBanExpireDaysChange)} onInput={linkEvent(this, this.handleModBanExpireDaysChange)}
/> />
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -676,14 +677,14 @@ export class Profile extends Component<
</div> </div>
</div> </div>
{/* TODO hold off on expires until later */} {/* TODO hold off on expires until later */}
{/* <div class="form-group row"> */} {/* <div class="mb-3 row"> */}
{/* <label class="col-form-label">Expires</label> */} {/* <label class="col-form-label">Expires</label> */}
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */} {/* <input type="date" class="form-control me-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */}
{/* </div> */} {/* </div> */}
<div className="form-group row"> <div className="mb-3 row">
<button <button
type="reset" type="reset"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
aria-label={i18n.t("cancel")} aria-label={i18n.t("cancel")}
onClick={linkEvent(this, this.handleModBanSubmitCancel)} onClick={linkEvent(this, this.handleModBanSubmitCancel)}
> >

View file

@ -130,6 +130,7 @@ export class RegistrationApplications extends Component<
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.Unread} value={UnreadOrAll.Unread}
checked={this.state.unreadOrAll == UnreadOrAll.Unread} checked={this.state.unreadOrAll == UnreadOrAll.Unread}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -143,6 +144,7 @@ export class RegistrationApplications extends Component<
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.All} value={UnreadOrAll.All}
checked={this.state.unreadOrAll == UnreadOrAll.All} checked={this.state.unreadOrAll == UnreadOrAll.All}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -156,7 +158,7 @@ export class RegistrationApplications extends Component<
selects() { selects() {
return ( return (
<div className="mb-2"> <div className="mb-2">
<span className="mr-3">{this.unreadOrAllRadios()}</span> <span className="me-3">{this.unreadOrAllRadios()}</span>
</div> </div>
); );
} }

View file

@ -193,6 +193,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.Unread} value={UnreadOrAll.Unread}
checked={this.state.unreadOrAll == UnreadOrAll.Unread} checked={this.state.unreadOrAll == UnreadOrAll.Unread}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -206,6 +207,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={UnreadOrAll.All} value={UnreadOrAll.All}
checked={this.state.unreadOrAll == UnreadOrAll.All} checked={this.state.unreadOrAll == UnreadOrAll.All}
onChange={linkEvent(this, this.handleUnreadOrAllChange)} onChange={linkEvent(this, this.handleUnreadOrAllChange)}
@ -226,6 +228,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.All} value={MessageType.All}
checked={this.state.messageType == MessageType.All} checked={this.state.messageType == MessageType.All}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -239,6 +242,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.CommentReport} value={MessageType.CommentReport}
checked={this.state.messageType == MessageType.CommentReport} checked={this.state.messageType == MessageType.CommentReport}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -252,6 +256,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.PostReport} value={MessageType.PostReport}
checked={this.state.messageType == MessageType.PostReport} checked={this.state.messageType == MessageType.PostReport}
onChange={linkEvent(this, this.handleMessageTypeChange)} onChange={linkEvent(this, this.handleMessageTypeChange)}
@ -269,6 +274,7 @@ export class Reports extends Component<any, ReportsState> {
> >
<input <input
type="radio" type="radio"
className="btn-check"
value={MessageType.PrivateMessageReport} value={MessageType.PrivateMessageReport}
checked={ checked={
this.state.messageType == MessageType.PrivateMessageReport this.state.messageType == MessageType.PrivateMessageReport
@ -285,8 +291,8 @@ export class Reports extends Component<any, ReportsState> {
selects() { selects() {
return ( return (
<div className="mb-2"> <div className="mb-2">
<span className="mr-3">{this.unreadOrAllRadios()}</span> <span className="me-3">{this.unreadOrAllRadios()}</span>
<span className="mr-3">{this.messageTypeRadios()}</span> <span className="me-3">{this.messageTypeRadios()}</span>
</div> </div>
); );
} }

View file

@ -110,7 +110,7 @@ const Filter = ({
onChange: (choice: Choice) => void; onChange: (choice: Choice) => void;
loading: boolean; loading: boolean;
}) => ( }) => (
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-md-4 col-form-label" className="col-md-4 col-form-label"
htmlFor={`block-${filterType}-filter`} htmlFor={`block-${filterType}-filter`}
@ -304,7 +304,7 @@ export class Settings extends Component<any, SettingsState> {
<> <>
<h5>{i18n.t("change_password")}</h5> <h5>{i18n.t("change_password")}</h5>
<form onSubmit={linkEvent(this, this.handleChangePasswordSubmit)}> <form onSubmit={linkEvent(this, this.handleChangePasswordSubmit)}>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-5 col-form-label" htmlFor="user-password"> <label className="col-sm-5 col-form-label" htmlFor="user-password">
{i18n.t("new_password")} {i18n.t("new_password")}
</label> </label>
@ -320,7 +320,7 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-5 col-form-label" className="col-sm-5 col-form-label"
htmlFor="user-verify-password" htmlFor="user-verify-password"
@ -339,7 +339,7 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label <label
className="col-sm-5 col-form-label" className="col-sm-5 col-form-label"
htmlFor="user-old-password" htmlFor="user-old-password"
@ -358,8 +358,11 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<button type="submit" className="btn btn-block btn-secondary mr-4"> <button
type="submit"
className="btn d-block btn-secondary me-4 w-100"
>
{this.state.changePasswordRes.state === "loading" ? ( {this.state.changePasswordRes.state === "loading" ? (
<Spinner /> <Spinner />
) : ( ) : (
@ -467,11 +470,11 @@ export class Settings extends Component<any, SettingsState> {
<> <>
<h5>{i18n.t("settings")}</h5> <h5>{i18n.t("settings")}</h5>
<form onSubmit={linkEvent(this, this.handleSaveSettingsSubmit)}> <form onSubmit={linkEvent(this, this.handleSaveSettingsSubmit)}>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-5 col-form-label" htmlFor="display-name"> <label className="col-sm-3 col-form-label" htmlFor="display-name">
{i18n.t("display_name")} {i18n.t("display_name")}
</label> </label>
<div className="col-sm-7"> <div className="col-sm-9">
<input <input
id="display-name" id="display-name"
type="text" type="text"
@ -484,7 +487,7 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3 col-form-label" htmlFor="user-bio"> <label className="col-sm-3 col-form-label" htmlFor="user-bio">
{i18n.t("bio")} {i18n.t("bio")}
</label> </label>
@ -499,7 +502,7 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3 col-form-label" htmlFor="user-email"> <label className="col-sm-3 col-form-label" htmlFor="user-email">
{i18n.t("email")} {i18n.t("email")}
</label> </label>
@ -515,13 +518,13 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-5 col-form-label" htmlFor="matrix-user-id"> <label className="col-sm-3 col-form-label" htmlFor="matrix-user-id">
<a href={elementUrl} rel={relTags}> <a href={elementUrl} rel={relTags}>
{i18n.t("matrix_user_id")} {i18n.t("matrix_user_id")}
</a> </a>
</label> </label>
<div className="col-sm-7"> <div className="col-sm-9">
<input <input
id="matrix-user-id" id="matrix-user-id"
type="text" type="text"
@ -533,8 +536,10 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3">{i18n.t("avatar")}</label> <label className="col-sm-3 col-form-label">
{i18n.t("avatar")}
</label>
<div className="col-sm-9"> <div className="col-sm-9">
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_avatar")} uploadTitle={i18n.t("upload_avatar")}
@ -545,8 +550,10 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3">{i18n.t("banner")}</label> <label className="col-sm-3 col-form-label">
{i18n.t("banner")}
</label>
<div className="col-sm-9"> <div className="col-sm-9">
<ImageUploadForm <ImageUploadForm
uploadTitle={i18n.t("upload_banner")} uploadTitle={i18n.t("upload_banner")}
@ -556,8 +563,8 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3" htmlFor="user-language"> <label className="col-sm-3 form-label" htmlFor="user-language">
{i18n.t("interface_language")} {i18n.t("interface_language")}
</label> </label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -565,7 +572,7 @@ export class Settings extends Component<any, SettingsState> {
id="user-language" id="user-language"
value={this.state.saveUserSettingsForm.interface_language} value={this.state.saveUserSettingsForm.interface_language}
onChange={linkEvent(this, this.handleInterfaceLangChange)} onChange={linkEvent(this, this.handleInterfaceLangChange)}
className="custom-select w-auto" className="form-select d-inline-block w-auto"
> >
<option disabled aria-hidden="true"> <option disabled aria-hidden="true">
{i18n.t("interface_language")} {i18n.t("interface_language")}
@ -593,8 +600,8 @@ export class Settings extends Component<any, SettingsState> {
showSite showSite
onChange={this.handleDiscussionLanguageChange} onChange={this.handleDiscussionLanguageChange}
/> />
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-3" htmlFor="user-theme"> <label className="col-sm-3 col-form-label" htmlFor="user-theme">
{i18n.t("theme")} {i18n.t("theme")}
</label> </label>
<div className="col-sm-9"> <div className="col-sm-9">
@ -602,7 +609,7 @@ export class Settings extends Component<any, SettingsState> {
id="user-theme" id="user-theme"
value={this.state.saveUserSettingsForm.theme} value={this.state.saveUserSettingsForm.theme}
onChange={linkEvent(this, this.handleThemeChange)} onChange={linkEvent(this, this.handleThemeChange)}
className="custom-select w-auto" className="form-select d-inline-block w-auto"
> >
<option disabled aria-hidden="true"> <option disabled aria-hidden="true">
{i18n.t("theme")} {i18n.t("theme")}
@ -616,8 +623,8 @@ export class Settings extends Component<any, SettingsState> {
</select> </select>
</div> </div>
</div> </div>
<form className="form-group row"> <form className="mb-3 row">
<label className="col-sm-3">{i18n.t("type")}</label> <label className="col-sm-3 col-form-label">{i18n.t("type")}</label>
<div className="col-sm-9"> <div className="col-sm-9">
<ListingTypeSelect <ListingTypeSelect
type_={ type_={
@ -630,8 +637,10 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</form> </form>
<form className="form-group row"> <form className="mb-3 row">
<label className="col-sm-3">{i18n.t("sort_type")}</label> <label className="col-sm-3 col-form-label">
{i18n.t("sort_type")}
</label>
<div className="col-sm-9"> <div className="col-sm-9">
<SortSelect <SortSelect
sort={ sort={
@ -641,7 +650,7 @@ export class Settings extends Component<any, SettingsState> {
/> />
</div> </div>
</form> </form>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -655,7 +664,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -669,7 +678,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -683,7 +692,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -697,7 +706,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -714,7 +723,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -731,7 +740,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -748,7 +757,7 @@ export class Settings extends Component<any, SettingsState> {
</label> </label>
</div> </div>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -772,8 +781,8 @@ export class Settings extends Component<any, SettingsState> {
</div> </div>
</div> </div>
{this.totpSection()} {this.totpSection()}
<div className="form-group"> <div className="input-group mb-3">
<button type="submit" className="btn btn-block btn-secondary mr-4"> <button type="submit" className="btn d-block btn-secondary me-4">
{this.state.saveRes.state === "loading" ? ( {this.state.saveRes.state === "loading" ? (
<Spinner /> <Spinner />
) : ( ) : (
@ -782,9 +791,9 @@ export class Settings extends Component<any, SettingsState> {
</button> </button>
</div> </div>
<hr /> <hr />
<div className="form-group"> <div className="input-group mb-3">
<button <button
className="btn btn-block btn-danger" className="btn d-block btn-danger"
onClick={linkEvent( onClick={linkEvent(
this, this,
this.handleDeleteAccountShowConfirmToggle this.handleDeleteAccountShowConfirmToggle
@ -809,7 +818,7 @@ export class Settings extends Component<any, SettingsState> {
className="form-control my-2" className="form-control my-2"
/> />
<button <button
className="btn btn-danger mr-4" className="btn btn-danger me-4"
disabled={!this.state.deleteAccountForm.password} disabled={!this.state.deleteAccountForm.password}
onClick={linkEvent(this, this.handleDeleteAccount)} onClick={linkEvent(this, this.handleDeleteAccount)}
> >
@ -843,7 +852,7 @@ export class Settings extends Component<any, SettingsState> {
return ( return (
<> <>
{!totpUrl && ( {!totpUrl && (
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -866,7 +875,7 @@ export class Settings extends Component<any, SettingsState> {
{i18n.t("two_factor_link")} {i18n.t("two_factor_link")}
</a> </a>
</div> </div>
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"

View file

@ -41,14 +41,14 @@ export class MetadataCard extends Component<
{post.embed_title} {post.embed_title}
</a> </a>
</h5> </h5>
<span className="d-inline-block ml-2 mb-2 small text-muted"> <span className="d-inline-block ms-2 mb-2 small text-muted">
<a <a
className="text-muted font-italic" className="text-muted font-italic"
href={post.url} href={post.url}
rel={relTags} rel={relTags}
> >
{new URL(post.url).hostname} {new URL(post.url).hostname}
<Icon icon="external-link" classes="ml-1" /> <Icon icon="external-link" classes="ms-1" />
</a> </a>
</span> </span>
</> </>

View file

@ -203,7 +203,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
) && !this.state.submitted ) && !this.state.submitted
} }
/> />
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="post-url"> <label className="col-sm-2 col-form-label" htmlFor="post-url">
{i18n.t("url")} {i18n.t("url")}
</label> </label>
@ -241,7 +241,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
<div> <div>
<a <a
href={`${webArchiveUrl}/save/${encodeURIComponent(url)}`} href={`${webArchiveUrl}/save/${encodeURIComponent(url)}`}
className="mr-2 d-inline-block float-right text-muted small font-weight-bold" className="me-2 d-inline-block float-right text-muted small font-weight-bold"
rel={relTags} rel={relTags}
> >
archive.org {i18n.t("archive_link")} archive.org {i18n.t("archive_link")}
@ -250,7 +250,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
href={`${ghostArchiveUrl}/search?term=${encodeURIComponent( href={`${ghostArchiveUrl}/search?term=${encodeURIComponent(
url url
)}`} )}`}
className="mr-2 d-inline-block float-right text-muted small font-weight-bold" className="me-2 d-inline-block float-right text-muted small font-weight-bold"
rel={relTags} rel={relTags}
> >
ghostarchive.org {i18n.t("archive_link")} ghostarchive.org {i18n.t("archive_link")}
@ -259,7 +259,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
href={`${archiveTodayUrl}/?run=1&url=${encodeURIComponent( href={`${archiveTodayUrl}/?run=1&url=${encodeURIComponent(
url url
)}`} )}`}
className="mr-2 d-inline-block float-right text-muted small font-weight-bold" className="me-2 d-inline-block float-right text-muted small font-weight-bold"
rel={relTags} rel={relTags}
> >
archive.today {i18n.t("archive_link")} archive.today {i18n.t("archive_link")}
@ -277,7 +277,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
aria-label={i18n.t("delete")} aria-label={i18n.t("delete")}
data-tippy-content={i18n.t("delete")} data-tippy-content={i18n.t("delete")}
> >
<Icon icon="x" classes="icon-inline mr-1" /> <Icon icon="x" classes="icon-inline me-1" />
{capitalizeFirstLetter(i18n.t("delete"))} {capitalizeFirstLetter(i18n.t("delete"))}
</button> </button>
)} )}
@ -316,7 +316,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
)} )}
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="post-title"> <label className="col-sm-2 col-form-label" htmlFor="post-title">
{i18n.t("title")} {i18n.t("title")}
</label> </label>
@ -342,7 +342,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
</div> </div>
</div> </div>
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label">{i18n.t("body")}</label> <label className="col-sm-2 col-form-label">{i18n.t("body")}</label>
<div className="col-sm-10"> <div className="col-sm-10">
<MarkdownTextArea <MarkdownTextArea
@ -355,7 +355,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
</div> </div>
</div> </div>
{!this.props.post_view && ( {!this.props.post_view && (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label" htmlFor="post-community"> <label className="col-sm-2 col-form-label" htmlFor="post-community">
{i18n.t("community")} {i18n.t("community")}
</label> </label>
@ -378,7 +378,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
</div> </div>
)} )}
{this.props.enableNsfw && ( {this.props.enableNsfw && (
<div className="form-group row"> <div className="mb-3 row">
<legend className="col-form-label col-sm-2 pt-0"> <legend className="col-form-label col-sm-2 pt-0">
{i18n.t("nsfw")} {i18n.t("nsfw")}
</legend> </legend>
@ -412,12 +412,12 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
value={this.state.form.honeypot} value={this.state.form.honeypot}
onInput={linkEvent(this, this.handleHoneyPotChange)} onInput={linkEvent(this, this.handleHoneyPotChange)}
/> />
<div className="form-group row"> <div className="mb-3 row">
<div className="col-sm-10"> <div className="col-sm-10">
<button <button
disabled={!this.state.form.community_id || this.state.loading} disabled={!this.state.form.community_id || this.state.loading}
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
> >
{this.state.loading ? ( {this.state.loading ? (
<Spinner /> <Spinner />

View file

@ -374,13 +374,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<PersonListing person={post_view.creator} /> <PersonListing person={post_view.creator} />
{this.creatorIsMod_ && ( {this.creatorIsMod_ && (
<span className="mx-1 badge">{i18n.t("mod")}</span> <span className="mx-1 badge text-bg-light">{i18n.t("mod")}</span>
)} )}
{this.creatorIsAdmin_ && ( {this.creatorIsAdmin_ && (
<span className="mx-1 badge">{i18n.t("admin")}</span> <span className="mx-1 badge text-bg-light">{i18n.t("admin")}</span>
)} )}
{post_view.creator.bot_account && ( {post_view.creator.bot_account && (
<span className="mx-1 badge"> <span className="mx-1 badge text-bg-light">
{i18n.t("bot_account").toLowerCase()} {i18n.t("bot_account").toLowerCase()}
</span> </span>
)} )}
@ -392,7 +392,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
</li> </li>
{post_view.post.language_id !== 0 && ( {post_view.post.language_id !== 0 && (
<span className="mx-1 badge"> <span className="mx-1 badge text-bg-light">
{ {
this.props.allLanguages.find( this.props.allLanguages.find(
lang => lang.id === post_view.post.language_id lang => lang.id === post_view.post.language_id
@ -415,7 +415,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
voteBar() { voteBar() {
return ( return (
<div className={`vote-bar col-1 pr-0 small text-center`}> <div className={`vote-bar col-1 pe-0 small text-center`}>
<button <button
className={`btn-animate btn btn-link p-0 ${ className={`btn-animate btn btn-link p-0 ${
this.postView.my_vote == 1 ? "text-info" : "text-muted" this.postView.my_vote == 1 ? "text-info" : "text-muted"
@ -433,7 +433,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</button> </button>
{showScores() ? ( {showScores() ? (
<div <div
className={`unselectable pointer font-weight-bold text-muted px-1 post-score`} className={`unselectable pointer 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)}
@ -509,7 +509,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
{(url && isImage(url)) || {(url && isImage(url)) ||
(post.thumbnail_url && ( (post.thumbnail_url && (
<button <button
className="btn btn-link text-monospace text-muted small d-inline-block" className="btn btn-sm text-monospace text-muted d-inline-block"
data-tippy-content={i18n.t("expand_here")} data-tippy-content={i18n.t("expand_here")}
onClick={linkEvent(this, this.handleImageExpandClick)} onClick={linkEvent(this, this.handleImageExpandClick)}
> >
@ -522,13 +522,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</button> </button>
))} ))}
{post.removed && ( {post.removed && (
<small className="ml-2 badge text-bg-secondary"> <small className="ms-2 badge text-bg-secondary">
{i18n.t("removed")} {i18n.t("removed")}
</small> </small>
)} )}
{post.deleted && ( {post.deleted && (
<small <small
className="unselectable pointer ml-2 text-muted font-italic" className="unselectable pointer ms-2 text-muted font-italic"
data-tippy-content={i18n.t("deleted")} data-tippy-content={i18n.t("deleted")}
> >
<Icon icon="trash" classes="icon-inline text-danger" /> <Icon icon="trash" classes="icon-inline text-danger" />
@ -536,7 +536,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
{post.locked && ( {post.locked && (
<small <small
className="unselectable pointer ml-2 text-muted font-italic" className="unselectable pointer ms-2 text-muted font-italic"
data-tippy-content={i18n.t("locked")} data-tippy-content={i18n.t("locked")}
> >
<Icon icon="lock" classes="icon-inline text-danger" /> <Icon icon="lock" classes="icon-inline text-danger" />
@ -544,7 +544,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
{post.featured_community && ( {post.featured_community && (
<small <small
className="unselectable pointer ml-2 text-muted font-italic" className="unselectable pointer ms-2 text-muted font-italic"
data-tippy-content={i18n.t("featured_in_community")} data-tippy-content={i18n.t("featured_in_community")}
aria-label={i18n.t("featured_in_community")} aria-label={i18n.t("featured_in_community")}
> >
@ -553,7 +553,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
{post.featured_local && ( {post.featured_local && (
<small <small
className="unselectable pointer ml-2 text-muted font-italic" className="unselectable pointer ms-2 text-muted font-italic"
data-tippy-content={i18n.t("featured_in_local")} data-tippy-content={i18n.t("featured_in_local")}
aria-label={i18n.t("featured_in_local")} aria-label={i18n.t("featured_in_local")}
> >
@ -561,7 +561,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</small> </small>
)} )}
{post.nsfw && ( {post.nsfw && (
<small className="ml-2 badge text-bg-danger"> <small className="ms-2 badge text-bg-danger">
{i18n.t("nsfw")} {i18n.t("nsfw")}
</small> </small>
)} )}
@ -596,9 +596,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
return dupes && dupes.length > 0 ? ( return dupes && dupes.length > 0 ? (
<ul className="list-inline mb-1 small text-muted"> <ul className="list-inline mb-1 small text-muted">
<> <>
<li className="list-inline-item mr-2">{i18n.t("cross_posted_to")}</li> <li className="list-inline-item me-2">{i18n.t("cross_posted_to")}</li>
{dupes.map(pv => ( {dupes.map(pv => (
<li key={pv.post.id} className="list-inline-item mr-2"> <li key={pv.post.id} className="list-inline-item me-2">
<Link to={`/post/${pv.post.id}`}> <Link to={`/post/${pv.post.id}`}>
{pv.community.local {pv.community.local
? pv.community.name ? pv.community.name
@ -617,11 +617,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
const post = this.postView.post; const post = this.postView.post;
return ( return (
<div className="d-flex align-items-center justify-content-start flex-wrap text-muted font-weight-bold"> <div className="d-flex align-items-center justify-content-start flex-wrap text-muted">
{this.commentsButton} {this.commentsButton}
{canShare() && ( {canShare() && (
<button <button
className="btn btn-sm btn-link" className="btn btn-sm btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleShare)} onClick={linkEvent(this, this.handleShare)}
type="button" type="button"
> >
@ -630,7 +630,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
{!post.local && ( {!post.local && (
<a <a
className="btn btn-link btn-animate text-muted py-0" className="btn btn-sm btn-animate text-muted py-0"
title={i18n.t("link")} title={i18n.t("link")}
href={post.ap_id} href={post.ap_id}
> >
@ -651,14 +651,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
return ( return (
<button <button
className="btn btn-link btn-animate text-muted py-0" className="btn btn-sm btn-animate text-muted py-0"
data-tippy-content={body && mdNoImages.render(body)} data-tippy-content={body && mdNoImages.render(body)}
data-tippy-allowHtml={true} data-tippy-allowHtml={true}
onClick={linkEvent(this, this.handleShowBody)} onClick={linkEvent(this, this.handleShowBody)}
> >
<Icon <Icon
icon="book-open" icon="book-open"
classes={classNames("icon-inline mr-1", { classes={classNames("icon-inline me-1", {
"text-success": this.state.showBody, "text-success": this.state.showBody,
})} })}
/> />
@ -688,7 +688,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<div className="dropdown"> <div className="dropdown">
<button <button
className="btn btn-link btn-animate text-muted py-0 dropdown-toggle" className="btn btn-sm btn-animate text-muted py-0 dropdown-toggle"
onClick={linkEvent(this, this.handleShowAdvanced)} onClick={linkEvent(this, this.handleShowAdvanced)}
data-tippy-content={i18n.t("more")} data-tippy-content={i18n.t("more")}
data-bs-toggle="dropdown" data-bs-toggle="dropdown"
@ -736,15 +736,15 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
const post_view = this.postView; const post_view = this.postView;
return ( return (
<Link <Link
className="btn btn-link text-muted pl-0 text-muted" className="btn btn-link text-muted ps-0 text-muted"
title={i18n.t("number_of_comments", { title={i18n.t("number_of_comments", {
count: Number(post_view.counts.comments), count: Number(post_view.counts.comments),
formattedCount: Number(post_view.counts.comments), formattedCount: Number(post_view.counts.comments),
})} })}
to={`/post/${post_view.post.id}?scrollToComments=true`} to={`/post/${post_view.post.id}?scrollToComments=true`}
> >
<Icon icon="message-square" classes="mr-1" inline /> <Icon icon="message-square" classes="me-1" inline />
<span className="mr-2"> <span className="me-2">
{i18n.t("number_of_comments", { {i18n.t("number_of_comments", {
count: Number(post_view.counts.comments), count: Number(post_view.counts.comments),
formattedCount: numToSI(post_view.counts.comments), formattedCount: numToSI(post_view.counts.comments),
@ -789,7 +789,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
<Icon icon="arrow-up1" classes="icon-inline small" /> <Icon icon="arrow-up1" classes="icon-inline small" />
{showScores() && ( {showScores() && (
<span className="ml-2"> <span className="ms-2">
{numToSI(this.postView.counts.upvotes)} {numToSI(this.postView.counts.upvotes)}
</span> </span>
)} )}
@ -798,7 +798,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</button> </button>
{this.props.enableDownvotes && ( {this.props.enableDownvotes && (
<button <button
className={`ml-2 btn-animate btn py-0 px-1 ${ className={`ms-2 btn-animate btn py-0 px-1 ${
this.postView.my_vote === -1 ? "text-danger" : "text-muted" this.postView.my_vote === -1 ? "text-danger" : "text-muted"
}`} }`}
onClick={linkEvent(this, this.handleDownvote)} onClick={linkEvent(this, this.handleDownvote)}
@ -813,7 +813,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<Icon icon="arrow-down1" classes="icon-inline small" /> <Icon icon="arrow-down1" classes="icon-inline small" />
{showScores() && ( {showScores() && (
<span <span
className={classNames("ml-2", { className={classNames("ms-2", {
invisible: this.postView.counts.downvotes === 0, invisible: this.postView.counts.downvotes === 0,
})} })}
> >
@ -834,7 +834,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
const label = saved ? i18n.t("unsave") : i18n.t("save"); const label = saved ? i18n.t("unsave") : i18n.t("save");
return ( return (
<button <button
className="btn btn-link btn-animate text-muted py-0" className="btn btn-sm btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleSavePostClick)} onClick={linkEvent(this, this.handleSavePostClick)}
data-tippy-content={label} data-tippy-content={label}
aria-label={label} aria-label={label}
@ -855,7 +855,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get crossPostButton() { get crossPostButton() {
return ( return (
<Link <Link
className="btn btn-link btn-animate text-muted py-0" className="btn btn-sm btn-animate text-muted py-0"
to={{ to={{
/* Empty string properties are required to satisfy type*/ /* Empty string properties are required to satisfy type*/
pathname: "/create_post", pathname: "/create_post",
@ -880,7 +880,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
onClick={linkEvent(this, this.handleShowReportDialog)} onClick={linkEvent(this, this.handleShowReportDialog)}
aria-label={i18n.t("show_report_dialog")} aria-label={i18n.t("show_report_dialog")}
> >
<Icon classes="mr-1" icon="flag" inline /> <Icon classes="me-1" icon="flag" inline />
{i18n.t("create_report")} {i18n.t("create_report")}
</button> </button>
); );
@ -896,7 +896,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
{this.state.blockLoading ? ( {this.state.blockLoading ? (
<Spinner /> <Spinner />
) : ( ) : (
<Icon classes="mr-1" icon="slash" inline /> <Icon classes="me-1" icon="slash" inline />
)} )}
{i18n.t("block_user")} {i18n.t("block_user")}
</button> </button>
@ -910,7 +910,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
onClick={linkEvent(this, this.handleEditClick)} onClick={linkEvent(this, this.handleEditClick)}
aria-label={i18n.t("edit")} aria-label={i18n.t("edit")}
> >
<Icon classes="mr-1" icon="edit" inline /> <Icon classes="me-1" icon="edit" inline />
{i18n.t("edit")} {i18n.t("edit")}
</button> </button>
); );
@ -931,7 +931,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
<Icon <Icon
icon="trash" icon="trash"
classes={classNames("mr-1", { "text-danger": deleted })} classes={classNames("me-1", { "text-danger": deleted })}
inline inline
/> />
{label} {label}
@ -944,7 +944,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get viewSourceButton() { get viewSourceButton() {
return ( return (
<button <button
className="btn btn-link btn-animate text-muted py-0" className="btn btn-sm btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleViewSource)} onClick={linkEvent(this, this.handleViewSource)}
data-tippy-content={i18n.t("view_source")} data-tippy-content={i18n.t("view_source")}
aria-label={i18n.t("view_source")} aria-label={i18n.t("view_source")}
@ -973,7 +973,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
<Icon <Icon
icon="lock" icon="lock"
classes={classNames("mr-1", { "text-danger": locked })} classes={classNames("me-1", { "text-danger": locked })}
inline inline
/> />
{label} {label}
@ -1008,7 +1008,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
<Icon <Icon
icon="pin" icon="pin"
classes={classNames("mr-1", { classes={classNames("me-1", {
"text-success": featuredCommunity, "text-success": featuredCommunity,
})} })}
inline inline
@ -1032,7 +1032,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<> <>
<Icon <Icon
icon="pin" icon="pin"
classes={classNames("mr-1", { classes={classNames("me-1", {
"text-success": featuredLocal, "text-success": featuredLocal,
})} })}
inline inline
@ -1143,13 +1143,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
) : ( ) : (
<> <>
<button <button
className="d-inline-block mr-1 btn btn-link btn-animate text-muted py-0" className="d-inline-block me-1 btn btn-link btn-animate text-muted py-0"
aria-label={i18n.t("are_you_sure")} aria-label={i18n.t("are_you_sure")}
> >
{i18n.t("are_you_sure")} {i18n.t("are_you_sure")}
</button> </button>
<button <button
className="btn btn-link btn-animate text-muted py-0 d-inline-block mr-1" className="btn btn-link btn-animate text-muted py-0 d-inline-block me-1"
aria-label={i18n.t("yes")} aria-label={i18n.t("yes")}
onClick={linkEvent(this, this.handleTransferCommunity)} onClick={linkEvent(this, this.handleTransferCommunity)}
> >
@ -1248,13 +1248,16 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
className="form-inline" className="form-inline"
onSubmit={linkEvent(this, this.handleModRemoveSubmit)} onSubmit={linkEvent(this, this.handleModRemoveSubmit)}
> >
<label className="sr-only" htmlFor="post-listing-remove-reason"> <label
className="visually-hidden"
htmlFor="post-listing-remove-reason"
>
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="post-listing-remove-reason" id="post-listing-remove-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.removeReason} value={this.state.removeReason}
onInput={linkEvent(this, this.handleModRemoveReasonChange)} onInput={linkEvent(this, this.handleModRemoveReasonChange)}
@ -1270,7 +1273,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)} )}
{this.state.showBanDialog && ( {this.state.showBanDialog && (
<form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}> <form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}>
<div className="form-group row col-12"> <div className="mb-3 row col-12">
<label <label
className="col-form-label" className="col-form-label"
htmlFor="post-listing-ban-reason" htmlFor="post-listing-ban-reason"
@ -1280,7 +1283,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<input <input
type="text" type="text"
id="post-listing-ban-reason" id="post-listing-ban-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.banReason} value={this.state.banReason}
onInput={linkEvent(this, this.handleModBanReasonChange)} onInput={linkEvent(this, this.handleModBanReasonChange)}
@ -1291,12 +1294,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<input <input
type="number" type="number"
id={`mod-ban-expires`} id={`mod-ban-expires`}
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("number_of_days")} placeholder={i18n.t("number_of_days")}
value={this.state.banExpireDays} value={this.state.banExpireDays}
onInput={linkEvent(this, this.handleModBanExpireDaysChange)} onInput={linkEvent(this, this.handleModBanExpireDaysChange)}
/> />
<div className="form-group"> <div className="input-group mb-3">
<div className="form-check"> <div className="form-check">
<input <input
className="form-check-input" className="form-check-input"
@ -1316,11 +1319,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</div> </div>
</div> </div>
{/* TODO hold off on expires until later */} {/* TODO hold off on expires until later */}
{/* <div class="form-group row"> */} {/* <div class="mb-3 row"> */}
{/* <label class="col-form-label">Expires</label> */} {/* <label class="col-form-label">Expires</label> */}
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */} {/* <input type="date" class="form-control me-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */}
{/* </div> */} {/* </div> */}
<div className="form-group row"> <div className="mb-3 row">
<button <button
type="submit" type="submit"
className="btn btn-secondary" className="btn btn-secondary"
@ -1342,13 +1345,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
className="form-inline" className="form-inline"
onSubmit={linkEvent(this, this.handleReportSubmit)} onSubmit={linkEvent(this, this.handleReportSubmit)}
> >
<label className="sr-only" htmlFor="post-report-reason"> <label className="visually-hidden" htmlFor="post-report-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="post-report-reason" id="post-report-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
required required
value={this.state.reportReason} value={this.state.reportReason}
@ -1369,13 +1372,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
onSubmit={linkEvent(this, this.handlePurgeSubmit)} onSubmit={linkEvent(this, this.handlePurgeSubmit)}
> >
<PurgeWarning /> <PurgeWarning />
<label className="sr-only" htmlFor="purge-reason"> <label className="visually-hidden" htmlFor="purge-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="purge-reason" id="purge-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
value={this.state.purgeReason} value={this.state.purgeReason}
onInput={linkEvent(this, this.handlePurgeReasonChange)} onInput={linkEvent(this, this.handlePurgeReasonChange)}
@ -1453,7 +1456,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<div className="d-none d-sm-block"> <div className="d-none d-sm-block">
<article className="row post-container"> <article className="row post-container">
{!this.props.viewOnly && this.voteBar()} {!this.props.viewOnly && this.voteBar()}
<div className="col-sm-2 pr-0 post-media"> <div className="col-sm-2 pe-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">

View file

@ -395,7 +395,7 @@ export class Post extends Component<any, PostState> {
/> />
<div className="d-block d-md-none"> <div className="d-block d-md-none">
<button <button
className="btn btn-secondary d-inline-block mb-2 mr-3" className="btn btn-secondary d-inline-block mb-2 me-3"
onClick={linkEvent(this, this.handleShowSidebarMobile)} onClick={linkEvent(this, this.handleShowSidebarMobile)}
> >
{i18n.t("sidebar")}{" "} {i18n.t("sidebar")}{" "}
@ -430,7 +430,7 @@ export class Post extends Component<any, PostState> {
sortRadios() { sortRadios() {
return ( return (
<> <>
<div className="btn-group btn-group-toggle flex-wrap mr-3 mb-2"> <div className="btn-group btn-group-toggle flex-wrap me-3 mb-2">
<label <label
className={`btn btn-outline-secondary pointer ${ className={`btn btn-outline-secondary pointer ${
this.state.commentSort === "Hot" && "active" this.state.commentSort === "Hot" && "active"
@ -439,6 +439,7 @@ export class Post extends Component<any, PostState> {
{i18n.t("hot")} {i18n.t("hot")}
<input <input
type="radio" type="radio"
className="btn-check"
value={"Hot"} value={"Hot"}
checked={this.state.commentSort === "Hot"} checked={this.state.commentSort === "Hot"}
onChange={linkEvent(this, this.handleCommentSortChange)} onChange={linkEvent(this, this.handleCommentSortChange)}
@ -452,6 +453,7 @@ export class Post extends Component<any, PostState> {
{i18n.t("top")} {i18n.t("top")}
<input <input
type="radio" type="radio"
className="btn-check"
value={"Top"} value={"Top"}
checked={this.state.commentSort === "Top"} checked={this.state.commentSort === "Top"}
onChange={linkEvent(this, this.handleCommentSortChange)} onChange={linkEvent(this, this.handleCommentSortChange)}
@ -465,6 +467,7 @@ export class Post extends Component<any, PostState> {
{i18n.t("new")} {i18n.t("new")}
<input <input
type="radio" type="radio"
className="btn-check"
value={"New"} value={"New"}
checked={this.state.commentSort === "New"} checked={this.state.commentSort === "New"}
onChange={linkEvent(this, this.handleCommentSortChange)} onChange={linkEvent(this, this.handleCommentSortChange)}
@ -478,6 +481,7 @@ export class Post extends Component<any, PostState> {
{i18n.t("old")} {i18n.t("old")}
<input <input
type="radio" type="radio"
className="btn-check"
value={"Old"} value={"Old"}
checked={this.state.commentSort === "Old"} checked={this.state.commentSort === "Old"}
onChange={linkEvent(this, this.handleCommentSortChange)} onChange={linkEvent(this, this.handleCommentSortChange)}
@ -493,6 +497,7 @@ export class Post extends Component<any, PostState> {
{i18n.t("chat")} {i18n.t("chat")}
<input <input
type="radio" type="radio"
className="btn-check"
value={CommentViewType.Flat} value={CommentViewType.Flat}
checked={this.state.commentViewType === CommentViewType.Flat} checked={this.state.commentViewType === CommentViewType.Flat}
onChange={linkEvent(this, this.handleCommentViewTypeChange)} onChange={linkEvent(this, this.handleCommentViewTypeChange)}
@ -585,14 +590,14 @@ export class Post extends Component<any, PostState> {
{!!this.state.commentId && ( {!!this.state.commentId && (
<> <>
<button <button
className="pl-0 d-block btn btn-link text-muted" className="ps-0 d-block btn btn-link text-muted"
onClick={linkEvent(this, this.handleViewPost)} onClick={linkEvent(this, this.handleViewPost)}
> >
{i18n.t("view_all_comments")} {i18n.t("view_all_comments")}
</button> </button>
{showContextButton && ( {showContextButton && (
<button <button
className="pl-0 d-block btn btn-link text-muted" className="ps-0 d-block btn btn-link text-muted"
onClick={linkEvent(this, this.handleViewContext)} onClick={linkEvent(this, this.handleViewContext)}
> >
{i18n.t("show_context")} {i18n.t("show_context")}

View file

@ -80,7 +80,7 @@ export class PrivateMessageForm extends Component<
} }
/> />
{!this.props.privateMessageView && ( {!this.props.privateMessageView && (
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label"> <label className="col-sm-2 col-form-label">
{capitalizeFirstLetter(i18n.t("to"))} {capitalizeFirstLetter(i18n.t("to"))}
</label> </label>
@ -90,7 +90,7 @@ export class PrivateMessageForm extends Component<
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<label className="col-sm-2 col-form-label"> <label className="col-sm-2 col-form-label">
{i18n.t("message")} {i18n.t("message")}
<button <button
@ -114,7 +114,7 @@ export class PrivateMessageForm extends Component<
</div> </div>
{this.state.showDisclaimer && ( {this.state.showDisclaimer && (
<div className="form-group row"> <div className="mb-3 row">
<div className="offset-sm-2 col-sm-10"> <div className="offset-sm-2 col-sm-10">
<div className="alert alert-danger" role="alert"> <div className="alert alert-danger" role="alert">
<T i18nKey="private_message_disclaimer"> <T i18nKey="private_message_disclaimer">
@ -131,11 +131,11 @@ export class PrivateMessageForm extends Component<
</div> </div>
</div> </div>
)} )}
<div className="form-group row"> <div className="mb-3 row">
<div className="offset-sm-2 col-sm-10"> <div className="offset-sm-2 col-sm-10">
<button <button
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary me-2"
disabled={this.state.loading} disabled={this.state.loading}
> >
{this.state.loading ? ( {this.state.loading ? (

View file

@ -248,13 +248,13 @@ export class PrivateMessage extends Component<
className="form-inline" className="form-inline"
onSubmit={linkEvent(this, this.handleReportSubmit)} onSubmit={linkEvent(this, this.handleReportSubmit)}
> >
<label className="sr-only" htmlFor="pm-report-reason"> <label className="visually-hidden" htmlFor="pm-report-reason">
{i18n.t("reason")} {i18n.t("reason")}
</label> </label>
<input <input
type="text" type="text"
id="pm-report-reason" id="pm-report-reason"
className="form-control mr-2" className="form-control me-2"
placeholder={i18n.t("reason")} placeholder={i18n.t("reason")}
required required
value={this.state.reportReason} value={this.state.reportReason}

View file

@ -180,8 +180,8 @@ const Filter = ({
loading: boolean; loading: boolean;
}) => { }) => {
return ( return (
<div className="form-group col-sm-6"> <div className="mb-3 col-sm-6">
<label className="col-form-label" htmlFor={`${filterType}-filter`}> <label className="col-form-label me-2" htmlFor={`${filterType}-filter`}>
{capitalizeFirstLetter(i18n.t(filterType))} {capitalizeFirstLetter(i18n.t(filterType))}
</label> </label>
<SearchableSelect <SearchableSelect
@ -491,13 +491,11 @@ export class Search extends Component<any, SearchState> {
get searchForm() { get searchForm() {
return ( return (
<form <form className="row" onSubmit={linkEvent(this, this.handleSearchSubmit)}>
className="form-inline" <div className="col-auto">
onSubmit={linkEvent(this, this.handleSearchSubmit)}
>
<input <input
type="text" type="text"
className="form-control mr-2 mb-2" className="form-control me-2 mb-2 col-sm-8"
value={this.state.searchText} value={this.state.searchText}
placeholder={`${i18n.t("search")}...`} placeholder={`${i18n.t("search")}...`}
aria-label={i18n.t("search")} aria-label={i18n.t("search")}
@ -505,13 +503,16 @@ export class Search extends Component<any, SearchState> {
required required
minLength={1} minLength={1}
/> />
<button type="submit" className="btn btn-secondary mr-2 mb-2"> </div>
<div className="col-auto">
<button type="submit" className="btn btn-secondary mb-2">
{this.state.searchRes.state === "loading" ? ( {this.state.searchRes.state === "loading" ? (
<Spinner /> <Spinner />
) : ( ) : (
<span>{i18n.t("search")}</span> <span>{i18n.t("search")}</span>
)} )}
</button> </button>
</div>
</form> </form>
); );
} }
@ -536,7 +537,7 @@ export class Search extends Component<any, SearchState> {
<select <select
value={type} value={type}
onChange={linkEvent(this, this.handleTypeChange)} onChange={linkEvent(this, this.handleTypeChange)}
className="custom-select w-auto mb-2" className="form-select d-inline-block w-auto mb-2"
aria-label={i18n.t("type")} aria-label={i18n.t("type")}
> >
<option disabled aria-hidden="true"> <option disabled aria-hidden="true">
@ -548,7 +549,7 @@ export class Search extends Component<any, SearchState> {
</option> </option>
))} ))}
</select> </select>
<span className="ml-2"> <span className="ms-2">
<ListingTypeSelect <ListingTypeSelect
type_={listingType} type_={listingType}
showLocal={showLocal(this.isoData)} showLocal={showLocal(this.isoData)}
@ -556,7 +557,7 @@ export class Search extends Component<any, SearchState> {
onChange={this.handleListingTypeChange} onChange={this.handleListingTypeChange}
/> />
</span> </span>
<span className="ml-2"> <span className="ms-2">
<SortSelect <SortSelect
sort={sort} sort={sort}
onChange={this.handleSortChange} onChange={this.handleSortChange}
@ -564,7 +565,7 @@ export class Search extends Component<any, SearchState> {
hideMostComments hideMostComments
/> />
</span> </span>
<div className="form-row"> <div className="row">
{hasCommunities && ( {hasCommunities && (
<Filter <Filter
filterType="community" filterType="community"

View file

@ -372,7 +372,7 @@ export function isCakeDay(published: string): boolean {
export function toast(text: string, background: ThemeColor = "success") { export function toast(text: string, background: ThemeColor = "success") {
if (isBrowser()) { if (isBrowser()) {
const backgroundColor = `var(--${background})`; const backgroundColor = `var(--bs-${background})`;
Toastify({ Toastify({
text: text, text: text,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
@ -393,7 +393,7 @@ export function pictrsDeleteToast(filename: string, deleteUrl: string) {
filename, filename,
}); });
const backgroundColor = `var(--light)`; const backgroundColor = `var(--bs-light)`;
const toast = Toastify({ const toast = Toastify({
text: clickToDeleteText, text: clickToDeleteText,

View file

@ -2487,11 +2487,6 @@ bonjour-service@^1.0.11:
fast-deep-equal "^3.1.3" fast-deep-equal "^3.1.3"
multicast-dns "^7.2.5" multicast-dns "^7.2.5"
"bootstrap-v4@npm:bootstrap@^4.6.2":
version "4.6.2"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.2.tgz#8e0cd61611728a5bf65a3a2b8d6ff6c77d5d7479"
integrity sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==
bootstrap@^5.2.3: bootstrap@^5.2.3:
version "5.3.0" version "5.3.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.0.tgz#0718a7cc29040ee8dbf1bd652b896f3436a87c29" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.0.tgz#0718a7cc29040ee8dbf1bd652b896f3436a87c29"