From d1535c4cd822943255b58de491860f5a1bd3d387 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Mon, 15 Jun 2026 14:45:06 +0300 Subject: [PATCH] add redact color --- .../template_documents_modify_controller.rb | 2 +- .../documents_editor_page.vue | 3 +- .../documents_editor_redact.vue | 43 ++++++++++++++++++- app/javascript/template_builder/i18n.js | 7 +++ lib/pdfium.rb | 11 +++-- lib/templates/modify_documents.rb | 16 ++++--- 6 files changed, 68 insertions(+), 14 deletions(-) diff --git a/app/controllers/template_documents_modify_controller.rb b/app/controllers/template_documents_modify_controller.rb index 30db1fd9..69de6e6d 100644 --- a/app/controllers/template_documents_modify_controller.rb +++ b/app/controllers/template_documents_modify_controller.rb @@ -10,7 +10,7 @@ class TemplateDocumentsModifyController < ApplicationController params.require(:documents).map do |item| item.permit(:attachment_uuid, pages: [:attachment_uuid, :page, :rotate, - { redact: [%i[x y w h]], replaced_page: %i[attachment_uuid page] }]).to_h + { redact: [%i[x y w h color]], replaced_page: %i[attachment_uuid page] }]).to_h end Templates::ModifyDocuments.call(@template, documents_layout) diff --git a/app/javascript/template_builder/documents_editor_page.vue b/app/javascript/template_builder/documents_editor_page.vue index 1bdc93e8..d6d9b9ff 100644 --- a/app/javascript/template_builder/documents_editor_page.vue +++ b/app/javascript/template_builder/documents_editor_page.vue @@ -36,7 +36,8 @@
+
+ {{ t('color') }} +
+ +
+