From 449f44b499e820a4c706ab02f248a391a6c3a4b5 Mon Sep 17 00:00:00 2001 From: shats Date: Wed, 27 Aug 2025 17:01:49 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BC=D0=B5=D1=82=D0=B0=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=B8=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=B5=D0=B3=D0=BE=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0=D1=85=20PageHeaderActions=20=D0=B8=20S?= =?UTF-8?q?3MetaBar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/PageHeaderActions.jsx | 13 ++++++++++++- frontend/src/components/S3MetaBar.jsx | 16 +++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/PageHeaderActions.jsx b/frontend/src/components/PageHeaderActions.jsx index 3dc1406..590d94d 100644 --- a/frontend/src/components/PageHeaderActions.jsx +++ b/frontend/src/components/PageHeaderActions.jsx @@ -8,6 +8,7 @@ import { IconEraser } from '@tabler/icons-react'; import PortalDropdown from './PortalDropdown.jsx'; +import { IconClock } from '@tabler/icons-react'; function PageHeaderActions({ loading = false, @@ -25,6 +26,7 @@ function PageHeaderActions({ onSave, disableSave = false, onHistory, + lastModified, onOnlineUpdate, onBackgroundUpdate, }) { @@ -144,7 +146,16 @@ function PageHeaderActions({ )} {onHistory && ( - +
+ + {lastModified && ( + + )} +
)} diff --git a/frontend/src/components/S3MetaBar.jsx b/frontend/src/components/S3MetaBar.jsx index 5a81f75..7276b4a 100644 --- a/frontend/src/components/S3MetaBar.jsx +++ b/frontend/src/components/S3MetaBar.jsx @@ -20,6 +20,17 @@ function S3MetaBar({ keys = [], className = '' }) { useEffect(() => { fetchMeta(); }, []); + const copyMeta = async (k) => { + try { + const it = meta[k] || {}; + const text = `etag: ${it?.etag || ''}\nlastModified: ${it?.lastModified || ''}`; + await navigator.clipboard?.writeText(text); + window.notify?.success?.('Скопировано в буфер'); + } catch (e) { + window.notify?.error?.('Не удалось скопировать', String(e)); + } + }; + const renderKey = (k) => { const it = meta[k]; return ( @@ -27,12 +38,15 @@ function S3MetaBar({ keys = [], className = '' }) { {it?.etag || '—'} {it?.lastModified ? new Date(it.lastModified).toLocaleString() : '—'} {typeof it?.contentLength === 'number' ? `${it.contentLength} байт` : '—'} + ); }; return ( -
+
{keys.length === 0 ? renderKey('domainsNew') : keys.map(renderKey)}