Files
MageSail/Magesail/Block/Adminhtml/Howto.php
T
snxraven 4ec4791f27
CI / php (push) Successful in 2m57s
feat(admin): copy buttons and shared clipboard helper
- 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
2026-03-21 04:03:13 -05:00

32 lines
745 B
PHP

<?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'),
],
]);
}
}