[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.

Enable strict mode

Kasper (May 19, 2023, 12:11 AM +0200) 24187ad6 9f51fbd2

+11 -12
+8 -4
src/App.svelte
··· 25 25 selectedDestination = null 26 26 closePage() 27 27 28 - destinations = await commands.destinationinfo() 28 + const newDestinations = await commands.destinationinfo() 29 + destinations = newDestinations 29 30 30 31 if (destinations[0]) { 31 32 setTimeout(() => { 32 - selectedDestination = destinations[0] 33 + selectedDestination = newDestinations[0] 33 34 }, timeRemaining()) 34 35 35 - backups = await commands.loadBackupList(destinations[0].id, refresh) 36 + backups = await commands.loadBackupList(newDestinations[0].id, refresh) 36 37 console.log('Loaded backups', backups) 37 38 } 38 39 await new Promise((resolve) => { ··· 51 52 {/if} 52 53 <Button disabled={loading} on:click={() => refresh(true)}>Refresh</Button> 53 54 <div class="mount-point"> 54 - {#if selectedDestination} 55 + {#if destinations && selectedDestination} 55 56 <div transition:fade={{ duration: 300, easing: cubicInOut }}> 56 57 {#if destinations.length >= 2} 57 58 <select 58 59 value={selectedDestination.id} 59 60 disabled={loading} 60 61 on:change={async (e) => { 62 + if (!destinations) { 63 + return 64 + } 61 65 loading = true 62 66 selectedDestination = destinations.find((d) => d.id === e.currentTarget.value) || null 63 67 backups = await commands.loadBackupList(destinations[0].id, false)
+1 -1
src/page/Page.svelte
··· 9 9 export let destination: DestinationDetail | null = null 10 10 11 11 async function compare(autoLoad = false) { 12 - if ($page.loading || $page.backup === null) { 12 + if ($page.loading || $page.backup === null || !destination) { 13 13 return 14 14 } 15 15 if (!autoLoad) {
+2 -7
tsconfig.json
··· 5 5 "useDefineForClassFields": true, 6 6 "module": "ESNext", 7 7 "resolveJsonModule": true, 8 - /** 9 - * Typecheck JS in `.svelte` and `.js` files by default. 10 - * Disable checkJs if you'd like to use dynamic types in JS. 11 - * Note that setting allowJs false does not prevent the use 12 - * of JS in `.svelte` files. 13 - */ 14 8 "allowJs": true, 15 9 "checkJs": true, 16 - "isolatedModules": true 10 + "isolatedModules": true, 11 + "strict": true 17 12 }, 18 13 "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] 19 14 }