mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: media library
This commit is contained in:
parent
a355ef0155
commit
36b0544fd1
@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2024 Hexastack. All rights reserved.
|
* Copyright © 2025 Hexastack. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
|
||||||
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import DriveFolderUploadIcon from "@mui/icons-material/DriveFolderUpload";
|
import DriveFolderUploadIcon from "@mui/icons-material/DriveFolderUpload";
|
||||||
import { Box, Grid, Paper } from "@mui/material";
|
import { Box, Grid, Paper } from "@mui/material";
|
||||||
import { GridColDef, GridEventListener } from "@mui/x-data-grid";
|
import { GridColDef, GridEventListener } from "@mui/x-data-grid";
|
||||||
@ -32,7 +33,10 @@ import { PermissionAction } from "@/types/permission.types";
|
|||||||
import { TFilterStringFields } from "@/types/search.types";
|
import { TFilterStringFields } from "@/types/search.types";
|
||||||
import { getDateTimeFormatter } from "@/utils/date";
|
import { getDateTimeFormatter } from "@/utils/date";
|
||||||
|
|
||||||
import { IAttachment } from "../../types/attachment.types";
|
import {
|
||||||
|
AttachmentResourceRef,
|
||||||
|
IAttachment,
|
||||||
|
} from "../../types/attachment.types";
|
||||||
|
|
||||||
type MediaLibraryProps = {
|
type MediaLibraryProps = {
|
||||||
showTitle?: boolean;
|
showTitle?: boolean;
|
||||||
@ -53,6 +57,10 @@ export const MediaLibrary = ({ onSelect, accept }: MediaLibraryProps) => {
|
|||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
where: {
|
where: {
|
||||||
|
resourceRef: [
|
||||||
|
AttachmentResourceRef.BlockAttachment,
|
||||||
|
AttachmentResourceRef.ContentAttachment,
|
||||||
|
],
|
||||||
...searchPayload.where,
|
...searchPayload.where,
|
||||||
or: {
|
or: {
|
||||||
...searchPayload.where.or,
|
...searchPayload.where.or,
|
||||||
|
Loading…
Reference in New Issue
Block a user