From ea69862bdb5792e40466bbc0a9e47ebbb722d040 Mon Sep 17 00:00:00 2001 From: maxitio Date: Thu, 31 Oct 2019 16:53:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=88=97=E8=A1=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E7=AD=89=E7=BA=A7=E5=92=8C?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E5=90=8D=E5=AD=97=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/.malio_config.example.php | 7 +- resources/views/malio/user/node.tpl | 185 +------------------------ resources/views/malio/user/scripts.tpl | 1 - 3 files changed, 13 insertions(+), 180 deletions(-) diff --git a/config/.malio_config.example.php b/config/.malio_config.example.php index e3462285..e641d83e 100644 --- a/config/.malio_config.example.php +++ b/config/.malio_config.example.php @@ -293,13 +293,18 @@ $Malio_Config['enable_telegram'] = true; // 是否显示绑定 Telegram 账号 // 节点列表 -$Malio_Config['show_free_nodes'] = true; // 是否显示免费节点(等级为0的节点) $Malio_Config['enable_node_load'] = true; // 是否显示节点的负载 $Malio_Config['enable_online_user'] = true; // 是否显示节点的在线人数 $Malio_Config['enable_node_traffic_rate'] = true; // 是否显示节点的流量倍率 $Malio_Config['enable_node_speedlimit'] = true; // 是否显示节点的限速 $Malio_Config['flag_mode'] = 'node-name'; // 节点列表的国旗取值方式。node-name 为从节点名字前两个字取值(比如美国Vultr取值为美国)。node-info 为从节点状态取值,在节点列表里编辑节点,填写节点状态为 us 则显示美国国旗。us这个是国家ISO 3166码,不懂就谷歌。 $Malio_Config['taiwan_flag'] = 'cn'; // 台湾的旗显示方式,cn为中国国旗,tw为台湾区旗 +$Malio_Config['node_class_name'] = [ // 节点的等级对应的名字 + 0 => '免费节点', // 格式为 节点等级 => 节点等级名字 + 1 => '标准版节点', + 2 => '高级版节点', + 3 => '加强版节点', +]; // 节点设置 -> 连接设置 diff --git a/resources/views/malio/user/node.tpl b/resources/views/malio/user/node.tpl index 31d7d85f..7e3248ba 100644 --- a/resources/views/malio/user/node.tpl +++ b/resources/views/malio/user/node.tpl @@ -61,22 +61,22 @@

节点列表

- {if $malio_config['show_free_nodes'] == true} + {foreach $malio_config['node_class_name'] as $node_class => $node_group_name}
-

免费节点

+

{$node_group_name}

{foreach $nodes as $node} - {if $node['class'] == 0} + {if $node['class'] == $node_class}
{if $node['sort'] == 11} -
class >= 0} data-toggle="modal" data-target="#node-modal-{$node['id']}"{/if}> +
class>0} data-toggle="modal" data-target="#node-modal-{$node['id']}"{/if}> {else} -
class >= 0}onclick="urlChange('{$node['id']}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})"{/if}> +
class >0}onclick="urlChange('{$node['id']}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})"{/if}> {/if} - {$region = substr($node['name'],0,6)}
  • + {$region = substr($node['name'],0,6)} image
    {current(explode(" - ", $node['name']))}
    @@ -117,179 +117,8 @@ {/foreach}
- {/if} + {/foreach} -
-

{$malio_config['plan_1_name']}节点

-
- {foreach $nodes as $node} - {if $node['class'] == 1} -
- {if $node['sort'] == 11} -
class>0} data-toggle="modal" data-target="#node-modal-{$node['id']}"{/if}> - {else} -
class >0}onclick="urlChange('{$node['id']}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})"{/if}> - {/if} -
-
    -
  • - {$region = substr($node['name'],0,6)} - image -
    -
    {current(explode(" - ", $node['name']))}
    -
    {$node['info']}
    -
    -
    - {if $malio_config['enable_online_user'] == true} -
    -
    {if $node['online_user'] == -1} N/A{else} {$node['online_user']}{/if}
    -
    在线
    -
    - {/if} - {if $malio_config['enable_node_traffic_rate'] == true} -
    -
    x{$node['traffic_rate']}
    -
    倍率
    -
    - {/if} - {if $malio_config['enable_node_load'] == true} -
    -
    {if $node['latest_load'] == -1}N/A{else}{$node['latest_load']}%{/if}
    -
    负载
    -
    - {/if} - {if $malio_config['enable_node_speedlimit'] == true} -
    -
    {if {$node['bandwidth']}==0}N/A{else}{$node['bandwidth']}{/if}
    -
    限速
    -
    - {/if} -
    -
  • -
