chore: add service mode locale

This commit is contained in:
dongchengjie
2024-05-02 22:16:05 +08:00
parent 7a3cc7d242
commit c2c419522a
4 changed files with 36 additions and 6 deletions

View File

@@ -86,12 +86,15 @@ export const ServiceViewer = forwardRef<DialogRef, Props>((props, ref) => {
disableFooter
onClose={() => setOpen(false)}
>
<Typography>Current State: {state}</Typography>
<Typography>
{t("Current State")}: {t(state)}
</Typography>
{(state === "unknown" || state === "uninstall") && (
<Typography>
Information: Please make sure that the Clash Verge Service is
installed and enabled
{t(
"Information: Please make sure that the Clash Verge Service is installed and enabled"
)}
</Typography>
)}
@@ -102,19 +105,19 @@ export const ServiceViewer = forwardRef<DialogRef, Props>((props, ref) => {
>
{state === "uninstall" && enable && (
<Button variant="contained" onClick={onDisable}>
Disable Service Mode
{t("Disable Service Mode")}
</Button>
)}
{state === "uninstall" && (
<Button variant="contained" onClick={onInstall}>
Install
{t("Install")}
</Button>
)}
{(state === "active" || state === "installed") && (
<Button variant="outlined" onClick={onUninstall}>
Uninstall
{t("Uninstall")}
</Button>
)}
</Stack>