Commit 16cdc9f7 authored by Grant's avatar Grant
Browse files

chat: buildable & fix ui to merge

parent e14b05cb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ COPY packages/admin/package.json ./packages/admin/
COPY packages/client/package.json ./packages/client/
COPY packages/lib/package.json ./packages/lib/
COPY packages/server/package.json ./packages/server/
COPY packages/chat/package.json ./packages/chat/

# Load yarn with the version in package.json
# as as elevated as it modifies system directories
@@ -58,6 +59,10 @@ RUN yarn workspace @sc07-canvas/lib run build
# janky? fix to keep imports in dev
# RUN sed -i -e 's/"main": ".*"/"main": ".\/dist\/index.js"/' packages/lib/package.json

# --- build chat ---

RUN yarn workspace @sc07-canvas/chat run build

# --- build main client ---

ARG VITE_INCLUDE_EVENT_INFO
+0 −2
Original line number Diff line number Diff line
import { MessageFlag, type Message } from "@/lib/const";
import { useYap } from "@/context/utils";
import type React from "react";
import type { MatrixEvent } from "matrix-js-sdk";

export const ChatBubble = ({ event }: { event: MatrixEvent }) => {
+2 −3
Original line number Diff line number Diff line
import React, { useEffect, useRef } from "react";
import { ChatBubble } from "./ChatBubble";
import type { Message } from "@/lib/const";

export const ChatLog = ({
@@ -25,9 +24,9 @@ export const ChatLog = ({
        <button onClick={loadMore}>Load More {loading && "loading"}</button>
      )}
      <React.Fragment>
        {messages.map((msg) => (
        {/* {messages.map((msg) => (
          <ChatBubble key={msg.eventId} event={msg} />
        ))}
        ))} */}
      </React.Fragment>
      <div ref={bottom} />
    </React.Fragment>
+2 −2
Original line number Diff line number Diff line
import type { MXUserID } from "@/lib/const";
import { HomeTab } from "./Tab/Home";
import { RoomTab } from "./Tab/Room";
import { getOpenRooms, useYap } from "@/context/utils";
import { useEffect } from "react";
import { LoggedOut } from "./Tab/LoggedOut";
import { InvitesTab } from "./Tab/Invites";

@@ -32,3 +30,5 @@ export const Yapper = () => {
    </div>
  );
};

export default Yapper;
+2 −2
Original line number Diff line number Diff line
@@ -88,10 +88,10 @@ export const YapContext = ({ children }: React.PropsWithChildren) => {
    window.open(client.getLoginUrl(window.location.href), "_self");
  }, [client]);

  const openChat = useCallback((withWho: MXUserID | MXRoomID) => {}, []);
  const openChat = useCallback((_withWho: MXUserID | MXRoomID) => {}, []);

  const setSystem = useCallback(
    (handler: (mxid: MXUserID) => boolean) => {},
    (_handler: (mxid: MXUserID) => boolean) => {},
    [],
  );

Loading