Skip to content

Commit

Permalink
Add conditional rendering for alert info in ImportModal and ShareModal
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfganggreschus committed Dec 18, 2024
1 parent 02cbde9 commit e2182f9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/components/share/ImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

<template #content>
<div>
<div class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5">
<div
class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5"
v-if="showAlertInfo"
>
<div class="mx-2">
<v-icon color="info" :icon="mdiInformation" />
</div>
Expand Down Expand Up @@ -138,4 +141,12 @@ const showCtlToolsInfo = computed(() => {
(props.parentType === "courses" || props.parentType === "columnBoard")
);
});
const showAlertInfo = computed(() => {
return (
props.parentType === "courses" ||
props.parentType === "columnBoard" ||
props.parentType === "lessons"
);
});
</script>
13 changes: 12 additions & 1 deletion src/components/share/ShareModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
<p data-testid="share-options-info-text">
{{ t(`components.molecules.share.${type}.options.infoText`) }}
</p>
<div class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5">
<div
class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5"
v-if="showAlertInfo"
>
<div class="mx-2">
<v-icon color="info" :icon="mdiInformation" />
</div>
Expand Down Expand Up @@ -195,4 +198,12 @@ const showCtlToolsInfo = computed(() => {
(props.type === "courses" || props.type === "columnBoard")
);
});
const showAlertInfo = computed(() => {
return (
props.type === "courses" ||
props.type === "columnBoard" ||
props.type === "lessons"
);
});
</script>

0 comments on commit e2182f9

Please sign in to comment.