Skip to content

Commit

Permalink
功能增强&增加翻译文本
Browse files Browse the repository at this point in the history
  • Loading branch information
powerAn2020 committed Sep 19, 2024
1 parent bb45ca1 commit d073e50
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ const execServiceCmd = (operation) => {
disablePull.value = true
setTimeout(() => {
execXrayHelperCmd("service " + operation.value).then(value => {
if(operation.value=="start"||operation.value=="restart"){
execXrayHelperCmd("proxy refresh").then(value2 => {
stdout.value=value+'\n'+value2;
})
}else if (operation.value=="stop"){
execXrayHelperCmd("proxy disable").then(value2 => {
stdout.value=value+'\n'+value2;
})
}
stdout.value = value
})
}, 300)
Expand Down
9 changes: 9 additions & 0 deletions src/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,15 @@ const getConfig = async () => {
const saveConfig = () => {
saveFile(YAML.stringify(config.value, {indent: 4}), XRAYHELPER_CONFIG)
setTimeout(() => {
callApi("get status").then(value => {
if (value.pid.length > 0) {
execXrayHelperCmd("proxy refresh").then(value2 => {
showToast(i18n.global.t('setting.refresh-proxy'))
})
}
})
}, 50)
}
const onRefresh = () => {
setTimeout(() => {
Expand Down
11 changes: 10 additions & 1 deletion src/locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ export const manage = {
'not-support': 'Not supporting the current core type.',
'no-more': 'No more.',
'route-manage': 'Routing',
'more-setting': 'Settings',
'load-balancing': 'Balancer',
'speedtest': 'Speedtest',
'switch': 'Switch',
'remarks': 'Remarks',
'search': 'Querying',
'placeholder-text': 'Please enter an Remarks.',
'speedtest-fail': 'The speed measurement failed and an exception occurred.',
'speedtest-reject': 'Wait patiently until the speed measurement of other nodes is completed before continuing.',
'speedtest-all-warn': 'All nodes will be speed tested soon to prevent the airport from being blocked! Use with caution (ps: not recommended. Too many nodes will freeze the page, and starting multi-process speed testing will consume power). Confirm to continue?',
}
export const setting = {
'xrayhelper': 'Config - XrayHelper',
Expand Down Expand Up @@ -90,5 +97,7 @@ export const setting = {
'cannot-get-config': 'Cannot get XrayHelper config',
'running-warn': 'Currently the core is running, it is highly recommended to stop it and disable proxy before edit',
'switch-core': 'Detected core switching. Whether to synchronously switch to the default configuration?',
'core-not-found':'Detected that the current core does not exist. Do you want to start downloading now?'
'core-not-found':'Detected that the current core does not exist. Do you want to start downloading now?',
'refresh-proxy':'The configuration file has been reloaded.'

}
10 changes: 9 additions & 1 deletion src/locales/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,16 @@ export const manage = {
'not-support': '暂不支持当前核心',
'no-more': '没有更多了',
'route-manage': '路由规则',
'more-setting': '更多设置',
'load-balancing': '负载均衡',
'speedtest': '测速',
'switch': '切换',
'remarks': '别名',
'search': '查询中',
'placeholder-text': '请输入别名',
'speedtest-fail': '测速失败,发生异常。',
'speedtest-reject': '耐心等待其他节点测速结束后再继续。',
'speedtest-all-warn': '即将测速所有节点,以防机场封号!谨慎使用(ps:不推荐,节点多页面会卡死,而且启动多进程测速会耗电),确认继续?',
}
export const setting = {
'xrayhelper': '配置项 - XrayHelper',
Expand Down Expand Up @@ -90,5 +97,6 @@ export const setting = {
'cannot-get-config': '无法获取 XrayHelper 配置文件',
'running-warn': '当前核心正在运行,强烈建议停止核心并停用代理后再修改此页配置',
'switch-core': '检测到核心切换,是否同步切换为默认配置?',
'core-not-found':'检测到当前核心不存在,是否现在开始下载?'
'core-not-found':'检测到当前核心不存在,是否现在开始下载?',
'refresh-proxy':'配置文件已经重新载入。'
}

0 comments on commit d073e50

Please sign in to comment.