mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-30 00:01:15 +00:00
Merge branch 'main' into chore/separate-mod-button-functions
This commit is contained in:
commit
a6a65d9519
10 changed files with 20 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true
|
"browser": true
|
||||||
},
|
},
|
||||||
"plugins": ["@typescript-eslint", "jsx-a11y"],
|
"plugins": ["@typescript-eslint", "jsx-a11y", "prettier"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
@ -41,6 +41,7 @@
|
||||||
"no-var": 0,
|
"no-var": 0,
|
||||||
"prefer-const": 1,
|
"prefer-const": 1,
|
||||||
"prefer-rest-params": 0,
|
"prefer-rest-params": 0,
|
||||||
|
"prettier/prettier": "error",
|
||||||
"quote-props": 0,
|
"quote-props": 0,
|
||||||
"unicorn/filename-case": 0
|
"unicorn/filename-case": 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
|
||||||
<PersonListing person={cv.creator} />
|
<PersonListing person={cv.creator} />
|
||||||
</span>
|
</span>
|
||||||
{cv.comment.distinguished && (
|
{cv.comment.distinguished && (
|
||||||
<Icon icon="shield" inline classes={`text-danger me-2`} />
|
<Icon icon="shield" inline classes="text-danger me-2" />
|
||||||
)}
|
)}
|
||||||
{this.isPostCreator && (
|
{this.isPostCreator && (
|
||||||
<div className="badge text-bg-light d-none d-sm-inline me-2">
|
<div className="badge text-bg-light d-none d-sm-inline me-2">
|
||||||
|
|
|
@ -79,7 +79,7 @@ export class CommentNodes extends Component<CommentNodesProps, any> {
|
||||||
const maxComments = this.props.maxCommentsShown ?? this.props.nodes.length;
|
const maxComments = this.props.maxCommentsShown ?? this.props.nodes.length;
|
||||||
|
|
||||||
const borderColor = this.props.depth
|
const borderColor = this.props.depth
|
||||||
? colorList[this.props.depth % colorList.length]
|
? colorList[(this.props.depth - 1) % colorList.length]
|
||||||
: colorList[0];
|
: colorList[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -89,7 +89,11 @@ export class CommentNodes extends Component<CommentNodesProps, any> {
|
||||||
"ms-1": !!this.props.isChild,
|
"ms-1": !!this.props.isChild,
|
||||||
"border-top border-light": !this.props.noBorder,
|
"border-top border-light": !this.props.noBorder,
|
||||||
})}
|
})}
|
||||||
style={`border-left: 2px solid ${borderColor} !important;`}
|
style={
|
||||||
|
this.props.isChild
|
||||||
|
? `border-left: 2px solid ${borderColor} !important;`
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{this.props.nodes.slice(0, maxComments).map(node => (
|
{this.props.nodes.slice(0, maxComments).map(node => (
|
||||||
<CommentNode
|
<CommentNode
|
||||||
|
|
|
@ -174,7 +174,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className={`vote-bar col-1 pe-0 small text-center`}>
|
<div className="vote-bar col-1 pe-0 small text-center">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`btn-animate btn btn-link p-0 ${
|
className={`btn-animate btn btn-link p-0 ${
|
||||||
|
@ -193,7 +193,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
|
||||||
</button>
|
</button>
|
||||||
{showScores() ? (
|
{showScores() ? (
|
||||||
<div
|
<div
|
||||||
className={`unselectable pointer text-muted px-1 post-score`}
|
className="unselectable pointer text-muted px-1 post-score"
|
||||||
data-tippy-content={tippy(this.props.counts)}
|
data-tippy-content={tippy(this.props.counts)}
|
||||||
>
|
>
|
||||||
{numToSI(this.props.counts.score)}
|
{numToSI(this.props.counts.score)}
|
||||||
|
|
|
@ -255,7 +255,7 @@ export class EmojiForm extends Component<EmojiFormProps, EmojiFormState> {
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
icon="trash"
|
icon="trash"
|
||||||
classes={`icon-inline text-danger`}
|
classes="icon-inline text-danger"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -71,7 +71,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
|
||||||
data-tippy-content={I18NextService.i18n.t("edit")}
|
data-tippy-content={I18NextService.i18n.t("edit")}
|
||||||
aria-label={I18NextService.i18n.t("edit")}
|
aria-label={I18NextService.i18n.t("edit")}
|
||||||
>
|
>
|
||||||
<Icon icon="edit" classes={`icon-inline`} />
|
<Icon icon="edit" classes="icon-inline" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
@ -83,7 +83,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> {
|
||||||
data-tippy-content={I18NextService.i18n.t("delete")}
|
data-tippy-content={I18NextService.i18n.t("delete")}
|
||||||
aria-label={I18NextService.i18n.t("delete")}
|
aria-label={I18NextService.i18n.t("delete")}
|
||||||
>
|
>
|
||||||
<Icon icon="trash" classes={`icon-inline text-danger`} />
|
<Icon icon="trash" classes="icon-inline text-danger" />
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -10,7 +10,7 @@ export class CakeDay extends Component<CakeDayProps, any> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`cake-day mx-2 d-inline-block unselectable pointer`}
|
className="cake-day mx-2 d-inline-block unselectable pointer"
|
||||||
data-tippy-content={this.cakeDayTippy()}
|
data-tippy-content={this.cakeDayTippy()}
|
||||||
>
|
>
|
||||||
<Icon icon="cake" classes="icon-inline" />
|
<Icon icon="cake" classes="icon-inline" />
|
||||||
|
|
|
@ -647,12 +647,12 @@ export class Profile extends Component<
|
||||||
value={this.state.banReason}
|
value={this.state.banReason}
|
||||||
onInput={linkEvent(this, this.handleModBanReasonChange)}
|
onInput={linkEvent(this, this.handleModBanReasonChange)}
|
||||||
/>
|
/>
|
||||||
<label className="col-form-label" htmlFor={`mod-ban-expires`}>
|
<label className="col-form-label" htmlFor="mod-ban-expires">
|
||||||
{I18NextService.i18n.t("expires")}
|
{I18NextService.i18n.t("expires")}
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id={`mod-ban-expires`}
|
id="mod-ban-expires"
|
||||||
className="form-control me-2"
|
className="form-control me-2"
|
||||||
placeholder={I18NextService.i18n.t("number_of_days")}
|
placeholder={I18NextService.i18n.t("number_of_days")}
|
||||||
value={this.state.banExpireDays}
|
value={this.state.banExpireDays}
|
||||||
|
|
|
@ -531,7 +531,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
checked={this.state.form.nsfw}
|
checked={this.state.form.nsfw}
|
||||||
onChange={linkEvent(this, handlePostNsfwChange)}
|
onChange={linkEvent(this, handlePostNsfwChange)}
|
||||||
/>
|
/>
|
||||||
<label className="form-check-label">
|
<label className="form-check-label" htmlFor="post-nsfw">
|
||||||
{I18NextService.i18n.t("nsfw")}
|
{I18NextService.i18n.t("nsfw")}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1264,12 +1264,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
value={this.state.banReason}
|
value={this.state.banReason}
|
||||||
onInput={linkEvent(this, this.handleModBanReasonChange)}
|
onInput={linkEvent(this, this.handleModBanReasonChange)}
|
||||||
/>
|
/>
|
||||||
<label className="col-form-label" htmlFor={`mod-ban-expires`}>
|
<label className="col-form-label" htmlFor="mod-ban-expires">
|
||||||
{I18NextService.i18n.t("expires")}
|
{I18NextService.i18n.t("expires")}
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id={`mod-ban-expires`}
|
id="mod-ban-expires"
|
||||||
className="form-control me-2"
|
className="form-control me-2"
|
||||||
placeholder={I18NextService.i18n.t("number_of_days")}
|
placeholder={I18NextService.i18n.t("number_of_days")}
|
||||||
value={this.state.banExpireDays}
|
value={this.state.banExpireDays}
|
||||||
|
|
Loading…
Reference in a new issue