mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 01:51:57 +03:00
Update to react to changes in pr URL
This commit is contained in:
parent
6a741c22cc
commit
0fb074a7a1
@ -14,15 +14,15 @@
|
||||
export let hasIntegratedCommits = false;
|
||||
export let isLaneCollapsed: Persisted<boolean>;
|
||||
|
||||
function updateContextMenu() {
|
||||
function updateContextMenu(copyablePrUrl: string) {
|
||||
if (popupMenu) popupMenu.$destroy();
|
||||
return new ViewPrContextMenu({
|
||||
target: document.body,
|
||||
props: { prUrl: prUrl || '' }
|
||||
props: { prUrl: copyablePrUrl }
|
||||
});
|
||||
}
|
||||
|
||||
$: popupMenu = updateContextMenu();
|
||||
$: popupMenu = updateContextMenu(prUrl || '');
|
||||
|
||||
onDestroy(() => {
|
||||
if (popupMenu) {
|
||||
|
@ -25,15 +25,15 @@
|
||||
let container: HTMLDivElement;
|
||||
let isApplying = false;
|
||||
|
||||
function updateContextMenu() {
|
||||
function updateContextMenu(copyablePrUrl: string) {
|
||||
if (popupMenu) popupMenu.$destroy();
|
||||
return new ViewPrContextMenu({
|
||||
target: document.body,
|
||||
props: { prUrl: pr?.htmlUrl || '' }
|
||||
props: { prUrl: copyablePrUrl }
|
||||
});
|
||||
}
|
||||
|
||||
$: popupMenu = updateContextMenu();
|
||||
$: popupMenu = updateContextMenu(pr?.htmlUrl || '');
|
||||
|
||||
onDestroy(() => {
|
||||
if (popupMenu) {
|
||||
|
Loading…
Reference in New Issue
Block a user