@@ -14,7 +14,7 @@ import {facesSetUp, detectFacesInImage, embedFace, scaleFaceBox, make112Face} fr
1414import SearchResultCard from ' $lib/components/SearchResultCard.svelte' ;
1515import TaggingSlugContextMenu from ' $lib/components/TaggingSlugContextMenu.svelte' ;
1616 import { l2NormalizeReturn } from ' $lib/utils/ml-utils' ;
17-
17+ import { url } from ' @roxi/routify ' ;
1818
1919const device = getContext <DeviceGPU >(' gpuDevice' ) ?? ' wasm' ;
2020
@@ -59,14 +59,14 @@ onMount(async () => {
5959 }
6060
6161 if (! mediaFile ) {
62- window .location .href = " /tagging"
62+ window .location .href = $url ( " /tagging" )
6363 } else {
6464 seenMediaFiles .push (mediaFile );
6565 await removeMediaFileSequential (mediaFile .fileHash );
6666 }
6767 } catch (error ) {
6868 console .error (" Error during media retrieval:" , error );
69- window .location .href = " /tagging" ; // $goto('/tagging');
69+ window .location .href = $url ( " /tagging" ) ; // $goto('/tagging');
7070 }
7171
7272 await facesSetUp (); // ~0.6seconds
@@ -94,11 +94,11 @@ async function nextMediaFile() {
9494
9595 await removeMediaFileSequential (mediaFile .fileHash );
9696 } else {
97- window .location .href = " /tagging" ; // $goto('/tagging');
97+ window .location .href = $url ( " /tagging" ) ; // $goto('/tagging');
9898 }
9999 } catch (error ) {
100100 console .error (" Error in nextMediaFile:" , error );
101- window .location .href = " /tagging" // $goto('/tagging');
101+ window .location .href = $url ( " /tagging" ) // $goto('/tagging');
102102 }
103103}
104104
@@ -110,7 +110,7 @@ async function prevMediaFile() {
110110 try {
111111 if (! mediaFile ) {
112112 console .warn (" No current media file is set." );
113- window .location .href = " /tagging" ; // $goto('/tagging');
113+ window .location .href = $url ( " /tagging" ) ; // $goto('/tagging');
114114 return ;
115115 }
116116
@@ -125,7 +125,7 @@ async function prevMediaFile() {
125125 }
126126 } catch (error ) {
127127 console .error (" Error in prevMediaFile:" , error );
128- window .location .href = " /tagging" ; // $goto('/tagging');
128+ window .location .href = $url ( " /tagging" ) ; // $goto('/tagging');
129129 }
130130}
131131
@@ -149,7 +149,7 @@ async function confirmDelete() {
149149
150150 const freshCount = await getTotalMediaFileCount ();
151151 if ( freshCount <= 0 ) {
152- window .location .href = " /tagging" ;
152+ window .location .href = $url ( " /tagging" ) ;
153153 }
154154
155155 isProcessing = false ;
@@ -383,7 +383,7 @@ async function saveFile() {
383383 <!-- Top row: Back and Delete -->
384384 <Row class =" mb-1 align-items-center" >
385385 <Col xs =" 6" class =" d-flex justify-content-start" >
386- <Button color =" primary" size =" sm" href =" /" ><Icon name =" house-fill" class =" fs-6" /></Button >
386+ <Button color ="primary" size ="sm" href ={ $url ( " /" )} ><Icon name =" house-fill" class =" fs-6" /></Button >
387387
388388 <Input disabled ={isProcessing } type ="select" class ="w-auto ms-1 me-2" bind:value ={mode }>
389389 {#each [" edit" , " gallery" ] as option }
@@ -410,7 +410,7 @@ async function saveFile() {
410410 <div class =" d-none d-sm-block" >
411411 <Row class =" mb-2 align-items-center" >
412412 <Col xs =" 4" class =" d-flex justify-content-start" >
413- <Button color =" primary" size =" md" href =" /" ><Icon name =" house-fill" class =" fs-3" /></Button >
413+ <Button color ="primary" size ="md" href ={ $url ( " /" )} ><Icon name =" house-fill" class =" fs-3" /></Button >
414414
415415 <Input disabled ={isProcessing } type ="select" class ="w-auto ms-2 me-2" bind:value ={mode }>
416416 {#each [" edit" , " gallery" ] as option }
0 commit comments