mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Sub-Store 1.0版本
1. 移除了所有基于关键词的节点操作,统一使用基于正则表达式的节点操作。 2. UI的大量改进。
This commit is contained in:
@@ -1,110 +0,0 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card class="mb-4">
|
||||
<v-card-title>订阅配置</v-card-title>
|
||||
<v-form class="pl-4 pr-4 pb-4" v-model="valid">
|
||||
<v-subheader class="pl-0">订阅名称</v-subheader>
|
||||
<v-text-field
|
||||
v-model="name"
|
||||
class="mt-2"
|
||||
:rules="validations.nameRules"
|
||||
required
|
||||
placeholder="填入订阅名称,名称需唯一"
|
||||
/>
|
||||
<v-divider></v-divider>
|
||||
<v-subheader class="pl-0">包含的订阅</v-subheader>
|
||||
<v-list dense>
|
||||
<v-list-item v-for="sub in availableSubs" :key="sub.name">
|
||||
<v-list-item-avatar dark>
|
||||
<v-icon>mdi-cloud</v-icon>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
{{ sub.name }}
|
||||
</v-list-item-content>
|
||||
<v-spacer></v-spacer>
|
||||
<v-checkbox
|
||||
:value="sub.name"
|
||||
v-model="selected"
|
||||
class="pr-1"
|
||||
/>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-form>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="save"><v-icon>save_alt</v-icon></v-btn>
|
||||
<v-btn icon @click="discard"><v-icon>settings_backup_restore</v-icon></v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {showInfo, showError} from "@/utils";
|
||||
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
valid: false,
|
||||
validations: {
|
||||
nameRules: [
|
||||
v => !!v || "名字不能为空",
|
||||
v => /^[\w-_]*$/.test(v) || "订阅名称只能包含英文字符、横杠和下划线!"
|
||||
]
|
||||
},
|
||||
selected: [],
|
||||
name: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
availableSubs() {
|
||||
return this.$store.state.subscriptions;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
save() {
|
||||
if (!this.valid || this.selected.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (this.$route.params.name === 'UNTITLED') {
|
||||
this.$store.dispatch("NEW_COLLECTION", {
|
||||
name: this.name,
|
||||
subscriptions: this.selected
|
||||
}).then(() => {
|
||||
showInfo(`成功创建订阅:${this.name}!`)
|
||||
}).catch(() => {
|
||||
showError(`发生错误,无法创建订阅!`)
|
||||
});
|
||||
} else {
|
||||
this.$store.dispatch("UPDATE_COLLECTION", {
|
||||
name: this.$route.params.name,
|
||||
collection: {
|
||||
name: this.name,
|
||||
subscriptions: this.selected
|
||||
}
|
||||
}).then(() => {
|
||||
showInfo(`成功保存订阅:${this.name}!`)
|
||||
}).catch(() => {
|
||||
showError(`发生错误,无法保存订阅!`)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
discard() {
|
||||
this.$router.back();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const name = this.$route.params.name;
|
||||
const collection = this.$store.state.collections[name] || {};
|
||||
this.$store.commit("SET_NAV_TITLE", collection.name ? `组合订阅编辑 -- ${collection.name}` : "新建组合订阅");
|
||||
this.name = collection.name;
|
||||
this.selected = collection.subscriptions || [];
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,41 +1,11 @@
|
||||
<template>
|
||||
<!-- <v-card-->
|
||||
<!-- class="ml-4 mt-4 mb-4 mr-4"-->
|
||||
<!-- >-->
|
||||
<!-- <v-card-title>Nexitally</v-card-title>-->
|
||||
<!-- <v-carousel-->
|
||||
<!-- cycle-->
|
||||
<!-- height="250"-->
|
||||
<!-- :show-arrows="false"-->
|
||||
<!-- >-->
|
||||
<!-- <v-carousel-item>-->
|
||||
<!-- <v-chart-->
|
||||
<!-- :options="pie"-->
|
||||
<!-- class="remains !important"-->
|
||||
<!-- autoresize-->
|
||||
<!-- />-->
|
||||
<!-- </v-carousel-item>-->
|
||||
<!-- <v-carousel-item>-->
|
||||
<!-- <v-chart-->
|
||||
<!-- :options="pie"-->
|
||||
<!-- class="remains !important"-->
|
||||
<!-- autoresize-->
|
||||
<!-- />-->
|
||||
<!-- </v-carousel-item>-->
|
||||
<!-- </v-carousel>-->
|
||||
<!-- </v-card>-->
|
||||
<v-container></v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ECharts from 'vue-echarts';
|
||||
import 'echarts/lib/chart/pie';
|
||||
|
||||
export default {
|
||||
name: "Dashboard",
|
||||
components: {
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
"v-chart": ECharts
|
||||
},
|
||||
computed: {
|
||||
pie() {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
label="订阅链接"
|
||||
placeholder="填入机场原始订阅链接"
|
||||
clearable
|
||||
auto-grow
|
||||
clear-icon="clear"
|
||||
/>
|
||||
<!--For Collection-->
|
||||
@@ -213,17 +214,14 @@
|
||||
import {showError, showInfo} from "@/utils";
|
||||
import TypeFilter from "@/components/TypeFilter";
|
||||
import RegionFilter from "@/components/RegionFilter";
|
||||
import KeywordFilter from "@/components/KeywordFilter";
|
||||
import RegexFilter from "@/components/RegexFilter";
|
||||
import SortOperator from "@/components/SortOperator";
|
||||
import KeywordRenameOperator from "@/components/KeywordRenameOperator";
|
||||
import RegexRenameOperator from "@/components/RegexRenameOperator";
|
||||
import KeywordDeleteOperator from "@/components/KeywordDeleteOperator";
|
||||
import RegexDeleteOperator from "@/components/RegexDeleteOperator";
|
||||
import FlagOperator from "@/components/FlagOperator";
|
||||
import ScriptFilter from "@/components/ScriptFilter";
|
||||
import ScriptOperator from "@/components/ScriptOperator";
|
||||
import KeywordSortOperator from "@/components/KeywordSortOperator";
|
||||
import RegexSortOperator from "@/components/RegexSortOperator";
|
||||
|
||||
const AVAILABLE_PROCESSORS = {
|
||||
"Flag Operator": {
|
||||
@@ -238,10 +236,6 @@ const AVAILABLE_PROCESSORS = {
|
||||
component: "RegionFilter",
|
||||
name: "区域过滤器"
|
||||
},
|
||||
"Keyword Filter": {
|
||||
component: "KeywordFilter",
|
||||
name: "关键词过滤器"
|
||||
},
|
||||
"Regex Filter": {
|
||||
component: "RegexFilter",
|
||||
name: "正则过滤器"
|
||||
@@ -250,22 +244,14 @@ const AVAILABLE_PROCESSORS = {
|
||||
component: "SortOperator",
|
||||
name: "节点排序"
|
||||
},
|
||||
"Keyword Sort Operator": {
|
||||
component: "KeywordSortOperator",
|
||||
name: "关键词排序"
|
||||
},
|
||||
"Keyword Rename Operator": {
|
||||
component: "KeywordRenameOperator",
|
||||
name: "关键词重命名"
|
||||
"Regex Sort Operator": {
|
||||
component: "RegexSortOperator",
|
||||
name: "正则排序"
|
||||
},
|
||||
"Regex Rename Operator": {
|
||||
component: "RegexRenameOperator",
|
||||
name: "正则重命名"
|
||||
},
|
||||
"Keyword Delete Operator": {
|
||||
component: "KeywordDeleteOperator",
|
||||
name: "删除关键词"
|
||||
},
|
||||
"Regex Delete Operator": {
|
||||
component: "RegexDeleteOperator",
|
||||
name: "删除正则"
|
||||
@@ -291,15 +277,12 @@ export default {
|
||||
},
|
||||
components: {
|
||||
FlagOperator,
|
||||
KeywordFilter,
|
||||
RegexFilter,
|
||||
RegionFilter,
|
||||
TypeFilter,
|
||||
SortOperator,
|
||||
KeywordRenameOperator,
|
||||
KeywordSortOperator,
|
||||
RegexSortOperator,
|
||||
RegexRenameOperator,
|
||||
KeywordDeleteOperator,
|
||||
RegexDeleteOperator,
|
||||
ScriptFilter,
|
||||
ScriptOperator,
|
||||
@@ -367,7 +350,7 @@ export default {
|
||||
},
|
||||
|
||||
processors() {
|
||||
return this.process.map(p => {
|
||||
return this.process.filter(p => AVAILABLE_PROCESSORS[p.type]).map(p => {
|
||||
return {
|
||||
component: AVAILABLE_PROCESSORS[p.type].component,
|
||||
args: p.args,
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
fab
|
||||
>
|
||||
<v-icon v-if="opened">mdi-close</v-icon>
|
||||
<v-icon v-else>apps</v-icon>
|
||||
<v-icon v-else>mdi-apps</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-btn
|
||||
@@ -131,10 +131,10 @@
|
||||
<v-dialog fullscreen hide-overlay transition="dialog-bottom-transition" v-model="showProxyList" scrollable>
|
||||
<v-card>
|
||||
<v-card-title class="pa-0">
|
||||
<v-toolbar dark color="primary">
|
||||
<v-toolbar>
|
||||
<v-icon>mdi-cloud</v-icon>
|
||||
<v-spacer></v-spacer>
|
||||
<v-toolbar-title>节点列表</v-toolbar-title>
|
||||
<v-toolbar-title><h4>节点列表</h4></v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-toolbar-items>
|
||||
<v-btn icon @click="refreshProxyList" v-if="sub">
|
||||
|
||||
Reference in New Issue
Block a user