mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-25 10:33:21 +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 hasIntegratedCommits = false;
|
||||||
export let isLaneCollapsed: Persisted<boolean>;
|
export let isLaneCollapsed: Persisted<boolean>;
|
||||||
|
|
||||||
function updateContextMenu() {
|
function updateContextMenu(copyablePrUrl: string) {
|
||||||
if (popupMenu) popupMenu.$destroy();
|
if (popupMenu) popupMenu.$destroy();
|
||||||
return new ViewPrContextMenu({
|
return new ViewPrContextMenu({
|
||||||
target: document.body,
|
target: document.body,
|
||||||
props: { prUrl: prUrl || '' }
|
props: { prUrl: copyablePrUrl }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$: popupMenu = updateContextMenu();
|
$: popupMenu = updateContextMenu(prUrl || '');
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (popupMenu) {
|
if (popupMenu) {
|
||||||
|
@ -25,15 +25,15 @@
|
|||||||
let container: HTMLDivElement;
|
let container: HTMLDivElement;
|
||||||
let isApplying = false;
|
let isApplying = false;
|
||||||
|
|
||||||
function updateContextMenu() {
|
function updateContextMenu(copyablePrUrl: string) {
|
||||||
if (popupMenu) popupMenu.$destroy();
|
if (popupMenu) popupMenu.$destroy();
|
||||||
return new ViewPrContextMenu({
|
return new ViewPrContextMenu({
|
||||||
target: document.body,
|
target: document.body,
|
||||||
props: { prUrl: pr?.htmlUrl || '' }
|
props: { prUrl: copyablePrUrl }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$: popupMenu = updateContextMenu();
|
$: popupMenu = updateContextMenu(pr?.htmlUrl || '');
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (popupMenu) {
|
if (popupMenu) {
|
||||||
|
Loading…
Reference in New Issue
Block a user