mirror of
https://github.com/v2board/v2board.git
synced 2025-03-13 14:14:42 +08:00
用户仪表盘显示设备在线数
This commit is contained in:
parent
24209b8ac1
commit
0c9aab2236
@ -153,6 +153,19 @@ class UserController extends Controller
|
|||||||
abort(500, __('Subscription plan does not exist'));
|
abort(500, __('Subscription plan does not exist'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//统计在线设备
|
||||||
|
$countalive = 0;
|
||||||
|
$ips_array = Cache::get('ALIVE_IP_USER_'. $request->user['id']);
|
||||||
|
if ($ips_array) {
|
||||||
|
foreach ($ips_array as $nodetypeid => $ip_array) {
|
||||||
|
foreach ($ip_array['aliveips'] as $ip) {
|
||||||
|
$countalive++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$user['alive_ip'] = $countalive;
|
||||||
|
|
||||||
$user['subscribe_url'] = Helper::getSubscribeUrl("/api/v1/client/subscribe?token={$user['token']}");
|
$user['subscribe_url'] = Helper::getSubscribeUrl("/api/v1/client/subscribe?token={$user['token']}");
|
||||||
$userService = new UserService();
|
$userService = new UserService();
|
||||||
$user['reset_day'] = $userService->getResetDay($user);
|
$user['reset_day'] = $userService->getResetDay($user);
|
||||||
|
1
public/theme/v2board/assets/i18n/en-US.js
vendored
1
public/theme/v2board/assets/i18n/en-US.js
vendored
@ -144,6 +144,7 @@ window.settings.i18n['en-US'] = {
|
|||||||
'该订阅长期有效': 'The subscription is valid for an unlimited time',
|
'该订阅长期有效': 'The subscription is valid for an unlimited time',
|
||||||
'已过期': 'Expired',
|
'已过期': 'Expired',
|
||||||
'已用 {used} / 总计 {total}': '{used} Used / Total {total}',
|
'已用 {used} / 总计 {total}': '{used} Used / Total {total}',
|
||||||
|
'在线设备 {alive_ip}/{device_limit}': 'Online {alive_ip}/{device_limit} Device',
|
||||||
'重置订阅信息': 'Reset Subscription',
|
'重置订阅信息': 'Reset Subscription',
|
||||||
'没有可用节点,如果您未订阅或已过期请': 'No access points are available. If you have not subscribed or the subscription has expired, please',
|
'没有可用节点,如果您未订阅或已过期请': 'No access points are available. If you have not subscribed or the subscription has expired, please',
|
||||||
'订阅': 'Subscription',
|
'订阅': 'Subscription',
|
||||||
|
1
public/theme/v2board/assets/i18n/ja-JP.js
vendored
1
public/theme/v2board/assets/i18n/ja-JP.js
vendored
@ -38,6 +38,7 @@ window.settings.i18n['ja-JP'] = {
|
|||||||
'该订阅长期有效': '時間制限なし',
|
'该订阅长期有效': '時間制限なし',
|
||||||
'已过期': '期限切れ',
|
'已过期': '期限切れ',
|
||||||
'已用 {used} / 总计 {total}': '使用済み {used} / 合計 {total}',
|
'已用 {used} / 总计 {total}': '使用済み {used} / 合計 {total}',
|
||||||
|
'在线设备 {alive_ip}/{device_limit}': 'オンラインデバイス {alive_ip}/{device_limit}',
|
||||||
'查看订阅': 'プランを表示',
|
'查看订阅': 'プランを表示',
|
||||||
'邮箱': 'E-mail アドレス',
|
'邮箱': 'E-mail アドレス',
|
||||||
'邮箱验证码': '確認コード',
|
'邮箱验证码': '確認コード',
|
||||||
|
1
public/theme/v2board/assets/i18n/zh-CN.js
vendored
1
public/theme/v2board/assets/i18n/zh-CN.js
vendored
@ -144,6 +144,7 @@ window.settings.i18n['zh-CN'] = {
|
|||||||
'该订阅长期有效': '该订阅长期有效',
|
'该订阅长期有效': '该订阅长期有效',
|
||||||
'已过期': '已过期',
|
'已过期': '已过期',
|
||||||
'已用 {used} / 总计 {total}': '已用 {used} / 总计 {total}',
|
'已用 {used} / 总计 {total}': '已用 {used} / 总计 {total}',
|
||||||
|
'在线设备 {alive_ip}/{device_limit}' : '在线设备 {alive_ip}/{device_limit}',
|
||||||
'重置订阅信息': '重置订阅信息',
|
'重置订阅信息': '重置订阅信息',
|
||||||
'没有可用节点,如果您未订阅或已过期请': '没有可用节点,如果您未订阅或已过期请',
|
'没有可用节点,如果您未订阅或已过期请': '没有可用节点,如果您未订阅或已过期请',
|
||||||
'订阅': '订阅',
|
'订阅': '订阅',
|
||||||
|
1
public/theme/v2board/assets/i18n/zh-TW.js
vendored
1
public/theme/v2board/assets/i18n/zh-TW.js
vendored
@ -38,6 +38,7 @@ window.settings.i18n['zh-TW'] = {
|
|||||||
'该订阅长期有效': '該訂閱長期有效',
|
'该订阅长期有效': '該訂閱長期有效',
|
||||||
'已过期': '已過期',
|
'已过期': '已過期',
|
||||||
'已用 {used} / 总计 {total}': '已用 {used} / 總計 {total}',
|
'已用 {used} / 总计 {total}': '已用 {used} / 總計 {total}',
|
||||||
|
'在线设备 {alive_ip}/{device_limit}': '在線設備 {alive_ip}/{device_limit}',
|
||||||
'查看订阅': '查看訂閱',
|
'查看订阅': '查看訂閱',
|
||||||
'邮箱': '郵箱',
|
'邮箱': '郵箱',
|
||||||
'邮箱验证码': '郵箱驗證碼',
|
'邮箱验证码': '郵箱驗證碼',
|
||||||
|
9
public/theme/v2board/assets/umi.js
vendored
9
public/theme/v2board/assets/umi.js
vendored
@ -30872,6 +30872,15 @@
|
|||||||
}, {
|
}, {
|
||||||
used: Object(p["b"])(d.u + d.d),
|
used: Object(p["b"])(d.u + d.d),
|
||||||
total: Object(p["b"])(d.transfer_enable)
|
total: Object(p["b"])(d.transfer_enable)
|
||||||
|
})),l.a.createElement("span",{
|
||||||
|
className: "font-w700"
|
||||||
|
}," "), l.a.createElement("span", {
|
||||||
|
className: "font-w700"
|
||||||
|
}, Object(b["formatMessage"])({
|
||||||
|
id: "\u5728\u7ebf\u8bbe\u5907 {alive_ip}/{device_limit}"
|
||||||
|
}, {
|
||||||
|
alive_ip: d.alive_ip,
|
||||||
|
device_limit: d.device_limit == null ? "-" : d.device_limit
|
||||||
})))), y >= 80 && !Object(p["h"])(d.expired_at) && (null === d || void 0 === d ? void 0 : null === (e = d.plan) || void 0 === e ? void 0 : e.reset_price) && l.a.createElement("div", {
|
})))), y >= 80 && !Object(p["h"])(d.expired_at) && (null === d || void 0 === d ? void 0 : null === (e = d.plan) || void 0 === e ? void 0 : e.reset_price) && l.a.createElement("div", {
|
||||||
className: "mb-4"
|
className: "mb-4"
|
||||||
}, l.a.createElement(i["a"], {
|
}, l.a.createElement(i["a"], {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user