- 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:
@@ -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'),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user