Add setting key in the title

This commit is contained in:
Adria Navarro 2025-02-03 13:13:53 +01:00
parent 795ab6f316
commit 9c24aba250
1 changed files with 10 additions and 4 deletions

View File

@ -8,6 +8,14 @@
let button: any let button: any
let popover: any let popover: any
function getErrorTitle(error: any) {
const titleParts = [$screenComponents[error.componentId]._instanceName]
if (error.errorType === "setting") {
titleParts.push(error.key)
}
return titleParts.join(" - ")
}
</script> </script>
<div bind:this={button} class="error-button"> <div bind:this={button} class="error-button">
@ -33,11 +41,9 @@
<div> <div>
<Link <Link
overBackground overBackground
on:click={() => { on:click={() => componentStore.select(error.componentId)}
componentStore.select(error.componentId)
}}
> >
{$screenComponents[error.componentId]._instanceName}:</Link {getErrorTitle(error)}:</Link
> >
<!-- eslint-disable-next-line svelte/no-at-html-tags--> <!-- eslint-disable-next-line svelte/no-at-html-tags-->
{@html error.message} {@html error.message}