diff --git a/src/app/slices/ui.ts b/src/app/slices/ui.ts index 721b048b..5d98bc30 100644 --- a/src/app/slices/ui.ts +++ b/src/app/slices/ui.ts @@ -50,7 +50,14 @@ const uiSlice = createSlice({ initialState, reducers: { fillUI(state, action: PayloadAction>) { - const { SSEStatus, ready, online, msgSound = false, ...rest } = action.payload; + const { + SSEStatus, + ready, + online, + msgSound = false, + fileListView = "item", + ...rest + } = action.payload; window.MSG_SOUND = msgSound; return { ...state, msgSound, ...rest }; }, diff --git a/src/components/FileBox/index.tsx b/src/components/FileBox/index.tsx index ff3230da..08ccaff7 100644 --- a/src/components/FileBox/index.tsx +++ b/src/components/FileBox/index.tsx @@ -14,6 +14,7 @@ import { VideoPreview } from "./preview"; import { shallowEqual } from "react-redux"; +import DownloadArea from "../FileMessage/DownloadArea"; interface Data { file_type: string; @@ -135,13 +136,7 @@ const FileBox: FC = ({ - - - + {withPreview &&
{previewContent}
} diff --git a/src/components/FileMessage/DownloadArea.tsx b/src/components/FileMessage/DownloadArea.tsx index 9d972bc1..497a9074 100644 --- a/src/components/FileMessage/DownloadArea.tsx +++ b/src/components/FileMessage/DownloadArea.tsx @@ -10,7 +10,7 @@ type Props = { const DownloadArea = ({ copyLink, downloadLink }: Props) => { const { copy, copied } = useCopy(); return ( -
+