Skip to content

Commit

Permalink
refactor: ♻️ disable bash shell link when container not running
Browse files Browse the repository at this point in the history
  • Loading branch information
youssefshibl committed Mar 20, 2024
1 parent 74c8bae commit 61e7ebd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
21 changes: 18 additions & 3 deletions frontend/src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</div>
</div>
<div class="col-5">
<div class="function">
<router-link v-if="!isEditMode" class="btn btn-normal" :to="terminalRouteLink" disabled="">
<div class="function" :class="{notallowed:!(!isEditMode && active)}">
<router-link v-if="!isEditMode" class="btn btn-normal" :to="terminalRouteLink" :class="{disabledlink:!(!isEditMode && active)}">
<font-awesome-icon icon="terminal" />
Bash
</router-link>
Expand Down Expand Up @@ -159,7 +159,11 @@ export default defineComponent({
status: {
type: String,
default: "N/A",
}
},
active: {
type: Boolean,
default: false,
},
},
emits: [
],
Expand Down Expand Up @@ -309,4 +313,15 @@ export default defineComponent({
justify-content: end;
}
}
.disabledlink {
pointer-events: none;
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}
.notallowed{
cursor: not-allowed;
}
</style>
1 change: 1 addition & 0 deletions frontend/src/pages/Compose.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
:is-edit-mode="isEditMode"
:first="name === Object.keys(jsonConfig.services)[0]"
:status="serviceStatusList[name]"
:active="active"
/>
</div>

Expand Down

0 comments on commit 61e7ebd

Please sign in to comment.