+
{entry.message}
diff --git a/web/src/screens/settings/Irc.tsx b/web/src/screens/settings/Irc.tsx
index d2f1714..320f0a7 100644
--- a/web/src/screens/settings/Irc.tsx
+++ b/web/src/screens/settings/Irc.tsx
@@ -5,7 +5,7 @@
import { Fragment, MouseEvent, useEffect, useMemo, useRef, useState } from "react";
import { useMutation, useQueryClient, useSuspenseQuery } from "@tanstack/react-query";
-import { LockClosedIcon, LockOpenIcon, PlusIcon } from "@heroicons/react/24/solid";
+import { ArrowPathIcon, LockClosedIcon, LockOpenIcon, PlusIcon } from "@heroicons/react/24/solid";
import { Menu, Transition } from "@headlessui/react";
import { toast } from "react-hot-toast";
import {
@@ -31,6 +31,7 @@ import { SettingsContext } from "@utils/Context";
import { Checkbox } from "@components/Checkbox";
import { Section } from "./_components";
+import { RingResizeSpinner } from "@components/Icons.tsx";
interface SortConfig {
key: keyof ListItemProps["network"] | "enabled";
@@ -575,6 +576,49 @@ const ListItemDropdown = ({
);
};
+interface ReprocessAnnounceProps {
+ networkId: number;
+ channel: string;
+ msg: string;
+}
+
+const ReprocessAnnounceButton = ({ networkId, channel, msg }: ReprocessAnnounceProps) => {
+ const mutation = useMutation({
+ mutationFn: (req: IrcProcessManualRequest) => APIClient.irc.reprocessAnnounce(req.network_id, req.channel, req.msg),
+ onSuccess: () => {
+ toast.custom((t) => (
+
+ ));
+ }
+ });
+
+ const reprocessAnnounce = () => {
+ const req: IrcProcessManualRequest = {
+ network_id: networkId,
+ msg: msg,
+ channel: channel,
+ }
+
+ if (channel.startsWith("#")) {
+ req.channel = channel.replace("#", "")
+ }
+
+ mutation.mutate(req);
+ };
+
+ return (
+
+
+
+ );
+
+}
+
type IrcEvent = {
channel: string;
nick: string;
@@ -684,10 +728,16 @@ export const Events = ({ network, channel }: EventsProps) => {
key={idx}
className={classNames(
settings.indentLogLines ? "grid justify-start grid-flow-col" : "",
- settings.hideWrappedText ? "truncate hover:text-ellipsis hover:whitespace-normal" : ""
+ settings.hideWrappedText ? "truncate hover:text-ellipsis hover:whitespace-normal" : "",
+ "flex items-center hover:bg-gray-200 hover:dark:bg-gray-800"
)}
>
- [{simplifyDate(entry.time)}] {entry.nick}: {entry.msg}
+
+
+
+ [{simplifyDate(entry.time)}] {entry.nick}: {entry.msg}
+
+
))}
diff --git a/web/src/types/Irc.d.ts b/web/src/types/Irc.d.ts
index 67856ce..983625c 100644
--- a/web/src/types/Irc.d.ts
+++ b/web/src/types/Irc.d.ts
@@ -89,3 +89,10 @@ interface SendIrcCmdRequest {
nick: string;
msg: string;
}
+
+interface IrcProcessManualRequest {
+ network_id: number;
+ channel: string;
+ nick?: string;
+ msg: string;
+}