mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 20:57:26 +08:00
feat(gui): add service and remote mode support (#1578)
This PR fundamentally restructures the EasyTier GUI, introducing support for service mode and remote mode, transforming it from a simple desktop application into a powerful network management terminal. This change allows users to persistently run the EasyTier core as a background service or remotely manage multiple EasyTier instances, greatly improving deployment flexibility and manageability.
This commit is contained in:
@@ -12,6 +12,7 @@ const { t } = useI18n()
|
||||
const props = defineProps<{
|
||||
api: Api.RemoteClient;
|
||||
newConfigGenerator?: () => NetworkTypes.NetworkConfig;
|
||||
pauseAutoRefresh?: boolean;
|
||||
}>();
|
||||
|
||||
const instanceId = defineModel('instanceId', {
|
||||
@@ -407,6 +408,9 @@ const actionMenu: Ref<MenuItem[]> = ref([
|
||||
]);
|
||||
|
||||
let periodFunc = new Utils.PeriodicTask(async () => {
|
||||
if (props.pauseAutoRefresh) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await Promise.all([loadNetworkInstanceIds(), loadCurrentNetworkInfo()]);
|
||||
} catch (e) {
|
||||
|
||||
@@ -340,3 +340,33 @@ web:
|
||||
language: 语言
|
||||
theme: 主题
|
||||
logout: 退出登录
|
||||
|
||||
mode:
|
||||
title: 模式
|
||||
switch_mode: 切换模式
|
||||
config_dir: 配置目录
|
||||
rpc_portal: RPC端口
|
||||
log_level: 日志级别
|
||||
log_dir: 日志目录
|
||||
remote_rpc_address: 远程RPC地址
|
||||
normal: 普通模式
|
||||
service: 服务模式
|
||||
remote: 远程模式
|
||||
normal_description: 直接运行EasyTier,适合本地使用
|
||||
service_description: 作为系统服务运行,支持开机自启和后台运行。退出GUI后服务仍在后台运行。
|
||||
remote_description: 连接到远程RPC服务,管理和控制远程节点
|
||||
service_status: 服务状态
|
||||
service_status_running: 运行中
|
||||
service_status_stopped: 已停止
|
||||
service_status_notinstalled: 未安装
|
||||
uninstall_service: 卸载服务
|
||||
stop_service: 停止服务
|
||||
uninstall_service_confirm: 确定要卸载服务吗?
|
||||
uninstall_service_success: 服务卸载成功,已切换回普通模式
|
||||
stop_service_success: 服务停止成功
|
||||
remote_rpc_address_empty: 远程RPC地址不能为空
|
||||
service_config_empty: 服务配置不能为空
|
||||
|
||||
client:
|
||||
not_running: 无法连接至远程客户端
|
||||
retry: 重试
|
||||
|
||||
@@ -340,3 +340,33 @@ web:
|
||||
language: Language
|
||||
theme: Theme
|
||||
logout: Logout
|
||||
|
||||
mode:
|
||||
title: Mode
|
||||
switch_mode: Switch Mode
|
||||
config_dir: Config Dir
|
||||
rpc_portal: RPC Portal
|
||||
log_level: Log Level
|
||||
log_dir: Log Dir
|
||||
remote_rpc_address: Remote RPC Address
|
||||
normal: Normal
|
||||
service: Service
|
||||
remote: Remote
|
||||
normal_description: Run EasyTier directly, suitable for local use.
|
||||
service_description: Run as a system service, supporting auto-startup and background operation. The service continues to run in the background after exiting the GUI.
|
||||
remote_description: Connect to a remote RPC service to manage and control remote nodes.
|
||||
service_status: Service Status
|
||||
service_status_running: Running
|
||||
service_status_stopped: Stopped
|
||||
service_status_notinstalled: Not Installed
|
||||
uninstall_service: Uninstall Service
|
||||
stop_service: Stop Service
|
||||
uninstall_service_confirm: Are you sure you want to uninstall the service?
|
||||
uninstall_service_success: Service uninstalled successfully, switched back to normal mode
|
||||
stop_service_success: Service stopped successfully
|
||||
remote_rpc_address_empty: Remote RPC Address cannot be empty
|
||||
service_config_empty: Service Config cannot be empty
|
||||
|
||||
client:
|
||||
not_running: Unable to connect to remote client.
|
||||
retry: Retry
|
||||
|
||||
Reference in New Issue
Block a user