mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Format and automatically fix linted code.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { isModalClosing } from "../../components/ui/Modal";
|
||||
import { internalEmit } from "../../lib/eventEmitter";
|
||||
|
||||
import { isModalClosing } from "../../components/ui/Modal";
|
||||
|
||||
import { Screen } from "./Intermediate";
|
||||
import { ClipboardModal } from "./modals/Clipboard";
|
||||
import { ErrorModal } from "./modals/Error";
|
||||
@@ -14,7 +16,10 @@ export interface Props {
|
||||
}
|
||||
|
||||
export default function Modals({ screen, openScreen }: Props) {
|
||||
const onClose = () => isModalClosing ? openScreen({ id: "none" }) : internalEmit('Modal', 'close');
|
||||
const onClose = () =>
|
||||
isModalClosing
|
||||
? openScreen({ id: "none" })
|
||||
: internalEmit("Modal", "close");
|
||||
|
||||
switch (screen.id) {
|
||||
case "_prompt":
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { useContext } from "preact/hooks";
|
||||
import { isModalClosing } from "../../components/ui/Modal";
|
||||
|
||||
import { internalEmit } from "../../lib/eventEmitter";
|
||||
|
||||
import { isModalClosing } from "../../components/ui/Modal";
|
||||
|
||||
import { IntermediateContext, useIntermediate } from "./Intermediate";
|
||||
import { SpecialInputModal } from "./modals/Input";
|
||||
import { SpecialPromptModal } from "./modals/Prompt";
|
||||
@@ -16,7 +18,10 @@ export default function Popovers() {
|
||||
const { screen } = useContext(IntermediateContext);
|
||||
const { openScreen } = useIntermediate();
|
||||
|
||||
const onClose = () => isModalClosing ? openScreen({ id: "none" }) : internalEmit('Modal', 'close');
|
||||
const onClose = () =>
|
||||
isModalClosing
|
||||
? openScreen({ id: "none" })
|
||||
: internalEmit("Modal", "close");
|
||||
|
||||
switch (screen.id) {
|
||||
case "profile":
|
||||
|
||||
@@ -92,7 +92,7 @@ export function SpecialPromptModal(props: SpecialProps) {
|
||||
block_user: ["block_user", "block"],
|
||||
};
|
||||
|
||||
let event = EVENTS[props.type];
|
||||
const event = EVENTS[props.type];
|
||||
let name;
|
||||
switch (props.type) {
|
||||
case "unfriend_user":
|
||||
|
||||
@@ -25,7 +25,7 @@ export function ImageViewer({ attachment, embed, onClose }: Props) {
|
||||
// ! FIXME: temp code
|
||||
// ! add proxy function to client
|
||||
function proxyImage(url: string) {
|
||||
return "https://jan.revolt.chat/proxy?url=" + encodeURIComponent(url);
|
||||
return `https://jan.revolt.chat/proxy?url=${encodeURIComponent(url)}`;
|
||||
}
|
||||
|
||||
if (attachment && attachment.metadata.type !== "Image") {
|
||||
|
||||
Reference in New Issue
Block a user