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
32 lines
745 B
PHP
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'),
|
|
],
|
|
]);
|
|
}
|
|
}
|