mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 14:40:58 -05:00
fix(ci): typing issues; broken submodules (#826)
* Remove broken submodules * Fix yarn typecheck * Add build:deps before typecheck to fix missing dependencies * fix: minor linting nitpick Co-authored-by: Sophie L <beartechtalks@gmail.com>
This commit is contained in:
parent
9f3e47d327
commit
6767ea1853
7 changed files with 18 additions and 10 deletions
|
@ -5,6 +5,7 @@ COPY . .
|
|||
COPY .env.build .env
|
||||
|
||||
RUN yarn install --frozen-lockfile
|
||||
RUN yarn build:deps
|
||||
RUN yarn typecheck
|
||||
RUN yarn build:highmem
|
||||
RUN yarn workspaces focus --production --all
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d314b2d191124f1b487ebd72409e748c1bfccb87
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7803fa54410a7ef9fc3149c482253e74ca1d7d71
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 39d1f596e280a28278d913e1e60e4d5298d71578
|
|
@ -45,6 +45,8 @@ import { PermissionTooltip } from "../Tooltip";
|
|||
import FilePreview from "./bars/FilePreview";
|
||||
import ReplyBar from "./bars/ReplyBar";
|
||||
|
||||
import { DraftObject } from "../../../mobx/stores/Draft";
|
||||
|
||||
type Props = {
|
||||
channel: Channel;
|
||||
};
|
||||
|
@ -277,7 +279,12 @@ export default observer(({ channel }: Props) => {
|
|||
|
||||
// Push message content to draft.
|
||||
const setMessage = useCallback(
|
||||
(content?: string) => state.draft.set(channel._id, content),
|
||||
(content?: string) => {
|
||||
const dobj: DraftObject = {
|
||||
content
|
||||
}
|
||||
state.draft.set(channel._id, dobj)
|
||||
},
|
||||
[state.draft, channel._id],
|
||||
);
|
||||
|
||||
|
@ -317,7 +324,7 @@ export default observer(({ channel }: Props) => {
|
|||
if (uploadState.type === "uploading" || uploadState.type === "sending")
|
||||
return;
|
||||
|
||||
const content = state.draft.get(channel._id)?.trim() ?? "";
|
||||
const content = state.draft.get(channel._id)?.content?.trim() ?? "";
|
||||
if (uploadState.type === "attached") return sendFile(content);
|
||||
if (content.length === 0) return;
|
||||
|
||||
|
@ -526,7 +533,7 @@ export default observer(({ channel }: Props) => {
|
|||
}
|
||||
|
||||
function isInCodeBlock(cursor: number): boolean {
|
||||
const content = state.draft.get(channel._id) || "";
|
||||
const content = state.draft.get(channel._id)?.content || "";
|
||||
const contentBeforeCursor = content.substring(0, cursor);
|
||||
|
||||
let delimiterCount = 0;
|
||||
|
@ -607,9 +614,12 @@ export default observer(({ channel }: Props) => {
|
|||
<HackAlertThisFileWillBeReplaced
|
||||
onSelect={(emoji) => {
|
||||
const v = state.draft.get(channel._id);
|
||||
const cnt: DraftObject = {
|
||||
content: (v == null ? "" : `${v.content} `) + `:${emoji}:`
|
||||
}
|
||||
state.draft.set(
|
||||
channel._id,
|
||||
`${v ? `${v} ` : ""}:${emoji}:`,
|
||||
cnt,
|
||||
);
|
||||
}}
|
||||
onClose={closePicker}
|
||||
|
@ -664,7 +674,7 @@ export default observer(({ channel }: Props) => {
|
|||
id="message"
|
||||
maxLength={2000}
|
||||
onKeyUp={onKeyUp}
|
||||
value={state.draft.get(channel._id) ?? ""}
|
||||
value={state.draft.get(channel._id)?.content ?? ""}
|
||||
padding="var(--message-box-padding)"
|
||||
onKeyDown={(e) => {
|
||||
if (e.ctrlKey && e.key === "Enter") {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { mapToRecord } from "../../lib/conversion";
|
|||
import Persistent from "../interfaces/Persistent";
|
||||
import Store from "../interfaces/Store";
|
||||
|
||||
interface DraftObject {
|
||||
export interface DraftObject {
|
||||
content?: string;
|
||||
masquerade?: {
|
||||
avatar: string;
|
||||
|
|
|
@ -53,7 +53,7 @@ export default observer(() => {
|
|||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||
const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9
|
||||
const snowflakes = useMemo(() => {
|
||||
const flakes = [];
|
||||
const flakes: string[] = [];
|
||||
|
||||
if (isDecember) {
|
||||
for (let i = 0; i < 15; i++) {
|
||||
|
|
Loading…
Reference in a new issue