index.jsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. Copyright (C) 2025 QuantumNous
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>.
  13. For commercial licensing, please contact support@quantumnous.com
  14. */
  15. import React from 'react';
  16. import { Layout } from '@douyinfe/semi-ui';
  17. import CardPro from '../../common/ui/CardPro.js';
  18. import TaskLogsTable from './TaskLogsTable.jsx';
  19. import TaskLogsActions from './TaskLogsActions.jsx';
  20. import TaskLogsFilters from './TaskLogsFilters.jsx';
  21. import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx';
  22. import ContentModal from './modals/ContentModal.jsx';
  23. import { useTaskLogsData } from '../../../hooks/task-logs/useTaskLogsData.js';
  24. import { useIsMobile } from '../../../hooks/common/useIsMobile.js';
  25. import { createCardProPagination } from '../../../helpers/utils';
  26. const TaskLogsPage = () => {
  27. const taskLogsData = useTaskLogsData();
  28. const isMobile = useIsMobile();
  29. return (
  30. <>
  31. {/* Modals */}
  32. <ColumnSelectorModal {...taskLogsData} />
  33. <ContentModal {...taskLogsData} isVideo={false} />
  34. {/* 新增:视频预览弹窗 */}
  35. <ContentModal
  36. isModalOpen={taskLogsData.isVideoModalOpen}
  37. setIsModalOpen={taskLogsData.setIsVideoModalOpen}
  38. modalContent={taskLogsData.videoUrl}
  39. isVideo={true}
  40. />
  41. <Layout>
  42. <CardPro
  43. type="type2"
  44. statsArea={<TaskLogsActions {...taskLogsData} />}
  45. searchArea={<TaskLogsFilters {...taskLogsData} />}
  46. paginationArea={createCardProPagination({
  47. currentPage: taskLogsData.activePage,
  48. pageSize: taskLogsData.pageSize,
  49. total: taskLogsData.logCount,
  50. onPageChange: taskLogsData.handlePageChange,
  51. onPageSizeChange: taskLogsData.handlePageSizeChange,
  52. isMobile: isMobile,
  53. t: taskLogsData.t,
  54. })}
  55. t={taskLogsData.t}
  56. >
  57. <TaskLogsTable {...taskLogsData} />
  58. </CardPro>
  59. </Layout>
  60. </>
  61. );
  62. };
  63. export default TaskLogsPage;