Skip to content

Commit

Permalink
feat: 支持忽略失败的远程订阅(后端版本 > 2.14.130)
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Dec 17, 2023
1 parent 25fc986 commit 9d7aa4e
Show file tree
Hide file tree
Showing 4 changed files with 32 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.20",
"version": "2.14.21",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ export default {
label: 'Icon',
placeholder: 'The URL of the icon',
},
ignoreFailedRemoteSub: {
label: 'Ignore failed remote subscription(s)'
},
ua: {
label: 'User-Agent',
placeholder:
Expand Down
3 changes: 3 additions & 0 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ export default {
label: '图标链接',
placeholder: '填入图标链接,不要使用 jpg',
},
ignoreFailedRemoteSub: {
label: '忽略失败的远程订阅'
},
ua: {
label: 'User-Agent',
placeholder: '下载订阅使用的 UA,不填使用默认',
Expand Down
25 changes: 25 additions & 0 deletions src/views/SubEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
</div>
</nut-form-item>
</template>

<template v-else-if="editType === 'collections'">
<nut-form-item
:label="$t(`editorPage.subConfig.basic.subscriptions.label`)"
Expand Down Expand Up @@ -181,6 +182,16 @@
</nut-checkboxgroup>
</nut-form-item>
</template>

<nut-form-item
:label="$t(`editorPage.subConfig.basic.ignoreFailedRemoteSub.label`)"
prop="ignoreFailedRemoteSub"
class="ignore-failed-wrapper"
>
<div class="swtich-wrapper">
<nut-switch v-model="form.ignoreFailedRemoteSub"/>
</div>
</nut-form-item>
</nut-form>
</div>

Expand Down Expand Up @@ -292,6 +303,7 @@
name: '',
displayName: '',
mergeSources: '',
ignoreFailedRemoteSub: false,
icon: '',
process: [
{
Expand Down Expand Up @@ -327,6 +339,7 @@
const sourceData: any = toRaw(sub.value) || toRaw(collection.value);
const newProcess = JSON.parse(JSON.stringify(sourceData.process));
form.mergeSources = sourceData.mergeSources;
form.ignoreFailedRemoteSub = sourceData.ignoreFailedRemoteSub;
form.name = sourceData.name;
form.displayName = sourceData.displayName || sourceData['display-name'];
form.icon = sourceData.icon;
Expand Down Expand Up @@ -608,6 +621,18 @@
}
}
.ignore-failed-wrapper {
flex-direction: row;
justify-content: space-between;
:deep(.nut-form-item__label) {
width: auto;
}
.swtich-wrapper {
display: flex;
justify-content: end;
}
}
.include-subs-wrapper {
flex-direction: column;
Expand Down

0 comments on commit 9d7aa4e

Please sign in to comment.