mirror of
https://github.com/louislam/dockge.git
synced 2024-11-27 13:14:03 +00:00
refactor: ♻️ disable bash shell link when container not running
This commit is contained in:
parent
74c8baef93
commit
61e7ebdadc
2 changed files with 19 additions and 3 deletions
|
@ -15,8 +15,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<div class="function">
|
<div class="function" :class="{notallowed:!(!isEditMode && active)}">
|
||||||
<router-link v-if="!isEditMode" class="btn btn-normal" :to="terminalRouteLink" disabled="">
|
<router-link v-if="!isEditMode" class="btn btn-normal" :to="terminalRouteLink" :class="{disabledlink:!(!isEditMode && active)}">
|
||||||
<font-awesome-icon icon="terminal" />
|
<font-awesome-icon icon="terminal" />
|
||||||
Bash
|
Bash
|
||||||
</router-link>
|
</router-link>
|
||||||
|
@ -159,7 +159,11 @@ export default defineComponent({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "N/A",
|
default: "N/A",
|
||||||
}
|
},
|
||||||
|
active: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: [
|
emits: [
|
||||||
],
|
],
|
||||||
|
@ -309,4 +313,15 @@ export default defineComponent({
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disabledlink {
|
||||||
|
pointer-events: none;
|
||||||
|
border: 1px solid #999999;
|
||||||
|
background-color: #cccccc;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notallowed{
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -129,6 +129,7 @@
|
||||||
:is-edit-mode="isEditMode"
|
:is-edit-mode="isEditMode"
|
||||||
:first="name === Object.keys(jsonConfig.services)[0]"
|
:first="name === Object.keys(jsonConfig.services)[0]"
|
||||||
:status="serviceStatusList[name]"
|
:status="serviceStatusList[name]"
|
||||||
|
:active="active"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue