[READ-ONLY] Mirror of https://github.com/probablykasper/kadium. App for staying ontop of YouTube channels' uploads kadium.kasper.space
linux macos notifications tauri windows youtube
0

Configure Feed

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

Add "Get Started" to Help menu

Kasper (Jan 21, 2024, 7:31 AM +0100) 7ce701bf f8e90772

+19 -13
+4 -1
src-tauri/src/main.rs
··· 288 288 )), 289 289 MenuEntry::Submenu(Submenu::new( 290 290 "Help", 291 - Menu::with_items([CustomMenuItem::new("Learn More", "Learn More").into()]), 291 + Menu::with_items([ 292 + CustomMenuItem::new("Get Started", "Get Started").into(), 293 + CustomMenuItem::new("Learn More", "Learn More").into(), 294 + ]), 292 295 )), 293 296 ])) 294 297 .on_menu_event(|event| match event.menu_item_id() {
+1 -1
src/lib/modals/GetStarted.svelte
··· 4 4 import Button from '$lib/Button.svelte' 5 5 import Link from '$lib/Link.svelte' 6 6 7 - export let visible = true 7 + export let visible = false 8 8 </script> 9 9 10 10 {#if visible}
+14 -11
src/routes/+layout.svelte
··· 1 + <script lang="ts" context="module"> 2 + let getStartedWasShown = false 3 + </script> 4 + 1 5 <script lang="ts"> 2 6 import { event } from '@tauri-apps/api' 3 7 import { checkShortcut, checkModifiers } from '$lib/general' ··· 65 69 goto('/', { replaceState: true }) 66 70 $viewOptions.show_all = true 67 71 $viewOptions.show_archived = false 72 + } else if (payload === 'Get Started') { 73 + showGetStarted = true 68 74 } 69 75 }) 70 76 onDestroy(async () => { 71 77 const unlisten = await unlistenFuture 72 78 unlisten() 73 79 }) 74 - let getStartedWasSeen = false 75 - $: if ( 76 - !getStartedWasSeen && 77 - $settings && 78 - $settings.channels.length === 0 && 79 - $settings.api_key === '' 80 - ) { 81 - getStartedWasSeen = true 80 + let showGetStarted = false 81 + $: if (showGetStarted) { 82 + getStartedWasShown = true 83 + } 84 + 85 + $: if (!getStartedWasShown && $settings?.channels.length === 0 && $settings.api_key === '') { 86 + showGetStarted = true 82 87 } 83 88 </script> 84 89 ··· 94 99 bind:visible={$settingsOpen} 95 100 /> 96 101 97 - {#if getStartedWasSeen} 98 - <GetStarted /> 99 - {/if} 102 + <GetStarted bind:visible={showGetStarted} /> 100 103 {:else if error} 101 104 Error loading. 102 105