[READ-ONLY] Mirror of https://github.com/probablykasper/time-machine-inspector. Time Machine backup size inspector app
backup macos tauri time-machine
0

Configure Feed

Select the types of activity you want to include in your feed.

Scroll to selected item when using arrow keys

Kasper (Jul 30, 2024, 12:48 AM +0200) 6c602824 0b1d54af

+14 -2
+1
CHANGELOG.md
··· 3 3 ## Next 4 4 - Fix missing property errors 5 5 - Ignore destinations without mount point (until a better solution is found) 6 + - Scroll to selected item when using arrow keys 6 7 7 8 ## 1.2.0 - 2023 May 19 8 9 - Support macOS 13
+13 -2
src/page/Page.svelte
··· 1 1 <script lang="ts"> 2 2 import PageItems from './PageItems.svelte' 3 - import { page, backupInfos, pageMap } from './page' 3 + import { page, backupInfos, pageMap, selectedPath } from './page' 4 4 import Button from '../lib/Button.svelte' 5 5 import ProgressBar from '../lib/ProgressBar.svelte' 6 6 import commands from '../lib/commands' 7 7 import type { DestinationDetail } from '../../bindings' 8 + import { tick } from 'svelte' 8 9 10 + let content_el: HTMLDivElement 9 11 export let destination: DestinationDetail | null = null 10 12 11 13 async function compare(autoLoad = false) { ··· 30 32 } 31 33 } 32 34 } 35 + 36 + $: if ($selectedPath) { 37 + tick().then(() => { 38 + console.log('.selected', document.querySelector('.selected')) 39 + content_el 40 + .querySelector('.selected') 41 + ?.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'nearest' }) 42 + }) 43 + } 33 44 </script> 34 45 35 46 {#if !destination} ··· 43 54 {:else} 44 55 <main> 45 56 <div class="bar">{$page.backup.path}</div> 46 - <div class="content"> 57 + <div class="content" bind:this={content_el}> 47 58 {#if $page.loading} 48 59 <div class="absolute center-align"> 49 60 <ProgressBar />