Skip to content

Commit

Permalink
feat: 组合订阅支持手动设置流量信息. 支持使用链接. 此时使用响应内容
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Dec 23, 2024
1 parent 2596660 commit 49dd5da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.313",
"version": "2.14.314",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
21 changes: 19 additions & 2 deletions src/views/SubEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,24 @@
</nut-checkbox>
</nut-checkboxgroup>
</nut-form-item>
<nut-form-item
<nut-form-item
:label="$t(`editorPage.subConfig.basic.subUserinfo.label`)"
prop="subUserinfo"
>
<nut-input
:border="false"
class="nut-input-text"
v-model.trim="form.subUserinfo"
:placeholder="
$t(`editorPage.subConfig.basic.subUserinfo.placeholder`)
"
type="text"
input-align="right"
left-icon="tips"
@click-left-icon="subUserinfoTips"
/>
</nut-form-item>
<nut-form-item
:label="$t(`editorPage.subConfig.basic.proxy.label`)"
prop="proxy"
>
Expand Down Expand Up @@ -991,7 +1008,7 @@ const urlValidator = (val: string): Promise<boolean> => {
const subUserinfoTips = () => {
Dialog({
title: '手动设置订阅流量信息',
content: '若填写链接, 则使用链接的响应内容作为值.\n\n此项值的格式为:\n\nupload=1024; download=10240; total=102400; expire=4115721600; reset_day=14; plan_name=VIP1; app_url=http://a.com\n\n1. app_url, 订阅将有一个可点击跳转的按钮\n\n2. plan_name, hover 时将显示套餐名称\n\n3. reset_day, 流量重置剩余天数(若要设置周期性重置, 可查看订阅链接中的参数说明)\n\n⚠️ 注意: 手动设置的订阅流量信息会附加到订阅自己的流量信息之前. 若包含不合法的内容, 订阅将无法正常使用\n\n例如: http://官网.com 应编码为 http%3A%2F%2F%E5%AE%98%E7%BD%91.com',
content: '若填写链接, 则使用链接的响应内容作为值.\n\n此项值的格式为:\n\nupload=1024; download=10240; total=102400; expire=4115721600; reset_day=14; plan_name=VIP1; app_url=http://a.com\n\n1. app_url, 订阅将有一个可点击跳转的按钮\n\n2. plan_name, hover 时将显示套餐名称\n\n3. reset_day, 流量重置剩余天数(若要设置周期性重置, 可查看订阅链接中的参数说明)\n\n⚠️ 注意: 手动设置的订阅流量信息会附加到订阅自己的流量信息之前. 若包含不合法的内容, 订阅将无法正常使用\n\n例如: http://官网.com 应编码为 http%3A%2F%2F%E5%AE%98%E7%BD%91.com\n\n若订阅本身有流量信息, 将进行合并',
popClass: 'auto-dialog',
okText: 'OK',
noCancelBtn: true,
Expand Down

0 comments on commit 49dd5da

Please sign in to comment.