mirror of https://github.com/wg-easy/wg-easy
7 changed files with 72 additions and 2 deletions
@ -0,0 +1,24 @@ |
|||||
|
<template> |
||||
|
<BaseDialog :trigger-class="triggerClass"> |
||||
|
<template #trigger><slot /></template> |
||||
|
<template #title>{{ $t('admin.interface.restart') }}</template> |
||||
|
<template #description> |
||||
|
{{ $t('admin.interface.restartWarn') }} |
||||
|
</template> |
||||
|
<template #actions> |
||||
|
<DialogClose as-child> |
||||
|
<BaseButton>{{ $t('dialog.cancel') }}</BaseButton> |
||||
|
</DialogClose> |
||||
|
<DialogClose as-child> |
||||
|
<BaseButton @click="$emit('restart')"> |
||||
|
{{ $t('admin.interface.restart') }} |
||||
|
</BaseButton> |
||||
|
</DialogClose> |
||||
|
</template> |
||||
|
</BaseDialog> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
defineEmits(['restart']); |
||||
|
defineProps<{ triggerClass?: string }>(); |
||||
|
</script> |
@ -0,0 +1,5 @@ |
|||||
|
export default definePermissionEventHandler('admin', 'any', async () => { |
||||
|
await WireGuard.Restart(); |
||||
|
|
||||
|
return { success: true }; |
||||
|
}); |
Loading…
Reference in new issue