diff --git a/src/components/QuillEditor.tsx b/src/components/QuillEditor.tsx index dee959f..e7a3eaa 100644 --- a/src/components/QuillEditor.tsx +++ b/src/components/QuillEditor.tsx @@ -83,7 +83,7 @@ const QuillEditor: FC = ({ quillRef.current.insertEmbed(range.index, 'video', { url: embedUrl, width: '100%', - height: '315' + height: 'auto' }) quillRef.current.setSelection(range.index + 1) } else { @@ -101,7 +101,7 @@ const QuillEditor: FC = ({ quillRef.current.insertEmbed(range.index, 'video', { url: embedUrl, width: '100%', - height: '315' + height: 'auto' }) quillRef.current.setSelection(range.index + 1) } else { @@ -143,10 +143,18 @@ const QuillEditor: FC = ({ .ql-video-wrapper { margin: 1em 0; text-align: center; + position: relative; + width: 100%; + aspect-ratio: 16/9; } .ql-video-wrapper iframe { - max-width: 100%; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; border-radius: 8px; + border: none; } ` }} /> diff --git a/src/components/VideoBlot.ts b/src/components/VideoBlot.ts index f2c94b6..0b428e9 100644 --- a/src/components/VideoBlot.ts +++ b/src/components/VideoBlot.ts @@ -21,7 +21,7 @@ class VideoBlot extends BlockEmbed { const iframe = document.createElement("iframe"); iframe.setAttribute("src", value.url); iframe.setAttribute("width", value.width || "100%"); - iframe.setAttribute("height", value.height || "315"); + iframe.setAttribute("height", value.height || "auto"); iframe.setAttribute("frameborder", "0"); iframe.setAttribute("allowfullscreen", "true"); iframe.style.maxWidth = "100%"; @@ -38,7 +38,7 @@ class VideoBlot extends BlockEmbed { return { url: iframe.getAttribute("src") || "", width: iframe.getAttribute("width") || "100%", - height: iframe.getAttribute("height") || "315", + height: iframe.getAttribute("height") || "auto", }; } } diff --git a/src/index.css b/src/index.css index 333801a..e8e2cd1 100644 --- a/src/index.css +++ b/src/index.css @@ -162,7 +162,7 @@ tbody tr { .ql-container { min-height: 200px !important; - max-height: 500px; + max-height: none; overflow-y: auto; } @@ -170,3 +170,24 @@ tbody tr { position: relative !important; z-index: 10; } + +/* استایل‌های مخصوص iframe ویدیو */ +.ql-video-wrapper { + margin: 1em 0 !important; + text-align: center !important; + position: relative !important; + width: 100% !important; + aspect-ratio: 16/9 !important; + min-height: 300px !important; +} + +.ql-video-wrapper iframe { + position: absolute !important; + top: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + border-radius: 8px !important; + border: none !important; + max-width: 100% !important; +} diff --git a/src/pages/accessLogs/AccessLogsList.tsx b/src/pages/accessLogs/AccessLogsList.tsx index f7a477a..a09c968 100644 --- a/src/pages/accessLogs/AccessLogsList.tsx +++ b/src/pages/accessLogs/AccessLogsList.tsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; import { DocumentText, - DocumentDownload, Refresh, Activity, InfoCircle @@ -26,7 +25,6 @@ const AccessLogsList: React.FC = () => { filters, updateFilters, resetFilters, - exportLogs, refetch, } = useAccessLogs(); @@ -51,14 +49,6 @@ const AccessLogsList: React.FC = () => { updateFilters({ page }); }; - const handleExport = async () => { - try { - await exportLogs(); - } catch (error) { - console.error("خطا در خروجی گرفتن:", error); - } - }; - if (error) { return (
@@ -98,15 +88,6 @@ const AccessLogsList: React.FC = () => { بروزرسانی - -
diff --git a/src/pages/accessLogs/components/FilterPanel.tsx b/src/pages/accessLogs/components/FilterPanel.tsx index 618e95f..601911c 100644 --- a/src/pages/accessLogs/components/FilterPanel.tsx +++ b/src/pages/accessLogs/components/FilterPanel.tsx @@ -8,10 +8,8 @@ import { AccessLogQuery, OperationType, UserType, - HttpMethod, OperationTypeLabels, UserTypeLabels, - HttpMethodLabels, } from "../types/AccessLogTypes"; interface FilterPanelProps { @@ -37,11 +35,6 @@ const FilterPanel: React.FC = ({ label: UserTypeLabels[type], })); - const httpMethodOptions = Object.values(HttpMethod).map((method) => ({ - value: method, - label: HttpMethodLabels[method], - })); - const statusCodeOptions = [ { value: "200", label: "200 - موفق" }, { value: "201", label: "201 - ایجاد شده" }, @@ -138,18 +131,7 @@ const FilterPanel: React.FC = ({ /> - {/* HTTP Method */} -
- - ) => onFiltersChange({ ipAddress: e.target.value })} - disabled={loading} - /> -
+ {/* User ID */}
@@ -214,37 +185,6 @@ const FilterPanel: React.FC = ({ />
- {/* Min Execution Time */} -
- - ) => onFiltersChange({ - minExecutionTime: e.target.value ? parseInt(e.target.value) : undefined - })} - disabled={loading} - /> -
- - {/* Max Execution Time */} -
- - ) => onFiltersChange({ - maxExecutionTime: e.target.value ? parseInt(e.target.value) : undefined - })} - disabled={loading} - /> -
);