ReviewDB: Kill Replies
This commit is contained in:
parent
0a919f2c06
commit
da8e022596
6 changed files with 7 additions and 34 deletions
|
|
@ -131,7 +131,7 @@ export default definePlugin({
|
|||
// Expands the experiment regex to allow negative numbers as well as text in the last segment of the URL.
|
||||
find: '"^dev://experiment/',
|
||||
replacement: {
|
||||
match: /(\[0-9\]\+)/,
|
||||
match: /\[0-9\]\+(?=\)\)\?\$")/,
|
||||
replace: "[a-zA-Z0-9-]+"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export function authorize(callback?: () => void) {
|
|||
permissions={0n}
|
||||
clientId="915703782174752809"
|
||||
cancelCompletesFlow={false}
|
||||
callback={async (response: { location: string }) => {
|
||||
callback={async (response: { location: string; }) => {
|
||||
try {
|
||||
const url = new URL(response.location);
|
||||
url.searchParams.append("clientMod", "vencord");
|
||||
|
|
|
|||
|
|
@ -83,25 +83,3 @@ export function BlockButton({ onClick, isBlocked }: { onClick(): void; isBlocked
|
|||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
export function ReplyButton({ onClick }: { onClick(): void; }) {
|
||||
return (
|
||||
<Tooltip text="Reply Review">
|
||||
{props => (
|
||||
<div
|
||||
{...props}
|
||||
className={iconClasses.button}
|
||||
onClick={onClick}
|
||||
role="button"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M2.3 7.3a1 1 0 0 0 0 1.4l5 5a1 1 0 0 0 1.4-1.4L5.42 9H11a7 7 0 0 1 7 7v4a1 1 0 1 0 2 0v-4a9 9 0 0 0-9-9H5.41l3.3-3.3a1 1 0 0 0-1.42-1.4l-5 5Z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ function ReviewList({ refetch, reviews, hideOwnReview, profileId, type }: { refe
|
|||
}
|
||||
|
||||
export function ReviewsInputComponent(
|
||||
{ discordId, isAuthor, refetch, name, modalKey, repliesTo }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; modalKey?: string; repliesTo?: number; }
|
||||
{ discordId, isAuthor, refetch, name, modalKey }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; modalKey?: string; }
|
||||
) {
|
||||
const { token } = Auth;
|
||||
const editorRef = useRef<any>(null);
|
||||
|
|
@ -148,10 +148,9 @@ export function ReviewsInputComponent(
|
|||
placeholder={
|
||||
!token
|
||||
? "You need to authorize to review users!"
|
||||
: repliesTo ? `Reply to @${name}`
|
||||
: isAuthor
|
||||
? `Update review for @${name}`
|
||||
: `Review @${name}`
|
||||
: isAuthor
|
||||
? `Update review for @${name}`
|
||||
: `Review @${name}`
|
||||
}
|
||||
type={inputType}
|
||||
disableThemedBackground={true}
|
||||
|
|
@ -160,12 +159,9 @@ export function ReviewsInputComponent(
|
|||
textValue=""
|
||||
onSubmit={
|
||||
async res => {
|
||||
// I know this naming is deranged, but for compatibility it has to stay this way
|
||||
|
||||
const response = await addReview({
|
||||
userid: discordId,
|
||||
comment: res.value,
|
||||
repliesto: repliesTo,
|
||||
});
|
||||
|
||||
if (response) {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,5 @@ export interface Review {
|
|||
sender: ReviewAuthor,
|
||||
timestamp: number;
|
||||
type?: ReviewType;
|
||||
replies?: Review[];
|
||||
userVote?: boolean | null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,4 +189,4 @@
|
|||
.vc-rdb-vote-column-down-selected:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--status-danger) 14%, transparent);
|
||||
color: var(--status-danger);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue