Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/topRail/TopRail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/>
<slot />

<LaunchpadButton @verifyLaunchpad="handleVerifyLaunchpad"/>
<LaunchpadButton @verifyLaunchpad="handleVerifyLaunchpad" :disabled="disableLaunchpad"/>
<LaunchpadModal :show="showLaunchpadModal" @closeModal="closeModal" />

</div>
Expand Down Expand Up @@ -85,6 +85,9 @@ export default {
isPackageAiInstalled() {
return window.ProcessMaker?.modeler?.isPackageAiInstalled;
},
disableLaunchpad() {
return window.ProcessMaker.modeler.process.is_template ? true : false;
},
},
watch: {
numberOfErrors(newValue) {
Expand Down
27 changes: 24 additions & 3 deletions src/components/topRail/launchpadControl/LaunchpadButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,55 @@
<button
type="button"
class="btn btn-white"
:class="buttonDisabledClass"
:title="$t('Open Launchpad')"
v-b-tooltip.hover.viewport.d50="{ customClass: 'no-pointer-events' }"
data-cy="launchpad-button"
@mouseleave="handleMouseLeave"
@mouseover="handleMouseOver"
@click.prevent="handleOpenLaunchpad"
:disabled="disabled"
>
<i :class="iconOpen" />
</button>
</template>

<script>
export default {
props: {
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
iconOpen: 'fas fa-play',
buttonDisabledClass: 'no-hover',
Comment thread
sanjacornelius marked this conversation as resolved.
Outdated
};
},
methods: {
handleOpenLaunchpad() {
this.$emit('verifyLaunchpad', window.ProcessMaker.modeler.launchpad === null);
if (!this.disabled) {
this.$emit('verifyLaunchpad', window.ProcessMaker.modeler.launchpad === null);
}
Comment thread
sanjacornelius marked this conversation as resolved.
Outdated
},
handleMouseOver() {
this.iconOpen = 'fas fa-external-link-alt';
if (!this.disabled) {
this.iconOpen = 'fas fa-external-link-alt';
}
},
handleMouseLeave() {
this.iconOpen = 'fas fa-play';
if (!this.disabled) {
this.iconOpen = 'fas fa-play';
}
},
},
};
</script>

<style scoped>
.no-hover:hover {
background-color: transparent;
}
</style>
Loading