mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Working on sub-editor
This commit is contained in:
91
web/src/components/KeywordFilter.vue
Normal file
91
web/src/components/KeywordFilter.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">filter_list</v-icon>
|
||||
关键词过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
关键词过滤
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据关键词过滤节点。如果设置为保留模式,则含有关键词的节点会被保留,否则会被过滤。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
模式
|
||||
<v-radio-group v-model="mode">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-radio label="保留" value="IN"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="过滤" value="OUT"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-radio-group>
|
||||
关键词
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(keyword, idx) in keywords"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ keyword }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新关键词"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add(form.keyword)"
|
||||
@keyup.enter="add(form.keyword)"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
mode: "IN",
|
||||
form: {
|
||||
keyword: ""
|
||||
},
|
||||
keywords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(keyword) {
|
||||
if (keyword) {
|
||||
this.keywords.push(keyword);
|
||||
this.form.keyword = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.keywords.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
13
web/src/components/KeywordRename.vue
Normal file
13
web/src/components/KeywordRename.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "KeywordRename"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
97
web/src/components/KeywordSort.vue
Normal file
97
web/src/components/KeywordSort.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">sort</v-icon>
|
||||
关键词排序
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
关键词排序
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据给出的关键词的顺序对节点进行排序。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
关键词
|
||||
<v-chip-group column
|
||||
>
|
||||
<v-chip
|
||||
draggable
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(keyword, idx) in keywords"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
@dragstart="dragStart"
|
||||
@dragend="dragEnd"
|
||||
>
|
||||
{{ keyword }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新关键词"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add(form.keyword)"
|
||||
@keyup.enter="add(form.keyword)"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
selection: null,
|
||||
currentTag: null,
|
||||
form: {
|
||||
keyword: ""
|
||||
},
|
||||
keywords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(keyword) {
|
||||
if (keyword) {
|
||||
this.keywords.push(keyword);
|
||||
this.form.keyword = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.keywords.splice(idx, 1);
|
||||
},
|
||||
dragStart() {
|
||||
if (this.keywords[this.selection]) this.currentTag = this.tags[this.selection].name;
|
||||
else this.currentTag = null;
|
||||
},
|
||||
dragEnd() {
|
||||
const self = this;
|
||||
if (this.currentTag) {
|
||||
this.keywords.forEach((x, i) => {
|
||||
if (x.name === self.currentTag) self.selection = i;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -3,7 +3,24 @@
|
||||
<v-list-item v-for="proxy in proxies" :key="proxy.name">
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="proxy.name" class="wrap-text"></v-list-item-title>
|
||||
<v-list-item-subtitle v-text="getType(proxy.type)"></v-list-item-subtitle>
|
||||
<v-chip-group>
|
||||
<v-chip x-small color="primary" outlined>
|
||||
<v-icon left x-small>mdi-server</v-icon>
|
||||
{{ proxy.type.toUpperCase() }}
|
||||
</v-chip>
|
||||
<v-chip x-small v-if="proxy.udp" color="blue" outlined>
|
||||
<v-icon left x-small>mdi-fire</v-icon>
|
||||
UDP
|
||||
</v-chip>
|
||||
<v-chip x-small v-if="proxy.tfo" color="success" outlined>
|
||||
<v-icon left x-small>mdi-flash</v-icon>
|
||||
TFO
|
||||
</v-chip>
|
||||
<v-chip x-small v-if="proxy.scert" color="error" outlined>
|
||||
<v-icon left x-small>error</v-icon>
|
||||
SCERT
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-btn icon>
|
||||
@@ -19,16 +36,7 @@ export default {
|
||||
name: "ProxyList",
|
||||
props: ['proxies'],
|
||||
methods: {
|
||||
getType(type) {
|
||||
switch (type) {
|
||||
case 'ss':
|
||||
return 'shadowsocks'
|
||||
case 'ssr':
|
||||
return 'shadowsocksr'
|
||||
default:
|
||||
return type
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
95
web/src/components/RegexFilter.vue
Normal file
95
web/src/components/RegexFilter.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">code</v-icon>
|
||||
正则过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
正则过滤
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据正则表达式过滤节点。如果设置为保留模式,则匹配<b>任何一个</b>正则表达式的节点会被保留,否则会被过滤。
|
||||
正则表达式需要注意转义。
|
||||
<br/>这里是一个合法的正则表达式:
|
||||
<br/>
|
||||
<b>IEPL|IPLC</b>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
模式
|
||||
<v-radio-group v-model="mode">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-radio label="保留" value="IN"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="过滤" value="OUT"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-radio-group>
|
||||
正则表达式
|
||||
<v-chip-group>
|
||||
<v-chip
|
||||
close
|
||||
close-icon="mdi-delete"
|
||||
v-for="(regex, idx) in regexps"
|
||||
:key="idx"
|
||||
@click:close="remove(idx)"
|
||||
>
|
||||
{{ regex }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新正则表达式"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add(form.regex)"
|
||||
@keyup.enter="add(form.regex)"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
mode: "IN",
|
||||
form: {
|
||||
regex: ""
|
||||
},
|
||||
regexps: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(keyword) {
|
||||
if (keyword) {
|
||||
this.regexps.push(keyword);
|
||||
this.form.regex = "";
|
||||
} else {
|
||||
this.$store.commit("SET_ERROR_MESSAGE", "正则表达式不能为空!");
|
||||
}
|
||||
},
|
||||
remove(idx) {
|
||||
this.regexps.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
13
web/src/components/RegexRename.vue
Normal file
13
web/src/components/RegexRename.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "RegexRename"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
81
web/src/components/RegionFilter.vue
Normal file
81
web/src/components/RegionFilter.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">flag</v-icon>
|
||||
区域过滤
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
区域过滤器
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据区域过滤节点,不选则默认保留所有节点。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-chip-group multiple active-class="primary accent-4" v-model="selection" column>
|
||||
<v-chip
|
||||
class="ma-2"
|
||||
v-for="region in regions"
|
||||
label
|
||||
:key="region.name"
|
||||
:value="region.value"
|
||||
>
|
||||
{{ region.name }}
|
||||
</v-chip>
|
||||
</v-chip-group>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const regions = [
|
||||
{
|
||||
name: "🇭🇰 香港",
|
||||
value: "HK"
|
||||
},
|
||||
{
|
||||
name: "🇨🇳 台湾",
|
||||
value: "TW"
|
||||
},
|
||||
{
|
||||
name: "🇸🇬 新加坡",
|
||||
value: "SG"
|
||||
},
|
||||
{
|
||||
name: "🇯🇵 日本",
|
||||
value: "JP"
|
||||
},
|
||||
{
|
||||
name: "🇺🇸 美国",
|
||||
value: "USA"
|
||||
},
|
||||
{
|
||||
name: "🇬🇧 英国",
|
||||
value: "UK"
|
||||
}
|
||||
];
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
regions,
|
||||
selection: []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
57
web/src/components/Sort.vue
Normal file
57
web/src/components/Sort.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<v-card class="ml-1 mr-1 mb-1 mt-1">
|
||||
<v-card-title>
|
||||
<v-icon left color="primary">sort_by_alpha</v-icon>
|
||||
节点排序
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon>
|
||||
<v-icon color="error">mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog>
|
||||
<template #activator="{on}">
|
||||
<v-btn icon v-on="on">
|
||||
<v-icon>help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-title class="headline">
|
||||
节点排序
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
根据节点名排序,一共有正序,逆序,随机三种模式。
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
模式
|
||||
<v-radio-group v-model="mode">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-radio label="正序" value="ASC"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="逆序" value="DESC"/>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-radio label="随机" value="RANDOM"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-radio-group>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
mode: "ASC"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user