Skip to content

Commit ffc1c4d

Browse files
committed
NXT-4484: Adjust tooltip
NXT-4484 (Adjust tooltip (and icon?) for component search items owned by another user/team)
1 parent ecda9d6 commit ffc1c4d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

org.knime.ui.js/src/components/nodeTemplates/NodeTemplate/NodeTemplateIconMode.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import type {
99
} from "@/util/dataMappers";
1010
1111
import NodeTemplateHelpIcon from "./NodeTemplateHelpIcon.vue";
12-
import { shouldShowCommunityIcon } from "./nodeTemplateCommunityIcon";
12+
import {
13+
isComponentNodeTemplate,
14+
shouldShowCommunityIcon,
15+
} from "./nodeTemplateCommunityIcon";
1316
1417
type Props = {
1518
nodeTemplate:
@@ -37,12 +40,24 @@ const extensionText = computed(() => {
3740
const showCommunityIcon = computed(() =>
3841
shouldShowCommunityIcon(props.nodeTemplate),
3942
);
43+
44+
const tileTitle = computed(() => {
45+
if (isComponentNodeTemplate(props.nodeTemplate)) {
46+
if (props.nodeTemplate.isOwnedByAnotherIdentity) {
47+
return "This component comes from outside your personal or team spaces.";
48+
} else {
49+
return props.nodeTemplate.name;
50+
}
51+
}
52+
53+
return `${props.nodeTemplate.name}${extensionText.value}`;
54+
});
4055
</script>
4156

4257
<template>
4358
<div
4459
class="node-template-icon-mode"
45-
:title="`${nodeTemplate.name}${extensionText}`"
60+
:title="tileTitle"
4661
data-test-id="node-template"
4762
>
4863
<div class="name-icon-wrapper">

0 commit comments

Comments
 (0)