mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-26 19:15:25 +03:00
show both expand / collapse all
This commit is contained in:
parent
2f40e62dbe
commit
65396ce379
@ -104,14 +104,18 @@
|
|||||||
allExpanded = undefined;
|
allExpanded = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function handleToggleExpandAll() {
|
|
||||||
if (allExpanded == true) {
|
$: allCollapsed = files.every((f) => getExpandedWithCacheFallback(f) === false);
|
||||||
files.forEach((f) => setExpandedWithCache(f, false));
|
|
||||||
allExpanded = false;
|
function handleCollapseAll() {
|
||||||
} else {
|
files.forEach((f) => setExpandedWithCache(f, false));
|
||||||
files.forEach((f) => setExpandedWithCache(f, true));
|
allExpanded = false;
|
||||||
allExpanded = true;
|
files = files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleExpandAll() {
|
||||||
|
files.forEach((f) => setExpandedWithCache(f, true));
|
||||||
|
allExpanded = true;
|
||||||
files = files;
|
files = files;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,13 +530,9 @@
|
|||||||
Unapply
|
Unapply
|
||||||
</PopupMenuItem>
|
</PopupMenuItem>
|
||||||
|
|
||||||
<PopupMenuItem on:click={handleToggleExpandAll}>
|
<PopupMenuItem on:click={handleExpandAll} disabled={allExpanded}>Expand all</PopupMenuItem>
|
||||||
{#if allExpanded}
|
|
||||||
Collapse all
|
<PopupMenuItem on:click={handleCollapseAll} disabled={allCollapsed}>Collapse all</PopupMenuItem>
|
||||||
{:else}
|
|
||||||
Expand all
|
|
||||||
{/if}
|
|
||||||
</PopupMenuItem>
|
|
||||||
|
|
||||||
<div class="mx-3">
|
<div class="mx-3">
|
||||||
<div class="my-2 h-[0.0625rem] w-full bg-light-300 dark:bg-dark-500" />
|
<div class="my-2 h-[0.0625rem] w-full bg-light-300 dark:bg-dark-500" />
|
||||||
|
Loading…
Reference in New Issue
Block a user