forked from rDrama/rDrama
Padding to quoted link
parent
54fa43038c
commit
bb0598cfda
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "chat",
|
"name": "chat",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"main": "./src/index.tsx",
|
"main": "./src/index.tsx",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ChatMessage-quoted-link {
|
||||||
|
padding-left: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.ChatMessage-actions-button {
|
.ChatMessage-actions-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -125,7 +125,11 @@ export function ChatMessage({
|
||||||
<div className="ChatMessage-timestamp">{timestamp}</div>
|
<div className="ChatMessage-timestamp">{timestamp}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{quotes && quotedMessage && <QuotedMessageLink message={quotedMessage} />}
|
{quotes && quotedMessage && (
|
||||||
|
<div className="ChatMessage-quoted-link">
|
||||||
|
<QuotedMessageLink message={quotedMessage} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="ChatMessage-bottom">
|
<div className="ChatMessage-bottom">
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
|
|
|
@ -9,7 +9,6 @@ import React, {
|
||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { io, Socket } from "socket.io-client";
|
import { io, Socket } from "socket.io-client";
|
||||||
import lozad from "lozad";
|
|
||||||
import debounce from "lodash.debounce";
|
import debounce from "lodash.debounce";
|
||||||
import { useRootContext } from "./useRootContext";
|
import { useRootContext } from "./useRootContext";
|
||||||
import { useWindowFocus } from "./useWindowFocus";
|
import { useWindowFocus } from "./useWindowFocus";
|
||||||
|
@ -178,17 +177,6 @@ export function ChatProvider({ children }: PropsWithChildren) {
|
||||||
title.innerHTML = alertedWhileAway ? `[+${notifications}] Chat` : "Chat";
|
title.innerHTML = alertedWhileAway ? `[+${notifications}] Chat` : "Chat";
|
||||||
}, [notifications, focused]);
|
}, [notifications, focused]);
|
||||||
|
|
||||||
// Setup Lozad
|
|
||||||
useEffect(() => {
|
|
||||||
const { observe, observer } = lozad();
|
|
||||||
|
|
||||||
observe();
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
observer.disconnect();
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ChatContext.Provider value={context}>{children}</ChatContext.Provider>
|
<ChatContext.Provider value={context}>{children}</ChatContext.Provider>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue