Skip to content

Commit

Permalink
Only show view content button with link
Browse files Browse the repository at this point in the history
  • Loading branch information
dotNomad committed Jan 28, 2025
1 parent 481d2a1 commit 645a089
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@
/>
</div>
</template>
<div
v-if="!isPreContentRecord(home.selectedContentRecord)"
class="last-deployment-details"
>
<div v-if="showContentButton" class="last-deployment-details">
<vscode-button
appearance="secondary"
@click="viewContent"
Expand Down Expand Up @@ -552,6 +549,16 @@ const onAssociateDeployment = () => {
});
};

const showContentButton = computed(() => {
const record = home.selectedContentRecord;
if (!record) {
return;
}
return (
record?.dashboardUrl || (!isPreContentRecord(record) && record.logsUrl)
);
});

const viewContent = () => {
const record = home.selectedContentRecord;
if (!record) {
Expand Down

0 comments on commit 645a089

Please sign in to comment.