index.jsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 CardPro from '../../common/ui/CardPro.js';
  17. import ChannelsTable from './ChannelsTable.jsx';
  18. import ChannelsActions from './ChannelsActions.jsx';
  19. import ChannelsFilters from './ChannelsFilters.jsx';
  20. import ChannelsTabs from './ChannelsTabs.jsx';
  21. import { useChannelsData } from '../../../hooks/channels/useChannelsData.js';
  22. import BatchTagModal from './modals/BatchTagModal.jsx';
  23. import ModelTestModal from './modals/ModelTestModal.jsx';
  24. import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx';
  25. import EditChannelModal from './modals/EditChannelModal.jsx';
  26. import EditTagModal from './modals/EditTagModal.jsx';
  27. const ChannelsPage = () => {
  28. const channelsData = useChannelsData();
  29. return (
  30. <>
  31. {/* Modals */}
  32. <ColumnSelectorModal {...channelsData} />
  33. <EditTagModal
  34. visible={channelsData.showEditTag}
  35. tag={channelsData.editingTag}
  36. handleClose={() => channelsData.setShowEditTag(false)}
  37. refresh={channelsData.refresh}
  38. />
  39. <EditChannelModal
  40. refresh={channelsData.refresh}
  41. visible={channelsData.showEdit}
  42. handleClose={channelsData.closeEdit}
  43. editingChannel={channelsData.editingChannel}
  44. />
  45. <BatchTagModal {...channelsData} />
  46. <ModelTestModal {...channelsData} />
  47. {/* Main Content */}
  48. <CardPro
  49. type="type3"
  50. tabsArea={<ChannelsTabs {...channelsData} />}
  51. actionsArea={<ChannelsActions {...channelsData} />}
  52. searchArea={<ChannelsFilters {...channelsData} />}
  53. t={channelsData.t}
  54. >
  55. <ChannelsTable {...channelsData} />
  56. </CardPro>
  57. </>
  58. );
  59. };
  60. export default ChannelsPage;