From: Jay Sitter Date: Mon, 3 Jul 2023 21:13:33 +0000 (-0400) Subject: Merge remote-tracking branch 'lemmy/main' into fix/fix-long-words-in-titles-overflow X-Git-Url: http://these/git/?a=commitdiff_plain;h=976812a44665e6a1f7fbf75d94c3383d820c1294;hp=8a163fedde4c28dffb747dbb9ad6119b5eb45ef7;p=lemmy-ui.git Merge remote-tracking branch 'lemmy/main' into fix/fix-long-words-in-titles-overflow * lemmy/main: v0.18.1-rc.9 fix: Fix comment collapse and vote buttons not having focus style (#1789) Add missing modlog reasons (#1787) Fix search page breaking on initial load when logged in (#1781) feat: Add PR template (#1785) v0.18.1-rc.8 Fix profile loading spinner fix: Move getRoleLabelPill to the only component that uses it fix: Remove unused hasBadges() function fix: Fix badge alignment and break out into component fix: Fix up filter row gaps and margins a little fix: Fix heading levels fix: Simplify row classes a bit fix: Fix some gaps in search filters fix: Fix row gap on search options fix: Add bottom margin to inbox controls fix: Small cleanup to search/inbox controls --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..13d49c8 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +## Description + + + +## Screenshots + + + +### Before + +### After diff --git a/package.json b/package.json index e928974..16e3d9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lemmy-ui", - "version": "0.18.1-rc.7", + "version": "0.18.1-rc.9", "description": "An isomorphic UI for lemmy", "repository": "https://github.com/LemmyNet/lemmy-ui", "license": "AGPL-3.0", diff --git a/src/server/handlers/catch-all-handler.tsx b/src/server/handlers/catch-all-handler.tsx index c599e46..6b21494 100644 --- a/src/server/handlers/catch-all-handler.tsx +++ b/src/server/handlers/catch-all-handler.tsx @@ -90,7 +90,7 @@ export default async (req: Request, res: Response) => { } const error = Object.values(routeData).find( - res => res.state === "failed" + res => res.state === "failed" && res.msg !== "couldnt_find_object" // TODO: find a better way of handling errors ) as FailedRequestState | undefined; // Redirect to the 404 if there's an API error diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 8f689aa..6c7d5c0 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -1,7 +1,6 @@ import { colorList, getCommentParentId, - getRoleLabelPill, myAuth, myAuthRequired, showScores, @@ -63,6 +62,7 @@ import { I18NextService, UserService } from "../../services"; import { setupTippy } from "../../tippy"; import { Icon, PurgeWarning, Spinner } from "../common/icon"; import { MomentTime } from "../common/moment-time"; +import { UserBadges } from "../common/user-badges"; import { VoteButtonsCompact } from "../common/vote-buttons"; import { CommunityLink } from "../community/community-link"; import { PersonListing } from "../person/person-listing"; @@ -299,7 +299,7 @@ export class CommentNode extends Component { >
- - - + {cv.comment.distinguished && ( - + )} - {this.isPostCreator && - getRoleLabelPill({ - label: I18NextService.i18n.t("op").toUpperCase(), - tooltip: I18NextService.i18n.t("creator"), - classes: "text-bg-info", - shrink: false, - })} - - {isMod_ && - getRoleLabelPill({ - label: I18NextService.i18n.t("mod"), - tooltip: I18NextService.i18n.t("mod"), - classes: "text-bg-primary", - })} - - {isAdmin_ && - getRoleLabelPill({ - label: I18NextService.i18n.t("admin"), - tooltip: I18NextService.i18n.t("admin"), - classes: "text-bg-danger", - })} - - {cv.creator.bot_account && - getRoleLabelPill({ - label: I18NextService.i18n.t("bot_account").toLowerCase(), - tooltip: I18NextService.i18n.t("bot_account"), - })} + {this.props.showCommunity && ( <> @@ -1483,6 +1461,7 @@ export class CommentNode extends Component { comment_id: i.commentId, removed: !i.commentView.comment.removed, auth: myAuthRequired(), + reason: i.state.removeReason, }); } diff --git a/src/shared/components/common/searchable-select.tsx b/src/shared/components/common/searchable-select.tsx index 801cd86..ef59a8c 100644 --- a/src/shared/components/common/searchable-select.tsx +++ b/src/shared/components/common/searchable-select.tsx @@ -102,7 +102,7 @@ export class SearchableSelect extends Component< const { searchText, selectedIndex, loadingEllipses } = this.state; return ( -
+