Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
const payload = await listRepos();
status = payload.ageSecs < 0
? "No cache — press Ctrl+R to scan"
: `${payload.repos.length} repos · cache ${fmtAge(payload.ageSecs)} old`;
: `${payload.repos.length} repos`;
await refresh();
if (payload.stale || payload.ageSecs < 0) void rescan();
}
Expand All @@ -323,7 +323,7 @@
status = "Scanning…";
try {
const payload = await rescanRepos();
status = `${payload.repos.length} repos · just scanned`;
status = `${payload.repos.length} repos`;
await refresh();
} catch (e) {
status = `Scan failed: ${e}`;
Expand All @@ -332,12 +332,6 @@
}
}

function fmtAge(secs: number): string {
if (secs < 90) return `${secs}s`;
if (secs < 5400) return `${Math.round(secs / 60)}m`;
return `${Math.round(secs / 3600)}h`;
}

async function loadApps() {
try {
const p = await listApps();
Expand All @@ -356,7 +350,7 @@
try {
const p = await rescanApps();
apps = p.apps;
appStatus = `${p.apps.length} apps · just scanned`;
appStatus = `${p.apps.length} apps`;
} catch (e) {
appStatus = `App scan failed: ${e}`;
} finally {
Expand Down Expand Up @@ -746,6 +740,9 @@
</svg>
</button>
{/if}
{#if mode === "settings" && upd.current}
<span class="shrink-0 tabular-nums text-sky-400">v{upd.current}</span>
{/if}
<span class="truncate">{footerStatus}</span>
{#if mode === "repo-list"}
<span class="inline-flex shrink-0 items-center gap-1"
Expand All @@ -768,8 +765,6 @@
>
↑ {upd.info.version}
</button>
{:else if upd.current}
<span class="shrink-0 tabular-nums text-white/25">v{upd.current}</span>
{/if}
</span>
</footer>
Expand Down
24 changes: 13 additions & 11 deletions src/lib/components/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@

<div class="space-y-5">
<div class="space-y-1">
<label class="flex cursor-pointer items-center gap-2">
<label class="flex w-fit cursor-pointer items-center gap-2">
<input
type="checkbox"
bind:checked={autostart}
Expand Down Expand Up @@ -593,7 +593,7 @@
</p>
</div>

<label class="block space-y-1.5">
<label class="block w-fit space-y-1.5">
<span class="text-orange-400">Overlay dismissal</span>
<select
bind:value={dismiss}
Expand Down Expand Up @@ -697,7 +697,7 @@
</label>
</div>

<label class="block space-y-1.5">
<label class="block w-fit space-y-1.5">
<span class="text-orange-400">Repo inside another repo</span>
<select
bind:value={collapseNested}
Expand Down Expand Up @@ -791,15 +791,17 @@
</div>

<div class="space-y-2">
<label class="flex cursor-pointer items-center gap-2">
<input
type="checkbox"
bind:checked={appsEnabled}
class="h-3.5 w-3.5 cursor-pointer accent-sky-500"
/>
<span class="text-orange-400">Index installed apps</span>
<div class="flex items-center gap-2">
<label class="flex w-fit cursor-pointer items-center gap-2">
<input
type="checkbox"
bind:checked={appsEnabled}
class="h-3.5 w-3.5 cursor-pointer accent-sky-500"
/>
<span class="text-orange-400">Index installed apps</span>
</label>
<span class="text-white/25">— type <span class="font-mono">›</span> in the search bar</span>
</label>
</div>
<p class="pl-5 text-[11px] text-white/25">
Unchecking this turns the <span class="font-mono">›</span> scope off entirely
— typing it does nothing and the app-launcher hotkey won't open it either.
Expand Down