Skip to content

Commit

Permalink
feat: 文件支持设置 查询流量信息订阅链接. 服务器版中使用此链接可在响应中传递订阅流量信息
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoyueLee committed Jun 28, 2024
1 parent 2217ff4 commit 870edc3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
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.248",
"version": "2.14.249",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
8 changes: 8 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ export default {
label: 'Display Name',
placeholder: 'The display name',
},
subInfoUrl: {
label: 'Sub Info URL',
placeholder: 'The URL for fetching subscription usage info',
},
subInfoUserAgent: {
label: 'Sub Info User-Agent',
placeholder: 'User-Agent for fetching subscription usage info',
},
tag: {
label: 'Tag(s)',
placeholder: 'The tag(s) (separated by comma) will be used for grouping.',
Expand Down
8 changes: 8 additions & 0 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ export default {
label: '显示名称',
placeholder: '输入展示的名称',
},
subInfoUrl: {
label: '查询流量信息订阅链接',
placeholder: '用于传递流量信息',
},
subInfoUserAgent: {
label: '查询流量信息 User-Agent',
placeholder: '不设置则使用默认 User-Agent',
},
tag: {
label: '标签',
placeholder: '标签(用 , 分隔) 将用于分组',
Expand Down
31 changes: 31 additions & 0 deletions src/views/FileEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,35 @@
/>
</nut-form-item>

<nut-form-item
:label="$t(`editorPage.subConfig.basic.subInfoUrl.label`)"
prop="subInfoUrl"
>
<input
class="nut-input-text"
data-1p-ignore
v-model.trim="form.subInfoUrl"
:placeholder="
$t(`editorPage.subConfig.basic.subInfoUrl.placeholder`)
"
type="text"
/>
</nut-form-item>
<nut-form-item
:label="$t(`editorPage.subConfig.basic.subInfoUserAgent.label`)"
prop="subInfoUserAgent"
>
<input
class="nut-input-text"
data-1p-ignore
v-model.trim="form.subInfoUserAgent"
:placeholder="
$t(`editorPage.subConfig.basic.subInfoUserAgent.placeholder`)
"
type="text"
/>
</nut-form-item>

<nut-form-item
:label="$t(`editorPage.subConfig.basic.source.mergeSources`)"
prop="mergeSources"
Expand Down Expand Up @@ -311,6 +340,8 @@ watchEffect(() => {
form.icon = sourceData.icon;
form.source = sourceData.source || "local";
form.url = sourceData.url;
form.flowUrl = sourceData.flowUrl;
form.flowUserAgent = sourceData.flowUserAgent;
form.ua = sourceData.ua;
form.mergeSources = sourceData.mergeSources;
form.content = sourceData.content;
Expand Down

0 comments on commit 870edc3

Please sign in to comment.