mirror of
https://github.com/turboderp-org/exui.git
synced 2026-04-20 06:19:11 +00:00
Tweak layout
This commit is contained in:
@@ -466,14 +466,15 @@
|
||||
right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 4px;
|
||||
height: 40px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 0px;
|
||||
height: 30px;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.copy-btn.clicked {
|
||||
padding-top: 0px;
|
||||
background-color: var(--button-disabled-background);
|
||||
border: 1px solid var(--button-disabled-border);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ renderer.code = function(code, infostring, escaped) {
|
||||
return `
|
||||
<div class="code-block">
|
||||
<pre><code>${code}</code></pre>
|
||||
<button id="${uniqueId}" data-clipboard-text="${escape(code)}" class="copy-btn">⎘ Copy</button>
|
||||
<button id="${uniqueId}" data-clipboard-text="${escape(code)}" class="copy-btn">🗎 Copy</button>
|
||||
</div>
|
||||
`;
|
||||
};
|
||||
@@ -67,7 +67,7 @@ export class Chat {
|
||||
if (event.target && event.target.classList.contains('code-block')) {
|
||||
const button = event.target.querySelector('.copy-btn');
|
||||
if (button) {
|
||||
button.textContent = '⎘ Copy'; // Revert button text to "Copy"
|
||||
button.textContent = '🗎 Copy'; // Revert button text to "Copy"
|
||||
button.classList.remove("clicked");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user