mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
Copy ID button
This commit is contained in:
@@ -191,7 +191,7 @@
|
||||
</OverflowMenu>
|
||||
</ButtonStyled>
|
||||
</template>
|
||||
<ButtonStyled v-else type="outlined" circular>
|
||||
<ButtonStyled type="outlined" circular>
|
||||
<OverflowMenu
|
||||
v-tooltip="formatMessage(commonMessages.moreOptionsButton)"
|
||||
:options="[
|
||||
@@ -201,6 +201,20 @@
|
||||
action: () =>
|
||||
auth.user ? reportVersion(version!.id) : navigateTo(signInRouteObj),
|
||||
},
|
||||
{ divider: true, shown: flags.developerMode },
|
||||
{
|
||||
id: 'copy-id',
|
||||
action: () => copyToClipboard(version!.id),
|
||||
shown: flags.developerMode,
|
||||
},
|
||||
{
|
||||
id: 'copy-permalink',
|
||||
action: () =>
|
||||
copyToClipboard(
|
||||
`https://modrinth.com/project/${project.id}/version/${version!.id}`,
|
||||
),
|
||||
shown: flags.developerMode,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<MoreVerticalIcon />
|
||||
@@ -208,6 +222,18 @@
|
||||
<ReportIcon aria-hidden="true" />
|
||||
{{ formatMessage(commonMessages.reportButton) }}
|
||||
</template>
|
||||
<template #copy-link>
|
||||
<ReportIcon aria-hidden="true" />
|
||||
{{ formatMessage(commonMessages.reportButton) }}
|
||||
</template>
|
||||
<template #copy-id>
|
||||
<ClipboardCopyIcon aria-hidden="true" />
|
||||
{{ formatMessage(commonMessages.copyIdButton) }}
|
||||
</template>
|
||||
<template #copy-permalink>
|
||||
<ClipboardCopyIcon aria-hidden="true" />
|
||||
{{ formatMessage(commonMessages.copyPermalinkButton) }}
|
||||
</template>
|
||||
</OverflowMenu>
|
||||
</ButtonStyled>
|
||||
</template>
|
||||
@@ -401,6 +427,7 @@ import type { Labrinth } from '@modrinth/api-client'
|
||||
import {
|
||||
BoxIcon,
|
||||
ChevronLeftIcon,
|
||||
ClipboardCopyIcon,
|
||||
CopyIcon,
|
||||
DownloadIcon,
|
||||
DropdownIcon,
|
||||
|
||||
Reference in New Issue
Block a user