Skip to content

Commit 645a089

Browse files
committed
Only show view content button with link
1 parent 481d2a1 commit 645a089

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

extensions/vscode/webviews/homeView/src/components/EvenEasierDeploy.vue

+11-4
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,7 @@
221221
/>
222222
</div>
223223
</template>
224-
<div
225-
v-if="!isPreContentRecord(home.selectedContentRecord)"
226-
class="last-deployment-details"
227-
>
224+
<div v-if="showContentButton" class="last-deployment-details">
228225
<vscode-button
229226
appearance="secondary"
230227
@click="viewContent"
@@ -552,6 +549,16 @@ const onAssociateDeployment = () => {
552549
});
553550
};
554551

552+
const showContentButton = computed(() => {
553+
const record = home.selectedContentRecord;
554+
if (!record) {
555+
return;
556+
}
557+
return (
558+
record?.dashboardUrl || (!isPreContentRecord(record) && record.logsUrl)
559+
);
560+
});
561+
555562
const viewContent = () => {
556563
const record = home.selectedContentRecord;
557564
if (!record) {

0 commit comments

Comments
 (0)