Ask for app restart confirmation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<MainLayout>
|
||||
<template #dialogs>
|
||||
<InputDialog ref="inputDialog" />
|
||||
</template>
|
||||
<template #header>
|
||||
<TopBar class="navbar">
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { Button, TopBar, MainLayout } from 'pankow';
|
||||
import { Button, InputDialog, TopBar, MainLayout } from 'pankow';
|
||||
|
||||
import LogsModel from '../models/LogsModel.js';
|
||||
import AppModel from '../models/AppModel.js';
|
||||
@@ -37,6 +38,7 @@ export default {
|
||||
name: 'LogsViewer',
|
||||
components: {
|
||||
Button,
|
||||
InputDialog,
|
||||
MainLayout,
|
||||
TopBar
|
||||
},
|
||||
@@ -66,6 +68,15 @@ export default {
|
||||
async onRestartApp() {
|
||||
if (this.type !== 'app') return;
|
||||
|
||||
const confirmed = await this.$refs.inputDialog.confirm({
|
||||
message: this.$t('filemanager.toolbar.restartApp') + '?',
|
||||
confirmStyle: 'danger',
|
||||
confirmLabel: this.$t('main.dialog.yes'),
|
||||
rejectLabel: this.$t('main.dialog.no')
|
||||
});
|
||||
|
||||
if (!confirmed) return;
|
||||
|
||||
this.busyRestart = true;
|
||||
|
||||
await this.appModel.restart();
|
||||
|
||||
Reference in New Issue
Block a user