-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Advanced tag filters #266
Changes from 8 commits
314efe1
4c09587
055dcc8
5ddeacc
7b2ba1f
343ef37
efa025a
8a2bce5
50c65f2
5a0957f
8ab42cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ import { | |
ChevronUpIcon, | ||
} from '@heroicons/react/24/outline' | ||
import { LabelSelector } from '@/common/labels/Selector' | ||
import { pluralize, takesKeyboardEvt } from '@/lib/util' | ||
import { takesKeyboardEvt } from '@/lib/util' | ||
import { Loading } from '@/common/Loader' | ||
import { ActionDurationSelector } from '@/reports/ModerationForm/ActionDurationSelector' | ||
import { MOD_EVENTS } from '@/mod-event/constants' | ||
|
@@ -200,6 +200,7 @@ function Form( | |
const shouldShowDurationInHoursField = | ||
isTakedownEvent || isMuteEvent || isMuteReporterEvent | ||
const canManageChat = usePermission('canManageChat') | ||
const canTakedown = usePermission('canTakedown') | ||
|
||
// navigate to next or prev report | ||
const navigateQueue = (delta: 1 | -1) => { | ||
|
@@ -491,7 +492,13 @@ function Form( | |
submitForm() | ||
} | ||
useKeyPressEvent('c', safeKeyHandler(onCancel)) | ||
useKeyPressEvent('s', safeKeyHandler(submitForm)) | ||
useKeyPressEvent( | ||
's', | ||
safeKeyHandler((e) => { | ||
e.stopImmediatePropagation() | ||
submitForm() | ||
}), | ||
) | ||
useKeyPressEvent('n', safeKeyHandler(submitAndGoNext)) | ||
useKeyPressEvent( | ||
'a', | ||
|
@@ -513,9 +520,11 @@ function Form( | |
) | ||
useKeyPressEvent( | ||
't', | ||
safeKeyHandler(() => { | ||
setModEventType(MOD_EVENTS.TAKEDOWN) | ||
}), | ||
canTakedown | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixes #244 |
||
? safeKeyHandler(() => { | ||
setModEventType(MOD_EVENTS.TAKEDOWN) | ||
}) | ||
: undefined, | ||
) | ||
|
||
return ( | ||
|
@@ -635,8 +644,8 @@ function Form( | |
{!!subjectStatus?.tags?.length && ( | ||
<div className={`mb-3`}> | ||
<FormLabel label="Tags"> | ||
<LabelList className="-ml-1 flex-wrap"> | ||
{subjectStatus.tags.map((tag) => { | ||
<LabelList className="-ml-1 flex-wrap gap-1"> | ||
{subjectStatus.tags.sort().map((tag) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes having the lang tags being placed in random places. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that |
||
return <SubjectTag key={tag} tag={tag} /> | ||
})} | ||
</LabelList> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ const Timer = () => { | |
}, 1000) | ||
|
||
return ( | ||
<div className="flex flex-row justify-center py-4"> | ||
<div className="flex flex-row justify-center py-4 dark:text-gray-200"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes #152 |
||
<p className="font-bold text-xl">{getDuration(seconds)}</p> | ||
</div> | ||
) | ||
|
@@ -44,41 +44,7 @@ export default function SurpriseMePage() { | |
<> | ||
{/* This is valid jsx but because of a known bug, typescript is confused */} | ||
{/* @ts-ignore:next-line */} | ||
<style global jsx> | ||
{` | ||
.game-block { | ||
margin: 0; | ||
padding: 0; | ||
width: 1.5em; | ||
height: 1.5em; | ||
border: 1px solid #ddd; | ||
} | ||
.piece-i { | ||
background-color: #ec858b; | ||
} | ||
.piece-j { | ||
background-color: #f1b598; | ||
} | ||
.piece-l { | ||
background-color: #f8efae; | ||
} | ||
.piece-o { | ||
background-color: #b5a677; | ||
} | ||
.piece-s { | ||
background-color: #816e56; | ||
} | ||
.piece-t { | ||
background-color: #b77c72; | ||
} | ||
.piece-z { | ||
background-color: #e3be58; | ||
} | ||
.piece-preview { | ||
background-color: #eee; | ||
} | ||
`} | ||
</style> | ||
|
||
<Timer /> | ||
<ClientOnlyTetris /> | ||
</> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,12 +27,12 @@ export function SetupModal({ | |
className="mx-auto h-20 w-auto" | ||
title="Icon from Flaticon: https://www.flaticon.com/free-icons/lifeguard-tower" | ||
src="/img/logo-colorful.png" | ||
alt="Ozone - Bluesky Admin" | ||
alt="Ozone - ATProto Moderation Service" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addresses #216 |
||
width={200} | ||
height={200} | ||
/> | ||
<h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-200"> | ||
Bluesky Admin Tools | ||
Ozone Moderation Service | ||
</h2> | ||
{title && ( | ||
<p className="mt-2 text-center text-sm text-gray-600 dark:text-gray-100"> | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to the PR. fixes #265