From a97455030a33d0010c320f4361817f93a7a02436 Mon Sep 17 00:00:00 2001 From: dev Date: Thu, 29 Oct 2026 11:23:16 +0300 Subject: [PATCH] feat: add report card screenshot functionality - Add screenshot button in journal HTML - Implement downloadReportCardScreenshot() with html-to-image - Add styles for screenshot modal - New dependency: html-to-image.js --- public/admin.css | 5 +++++ public/journal.html | 5 +++++ public/js/journal.js | 51 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/public/admin.css b/public/admin.css index 9b6c173..63bfc2d 100644 --- a/public/admin.css +++ b/public/admin.css @@ -1226,6 +1226,11 @@ body.report-card-open .report-fields{display:flex} .report-fields__actions{display:flex;gap:10px} .report-fields__link{background:none;border:none;color:var(--accent);cursor:pointer;font-size:.78rem;font-weight:600;padding:0;font-family:inherit} .report-fields__link:hover{text-decoration:underline} +.report-fields__shot{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:10px;background:var(--accent);color:#fff;border:none;border-radius:10px;padding:9px 12px;font-family:inherit;font-size:.82rem;font-weight:700;cursor:pointer} +.report-fields__shot svg{width:16px;height:16px;flex:none} +.report-fields__shot:hover{filter:brightness(1.06)} +.report-fields__shot[disabled]{opacity:.6;cursor:default} +.report-fields__shot-text{white-space:nowrap} .report-fields__list{display:flex;flex-direction:column;gap:2px;max-height:min(56vh,420px);overflow:auto} .report-fields__item{ display:flex; diff --git a/public/journal.html b/public/journal.html index 5217191..57d2f77 100644 --- a/public/journal.html +++ b/public/journal.html @@ -585,6 +585,10 @@ +