diff --git a/backend/.idea/codeStyles/codeStyleConfig.xml b/backend/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/backend/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/.idea/workspace.xml b/backend/.idea/workspace.xml
index 718add7..192c9cc 100644
--- a/backend/.idea/workspace.xml
+++ b/backend/.idea/workspace.xml
@@ -20,7 +20,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -48,6 +58,7 @@
+
@@ -91,7 +102,11 @@
-
+
+
+
+
+
@@ -111,8 +126,8 @@
-
-
+
+
@@ -122,8 +137,9 @@
-
-
+
+
+
@@ -133,8 +149,9 @@
-
-
+
+
+
@@ -144,8 +161,9 @@
-
-
+
+
+
@@ -155,8 +173,9 @@
-
-
+
+
+
@@ -166,8 +185,9 @@
-
-
+
+
+
@@ -177,8 +197,9 @@
-
-
+
+
+
@@ -188,8 +209,9 @@
-
-
+
+
+
@@ -199,8 +221,9 @@
-
-
+
+
+
@@ -210,8 +233,9 @@
-
-
+
+
+
@@ -221,8 +245,9 @@
-
-
+
+
+
@@ -232,8 +257,9 @@
-
-
+
+
+
@@ -243,8 +269,9 @@
-
-
+
+
+
@@ -254,8 +281,9 @@
-
-
+
+
+
@@ -265,8 +293,9 @@
-
-
+
+
+
@@ -276,8 +305,9 @@
-
-
+
+
+
@@ -287,6 +317,7 @@
+
diff --git a/web/src/components/FlagOperator.vue b/web/src/components/FlagOperator.vue
new file mode 100644
index 0000000..70fb542
--- /dev/null
+++ b/web/src/components/FlagOperator.vue
@@ -0,0 +1,75 @@
+
+
+
+ flag
+ 国旗
+
+
+ keyboard_arrow_up
+
+
+ keyboard_arrow_down
+
+
+ mdi-delete
+
+
+
+
+ help
+
+
+
+
+ 国旗
+
+
+ 添加或者删除节点国旗。
+
+
+
+
+
+ 工作模式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/components/KeywordDeleteOperator.vue b/web/src/components/KeywordDeleteOperator.vue
index 98d99ec..804eead 100644
--- a/web/src/components/KeywordDeleteOperator.vue
+++ b/web/src/components/KeywordDeleteOperator.vue
@@ -38,6 +38,7 @@
v-for="(keyword, idx) in keywords"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ keyword }}
@@ -76,6 +77,10 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
}
},
+ edit(idx) {
+ this.form.keyword = this.keywords[idx];
+ this.remove(idx);
+ },
remove(idx) {
this.keywords.splice(idx, 1);
},
diff --git a/web/src/components/KeywordFilter.vue b/web/src/components/KeywordFilter.vue
index 7970e08..7c6d713 100644
--- a/web/src/components/KeywordFilter.vue
+++ b/web/src/components/KeywordFilter.vue
@@ -49,6 +49,7 @@
v-for="(keyword, idx) in keywords"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ keyword }}
@@ -87,6 +88,10 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
}
},
+ edit(idx) {
+ this.form.keyword = this.keywords[idx];
+ this.remove(idx);
+ },
remove(idx) {
this.keywords.splice(idx, 1);
},
diff --git a/web/src/components/KeywordRenameOperator.vue b/web/src/components/KeywordRenameOperator.vue
index df97ade..ab5218c 100644
--- a/web/src/components/KeywordRenameOperator.vue
+++ b/web/src/components/KeywordRenameOperator.vue
@@ -38,6 +38,7 @@
v-for="(chip, idx) in chips"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ chip }}
@@ -84,16 +85,16 @@ export default {
chips() {
return this.keywords.map(k => {
const {old, now} = k;
- return `${old} ⇒ ${now}`;
+ return `${old} ⇒ ${now.length === 0 ? "∅" : now}`;
});
}
},
methods: {
add() {
- if (this.form.keyword && this.form.replace) {
+ if (this.form.keyword) {
this.keywords.push({
old: this.form.keyword,
- now: this.form.replace
+ now: this.form.replace || ""
});
this.form.keyword = "";
this.form.replace = "";
@@ -101,6 +102,11 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
}
},
+ edit(idx) {
+ this.form.keyword = this.keywords[idx].old;
+ this.form.replace = this.keywords[idx].now;
+ this.remove(idx);
+ },
remove(idx) {
this.keywords.splice(idx, 1);
},
diff --git a/web/src/components/RegexDeleteOperator.vue b/web/src/components/RegexDeleteOperator.vue
index 83c1521..1d5b127 100644
--- a/web/src/components/RegexDeleteOperator.vue
+++ b/web/src/components/RegexDeleteOperator.vue
@@ -41,6 +41,7 @@
v-for="(regex, idx) in regexps"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ regex }}
@@ -79,6 +80,10 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", "正则表达式不能为空!");
}
},
+ edit(idx) {
+ this.form.regex = this.regexps[idx];
+ this.remove(idx);
+ },
remove(idx) {
this.regexps.splice(idx, 1);
},
diff --git a/web/src/components/RegexFilter.vue b/web/src/components/RegexFilter.vue
index 26fdaab..3a8ecd8 100644
--- a/web/src/components/RegexFilter.vue
+++ b/web/src/components/RegexFilter.vue
@@ -53,6 +53,7 @@
v-for="(regex, idx) in regexps"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ regex }}
@@ -91,6 +92,10 @@ export default {
this.$store.commit("SET_ERROR_MESSAGE", "正则表达式不能为空!");
}
},
+ edit(idx) {
+ this.form.regex = this.regexps[idx];
+ this.remove(idx);
+ },
remove(idx) {
this.regexps.splice(idx, 1);
},
diff --git a/web/src/components/RegexRenameOperator.vue b/web/src/components/RegexRenameOperator.vue
index ced5d55..a86ad66 100644
--- a/web/src/components/RegexRenameOperator.vue
+++ b/web/src/components/RegexRenameOperator.vue
@@ -38,6 +38,7 @@
v-for="(chip, idx) in chips"
:key="idx"
@click:close="remove(idx)"
+ @click="edit(idx)"
>
{{ chip }}
@@ -45,7 +46,7 @@
@@ -84,23 +85,28 @@ export default {
chips() {
return this.regexps.map(k => {
const {expr, now} = k;
- return `${expr} ⇒ ${now}`;
+ return `${expr} ⇒ ${now.length === 0 ? "∅" : now}`;
});
}
},
methods: {
add() {
- if (this.form.regex && this.form.replace) {
+ if (this.form.regex) {
this.regexps.push({
expr: this.form.regex,
- now: this.form.replace
+ now: this.form.replace || ""
});
this.form.regex = "";
this.form.replace = "";
} else {
- this.$store.commit("SET_ERROR_MESSAGE", "关键词不能为空!");
+ this.$store.commit("SET_ERROR_MESSAGE", "正则表达式不能为空!");
}
},
+ edit(idx) {
+ this.form.regex = this.regexps[idx].expr;
+ this.form.replace = this.regexps[idx].now;
+ this.remove(idx);
+ },
remove(idx) {
this.regexps.splice(idx, 1);
},
diff --git a/web/src/config.js b/web/src/config.js
index 371620a..0655575 100644
--- a/web/src/config.js
+++ b/web/src/config.js
@@ -1,3 +1,2 @@
-// const DEBUG = process.env.NODE_ENV === "development";
-const DEBUG = false;
+const DEBUG = process.env.NODE_ENV === "development";
export const BACKEND_BASE = DEBUG ? `http://192.168.1.134:3000` : `https://sub.store`;
\ No newline at end of file
diff --git a/web/src/views/SubEditor.vue b/web/src/views/SubEditor.vue
index 614d6f0..28804bc 100644
--- a/web/src/views/SubEditor.vue
+++ b/web/src/views/SubEditor.vue
@@ -51,24 +51,6 @@
-
- 国旗
-
-
-
-
-
-
-
-
-
-
-
-