-
-
-
- {/if} - {/foreach} -
-
- -
- {if $malio_config['enable_plan_2'] == true} -

{$malio_config['plan_2_name']}节点

- {/if} -
- {foreach $nodes as $node} - {if $node['class'] == 2} -
- {if $node['sort'] == 11} -
class>0} data-toggle="modal" data-target="#node-modal-{$node['id']}"{/if}> - {else} -
class >0}onclick="urlChange('{$node['id']}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})"{/if}> - {/if} -
-
    -
  • - {$region = substr($node['name'],0,6)} - image -
    -
    {current(explode(" - ", $node['name']))}
    -
    {$node['info']}
    -
    -
    - {if $malio_config['enable_online_user'] == true} -
    -
    {if $node['online_user'] == -1} N/A{else} {$node['online_user']}{/if}
    -
    在线
    -
    - {/if} - {if $malio_config['enable_node_traffic_rate'] == true} -
    -
    x{$node['traffic_rate']}
    -
    倍率
    -
    - {/if} - {if $malio_config['enable_node_load'] == true} -
    -
    {if $node['latest_load'] == -1}N/A{else}{$node['latest_load']}%{/if}
    -
    负载
    -
    - {/if} - {if $malio_config['enable_node_speedlimit'] == true} -
    -
    {if {$node['bandwidth']}==0}N/A{else}{$node['bandwidth']}{/if}
    -
    限速
    -
    - {/if} -
    -
  • -
-
-
-
- {/if} - {/foreach} -
-
- -
- {if $malio_config['enable_plan_3'] == true} -

{$malio_config['plan_3_name']}节点

- {/if} -
- {foreach $nodes as $node} - {if $node['class'] == 3} -
- {if $node['sort'] == 11} -
class>0} data-toggle="modal" data-target="#node-modal-{$node['id']}"{/if}> - {else} -
class >0}onclick="urlChange('{$node['id']}',0,{if $relay_rule != null}{$relay_rule->id}{else}0{/if})"{/if}> - {/if} -
-
    -
  • - {$region = substr($node['name'],0,6)} - image -
    -
    {current(explode(" - ", $node['name']))}
    -
    {$node['info']}
    -
    -
    - {if $malio_config['enable_online_user'] == true} -
    -
    {if $node['online_user'] == -1} N/A{else} {$node['online_user']}{/if}
    -
    在线
    -
    - {/if} - {if $malio_config['enable_node_traffic_rate'] == true} -
    -
    x{$node['traffic_rate']}
    -
    倍率
    -
    - {/if} - {if $malio_config['enable_node_load'] == true} -
    -
    {if $node['latest_load'] == -1}N/A{else}{$node['latest_load']}%{/if}
    -
    负载
    -
    - {/if} - {if $malio_config['enable_node_speedlimit'] == true} -
    -
    {if {$node['bandwidth']}==0}N/A{else}{$node['bandwidth']}{/if}
    -
    限速
    -
    - {/if} -
    -
  • -
-
-
-
- {/if} - {/foreach} -
-
diff --git a/resources/views/malio/user/scripts.tpl b/resources/views/malio/user/scripts.tpl index 73a7e764..8f6fc37f 100644 --- a/resources/views/malio/user/scripts.tpl +++ b/resources/views/malio/user/scripts.tpl @@ -67,6 +67,5 @@ '剩余流量': '{$user->unusedTraffic()}' }; var userUUID = '{$user->uuid}'; - setupChatra(); {/if} \ No newline at end of file