File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
DUUIWeb/src/lib/svelte/components Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 409409 component .target = registryEntry .registry_url
410410 ? ` ${registryEntry .registry_url }${registryEntry .name }:${entryMetadata .tag } `
411411 : " " ;
412+
413+ if (component .target .startsWith (' https://' )) {
414+ component .target = component .target .replace (/ ^ https? :\/\/ / , ' ' );
415+ }
412416
413417 component .description = entryMetadata .description
414418 }
Original file line number Diff line number Diff line change 1515 import { onMount , createEventDispatcher } from ' svelte' ;
1616 import type {DUUIComponentMetaData , DUUIRegistryEntry } from " $lib/duui/component" ;
1717 import Tip from " $lib/svelte/components/Tip.svelte" ;
18- import {infoToast } from " $lib/duui/utils/ui" ;
18+ import {errorToast , infoToast } from " $lib/duui/utils/ui" ;
1919 import Popup from " $lib/svelte/components/Popup.svelte" ;
2020 import Link from " $lib/svelte/components/Link.svelte" ;
2121 import Chip from " $lib/svelte/components/Chip.svelte" ; // wherever you put the types
153153
154154 if (response .ok ) {
155155 entries = await response .json ()
156+ } else {
157+ toastStore .trigger (errorToast (` ERROR ${response .status }: ${response .statusText } \n Failed to fetch registry entries. Registry is not reachable. ` ))
158+ entries = [];
156159 }
157160 }
158161
352355 <Tip tipTheme =" error" >
353356 You have no registries available. Access can be granted by an administrator.
354357 </Tip >
355- <!-- {:else if !selectedRegistryEndpoint }-->
356- <!-- <Tip tipTheme="tertiary">-- >
357- <!-- Please select a registry endpoint to view entries.-->
358- <!-- </Tip>-- >
358+ {:else if ! entries . length }
359+ <Tip tipTheme =" tertiary" >
360+ No entries found in the selected registry.
361+ </Tip >
359362 {:else }
360363 <div class =" overflow-visible" >
361364
You can’t perform that action at this time.
0 commit comments