mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
refactor: extract service installation logic to custom hook and optimize related component handling
This commit is contained in:
@@ -11,7 +11,9 @@ import {
|
|||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { EnhancedCard } from "./enhanced-card";
|
import { EnhancedCard } from "./enhanced-card";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { getSystemInfo, installService, restartApp } from "@/services/cmds";
|
import {
|
||||||
|
getSystemInfo,
|
||||||
|
} from "@/services/cmds";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { version as appVersion } from "@root/package.json";
|
import { version as appVersion } from "@root/package.json";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
@@ -19,12 +21,14 @@ import { check as checkUpdate } from "@tauri-apps/plugin-updater";
|
|||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
import { useSystemState } from "@/hooks/use-system-state";
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
|
|
||||||
export const SystemInfoCard = () => {
|
export const SystemInfoCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { verge, patchVerge } = useVerge();
|
const { verge, patchVerge } = useVerge();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { isAdminMode, isSidecarMode, mutateRunningMode } = useSystemState();
|
const { isAdminMode, isSidecarMode, mutateRunningMode } = useSystemState();
|
||||||
|
const { installServiceAndRestartCore } = useServiceInstaller();
|
||||||
|
|
||||||
// 系统信息状态
|
// 系统信息状态
|
||||||
const [systemState, setSystemState] = useState({
|
const [systemState, setSystemState] = useState({
|
||||||
@@ -34,15 +38,13 @@ const [systemState, setSystemState] = useState({
|
|||||||
|
|
||||||
// 初始化系统信息
|
// 初始化系统信息
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 获取系统信息
|
|
||||||
getSystemInfo()
|
getSystemInfo()
|
||||||
.then((info) => {
|
.then((info) => {
|
||||||
const lines = info.split("\n");
|
const lines = info.split("\n");
|
||||||
if (lines.length > 0) {
|
if (lines.length > 0) {
|
||||||
const sysName = lines[0].split(": ")[1] || "";
|
const sysName = lines[0].split(": ")[1] || "";
|
||||||
let sysVersion = lines[1].split(": ")[1] || "";
|
let sysVersion = lines[1].split(": ")[1] || "";
|
||||||
|
|
||||||
// 处理sysVersion前缀与sysName相同的情况
|
|
||||||
if (sysName && sysVersion.toLowerCase().startsWith(sysName.toLowerCase())) {
|
if (sysName && sysVersion.toLowerCase().startsWith(sysName.toLowerCase())) {
|
||||||
sysVersion = sysVersion.substring(sysName.length).trim();
|
sysVersion = sysVersion.substring(sysName.length).trim();
|
||||||
}
|
}
|
||||||
@@ -120,26 +122,13 @@ useEffect(() => {
|
|||||||
}
|
}
|
||||||
}, [verge, patchVerge]);
|
}, [verge, patchVerge]);
|
||||||
|
|
||||||
// 安装系统服务
|
|
||||||
const onInstallService = useLockFn(async () => {
|
|
||||||
try {
|
|
||||||
showNotice('info', t("Installing Service..."), 1000);
|
|
||||||
await installService();
|
|
||||||
showNotice('success', t("Service Installed Successfully"), 2000);
|
|
||||||
|
|
||||||
await mutateRunningMode();
|
|
||||||
|
|
||||||
} catch (err: any) {
|
|
||||||
showNotice('error', err.message || err.toString(), 3000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 点击运行模式处理,Sidecar或纯管理员模式允许安装服务
|
// 点击运行模式处理,Sidecar或纯管理员模式允许安装服务
|
||||||
const handleRunningModeClick = useCallback(() => {
|
const handleRunningModeClick = useCallback(() => {
|
||||||
if (isSidecarMode || (isAdminMode && isSidecarMode)) {
|
if (isSidecarMode || (isAdminMode && isSidecarMode)) {
|
||||||
onInstallService();
|
installServiceAndRestartCore();
|
||||||
}
|
}
|
||||||
}, [isSidecarMode, isAdminMode, onInstallService]);
|
}, [isSidecarMode, isAdminMode, installServiceAndRestartCore]);
|
||||||
|
|
||||||
// 检查更新
|
// 检查更新
|
||||||
const onCheckUpdate = useLockFn(async () => {
|
const onCheckUpdate = useLockFn(async () => {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
const onRestart = useLockFn(async () => {
|
const onRestart = useLockFn(async () => {
|
||||||
try {
|
try {
|
||||||
await restartCore();
|
await restartCore();
|
||||||
showNotice('success', t(`Clash Core Restarted`), 1000);
|
showNotice('success', t(`Clash Core Restarted`));
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
showNotice('error', err.message || err.toString());
|
showNotice('error', err.message || err.toString());
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
setUpgrading(true);
|
setUpgrading(true);
|
||||||
await upgradeCore();
|
await upgradeCore();
|
||||||
setUpgrading(false);
|
setUpgrading(false);
|
||||||
showNotice('success', t(`Core Version Updated`), 1000);
|
showNotice('success', t(`Core Version Updated`));
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setUpgrading(false);
|
setUpgrading(false);
|
||||||
showNotice('error', err.response?.data?.message || err.toString());
|
showNotice('error', err.response?.data?.message || err.toString());
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { BaseDialog, DialogRef } from "@/components/base";
|
import { BaseDialog, DialogRef } from "@/components/base";
|
||||||
import { getNetworkInterfacesInfo } from "@/services/cmds";
|
import { getNetworkInterfacesInfo } from "@/services/cmds";
|
||||||
import { alpha, Box, Button, Chip, IconButton } from "@mui/material";
|
import { alpha, Box, Button, IconButton } from "@mui/material";
|
||||||
import { ContentCopyRounded } from "@mui/icons-material";
|
import { ContentCopyRounded } from "@mui/icons-material";
|
||||||
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import { Button, Tooltip } from "@mui/material";
|
|||||||
import { useSystemState } from "@/hooks/use-system-state";
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
import { closeAllConnections } from "@/services/api";
|
import { closeAllConnections } from "@/services/api";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError?: (err: Error) => void;
|
onError?: (err: Error) => void;
|
||||||
@@ -39,35 +40,21 @@ const SettingSystem = ({ onError }: Props) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { verge, mutateVerge, patchVerge } = useVerge();
|
const { verge, mutateVerge, patchVerge } = useVerge();
|
||||||
|
const { installServiceAndRestartCore } = useServiceInstaller();
|
||||||
|
|
||||||
const { data: sysproxy } = useSWR("getSystemProxy", getSystemProxy);
|
const { data: sysproxy } = useSWR("getSystemProxy", getSystemProxy);
|
||||||
const { data: autoproxy } = useSWR("getAutotemProxy", getAutotemProxy);
|
const { data: autoproxy } = useSWR("getAutotemProxy", getAutotemProxy);
|
||||||
|
|
||||||
|
const { data: serviceOk, mutate: mutateServiceAvailable } = useSWR(
|
||||||
|
"isServiceAvailable",
|
||||||
|
isServiceAvailable
|
||||||
|
);
|
||||||
|
|
||||||
const { isAdminMode, isSidecarMode, mutateRunningMode } = useSystemState();
|
const { isAdminMode, isSidecarMode, mutateRunningMode } = useSystemState();
|
||||||
|
|
||||||
// 添加本地服务状态
|
|
||||||
const [localServiceOk, setLocalServiceOk] = useState(false);
|
|
||||||
|
|
||||||
// 更新本地服务状态
|
|
||||||
const updateLocalStatus = async () => {
|
|
||||||
try {
|
|
||||||
const serviceStatus = await isServiceAvailable();
|
|
||||||
setLocalServiceOk(serviceStatus);
|
|
||||||
mutate("isServiceAvailable", serviceStatus, false);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("更新TUN状态失败:", error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 组件挂载时更新状态
|
|
||||||
useEffect(() => {
|
|
||||||
updateLocalStatus();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// 判断Tun模式是否可用 - 当处于服务模式或管理员模式时可用
|
// +++ isTunAvailable 现在使用 SWR 的 serviceOk
|
||||||
const isTunAvailable = localServiceOk || isAdminMode;
|
const isTunAvailable = serviceOk || isAdminMode;
|
||||||
|
|
||||||
console.log("is tun isTunAvailable:", isTunAvailable);
|
|
||||||
|
|
||||||
const sysproxyRef = useRef<DialogRef>(null);
|
const sysproxyRef = useRef<DialogRef>(null);
|
||||||
const tunRef = useRef<DialogRef>(null);
|
const tunRef = useRef<DialogRef>(null);
|
||||||
@@ -107,22 +94,22 @@ const SettingSystem = ({ onError }: Props) => {
|
|||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
showNotice("info", t(beforeMsg));
|
showNotice("info", beforeMsg);
|
||||||
await stopCore();
|
await stopCore();
|
||||||
showNotice("info", t(actionMsg));
|
showNotice("info", actionMsg);
|
||||||
await action();
|
await action();
|
||||||
showNotice("success", t(successMsg));
|
showNotice("success", successMsg);
|
||||||
showNotice("info", t("Restarting Core..."));
|
showNotice("info", t("Restarting Core..."));
|
||||||
await restartCore();
|
await restartCore();
|
||||||
await mutateRunningMode();
|
await mutateRunningMode();
|
||||||
await updateLocalStatus();
|
await mutateServiceAvailable();
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
showNotice("error", err.message || err.toString());
|
showNotice("error", err.message || err.toString());
|
||||||
try {
|
try {
|
||||||
showNotice("info", t("Try running core as Sidecar..."));
|
showNotice("info", t("Try running core as Sidecar..."));
|
||||||
await restartCore();
|
await restartCore();
|
||||||
await mutateRunningMode();
|
await mutateRunningMode();
|
||||||
await updateLocalStatus();
|
await mutateServiceAvailable();
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
showNotice("error", e?.message || e?.toString());
|
showNotice("error", e?.message || e?.toString());
|
||||||
}
|
}
|
||||||
@@ -130,15 +117,6 @@ const SettingSystem = ({ onError }: Props) => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 安装系统服务
|
|
||||||
const onInstallService = () =>
|
|
||||||
handleServiceOperation({
|
|
||||||
beforeMsg: t("Stopping Core..."),
|
|
||||||
action: installService,
|
|
||||||
actionMsg: t("Installing Service..."),
|
|
||||||
successMsg: t("Service Installed Successfully"),
|
|
||||||
});
|
|
||||||
|
|
||||||
// 卸载系统服务
|
// 卸载系统服务
|
||||||
const onUninstallService = () =>
|
const onUninstallService = () =>
|
||||||
handleServiceOperation({
|
handleServiceOperation({
|
||||||
@@ -167,21 +145,20 @@ const SettingSystem = ({ onError }: Props) => {
|
|||||||
<WarningRounded sx={{ color: "warning.main", mr: 1 }} />
|
<WarningRounded sx={{ color: "warning.main", mr: 1 }} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{!localServiceOk && !isAdminMode && (
|
{!serviceOk && !isAdminMode && (
|
||||||
<Tooltip title={t("Install Service")}>
|
<Tooltip title={t("Install Service")}>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="small"
|
size="small"
|
||||||
onClick={onInstallService}
|
onClick={installServiceAndRestartCore}
|
||||||
sx={{ mr: 1, minWidth: "32px", p: "4px" }}
|
sx={{ mr: 1, minWidth: "32px", p: "4px" }}
|
||||||
>
|
>
|
||||||
<BuildRounded fontSize="small" />
|
<BuildRounded fontSize="small" />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{
|
{serviceOk && (
|
||||||
localServiceOk && (
|
|
||||||
<Tooltip title={t("Uninstall Service")}>
|
<Tooltip title={t("Uninstall Service")}>
|
||||||
<Button
|
<Button
|
||||||
// variant="outlined"
|
// variant="outlined"
|
||||||
@@ -215,7 +192,7 @@ const SettingSystem = ({ onError }: Props) => {
|
|||||||
return patchVerge({ enable_tun_mode: e });
|
return patchVerge({ enable_tun_mode: e });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Switch edge="end" disabled={!isTunAvailable} />
|
<Switch edge="end" disabled={!isTunAvailable} />
|
||||||
</GuardState>
|
</GuardState>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import {
|
|||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { closeAllConnections } from "@/services/api";
|
import { closeAllConnections } from "@/services/api";
|
||||||
import { showNotice } from "@/services/noticeService";
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { useServiceInstaller } from "@/hooks/useServiceInstaller";
|
||||||
|
|
||||||
interface ProxySwitchProps {
|
interface ProxySwitchProps {
|
||||||
label?: string;
|
label?: string;
|
||||||
@@ -45,6 +46,7 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { verge, mutateVerge, patchVerge } = useVerge();
|
const { verge, mutateVerge, patchVerge } = useVerge();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { installServiceAndRestartCore } = useServiceInstaller();
|
||||||
|
|
||||||
const { data: sysproxy } = useSWR("getSystemProxy", getSystemProxy);
|
const { data: sysproxy } = useSWR("getSystemProxy", getSystemProxy);
|
||||||
const { data: autoproxy } = useSWR("getAutotemProxy", getAutotemProxy);
|
const { data: autoproxy } = useSWR("getAutotemProxy", getAutotemProxy);
|
||||||
@@ -78,50 +80,7 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 安装系统服务
|
// 安装系统服务
|
||||||
const onInstallService = useLockFn(async () => {
|
const onInstallService = installServiceAndRestartCore;
|
||||||
try {
|
|
||||||
showNotice('info', t("Installing Service..."));
|
|
||||||
await installService();
|
|
||||||
showNotice('success', t("Service Installed Successfully"));
|
|
||||||
|
|
||||||
showNotice('info', t("Waiting for service to be ready..."));
|
|
||||||
|
|
||||||
let serviceReady = false;
|
|
||||||
for (let i = 0; i < 5; i++) {
|
|
||||||
try {
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
||||||
const isAvailable = await isServiceAvailable();
|
|
||||||
|
|
||||||
if (isAvailable) {
|
|
||||||
serviceReady = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
showNotice('info', t("Service not ready, retrying..."));
|
|
||||||
} catch (error) {
|
|
||||||
console.error("检查服务状态失败:", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showNotice('info', t("Restarting Core..."));
|
|
||||||
await restartCore();
|
|
||||||
|
|
||||||
// 重新获取运行模式
|
|
||||||
await mutateRunningMode();
|
|
||||||
|
|
||||||
// 更新服务状态
|
|
||||||
const serviceStatus = await isServiceAvailable();
|
|
||||||
mutate("isServiceAvailable", serviceStatus, false);
|
|
||||||
|
|
||||||
if (serviceReady) {
|
|
||||||
showNotice('success', t("Service is ready and core restarted"));
|
|
||||||
} else {
|
|
||||||
showNotice('info', t("Service may not be fully ready"));
|
|
||||||
}
|
|
||||||
} catch (err: any) {
|
|
||||||
showNotice('error', err.message || err.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
@@ -248,12 +207,6 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
|
|||||||
>
|
>
|
||||||
{t("Tun Mode")}
|
{t("Tun Mode")}
|
||||||
</Typography>
|
</Typography>
|
||||||
{/* <Typography variant="caption" color="text.secondary">
|
|
||||||
{isSidecarMode
|
|
||||||
? t("TUN requires Service Mode or Admin Mode")
|
|
||||||
: t("For special applications")
|
|
||||||
}
|
|
||||||
</Typography> */}
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
80
src/hooks/useServiceInstaller.ts
Normal file
80
src/hooks/useServiceInstaller.ts
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useLockFn } from "ahooks";
|
||||||
|
import { showNotice } from "@/services/noticeService";
|
||||||
|
import { installService, isServiceAvailable, restartCore } from "@/services/cmds";
|
||||||
|
import { useSystemState } from "@/hooks/use-system-state";
|
||||||
|
import { mutate } from "swr";
|
||||||
|
|
||||||
|
export function useServiceInstaller() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const { mutateRunningMode } = useSystemState();
|
||||||
|
|
||||||
|
const installServiceAndRestartCore = useLockFn(async () => {
|
||||||
|
try {
|
||||||
|
showNotice('info', t("Installing Service..."));
|
||||||
|
await installService();
|
||||||
|
showNotice('success', t("Service Installed Successfully"));
|
||||||
|
|
||||||
|
showNotice('info', t("Waiting for service to be ready..."));
|
||||||
|
let serviceReady = false;
|
||||||
|
for (let i = 0; i < 5; i++) {
|
||||||
|
try {
|
||||||
|
// 等待1秒再检查
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
|
const isAvailable = await isServiceAvailable();
|
||||||
|
if (isAvailable) {
|
||||||
|
serviceReady = true;
|
||||||
|
mutate("isServiceAvailable", true, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// 最后一次尝试不显示重试信息
|
||||||
|
if (i < 4) {
|
||||||
|
showNotice('info', t("Service not ready, retrying attempt {count}/{total}...", { count: i + 1, total: 5 }));
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(t("Error checking service status:"), error);
|
||||||
|
if (i < 4) {
|
||||||
|
showNotice('error', t("Failed to check service status, retrying attempt {count}/{total}...", { count: i + 1, total: 5 }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!serviceReady) {
|
||||||
|
showNotice('info', t("Service did not become ready after attempts. Proceeding with core restart."));
|
||||||
|
}
|
||||||
|
|
||||||
|
showNotice('info', t("Restarting Core..."));
|
||||||
|
await restartCore();
|
||||||
|
|
||||||
|
// 核心重启后,再次确认并更新相关状态
|
||||||
|
await mutateRunningMode();
|
||||||
|
const finalServiceStatus = await isServiceAvailable();
|
||||||
|
mutate("isServiceAvailable", finalServiceStatus, false);
|
||||||
|
|
||||||
|
if (serviceReady && finalServiceStatus) {
|
||||||
|
showNotice('success', t("Service is ready and core restarted"));
|
||||||
|
} else if (finalServiceStatus) {
|
||||||
|
showNotice('success', t("Core restarted. Service is now available."));
|
||||||
|
} else if (serviceReady) {
|
||||||
|
showNotice('info', t("Service was ready, but core restart might have issues or service became unavailable. Please check."));
|
||||||
|
} else {
|
||||||
|
showNotice('error', t("Service installation or core restart encountered issues. Service might not be available. Please check system logs."));
|
||||||
|
}
|
||||||
|
return finalServiceStatus;
|
||||||
|
} catch (err: any) {
|
||||||
|
showNotice('error', err.message || err.toString());
|
||||||
|
// 尝试性回退或最终操作
|
||||||
|
try {
|
||||||
|
showNotice('info', t("Attempting to restart core as a fallback..."));
|
||||||
|
await restartCore();
|
||||||
|
await mutateRunningMode();
|
||||||
|
await isServiceAvailable().then(status => mutate("isServiceAvailable", status, false));
|
||||||
|
} catch (recoveryError: any) {
|
||||||
|
showNotice('error', t("Fallback core restart also failed: {message}", { message: recoveryError.message }));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return { installServiceAndRestartCore };
|
||||||
|
}
|
||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "جاري تثبيت الخدمة...",
|
"Installing Service...": "جاري تثبيت الخدمة...",
|
||||||
"Service Installed Successfully": "تم تثبيت الخدمة بنجاح",
|
"Service Installed Successfully": "تم تثبيت الخدمة بنجاح",
|
||||||
"Service is ready and core restarted": "الخدمة جاهزة، وتم إعادة تشغيل اللبن",
|
"Service is ready and core restarted": "الخدمة جاهزة، وتم إعادة تشغيل اللبن",
|
||||||
"Service may not be fully ready": "ربما لا تكون الخدمة جاهزة بالكامل",
|
"Core restarted. Service is now available.": "تم إعادة تشغيل اللبن، وتم تشغيل الخدمة",
|
||||||
"Uninstalling Service...": "جاري إزالة تثبيت الخدمة...",
|
"Uninstalling Service...": "جاري إزالة تثبيت الخدمة...",
|
||||||
"Waiting for service to be ready...": "في انتظار جاهزية الخدمة...",
|
"Waiting for service to be ready...": "في انتظار جاهزية الخدمة...",
|
||||||
"Service not ready, retrying...": "الخدمة غير جاهزة، جاري إعادة المحاولة...",
|
"Service not ready, retrying...": "الخدمة غير جاهزة، جاري إعادة المحاولة...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Service wird installiert...",
|
"Installing Service...": "Service wird installiert...",
|
||||||
"Service Installed Successfully": "Service erfolgreich installiert",
|
"Service Installed Successfully": "Service erfolgreich installiert",
|
||||||
"Service is ready and core restarted": "Service ist bereit und Kern wurde neu gestartet",
|
"Service is ready and core restarted": "Service ist bereit und Kern wurde neu gestartet",
|
||||||
"Service may not be fully ready": "Service möglicherweise noch nicht vollständig bereit",
|
"Core restarted. Service is now available.": "Kern wurde neu gestartet. Service ist jetzt verfügbar.",
|
||||||
"Uninstalling Service...": "Service wird deinstalliert...",
|
"Uninstalling Service...": "Service wird deinstalliert...",
|
||||||
"Waiting for service to be ready...": "Auf Service-Bereitschaft gewartet...",
|
"Waiting for service to be ready...": "Auf Service-Bereitschaft gewartet...",
|
||||||
"Service not ready, retrying...": "Service nicht bereit, wird erneut versucht...",
|
"Service not ready, retrying...": "Service nicht bereit, wird erneut versucht...",
|
||||||
|
|||||||
@@ -394,7 +394,9 @@
|
|||||||
"Installing Service...": "Installing Service...",
|
"Installing Service...": "Installing Service...",
|
||||||
"Service Installed Successfully": "Service Installed Successfully",
|
"Service Installed Successfully": "Service Installed Successfully",
|
||||||
"Service is ready and core restarted": "Service is ready and core restarted",
|
"Service is ready and core restarted": "Service is ready and core restarted",
|
||||||
"Service may not be fully ready": "Service may not be fully ready",
|
"Core restarted. Service is now available.": "Core restarted. Service is now available.",
|
||||||
|
"Service was ready, but core restart might have issues or service became unavailable. Please check.": "Service was ready, but core restart might have issues or service became unavailable. Please check.",
|
||||||
|
"Service installation or core restart encountered issues. Service might not be available. Please check system logs.": "Service installation or core restart encountered issues. Service might not be available. Please check system logs.",
|
||||||
"Waiting for service to be ready...": "Waiting for service to be ready...",
|
"Waiting for service to be ready...": "Waiting for service to be ready...",
|
||||||
"Service not ready, retrying...": "Service not ready, retrying...",
|
"Service not ready, retrying...": "Service not ready, retrying...",
|
||||||
"Uninstalling Service...": "Uninstalling Service...",
|
"Uninstalling Service...": "Uninstalling Service...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Instalando servicio...",
|
"Installing Service...": "Instalando servicio...",
|
||||||
"Service Installed Successfully": "Servicio instalado con éxito",
|
"Service Installed Successfully": "Servicio instalado con éxito",
|
||||||
"Service is ready and core restarted": "El servicio está listo y el núcleo se ha reiniciado",
|
"Service is ready and core restarted": "El servicio está listo y el núcleo se ha reiniciado",
|
||||||
"Service may not be fully ready": "El servicio puede no estar completamente listo",
|
"Core restarted. Service is now available.": "El núcleo se ha reiniciado. El servicio está disponible.",
|
||||||
"Uninstalling Service...": "Desinstalando servicio...",
|
"Uninstalling Service...": "Desinstalando servicio...",
|
||||||
"Waiting for service to be ready...": "Esperando a que el servicio esté listo...",
|
"Waiting for service to be ready...": "Esperando a que el servicio esté listo...",
|
||||||
"Service not ready, retrying...": "El servicio no está listo. Volviendo a intentar...",
|
"Service not ready, retrying...": "El servicio no está listo. Volviendo a intentar...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "در حال نصب سرویس...",
|
"Installing Service...": "در حال نصب سرویس...",
|
||||||
"Service Installed Successfully": "سرویس با موفقیت نصب شد",
|
"Service Installed Successfully": "سرویس با موفقیت نصب شد",
|
||||||
"Service is ready and core restarted": "سرویس آماده است و هسته بازآغاز شد",
|
"Service is ready and core restarted": "سرویس آماده است و هسته بازآغاز شد",
|
||||||
"Service may not be fully ready": "سرویس ممکن است کاملاً آماده نباشد",
|
"Core restarted. Service is now available.": "هسته بازآغاز شد و سرویس آماده است",
|
||||||
"Uninstalling Service...": "در حال حذف نصب سرویس...",
|
"Uninstalling Service...": "در حال حذف نصب سرویس...",
|
||||||
"Waiting for service to be ready...": "در انتظار آماده شدن سرویس...",
|
"Waiting for service to be ready...": "در انتظار آماده شدن سرویس...",
|
||||||
"Service not ready, retrying...": "سرویس آماده نیست، تلاش مجدد...",
|
"Service not ready, retrying...": "سرویس آماده نیست، تلاش مجدد...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Memasang layanan...",
|
"Installing Service...": "Memasang layanan...",
|
||||||
"Service Installed Successfully": "Berhasil memasang layanan",
|
"Service Installed Successfully": "Berhasil memasang layanan",
|
||||||
"Service is ready and core restarted": "Layanan telah siap, inti telah di-restart",
|
"Service is ready and core restarted": "Layanan telah siap, inti telah di-restart",
|
||||||
"Service may not be fully ready": "Layanan mungkin belum sepenuhnya siap",
|
"Core restarted. Service is now available.": "Inti telah di-restart, layanan sekarang tersedia",
|
||||||
"Uninstalling Service...": "Menghapus layanan...",
|
"Uninstalling Service...": "Menghapus layanan...",
|
||||||
"Waiting for service to be ready...": "Menunggu layanan siap...",
|
"Waiting for service to be ready...": "Menunggu layanan siap...",
|
||||||
"Service not ready, retrying...": "Layanan belum siap, mencoba lagi...",
|
"Service not ready, retrying...": "Layanan belum siap, mencoba lagi...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "サービスをインストール中...",
|
"Installing Service...": "サービスをインストール中...",
|
||||||
"Service Installed Successfully": "サービスのインストールに成功しました。",
|
"Service Installed Successfully": "サービスのインストールに成功しました。",
|
||||||
"Service is ready and core restarted": "サービスが準備完了し、コアが再起動されました。",
|
"Service is ready and core restarted": "サービスが準備完了し、コアが再起動されました。",
|
||||||
"Service may not be fully ready": "サービスが完全に準備できていない可能性があります。",
|
"Core restarted. Service is now available.": "コアが再起動され、サービスが利用可能になりました。",
|
||||||
"Uninstalling Service...": "サービスをアンインストール中...",
|
"Uninstalling Service...": "サービスをアンインストール中...",
|
||||||
"Waiting for service to be ready...": "サービスの準備を待っています...",
|
"Waiting for service to be ready...": "サービスの準備を待っています...",
|
||||||
"Service not ready, retrying...": "サービスが準備できていないので、再試行中...",
|
"Service not ready, retrying...": "サービスが準備できていないので、再試行中...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "서비스 설치 중...",
|
"Installing Service...": "서비스 설치 중...",
|
||||||
"Service Installed Successfully": "서비스가 성공적으로 설치되었습니다.",
|
"Service Installed Successfully": "서비스가 성공적으로 설치되었습니다.",
|
||||||
"Service is ready and core restarted": "서비스가 준비되었으며, 코어가 재시작되었습니다.",
|
"Service is ready and core restarted": "서비스가 준비되었으며, 코어가 재시작되었습니다.",
|
||||||
"Service may not be fully ready": "서비스가 완전히 준비되지 않았을 수 있습니다.",
|
"Core restarted. Service is now available.": "코어가 재시작되었습니다. 서비스가 이제 사용 가능합니다.",
|
||||||
"Uninstalling Service...": "서비스 제거 중...",
|
"Uninstalling Service...": "서비스 제거 중...",
|
||||||
"Waiting for service to be ready...": "서비스가 준비되기를 기다리는 중...",
|
"Waiting for service to be ready...": "서비스가 준비되기를 기다리는 중...",
|
||||||
"Service not ready, retrying...": "서비스가 준비되지 않았습니다. 다시 시도 중...",
|
"Service not ready, retrying...": "서비스가 준비되지 않았습니다. 다시 시도 중...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Установка службы...",
|
"Installing Service...": "Установка службы...",
|
||||||
"Service Installed Successfully": "Служба успешно установлена",
|
"Service Installed Successfully": "Служба успешно установлена",
|
||||||
"Service is ready and core restarted": "Служба готова, ядро перезапущено",
|
"Service is ready and core restarted": "Служба готова, ядро перезапущено",
|
||||||
"Service may not be fully ready": "Служба может быть не полностью готова",
|
"Core restarted. Service is now available.": "Ядро перезапущено. Служба теперь доступна.",
|
||||||
"Uninstalling Service...": "Удаление службы...",
|
"Uninstalling Service...": "Удаление службы...",
|
||||||
"Waiting for service to be ready...": "Ожидание готовности службы...",
|
"Waiting for service to be ready...": "Ожидание готовности службы...",
|
||||||
"Service not ready, retrying...": "Служба не готова, повторная попытка...",
|
"Service not ready, retrying...": "Служба не готова, повторная попытка...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Hizmet yükleniyor...",
|
"Installing Service...": "Hizmet yükleniyor...",
|
||||||
"Service Installed Successfully": "Hizmet başarıyla yüklendi",
|
"Service Installed Successfully": "Hizmet başarıyla yüklendi",
|
||||||
"Service is ready and core restarted": "Hizmet hazır, çekirdek yeniden başlatıldı",
|
"Service is ready and core restarted": "Hizmet hazır, çekirdek yeniden başlatıldı",
|
||||||
"Service may not be fully ready": "Hizmet tam olarak hazır olmayabilir",
|
"Core restarted. Service is now available.": "Çekirdek yeniden başlatıldı, hizmet artık kullanılabilir",
|
||||||
"Uninstalling Service...": "Hizmet kaldırılıyor...",
|
"Uninstalling Service...": "Hizmet kaldırılıyor...",
|
||||||
"Waiting for service to be ready...": "Hizmetin hazır olmasını bekliyor...",
|
"Waiting for service to be ready...": "Hizmetin hazır olmasını bekliyor...",
|
||||||
"Service not ready, retrying...": "Hizmet hazır değil, tekrar deneniyor...",
|
"Service not ready, retrying...": "Hizmet hazır değil, tekrar deneniyor...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "Сервис орнатылыр...",
|
"Installing Service...": "Сервис орнатылыр...",
|
||||||
"Service Installed Successfully": "Сервис орнатылган",
|
"Service Installed Successfully": "Сервис орнатылган",
|
||||||
"Service is ready and core restarted": "Сервис дайын, ядрә қайта иштеген",
|
"Service is ready and core restarted": "Сервис дайын, ядрә қайта иштеген",
|
||||||
"Service may not be fully ready": "Сервис толык дайын булмаган",
|
"Core restarted. Service is now available.": "Ядрә қайта иштеренде, сервис дайын",
|
||||||
"Uninstalling Service...": "Сервис өчүрүлә...",
|
"Uninstalling Service...": "Сервис өчүрүлә...",
|
||||||
"Waiting for service to be ready...": "Сервис дайын болуына күтүлә...",
|
"Waiting for service to be ready...": "Сервис дайын болуына күтүлә...",
|
||||||
"Service not ready, retrying...": "Сервис дайын булмаган, кайта аракет күрәргә...",
|
"Service not ready, retrying...": "Сервис дайын булмаган, кайта аракет күрәргә...",
|
||||||
|
|||||||
@@ -394,7 +394,9 @@
|
|||||||
"Installing Service...": "安装服务中...",
|
"Installing Service...": "安装服务中...",
|
||||||
"Service Installed Successfully": "已成功安装服务",
|
"Service Installed Successfully": "已成功安装服务",
|
||||||
"Service is ready and core restarted": "服务已就绪,内核已重启",
|
"Service is ready and core restarted": "服务已就绪,内核已重启",
|
||||||
"Service may not be fully ready": "服务可能未完全就绪",
|
"Core restarted. Service is now available.": "内核已重启,服务已就绪",
|
||||||
|
"Service was ready, but core restart might have issues or service became unavailable. Please check.": "服务已就绪,但内核重启可能存在问题或服务已不可用。请检查。",
|
||||||
|
"Service installation or core restart encountered issues. Service might not be available. Please check system logs.": "服务安装或内核重启遇到问题。服务可能不可用。请检查系统日志。",
|
||||||
"Uninstalling Service...": "服务卸载中...",
|
"Uninstalling Service...": "服务卸载中...",
|
||||||
"Waiting for service to be ready...": "等待服务就绪...",
|
"Waiting for service to be ready...": "等待服务就绪...",
|
||||||
"Service not ready, retrying...": "服务未就绪,重试中...",
|
"Service not ready, retrying...": "服务未就绪,重试中...",
|
||||||
|
|||||||
@@ -394,7 +394,7 @@
|
|||||||
"Installing Service...": "安裝服務中...",
|
"Installing Service...": "安裝服務中...",
|
||||||
"Service Installed Successfully": "已成功安裝服務",
|
"Service Installed Successfully": "已成功安裝服務",
|
||||||
"Service is ready and core restarted": "服務已就緒,內核已重啟",
|
"Service is ready and core restarted": "服務已就緒,內核已重啟",
|
||||||
"Service may not be fully ready": "服務可能未完全就緒",
|
"Core restarted. Service is now available.": "內核已重啟,服務已就緒",
|
||||||
"Uninstalling Service...": "服務卸載中...",
|
"Uninstalling Service...": "服務卸載中...",
|
||||||
"Waiting for service to be ready...": "等待服務就緒...",
|
"Waiting for service to be ready...": "等待服務就緒...",
|
||||||
"Service not ready, retrying...": "服務未就緒,重試中...",
|
"Service not ready, retrying...": "服務未就緒,重試中...",
|
||||||
|
|||||||
Reference in New Issue
Block a user