11<script lang =" ts" >
22import { Container , Row , Col , Button , Input , Icon , Image , Modal , ModalBody , ModalHeader , ModalFooter , Accordion , AccordionItem , Figure , Tooltip , Toast } from ' @sveltestrap/sveltestrap' ;
3- import { params } from ' @roxi/routify' ;
3+ import { goto , params } from ' @roxi/routify' ;
44
55import MediaView from ' $lib/MediaView.svelte' ;
66import { getContext , onMount } from ' svelte' ;
@@ -344,6 +344,11 @@ async function saveFile() {
344344 saveToastOpen = true ;
345345}
346346
347+ const go = $goto ; // top-level access is allowed
348+
349+ function home() {
350+ go (' /' ); // navigate when the button is clicked
351+ }
347352 </script >
348353
349354<TaggingSlugContextMenu {saveFile }/>
@@ -383,7 +388,7 @@ async function saveFile() {
383388 <!-- Top row: Back and Delete -->
384389 <Row class =" mb-1 align-items-center" >
385390 <Col xs =" 6" class =" d-flex justify-content-start" >
386- <Button color ="primary" size ="sm" href ={ $url ( " / " ) }><Icon name =" house-fill" class =" fs-6" /></Button >
391+ <Button color ="primary" size ="sm" on:click ={ home }><Icon name =" house-fill" class =" fs-6" /></Button >
387392
388393 <Input disabled ={isProcessing } type ="select" class ="w-auto ms-1 me-2" bind:value ={mode }>
389394 {#each [" edit" , " gallery" ] as option }
@@ -410,7 +415,7 @@ async function saveFile() {
410415 <div class =" d-none d-sm-block" >
411416 <Row class =" mb-2 align-items-center" >
412417 <Col xs =" 4" class =" d-flex justify-content-start" >
413- <Button color ="primary" size ="md" href ={ $url ( " / " ) }><Icon name =" house-fill" class =" fs-3" /></Button >
418+ <Button color ="primary" size ="md" on:click ={ home }><Icon name =" house-fill" class =" fs-3" /></Button >
414419
415420 <Input disabled ={isProcessing } type ="select" class ="w-auto ms-2 me-2" bind:value ={mode }>
416421 {#each [" edit" , " gallery" ] as option }
0 commit comments