mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-24 05:29:51 +03:00
better file filter
This commit is contained in:
parent
2057c9216e
commit
d8af16f0cf
@ -35,12 +35,12 @@
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<div class="flex-auto overflow-auto flex h-full w-full flex-row gap-2 p-2">
|
||||
<div class="flex h-full w-full flex-auto flex-row gap-2 overflow-auto p-2">
|
||||
<ul id="days" class="flex h-full flex-shrink-0 flex-col gap-2 overflow-y-scroll">
|
||||
{#each $dates as date}
|
||||
<li class="w-full">
|
||||
<a
|
||||
href="/projects/{projectId}/player/{date}"
|
||||
href="/projects/{projectId}/player/{date}{$page.url.search}"
|
||||
class:bg-gb-800={date === $currentDate}
|
||||
class:text-white={date === $currentDate}
|
||||
class:border-gb-700={date !== $currentDate}
|
||||
|
@ -47,7 +47,7 @@
|
||||
.map((s) => enrichSession(projectId, s, paths))
|
||||
).then((sessions) =>
|
||||
sessions
|
||||
.filter((s) => s.deltas.length > 0)
|
||||
.filter((s) => s.deltas.length > 0 && Object.keys(s.files).length > 0)
|
||||
.sort((a, b) => a.meta.startTimestampMs - b.meta.startTimestampMs)
|
||||
);
|
||||
});
|
||||
@ -56,6 +56,14 @@
|
||||
const currentSessionId = writable($page.params.sessionId);
|
||||
const currentDate = writable($page.params.date);
|
||||
|
||||
richSessions.subscribe((sessions) => {
|
||||
if (!sessions) return;
|
||||
if (sessions.length === 0) return;
|
||||
if (!sessions.some((s) => s.id === $currentSessionId)) {
|
||||
currentSessionId.set(sessions[0].id);
|
||||
}
|
||||
});
|
||||
|
||||
const scrollToSession = () => {
|
||||
const sessionEl = document.getElementById('current-session');
|
||||
if (sessionEl) {
|
||||
|
Loading…
Reference in New Issue
Block a user