Skip to content

Commit bc4835b

Browse files
authored
Merge pull request #58 from beekeeper-studio/fix/copy-query-label
add copy query label
2 parents b28e31b + fbdd52c commit bc4835b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/assets/styles/components/_message.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
justify-content: flex-end;
3737
}
3838

39+
.message-content .code-block .actions .btn {
40+
gap: 0.25rem;
41+
min-width: 1.75rem;
42+
padding-inline: 0.4rem;
43+
width: auto;
44+
font-weight: normal;
45+
}
46+
3947
.message-content.literally-empty {
4048
font-style: italic;
4149
--theme-text-message-system: var(--text-muted);

src/markdownParser.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ async function useExtensions() {
3333
langAttr = ` data-lang="${token.lang}"`;
3434
}
3535

36+
const queryOrCode = token.lang === "sql" ? "query" : "code";
37+
3638
let actionsHtml = `
3739
<button
3840
class="btn btn-flat-2"
@@ -53,8 +55,9 @@ async function useExtensions() {
5355
>
5456
<span class="material-symbols-outlined copy-icon">content_copy</span>
5557
<span class="material-symbols-outlined copied-icon">check</span>
58+
<span>Copy ${queryOrCode}</span>
5659
<span class="title-popup">
57-
<span class="copy-label">Copy</span>
60+
<span class="copy-label">Copy ${queryOrCode}</span>
5861
<span class="copied-label">Copied</span>
5962
</span>
6063
</button>

0 commit comments

Comments
 (0)