File tree Expand file tree Collapse file tree 3 files changed +35
-15
lines changed Expand file tree Collapse file tree 3 files changed +35
-15
lines changed Original file line number Diff line number Diff line change 35
35
</script >
36
36
37
37
<button
38
- class ="btn rounded-lg border border-gray-200 px-2 py-2 text-sm shadow-sm transition-all hover:border-gray-300 active:shadow-inner dark:border-gray-600 dark:hover:border-gray-400 {classNames }
39
- {! isSuccess && ' text-gray-200 dark:text-gray-200' }
40
- {isSuccess && ' text-green-500' }
41
- "
38
+ class ="btn rounded-lg border border-gray-200 px-2 py-2 text-sm shadow-sm transition-all hover:border-gray-300 active:shadow-inner dark:border-gray-700 dark:hover:border-gray-500 {classNames }"
42
39
title ={" Copy to clipboard" }
43
40
type =" button"
44
41
on:click
45
42
on:click ={handleClick }
46
43
>
47
- <span class =" relative" >
48
- <IconCopy />
44
+ <div class =" relative" >
45
+ <slot >
46
+ <IconCopy />
47
+ </slot >
48
+
49
49
<Tooltip classNames ={isSuccess ? " opacity-100" : " opacity-0" } />
50
- </span >
50
+ </div >
51
51
</button >
Original file line number Diff line number Diff line change 31
31
if (browser ) window ;
32
32
goto (previousPage );
33
33
}}
34
- class =" z-10 grid h-[95dvh] w-[90dvw] grid-cols-1 content-start gap-x-10 gap-y-6 overflow-hidden rounded-2xl bg-white p-4 shadow-2xl outline-none sm:h-[80dvh] md:grid-cols-3 md:grid-rows-[auto,1fr] md:p-8 xl:w-[1100px ]"
34
+ class =" xl: z-10 grid h-[95dvh] w-[90dvw] grid-cols-1 content-start gap-x-10 gap-y-6 overflow-hidden rounded-2xl bg-white p-4 shadow-2xl outline-none sm:h-[80dvh] md:grid-cols-3 md:grid-rows-[auto,1fr] md:p-8 xl:w-[1200px] 2xl:h-[70dvh ]"
35
35
>
36
36
<div class =" col-span-1 flex items-center justify-between md:col-span-3" >
37
37
<h2 class =" text-xl font-bold" >Settings</h2 >
46
46
</button >
47
47
</div >
48
48
<div
49
- class =" col-span-1 flex flex-col overflow-y-auto whitespace-nowrap max-md:-mx-4 max-md:h-[160px ] max-md:border md:pr-6"
49
+ class =" col-span-1 flex flex-col overflow-y-auto whitespace-nowrap max-md:-mx-4 max-md:h-[245px ] max-md:border md:pr-6"
50
50
>
51
51
{#each data .models .filter ((el ) => ! el .unlisted ) as model }
52
52
<a
82
82
</div >
83
83
84
84
{#if $settings .recentlySaved }
85
- <div class =" absolute bottom-0 right-0 m-2 inline p-2 text-gray-400" >
86
- <CarbonCheckmark class =" inline text-lg" />
85
+ <div
86
+ class =" absolute bottom-4 right-4 m-2 flex items-center gap-1.5 rounded-full border border-gray-300 bg-gray-200 px-3 py-1 text-black"
87
+ >
88
+ <CarbonCheckmark />
87
89
Saved
88
90
</div >
89
91
{/if }
Original file line number Diff line number Diff line change 2
2
import { page } from " $app/stores" ;
3
3
import type { BackendModel } from " $lib/server/models" ;
4
4
import { useSettingsStore } from " $lib/stores/settings" ;
5
+ import CopyToClipBoardBtn from " $lib/components/CopyToClipBoardBtn.svelte" ;
5
6
import CarbonArrowUpRight from " ~icons/carbon/arrow-up-right" ;
7
+ import CarbonLink from " ~icons/carbon/link" ;
6
8
7
9
const settings = useSettingsStore ();
8
10
24
26
</script >
25
27
26
28
<div class =" flex flex-col items-start" >
27
- <h2 class =" mb-2.5 text-xl font-semibold" >
28
- {$page .params .model }
29
- </h2 >
29
+ <div class =" mb-5 flex flex-col gap-1.5" >
30
+ <h2 class =" text-lg font-semibold md:text-xl" >
31
+ {$page .params .model }
32
+ </h2 >
30
33
31
- <div class =" flex items-center gap-4" >
34
+ {#if model .description }
35
+ <p class =" text-gray-600" >
36
+ {model .description }
37
+ </p >
38
+ {/if }
39
+ </div >
40
+
41
+ <div class =" flex flex-wrap items-center gap-2 md:gap-4" >
32
42
<a
33
43
href ={model .modelUrl || " https://huggingface.co/" + model .name }
34
44
target =" _blank"
62
72
Model website
63
73
</a >
64
74
{/if }
75
+ <CopyToClipBoardBtn
76
+ value =" {$page .url .origin }/?model= {model .id }"
77
+ classNames =" !border-none !shadow-none !py-0 !px-1 !rounded-md"
78
+ >
79
+ <div class =" flex items-center gap-1.5" >
80
+ <CarbonLink />Copy direct link to model
81
+ </div >
82
+ </CopyToClipBoardBtn >
65
83
</div >
66
84
67
85
<button
You can’t perform that action at this time.
0 commit comments