feat(admin): copy buttons and shared clipboard helper
CI / php (push) Successful in 2m57s

- Add magesail-clipboard.js (clipboard API + execCommand fallback)
- Tunnel: copy store code, key, Holesail command, log tail; wire polling UI
- How-To: copy per code block; Howto block + magesail-howto-copy.js
- NGINX map: copy raw map from textarea; translations in Map block
- Document copy UX in docs/admin-ui.md
This commit is contained in:
2026-03-21 04:03:13 -05:00
parent bbd83659a7
commit 4ec4791f27
15 changed files with 338 additions and 21 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace MageSail\Magesail\Block\Adminhtml;
use Magento\Backend\Block\Template;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Serialize\Serializer\Json;
class Howto extends Template
{
public function __construct(
Context $context,
private readonly Json $json,
array $data = []
) {
parent::__construct($context, $data);
}
public function getHowtoCopyInitJson(): string
{
return $this->json->serialize([
'translations' => [
'copy' => (string) __('Copy'),
'copied' => (string) __('Copied!'),
'copyFailed' => (string) __('Copy failed'),
],
]);
}
}