File tree Expand file tree Collapse file tree 4 files changed +42
-8
lines changed
routes/package/[...package] Expand file tree Collapse file tree 4 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 55
55
"svelte-check" : " ^4.1.6" ,
56
56
"svelte-exmarkdown" : " ^5.0.0" ,
57
57
"svelte-meta-tags" : " ^4.2.0" ,
58
- "svelte-sonner" : " ^0.3.28 " ,
58
+ "svelte-sonner" : " https://pkg.pr.new/wobsoriano/svelte-sonner@126 " ,
59
59
"tailwind-merge" : " ^3.2.0" ,
60
60
"tailwind-variants" : " ^1.0.0" ,
61
61
"tailwindcss" : " ^4.1.4" ,
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import { ArrowUpRight } from " @lucide/svelte" ;
3
+ import { Button } from " $lib/components/ui/button" ;
4
+
5
+ type Props = {
6
+ href? : string ;
7
+ };
8
+ let { href }: Props = $props ();
9
+ </script >
10
+
11
+ <h3 class =" text-sm" >Sorry, you can't react to releases here!</h3 >
12
+ <div class =" flex items-center-safe justify-between" >
13
+ <h4 class =" text-sm text-muted-foreground" >Click here to open this release on GitHub</h4 >
14
+ <Button size ="sm" variant ="secondary" {href } target =" _blank" class =" group/button" >
15
+ <img src =" /github.svg" alt =" GitHub" class =" size-4 dark:invert" />
16
+ <ArrowUpRight
17
+ class =" size-4 transition-transform duration-300 group-hover/button:translate-x-0.5 group-hover/button:-translate-y-0.5"
18
+ />
19
+ </Button >
20
+ </div >
Original file line number Diff line number Diff line change 2
2
import { ArrowUpRight } from " @lucide/svelte" ;
3
3
import { confetti } from " @neoconfetti/svelte" ;
4
4
import semver from " semver" ;
5
+ import { toast } from " svelte-sonner" ;
5
6
import MarkdownRenderer from " $lib/components/MarkdownRenderer.svelte" ;
6
7
import type { GitHubRelease } from " $lib/server/github-cache" ;
7
8
import type { Entries } from " $lib/types" ;
10
11
import * as Accordion from " $lib/components/ui/accordion" ;
11
12
import * as Tooltip from " $lib/components/ui/tooltip" ;
12
13
import ListElementRenderer from " $lib/components/renderers/ListElementRenderer.svelte" ;
14
+ import ReactionToast from " $lib/components/ReactionToast.svelte" ;
13
15
14
16
type Props = {
15
17
index? : number ;
255
257
>}
256
258
<div class =" flex flex-wrap gap-1.5" >
257
259
{#each reactionEntries as [key, value] (key )}
258
- <Badge variant ="outline" class ="text-sm" >{reactionsEmojis [key ]} {value }</Badge >
260
+ <Badge
261
+ variant =" outline"
262
+ class =" text-sm select-none"
263
+ onclick ={() =>
264
+ toast (ReactionToast , {
265
+ duration: 5_000 ,
266
+ componentProps: { href: release .html_url }
267
+ })}
268
+ >
269
+ {reactionsEmojis [key ]}
270
+ {value }
271
+ </Badge >
259
272
{/each }
260
273
</div >
261
274
{/if }
You can’t perform that action at this time.
0 commit comments