From: SleeplessOne1917 Date: Thu, 4 May 2023 02:06:59 +0000 (+0000) Subject: Add content warning to modlog and fix modlog routing bug (#994) X-Git-Url: http://these/git/README.zh.hant.md?a=commitdiff_plain;h=3a88f6e85444ce4c9c38943645a0577d1cc93632;p=lemmy-ui.git Add content warning to modlog and fix modlog routing bug (#994) * Add content warning to modlog and fix modlog routing bug * Add translation logic --- diff --git a/src/assets/css/main.css b/src/assets/css/main.css index e796b7f..9cff2c7 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -99,7 +99,7 @@ border-bottom: 2px solid var(--dark); } -.md-div table tbody+tbody { +.md-div table tbody + tbody { border-top: 2px solid var(--dark); } @@ -140,8 +140,8 @@ } .icon-emoji-admin { - max-width: 24px; - max-height: 24px; + max-width: 24px; + max-height: 24px; display: inline-block; } @@ -164,7 +164,7 @@ left: 0; } - .emoji-picker-container>section { + .emoji-picker-container > section { width: 100% !important; } } @@ -175,7 +175,7 @@ left: 0; right: 0; bottom: 0; - background-color: rgba(0, 0, 0, .3); + background-color: rgba(0, 0, 0, 0.3); z-index: 999; } @@ -256,6 +256,10 @@ hr { text-overflow: ellipsis; } +.text-xs-center { + text-align: center; +} + .overflow-wrap-anywhere { overflow-wrap: anywhere; } @@ -435,6 +439,6 @@ br.big { .lang-select-action:focus { width: auto; } -em-emoji-picker{ - width:100%; +em-emoji-picker { + width: 100%; } diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index 8b23559..c7b1046 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -262,7 +262,7 @@ export class Sidebar extends Component {
  • {i18n.t("modlog")} diff --git a/src/shared/components/modlog.tsx b/src/shared/components/modlog.tsx index af717fc..8972f98 100644 --- a/src/shared/components/modlog.tsx +++ b/src/shared/components/modlog.tsx @@ -1,5 +1,6 @@ import { NoOptionI18nKeys } from "i18next"; import { Component, linkEvent } from "inferno"; +import { T } from "inferno-i18next-dess"; import { Link } from "inferno-router"; import { RouteComponentProps } from "inferno-router/dist/Route"; import { @@ -57,7 +58,7 @@ import { wsSubscribe, } from "../utils"; import { HtmlTags } from "./common/html-tags"; -import { Spinner } from "./common/icon"; +import { Icon, Spinner } from "./common/icon"; import { MomentTime } from "./common/moment-time"; import { Paginator } from "./common/paginator"; import { SearchableSelect } from "./common/searchable-select"; @@ -782,6 +783,19 @@ export class Modlog extends Component< />
    +
    + + + ### + +
    {communityName && ( diff --git a/src/shared/routes.ts b/src/shared/routes.ts index 875ba50..ddaa874 100644 --- a/src/shared/routes.ts +++ b/src/shared/routes.ts @@ -92,12 +92,12 @@ export const routes: IRoutePropsWithFetch[] = [ component: Settings, }, { - path: `/modlog`, + path: `/modlog/:communityId`, component: Modlog, fetchInitialData: Modlog.fetchInitialData, }, { - path: `/modlog/:communityId`, + path: `/modlog`, component: Modlog, fetchInitialData: Modlog.fetchInitialData, },