restart singbox button #328

This commit is contained in:
Alireza Ahmadi
2024-10-28 13:49:38 +01:00
parent d255905907
commit 50d1177443
8 changed files with 25 additions and 1 deletions
+14 -1
View File
@@ -5,7 +5,7 @@
:logType="logModal.logType"
@close="closeLogs"
/>
<v-container class="fill-height">
<v-container class="fill-height" :loading="loading">
<v-responsive :class="reloadItems.length>0 ? 'fill-height text-center' : 'align-center'" >
<v-row class="d-flex align-center justify-center">
<v-col cols="auto">
@@ -116,6 +116,12 @@
</v-tooltip>
<v-icon icon="mdi-list-box-outline" :color="tilesData.sbd?.running ? 'success': 'error'" />
</v-chip>
<v-chip density="compact" color="transparent" v-if="tilesData.sbd?.running && !loading" style="cursor: pointer;" @click="restartSingbox()">
<v-tooltip activator="parent" location="top">
{{ $t('actions.restartSb') }}
</v-tooltip>
<v-icon icon="mdi-restart" color="warning" />
</v-chip>
</v-col>
<v-col cols="4">{{ $t('main.info.memory') }}</v-col>
<v-col cols="8">
@@ -168,6 +174,7 @@ import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import { i18n } from '@/locales'
import LogVue from '@/layouts/modals/Logs.vue'
const loading = ref(false)
const menu = ref(false)
const menuItems = [
{ title: i18n.global.t('main.gauges'), value: [
@@ -249,4 +256,10 @@ const closeLogs = () => {
logModal.value.logType = "s-ui"
logModal.value.visible = false
}
const restartSingbox = async () => {
loading.value = true
await HttpUtils.post('api/restartSb',{})
loading.value = false
}
</script>
+1
View File
@@ -103,6 +103,7 @@ export default {
disable: "Disable",
close: "Close",
restartApp: "Restart App",
restartSb: "Restart Singbox",
},
login: {
title: "Login",
+1
View File
@@ -102,6 +102,7 @@ export default {
disable: "غیرفعال",
close: "بستن",
restartApp: "ریستارت پنل",
restartSb: "ریستارت سینگ‌باکس",
},
login: {
title: "ورود",
+1
View File
@@ -103,6 +103,7 @@ export default {
disable: "Отключить",
close: "Закрыть",
restartApp: "Перезапустить приложение",
restartSb: "Перезапустить Singbox",
},
login: {
title: "Вход",
+1
View File
@@ -103,6 +103,7 @@ export default {
disable: "Vô hiệu hóa",
close: "Đóng",
restartApp: "Khởi động lại ứng dụng",
restartSb: "Khởi động lại Singbox",
},
login: {
title: "Đăng nhập",
+1
View File
@@ -103,6 +103,7 @@ export default {
disable: "禁用",
close: "关闭",
restartApp: "重启面板",
restartSb: "重启 Singbox",
},
login: {
title: "登录",
+1
View File
@@ -104,6 +104,7 @@ export default {
disable: "禁用",
close: "關閉",
restartApp: "重啟面板",
restartSb: "重啟 Singbox",
},
login: {
title: "登錄",