Skip to content

Commit 05db2f4

Browse files
committed
fix: fix indirect merge conflicts
1 parent e371b21 commit 05db2f4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ function handleLineClick(lineNum: number, event: MouseEvent) {
262262
currentHash.value = newHash
263263
}
264264
265+
// Copy link to current line(s)
266+
const { copy: copyPermalink } = useClipboard({ copiedDuring: 2000 })
267+
function copyPermalinkUrl() {
268+
const url = new URL(window.location.href)
269+
copyPermalink(url.toString())
270+
}
271+
272+
const { copy: copyFileContent } = useClipboard({
273+
source: () => fileContent.value?.content || '',
274+
copiedDuring: 2000,
275+
})
276+
265277
// Canonical URL for this code page
266278
const canonicalUrl = computed(() => `https://npmx.dev${getCodeUrl(route.params)}`)
267279

i18n/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@
939939
"close_tree": "Close file tree",
940940
"copy_content": "Copy file content",
941941
"copy_link": "Copy link",
942+
"raw": "Raw",
942943
"view_raw": "View raw file",
943944
"toggle_container": "Toggle code container width",
944945
"open_raw_file": "Open raw file",

0 commit comments

Comments
 (0)