forked from wrenn/wrenn
Add syntax highlighting to file browser, harden capsules list
File browser: - Add shiki-based syntax highlighting (lazy-loaded, zero initial bundle impact) with support for 30+ languages - Cap highlighting at 2000 lines to avoid freezing on large files - Pre-compute preview lines as derived state instead of re-splitting on every render - Add content-visibility: auto on code lines for off-screen skip - Remove per-line CSS transitions (unnecessary paint on 5000 elements) - Cap row entrance animations to first 30 entries Capsules list: - Pause auto-refresh polling when browser tab is hidden - Add empty state for search with no results - Fix error state not clearing on successful refresh - Fix action menu positioning near viewport edges - Disable create button when no template selected
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { createCapsule, listSnapshots, type Capsule, type CreateCapsuleParams, type Snapshot } from '$lib/api/capsules';
|
||||
|
||||
type Props = {
|
||||
@ -292,7 +291,7 @@
|
||||
</button>
|
||||
<button
|
||||
onclick={handleCreate}
|
||||
disabled={creating}
|
||||
disabled={creating || !templateQuery.trim()}
|
||||
class="flex items-center gap-2 rounded-[var(--radius-button)] bg-[var(--color-accent)] px-5 py-2 text-ui font-semibold text-white transition-all duration-150 hover:brightness-115 hover:-translate-y-px active:translate-y-0 disabled:opacity-50 disabled:hover:translate-y-0"
|
||||
>
|
||||
{#if creating}
|
||||
|
||||
Reference in New Issue
Block a user