@@ -56,11 +56,11 @@ export const COMPRESSION_OPTIONS: Array<{
5656 { label : "Potato" , value : "Potato" , bpp : 0.04 } ,
5757] ;
5858
59- const BPP_TO_COMPRESSION : Record < number , ExportCompression > = {
60- 0.3 : "Minimal" ,
61- 0.15 : "Social" ,
62- 0.08 : "Web" ,
63- 0.04 : "Potato" ,
59+ const BPP_TO_COMPRESSION : Record < string , ExportCompression > = {
60+ " 0.3" : "Minimal" ,
61+ " 0.15" : "Social" ,
62+ " 0.08" : "Web" ,
63+ " 0.04" : "Potato" ,
6464} ;
6565
6666const COMPRESSION_TO_BPP : Record < ExportCompression , number > = {
@@ -286,10 +286,10 @@ export function ExportPage() {
286286 createEffect (
287287 on (
288288 [
289- ( ) => _settings . format ,
290- ( ) => _settings . fps ,
291- ( ) => _settings . resolution . width ,
292- ( ) => _settings . resolution . height ,
289+ ( ) => settings . format ,
290+ ( ) => settings . fps ,
291+ ( ) => settings . resolution . width ,
292+ ( ) => settings . resolution . height ,
293293 compressionBpp ,
294294 ] ,
295295 ( ) => {
@@ -918,11 +918,7 @@ export function ExportPage() {
918918 < div class = "flex gap-2" >
919919 < For
920920 each = {
921- settings . format === "Gif"
922- ? GIF_FPS_OPTIONS . filter ( ( o ) =>
923- [ 10 , 15 , 20 , 30 ] . includes ( o . value ) ,
924- )
925- : FPS_OPTIONS
921+ settings . format === "Gif" ? GIF_FPS_OPTIONS : FPS_OPTIONS
926922 }
927923 >
928924 { ( option ) => (
@@ -1301,35 +1297,39 @@ export function ExportPage() {
13011297 exportState . type === "done"
13021298 }
13031299 >
1304- < div class = "relative" >
1305- < a
1306- href = { meta ( ) . sharing ?. link }
1307- target = "_blank"
1308- rel = "noreferrer"
1309- class = "block"
1310- >
1311- < Button
1312- onClick = { ( ) => {
1313- setCopyPressed ( true ) ;
1314- setTimeout ( ( ) => {
1315- setCopyPressed ( false ) ;
1316- } , 2000 ) ;
1317- navigator . clipboard . writeText (
1318- meta ( ) . sharing ?. link ! ,
1319- ) ;
1320- } }
1321- variant = "dark"
1322- class = "flex gap-2 justify-center items-center"
1323- >
1324- { ! copyPressed ( ) ? (
1325- < IconCapCopy class = "transition-colors duration-200 text-gray-1 size-4 group-hover:text-gray-12" />
1326- ) : (
1327- < IconLucideCheck class = "transition-colors duration-200 text-gray-1 size-4 svgpathanimation group-hover:text-gray-12" />
1328- ) }
1329- < p > Open Link</ p >
1330- </ Button >
1331- </ a >
1332- </ div >
1300+ < Show when = { meta ( ) . sharing ?. link } >
1301+ { ( link ) => (
1302+ < div class = "flex gap-2" >
1303+ < Button
1304+ onClick = { ( ) => {
1305+ setCopyPressed ( true ) ;
1306+ setTimeout ( ( ) => {
1307+ setCopyPressed ( false ) ;
1308+ } , 2000 ) ;
1309+ navigator . clipboard . writeText ( link ( ) ) ;
1310+ } }
1311+ variant = "dark"
1312+ class = "flex gap-2 justify-center items-center"
1313+ >
1314+ { ! copyPressed ( ) ? (
1315+ < IconCapCopy class = "transition-colors duration-200 text-gray-1 size-4 group-hover:text-gray-12" />
1316+ ) : (
1317+ < IconLucideCheck class = "transition-colors duration-200 text-gray-1 size-4 svgpathanimation group-hover:text-gray-12" />
1318+ ) }
1319+ < p > Copy Link</ p >
1320+ </ Button >
1321+ < a href = { link ( ) } target = "_blank" rel = "noreferrer" >
1322+ < Button
1323+ variant = "dark"
1324+ class = "flex gap-2 justify-center items-center"
1325+ >
1326+ < IconCapLink class = "transition-colors duration-200 text-gray-1 size-4 group-hover:text-gray-12" />
1327+ < p > Open Link</ p >
1328+ </ Button >
1329+ </ a >
1330+ </ div >
1331+ ) }
1332+ </ Show >
13331333 </ Show >
13341334
13351335 < Show
0 commit comments