File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22 import { onMount , type ComponentProps } from ' svelte' ;
33 import { page } from ' $app/state' ;
44 import { goto } from ' $app/navigation' ;
5+ import { resolve } from ' $app/paths' ;
56 import * as Sidebar from ' $lib/components/ui/sidebar/index.ts' ;
67 import * as Avatar from ' $lib/components/ui/avatar/index.ts' ;
78 import NavUser from ' $lib/components/nav-user.svelte' ;
5051 extra_channel = result .data ;
5152 }
5253 }
53- goto (` /app/chat/${login } ` );
54+ goto (resolve ( ` /app/chat/${login } ` ) );
5455 }
5556
5657 let authState = new SyncedState <AuthState >(' auth_state' , {
6869 async function logout() {
6970 let result = await commands .logout ();
7071 if (result .status == ' ok' ) {
71- goto (' /' );
72+ goto (resolve ( ' /' ) );
7273 } else {
7374 Logger .error (' logout failed' , result .error );
7475 }
8485 }
8586 });
8687
87- $inspect (page .url .pathname );
88-
8988 let {
9089 ref = $bindable (null ),
9190 collapsible = ' icon' ,
102101 <Sidebar .MenuItem isActive ={` /app/chat/${login } ` === page .url .pathname }>
103102 <Sidebar .MenuButton size =" lg" class =" p-2" >
104103 {#snippet child ({ props })}
105- <a href ={` /app/chat/${login } ` } {...props }>
104+ <a href ={resolve ( ` /app/chat/${login } ` ) } {...props }>
106105 <div class =" relative" >
107106 <Avatar .Root class =" size-8" >
108107 <Avatar .Image src ={imageUrl } alt ={displayName } />
Original file line number Diff line number Diff line change 55 import broadcasterBadge from ' $lib/resources/broadcaster.svelte' ;
66 import vipBadge from ' $lib/resources/vip.svelte' ;
77 import type { BadgeRef } from ' $lib/bindings' ;
8+ import type { Component } from ' svelte' ;
89
910 interface Props {
1011 badge_ref: BadgeRef ;
1617 badge_ref .set_id !== badge_ref .badge .set_id && badge_ref .id !== badge_ref .badge .id
1718 );
1819
19- $inspect (badge_ref );
20-
21- const badgeMap: Map <string , any > = new Map <string , any >([
20+ const badgeMap: Map <string , Component > = new Map <string , Component >([
2221 [' subscriber' , subBadge ],
2322 [' moderator' , moderatorBadge ],
2423 [' partner' , partnerBadge ],
Original file line number Diff line number Diff line change 1010 </script >
1111
1212<span class =" inline-flex items-center gap-1 align-middle whitespace-nowrap" >
13- {#each badges as badge }
13+ {#each badges as badge ( ` ${ badge . set_id }:${ badge . id } ` ) }
1414 <Badge badge _ref={badge } />
1515 {/each }
1616</span >
Original file line number Diff line number Diff line change 3737 class =" absolute bottom-full left-0 right-0 z-50 max-h-48 overflow-y-auto border rounded-lg bg-popover p-2 shadow-md"
3838 >
3939 {#if showSearch }
40- <!-- svelte-ignore a11y_autofocus -->
4140 <Input
4241 bind:value ={searchQuery }
4342 onkeydown ={onSearchKeydown }
4847 {/if }
4948 {#if emotes .length > 0 }
5049 <div class =" grid grid-cols-8 gap-1" >
51- {#each emotes as emote , i }
50+ {#each emotes as emote , i ( emote . name ) }
5251 <Tooltip .Root >
5352 <Tooltip .Trigger >
5453 <button
Original file line number Diff line number Diff line change 5353 </script >
5454
5555{#if href }
56+ <!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
5657 <a bind:this ={ref } class ={cn (buttonVariants ({ variant , size }), className )} {href } {...restProps }>
5758 {@render children ?.()}
5859 </a >
Original file line number Diff line number Diff line change 1818 </script >
1919
2020<Button
21+ bind:ref
2122 type =" button"
2223 onclick ={(e ) => {
2324 onclick ?.(e );
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import { onMount } from ' svelte' ;
33 import ' ../app.css' ;
4- import { page } from ' $app/state' ;
54 import { checkForAppUpdates } from ' $utils/updater' ;
65
76 let { children } = $props ();
87
9- $inspect (page .params .id );
10-
118 onMount (async () => {
129 await checkForAppUpdates (' https://github.com/synthlabs/pepo/releases/latest' );
1310 });
Original file line number Diff line number Diff line change 33 import { SyncedState } from ' tauri-svelte-synced-store' ;
44 import { CircleCheckBig , LoaderCircle } from ' @lucide/svelte' ;
55 import { goto } from ' $app/navigation' ;
6+ import { resolve } from ' $app/paths' ;
67 import { commands , type AuthState } from ' $lib/bindings' ;
78 import { cn } from ' $lib/utils.js' ;
89 import Logger from ' $utils/log' ;
3435 onMount (async () => {
3536 let result = await commands .login (true );
3637 if (result .status == ' ok' ) {
37- goto (' /app' );
38+ goto (resolve ( ' /app' ) );
3839 }
3940 });
4041
4546
4647 let result = await commands .login (false );
4748 if (result .status == ' ok' ) {
48- goto (' /app' );
49+ goto (resolve ( ' /app' ) );
4950 } else {
5051 Logger .error (' failure' , result .error );
5152 }
Original file line number Diff line number Diff line change 1010 import Users from ' @lucide/svelte/icons/users' ;
1111 import * as Tooltip from ' $lib/components/ui/tooltip/index.ts' ;
1212 import { goto } from ' $app/navigation' ;
13+ import { resolve } from ' $app/paths' ;
1314
1415 let { children } = $props ();
1516
1617 let authState = new SyncedState <AuthState >(' auth_state' );
1718
1819 $effect (() => {
1920 if (authState .ready && authState .obj .phase === ' unauthorized' ) {
20- goto (' /' );
21+ goto (resolve ( ' /' ) );
2122 }
2223 });
2324
You can’t perform that action at this time.
0 commit comments