Skip to content

Commit

Permalink
Update 添加Stash客户端订阅 && 删除clashr订阅
Browse files Browse the repository at this point in the history
  • Loading branch information
BobCoderS9 committed Jun 18, 2022
1 parent 6191158 commit c65f207
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 138 deletions.
4 changes: 2 additions & 2 deletions config/.metron_setting.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@
$_MT['nodes_filter'] = false; // 开启订阅节点筛选
$_MT['nodes_miniName'] = false; // 允许用户开启节点正则匹配简化节点名称, 启用该选项需熟悉使用正则表达式
$_MT['nodes_regex'] = '/\[(.*?)\]/'; // 节点筛选设置中节点名称缩短的正则表达式, 默认 [ ] 中的字符都会被移除
# 主页订阅框显示哪些订阅 可选: ssr, v2ray, surge, clash, clashr, surfboard, kitsunebi, shadowrocket, quantumult, quantumultx,
# 主页订阅框显示哪些订阅 可选: ssr, v2ray, surge, clash, surfboard, kitsunebi, shadowrocket, quantumult, quantumultx,
$_MT['index_sub'] = [
'ssr',
'v2ray',
'surge',
'clash',
'clashr',
'surfboard',
'kitsunebi',
'quantumult',
'quantumultx',
'shadowrocket',
'stash'
];
# 共享账号
$_MT['shared_account_enable'] = true; // 显示 共享账号 导航菜单
Expand Down
10 changes: 5 additions & 5 deletions resources/views/material/user/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ table tr td:first-child {
<a class="btn-dl" href="clash://install-config?url={urlencode($subInfo['clash'])}"><i class="material-icons icon-sm">send</i> 配置一键导入</a>
</p>
<hr/>
<p><span class="icon icon-lg text-white">filter_7</span> ClashR for Windows - [ SS/SSR/VMess ]:</p>
<p><span class="icon icon-lg text-white">filter_7</span> Clash for Windows - [ SS/SSR/VMess ]:</p>
<p>
应用下载:
<a class="btn-dl" href="#"><i class="material-icons icon-sm">cloud_download</i> 暂无下载</a>
Expand All @@ -565,9 +565,9 @@ table tr td:first-child {
</p>
<p>
使用方式:
<a class="btn-dl" href="{$subInfo['clashr']}"><i class="material-icons icon-sm">send</i> 配置文件下载</a>
<a class="btn-dl" href="{$subInfo['clash']}"><i class="material-icons icon-sm">send</i> 配置文件下载</a>
.
<a class="btn-dl" href="clash://install-config?url={urlencode($subInfo['clashr'])}"><i class="material-icons icon-sm">send</i> 配置一键导入</a>
<a class="btn-dl" href="clash://install-config?url={urlencode($subInfo['clash'])}"><i class="material-icons icon-sm">send</i> 配置一键导入</a>
</p>
{if array_key_exists('Windows',$config['userCenterClient'])}
{if count($config['userCenterClient']['Windows']) != 0}
Expand Down Expand Up @@ -626,9 +626,9 @@ table tr td:first-child {
</p>
<p>
使用方式:
<a class="btn-dl" href="{$subInfo['clashr']}"><i class="material-icons icon-sm">send</i> 配置文件下载</a>
<a class="btn-dl" href="{$subInfo['clash']}"><i class="material-icons icon-sm">send</i> 配置文件下载</a>
.
<a class="btn-dl" href="clash://install-config?url={urlencode($subInfo['clashr'])}"><i class="material-icons icon-sm">send</i> 配置一键导入</a>
<a class="btn-dl" href="clash://install-config?url={urlencode($subInfo['clash'])}"><i class="material-icons icon-sm">send</i> 配置一键导入</a>
</p>
<hr/>
<p><span class="icon icon-lg text-white">filter_4</span> V2RayU - [ SS/VMess ]:</p>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/metron/include/global/import_sublink.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
if (client == 'clash') {
index.oneclickImport('clash','{$subInfo["clash"]}')
};
if (client == 'clashr') {
index.oneclickImport('clashr','{$subInfo["clashr"]}')
};
if (client == 'shadowrocket') {
index.oneclickImport('shadowrocket','{$subInfo["shadowrocket"]}')
};
Expand All @@ -18,10 +15,13 @@
if (client == 'quantumult_v2') {
index.oneclickImport('quantumult_v2','{$subInfo["quantumult_v2"]}')
};
if (client == 'stash') {
location.href = "stash://install-config?url=" + encodeURIComponent('{$subInfo["stash"]}') + "&name=" + '{$config["appName"]}'
};
}
function qrcodeSublink(client) {
if (client == 'shadowrocket') {
index.qrcodeImport('shadowrocket', '{$subInfo["shadowrocket"]}');
}
}
</script>
</script>
24 changes: 12 additions & 12 deletions resources/views/metron/include/index/sub_button.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@
</div>
</div>
{/if}
{if in_array('clashr',$metron['index_sub'])}
<!-- ClashR订阅 -->
<div class="btn-group mb-3 mr-3">
<button type="button" class="btn btn-pill btn-clash dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="metron-clash text-white"></i>&nbsp;&nbsp;ClashR 订阅&nbsp;&nbsp;</button>
<div class="dropdown-menu">
<button type="button" class="dropdown-item copy-text" data-clipboard-text="{$subInfo["clashr"]}">复制 ClashR 订阅</button>
<div class="dropdown-divider">
</div>
<button type="button" class="dropdown-item" href="##" onclick="importSublink('clashr')">一键导入 ClashR</button>
</div>
</div>
{/if}
{if in_array('surge',$metron['index_sub'])}
<!-- Surge订阅 -->
<div class="btn-group mb-3 mr-3">
Expand All @@ -58,6 +46,18 @@
</div>
</div>
{/if}
{if in_array('stash',$metron['index_sub'])}
<!-- Stash -->
<div class="btn-group mb-3 mr-3">
<button type="button" class="btn btn-pill btn-surfboard dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="text-white"></i>&nbsp;&nbsp;Stash 订阅&nbsp;&nbsp;</button>
<div class="dropdown-menu">
<button type="button" class="dropdown-item copy-text" data-clipboard-text="{$subInfo["stash"]}">复制 Stash 订阅</button>
<div class="dropdown-divider"></div>
<button type="button" class="dropdown-item" href="##" onclick="importSublink('stash')">一键导入 Stash</button>
</div>
</div>
{/if}
{if in_array('quantumult',$metron['index_sub'])}
<!-- Quantumult订阅 -->
<div class="btn-group mb-3 mr-3">
Expand Down
19 changes: 4 additions & 15 deletions resources/views/metron/user/tutorial/Android/Clash.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,7 @@
</div>
</div>
{/if}
{if in_array('clashr',$metron['index_sub'])}
<div class="btn-group mb-3 mr-3">
<button type="button" class="btn btn-pill btn-clash dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;<i class="metron-clash text-white"></i>ClashR 订阅配置&nbsp;&nbsp;</button>
<div class="dropdown-menu">
<button type="button" class="dropdown-item copy-text" data-clipboard-text="{$subInfo["clashr"]}">复制 ClashR 订阅</button>
<div class="dropdown-divider">
</div>
<button type="button" class="dropdown-item" href="##" onclick="importSublink('clashr')">一键导入 ClashR</button>
</div>
</div>
{/if}
<p class="mb-2">点击上方按钮一键导入节点配置到ClashR</p>
<p class="mb-2">点击上方按钮一键导入节点配置到Clash</p>
<p class="mb-2">文件名填入 <code>{$config["appName"]}</code></p>
<p class="mb-2">然后点击右上角的 <code>√</code> 完成导入</p>
<p class="mb-2">再次打开软件,进入 <code>配置文件</code> 选中刚刚导入的节点配置</p>
Expand All @@ -101,7 +90,7 @@
</div>
<div class="alert-text">
<p class="mb-2">无法一键导入? 试试手动设置订阅</p>
<p class="mb-2">先复制 Clash/ClashR 订阅地址</p>
<p class="mb-2">先复制 Clash 订阅地址</p>
<p class="mb-2">打开APP 进入 <code>配置</code> - 选择 <code>新配置</code> - <code>URL</code> </p>
<p class="mb-2">粘贴订阅地址到 URL 一栏, 名称填写 {$config["appName"]}, 点击右上角保存</p>
<p class="mb-2">回到 <code>配置文件</code> 选中刚刚导入的节点配置</p>
Expand Down Expand Up @@ -140,7 +129,7 @@
</div>
</div>
</div>

</div>
</div>
</div>
Expand All @@ -153,4 +142,4 @@
{include file='include/global/import_sublink.tpl'}
<script src="{$metron['assets_url']}/plugins/tutorial/lightbox/lightbox.min.js" type="text/javascript"></script>
</body>
</html>
</html>
15 changes: 2 additions & 13 deletions resources/views/metron/user/tutorial/MacOS/Clash.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,6 @@
</div>
</div>
{/if}
{if in_array('clashr',$metron['index_sub'])}
<div class="btn-group mb-3 mr-3">
<button type="button" class="btn btn-pill btn-clash dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;<i class="metron-clash text-white"></i>ClashR 订阅配置&nbsp;&nbsp;</button>
<div class="dropdown-menu">
<button type="button" class="dropdown-item copy-text" data-clipboard-text="{$subInfo["clashr"]}">复制 ClashR 订阅</button>
<div class="dropdown-divider">
</div>
<button type="button" class="dropdown-item" href="##" onclick="importSublink('clashr')">一键导入 ClashR</button>
</div>
</div>
{/if}
<p class="mb-2">点击上方按钮一键导入节点配置到Clash</p>
<p class="mb-2">Config Name 填入 {$config["appName"]}</p>
<p class="mb-2">点击确定,如果弹出配置错误信息,请重启Clash 后重试。(请确保您已购买套餐)</p>
Expand Down Expand Up @@ -140,7 +129,7 @@
</div>
</div>
</div>

</div>
</div>
</div>
Expand All @@ -153,4 +142,4 @@
{include file='include/global/import_sublink.tpl'}
<script src="{$metron['assets_url']}/plugins/tutorial/lightbox/lightbox.min.js" type="text/javascript"></script>
</body>
</html>
</html>
15 changes: 2 additions & 13 deletions resources/views/metron/user/tutorial/Windows/Clash.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,6 @@
</div>
</div>
{/if}
{if in_array('clashr',$metron['index_sub'])}
<div class="btn-group mb-3 mr-3">
<button type="button" class="btn btn-pill btn-clash dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">&nbsp;&nbsp;<i class="metron-clash"></i>ClashR 订阅配置&nbsp;&nbsp;</button>
<div class="dropdown-menu">
<button type="button" class="dropdown-item copy-text" data-clipboard-text="{$subInfo["clashr"]}">复制 ClashR 订阅</button>
<div class="dropdown-divider">
</div>
<button type="button" class="dropdown-item" href="##" onclick="importSublink('clashr')">一键导入 ClashR</button>
</div>
</div>
{/if}
<!-- 结束 :: 订阅按钮 -->
<div class="h6 pt-2">点击上方按钮一键导入节点配置到Clash/ClashR</div>
<div class="h6 pt-2">导入成功后, <code>Profiles</code> 界面会多出一个配置选项卡</div>
Expand Down Expand Up @@ -182,7 +171,7 @@
</div>
</div>
<!-- 结束 :: 教程内容 -->

</div>
</div>
</div>
Expand All @@ -196,4 +185,4 @@
<script src="{$metron['assets_url']}/plugins/tutorial/lightbox/lightbox.min.js" type="text/javascript"></script>

</body>
</html>
</html>
Loading

0 comments on commit c65f207

Please sign in to comment.