Skip to content

Commit

Permalink
Show install command to moderators
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Jan 30, 2024
1 parent a000f9a commit a049b9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/moderation/ReviewCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const queryClient = new QueryClient({
const request_id = 1

export default {
title: "Components/Moderation/ReviewRow",
title: "Components/Moderation/ReviewCard",
component: ReviewCard,
decorators: [
(Story) => {
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/moderation/ReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ModerationRequestResponse } from "src/codegen/model"
import { moderationApi } from "src/api"
import { useMutation } from "@tanstack/react-query"
import Modal from "../Modal"
import CodeCopy from "../application/CodeCopy"

interface Props {
title: string
Expand Down Expand Up @@ -220,6 +221,14 @@ const ReviewCard: FunctionComponent<Props> = ({ title, request, children }) => {

{children}

{user.info && user.info.is_moderator && (
<CodeCopy
className="mt-8"
nested
text={`flatpak install --user https://dl.flathub.org/build-repo/${request.build_id}/${request.app_id}.flatpakref`}
/>
)}

<div className="flex flex-col sm:flex-row-reverse gap-2 pt-4">
{buttons}
</div>
Expand Down

0 comments on commit a049b9e

Please sign in to comment.