forked from platypush/platypush
[Extensions UI] Added RestartButton
to the Install
tab.
It should be possible to easily restart the service after installing the dependencies for a new integration.
This commit is contained in:
parent
b724e80ee2
commit
f3c5c2fdfa
1 changed files with 7 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons install-btn" v-if="installCmd?.length">
|
<div class="buttons install-btn" v-if="installCmd?.length">
|
||||||
|
<RestartButton v-if="installDone" />
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-default"
|
class="btn btn-default"
|
||||||
:disabled="installRunning"
|
:disabled="installRunning"
|
||||||
|
@ -47,6 +48,7 @@ import 'highlight.js/styles/stackoverflow-dark.min.css'
|
||||||
import hljs from "highlight.js"
|
import hljs from "highlight.js"
|
||||||
import CopyButton from "@/components/elements/CopyButton"
|
import CopyButton from "@/components/elements/CopyButton"
|
||||||
import Loading from "@/components/Loading"
|
import Loading from "@/components/Loading"
|
||||||
|
import RestartButton from "@/components/elements/RestartButton"
|
||||||
import Utils from "@/Utils"
|
import Utils from "@/Utils"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -56,6 +58,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
CopyButton,
|
CopyButton,
|
||||||
Loading,
|
Loading,
|
||||||
|
RestartButton,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
|
@ -68,6 +71,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
installRunning: false,
|
installRunning: false,
|
||||||
|
installDone: false,
|
||||||
installOutput: null,
|
installOutput: null,
|
||||||
pendingCommands: 0,
|
pendingCommands: 0,
|
||||||
error: null,
|
error: null,
|
||||||
|
@ -129,7 +133,9 @@ export default {
|
||||||
onClose() {
|
onClose() {
|
||||||
this.installRunning = false
|
this.installRunning = false
|
||||||
this.$emit('install-end', this.extension)
|
this.$emit('install-end', this.extension)
|
||||||
|
|
||||||
if (!this.error)
|
if (!this.error)
|
||||||
|
this.installDone = true
|
||||||
this.notify({
|
this.notify({
|
||||||
title: `Extension installed`,
|
title: `Extension installed`,
|
||||||
html: `Extension <b>${this.extension.name}</b> installed successfully`,
|
html: `Extension <b>${this.extension.name}</b> installed successfully`,
|
||||||
|
@ -237,7 +243,7 @@ $header-height: 3.5em;
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-btn {
|
:deep(.install-btn) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
Loading…
Reference in a new issue