mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-23 01:55:00 +02:00
Add copy link button to notification (#2444)
Signed-off-by: Denis Maslennikov <denis.maslennikov@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
Label,
|
||||
showPanel
|
||||
} from '@hcengineering/ui'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import { copyTextToClipboard, createQuery } from '@hcengineering/presentation'
|
||||
import { Issue, IssueStatus } from '@hcengineering/tracker'
|
||||
|
||||
import IssueStatusIcon from './IssueStatusIcon.svelte'
|
||||
@@ -79,6 +79,11 @@
|
||||
|
||||
onRemove()
|
||||
}
|
||||
const handleCopyUrl = () => {
|
||||
if (issue) {
|
||||
copyTextToClipboard(params?.issueUrl)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="root" in:fade out:fade>
|
||||
@@ -104,8 +109,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-issue-button">
|
||||
<Button label={tracker.string.ViewIssue} kind="link" size="medium" on:click={handleIssueOpened} />
|
||||
<div class="row">
|
||||
<div class="view-issue-button">
|
||||
<Button label={tracker.string.ViewIssue} kind="link" size="medium" on:click={handleIssueOpened} />
|
||||
</div>
|
||||
<div class="copy-link-button">
|
||||
<Button
|
||||
icon={tracker.icon.CopyURL}
|
||||
kind={'link'}
|
||||
label={tracker.string.CopyIssueUrl}
|
||||
on:click={handleCopyUrl}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -152,6 +167,11 @@
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.copy-link-button {
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user