diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..13d49c8f --- /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 e9289746..16e3d9c0 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/assets/css/main.css b/src/assets/css/main.css index e5c163b1..b92f0866 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -81,6 +81,7 @@ } .vote-bar { + min-width: 5ch; margin-top: -6.5px; } @@ -253,10 +254,6 @@ hr { -ms-filter: blur(10px); } -.img-cover { - object-fit: cover; -} - .img-expanded { max-height: 90vh; } @@ -349,10 +346,12 @@ br.big { } .avatar-overlay { - width: 20%; - height: 20%; + width: 20vw; + height: 20vw; max-width: 120px; max-height: 120px; + min-width: 80px; + min-height: 80px; } .avatar-pushup { diff --git a/src/server/handlers/catch-all-handler.tsx b/src/server/handlers/catch-all-handler.tsx index c599e465..6b214944 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/app/app.tsx b/src/shared/components/app/app.tsx index be0319db..3452f962 100644 --- a/src/shared/components/app/app.tsx +++ b/src/shared/components/app/app.tsx @@ -1,10 +1,11 @@ import { isAuthPath, setIsoData } from "@utils/app"; +import { dataBsTheme } from "@utils/browser"; import { Component, RefObject, createRef, linkEvent } from "inferno"; import { Provider } from "inferno-i18next-dess"; import { Route, Switch } from "inferno-router"; import { IsoDataOptionalSite } from "../../interfaces"; import { routes } from "../../routes"; -import { FirstLoadService, I18NextService } from "../../services"; +import { FirstLoadService, I18NextService, UserService } from "../../services"; import AuthGuard from "../common/auth-guard"; import ErrorGuard from "../common/error-guard"; import { ErrorPage } from "./error-page"; @@ -25,6 +26,13 @@ export class App extends Component { event.preventDefault(); this.mainContentRef.current?.focus(); } + + user = UserService.Instance.myUserInfo; + + componentDidMount() { + this.setState({ bsTheme: dataBsTheme(this.user) }); + } + render() { const siteRes = this.isoData.site_res; const siteView = siteRes?.site_view; @@ -32,7 +40,11 @@ export class App extends Component { return ( <> -
+
- - - + {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/image-upload-form.tsx b/src/shared/components/common/image-upload-form.tsx index 854e7105..890f47f2 100644 --- a/src/shared/components/common/image-upload-form.tsx +++ b/src/shared/components/common/image-upload-form.tsx @@ -1,4 +1,5 @@ import { randomStr } from "@utils/helpers"; +import classNames from "classnames"; import { Component, linkEvent } from "inferno"; import { HttpService, I18NextService, UserService } from "../../services"; import { toast } from "../../toast"; @@ -33,38 +34,35 @@ export class ImageUploadForm extends Component< render() { return (
- + {this.props.imageSrc && ( + + {/* TODO: Create "Current Iamge" translation for alt text */} + + + + )} diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 5623ace5..1a707a23 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -173,6 +173,9 @@ export class MarkdownTextArea extends Component<