UI Improvements

This commit is contained in:
Peng-YM 2020-09-03 10:23:50 +08:00
parent 80294618fb
commit 1c06bd8869
11 changed files with 193 additions and 74 deletions

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -20,7 +20,17 @@
</component>
<component name="ChangeListManager">
<list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../web/src/components/FlagOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/KeywordDeleteOperator.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/KeywordDeleteOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/KeywordFilter.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/KeywordFilter.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/KeywordRenameOperator.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/KeywordRenameOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/RegexDeleteOperator.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/RegexDeleteOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/RegexFilter.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/RegexFilter.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/RegexRenameOperator.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/RegexRenameOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/config.js" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/config.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/views/SubEditor.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/SubEditor.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -48,6 +58,7 @@
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RunManager">
<configuration name="sub-store.js" type="NodeJSConfigurationType" temporary="true" nameIsGenerated="true" path-to-js-file="$PROJECT_DIR$/sub-store.js" working-dir="$PROJECT_DIR$">
@ -91,7 +102,11 @@
<workItem from="1598931009084" duration="2069000" />
<workItem from="1598946261983" duration="463000" />
<workItem from="1598948545209" duration="3969000" />
<workItem from="1598962864003" duration="97000" />
<workItem from="1598962864003" duration="709000" />
<workItem from="1599095419072" duration="112000" />
<workItem from="1599095538624" duration="1682000" />
<workItem from="1599098635956" duration="82000" />
<workItem from="1599099268523" duration="350000" />
</task>
<servers />
</component>
@ -111,8 +126,8 @@
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="WindowStateProjectService">
<state width="840" height="374" key="GridCell.Tab.0.bottom" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="440" key="GridCell.Tab.0.bottom" timestamp="1599099330723">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
<state width="850" height="374" key="GridCell.Tab.0.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -122,8 +137,9 @@
<state width="849" height="374" key="GridCell.Tab.0.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" />
<state width="840" height="374" key="GridCell.Tab.0.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.0.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="840" height="374" key="GridCell.Tab.0.center" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="440" key="GridCell.Tab.0.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599099330723" />
<state width="1322" height="440" key="GridCell.Tab.0.center" timestamp="1599099330723">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
<state width="850" height="374" key="GridCell.Tab.0.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -133,8 +149,9 @@
<state width="849" height="374" key="GridCell.Tab.0.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" />
<state width="840" height="374" key="GridCell.Tab.0.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.0.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="840" height="374" key="GridCell.Tab.0.left" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="440" key="GridCell.Tab.0.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599099330723" />
<state width="1322" height="440" key="GridCell.Tab.0.left" timestamp="1599099330723">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
<state width="850" height="374" key="GridCell.Tab.0.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773765" />
@ -144,8 +161,9 @@
<state width="849" height="374" key="GridCell.Tab.0.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992683" />
<state width="840" height="374" key="GridCell.Tab.0.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.0.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266531" />
<state width="840" height="374" key="GridCell.Tab.0.right" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="440" key="GridCell.Tab.0.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599099330723" />
<state width="1322" height="440" key="GridCell.Tab.0.right" timestamp="1599099330723">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
<state width="850" height="374" key="GridCell.Tab.0.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -155,8 +173,9 @@
<state width="849" height="374" key="GridCell.Tab.0.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" />
<state width="840" height="374" key="GridCell.Tab.0.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.0.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="840" height="374" key="GridCell.Tab.1.bottom" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="440" key="GridCell.Tab.0.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599099330723" />
<state width="1322" height="374" key="GridCell.Tab.1.bottom" timestamp="1599097989339">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -166,8 +185,9 @@
<state width="849" height="374" key="GridCell.Tab.1.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" />
<state width="840" height="374" key="GridCell.Tab.1.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="840" height="374" key="GridCell.Tab.1.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="840" height="374" key="GridCell.Tab.1.center" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.1.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989339" />
<state width="1322" height="374" key="GridCell.Tab.1.center" timestamp="1599097989338">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -177,8 +197,9 @@
<state width="849" height="374" key="GridCell.Tab.1.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" />
<state width="840" height="374" key="GridCell.Tab.1.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.1.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="840" height="374" key="GridCell.Tab.1.left" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.1.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989338" />
<state width="1322" height="374" key="GridCell.Tab.1.left" timestamp="1599097989338">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -188,8 +209,9 @@
<state width="849" height="374" key="GridCell.Tab.1.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" />
<state width="840" height="374" key="GridCell.Tab.1.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.1.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593852" />
<state width="840" height="374" key="GridCell.Tab.1.right" timestamp="1598947305944">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.1.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989338" />
<state width="1322" height="374" key="GridCell.Tab.1.right" timestamp="1599097989338">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -199,8 +221,9 @@
<state width="849" height="374" key="GridCell.Tab.1.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" />
<state width="840" height="374" key="GridCell.Tab.1.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="840" height="374" key="GridCell.Tab.1.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="840" height="374" key="GridCell.Tab.2.bottom" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.1.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989338" />
<state width="1322" height="374" key="GridCell.Tab.2.bottom" timestamp="1599097989340">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.2.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -210,8 +233,9 @@
<state width="849" height="374" key="GridCell.Tab.2.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.2.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.2.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="840" height="374" key="GridCell.Tab.2.center" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.2.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989340" />
<state width="1322" height="374" key="GridCell.Tab.2.center" timestamp="1599097989339">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -221,8 +245,9 @@
<state width="849" height="374" key="GridCell.Tab.2.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.2.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.2.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="840" height="374" key="GridCell.Tab.2.left" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.2.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989339" />
<state width="1322" height="374" key="GridCell.Tab.2.left" timestamp="1599097989339">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -232,8 +257,9 @@
<state width="849" height="374" key="GridCell.Tab.2.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" />
<state width="840" height="374" key="GridCell.Tab.2.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.2.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="840" height="374" key="GridCell.Tab.2.right" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.2.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989339" />
<state width="1322" height="374" key="GridCell.Tab.2.right" timestamp="1599097989339">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -243,8 +269,9 @@
<state width="849" height="374" key="GridCell.Tab.2.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.2.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.2.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="840" height="374" key="GridCell.Tab.3.bottom" timestamp="1598947305946">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.2.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989339" />
<state width="1322" height="374" key="GridCell.Tab.3.bottom" timestamp="1599097989340">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
<state width="850" height="374" key="GridCell.Tab.3.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -254,8 +281,9 @@
<state width="849" height="374" key="GridCell.Tab.3.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.3.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305946" />
<state width="1300" height="374" key="GridCell.Tab.3.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="840" height="374" key="GridCell.Tab.3.center" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.3.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989340" />
<state width="1322" height="374" key="GridCell.Tab.3.center" timestamp="1599097989340">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.3.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -265,8 +293,9 @@
<state width="849" height="374" key="GridCell.Tab.3.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.3.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.3.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="840" height="374" key="GridCell.Tab.3.left" timestamp="1598947305945">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.3.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989340" />
<state width="1322" height="374" key="GridCell.Tab.3.left" timestamp="1599097989340">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.3.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -276,8 +305,9 @@
<state width="849" height="374" key="GridCell.Tab.3.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.3.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1300" height="374" key="GridCell.Tab.3.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="840" height="374" key="GridCell.Tab.3.right" timestamp="1598947305946">
<screen x="67" y="23" width="1725" height="1097" />
<state width="1322" height="374" key="GridCell.Tab.3.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989340" />
<state width="1322" height="374" key="GridCell.Tab.3.right" timestamp="1599097989340">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
<state width="850" height="374" key="GridCell.Tab.3.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -287,6 +317,7 @@
<state width="849" height="374" key="GridCell.Tab.3.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" />
<state width="840" height="374" key="GridCell.Tab.3.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305946" />
<state width="1300" height="374" key="GridCell.Tab.3.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="374" key="GridCell.Tab.3.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599097989340" />
<state x="161" y="268" width="670" height="676" key="search.everywhere.popup" timestamp="1598787117227">
<screen x="53" y="23" width="1739" height="1097" />
</state>

View File

@ -0,0 +1,75 @@
<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 @click="$emit('up', idx)">
<v-icon>keyboard_arrow_up</v-icon>
</v-btn>
<v-btn icon @click="$emit('down', idx)">
<v-icon>keyboard_arrow_down</v-icon>
</v-btn>
<v-btn icon @click="$emit('deleteProcess', idx)">
<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="ADD"/>
</v-col>
<v-col>
<v-radio label="删除" value="REMOVE"/>
</v-col>
</v-row>
</v-radio-group>
</v-card-text>
</v-card>
</template>
<script>
export default {
props: ["args"],
data: function () {
return {
idx: this.$vnode.key,
mode: "DEFAULT"
}
},
created() {
if (typeof this.args !== 'undefined')
this.mode = this.args === true ? "ADD" : "REMOVE";
},
watch: {
mode() {
this.$emit("dataChanged", {
idx: this.idx,
args: this.mode === "ADD"
})
}
}
}
</script>
<style scoped>
</style>

View File

@ -38,6 +38,7 @@
v-for="(keyword, idx) in keywords"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ keyword }}
</v-chip>
@ -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);
},

View File

@ -49,6 +49,7 @@
v-for="(keyword, idx) in keywords"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ keyword }}
</v-chip>
@ -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);
},

View File

@ -38,6 +38,7 @@
v-for="(chip, idx) in chips"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ chip }}
</v-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);
},

View File

@ -41,6 +41,7 @@
v-for="(regex, idx) in regexps"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ regex }}
</v-chip>
@ -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);
},

View File

@ -53,6 +53,7 @@
v-for="(regex, idx) in regexps"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ regex }}
</v-chip>
@ -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);
},

View File

@ -38,6 +38,7 @@
v-for="(chip, idx) in chips"
:key="idx"
@click:close="remove(idx)"
@click="edit(idx)"
>
{{ chip }}
</v-chip>
@ -45,7 +46,7 @@
<v-row>
<v-col>
<v-text-field
placeholder="关键词"
placeholder="正则表达式"
solo
v-model="form.regex"
/>
@ -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);
},

View File

@ -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`;

View File

@ -51,24 +51,6 @@
<v-col></v-col>
</v-row>
</v-radio-group>
<v-radio-group
v-model="options.flag"
dense
class="mt-0 mb-0"
>
国旗
<v-row>
<v-col>
<v-radio label="默认" value="DEFAULT"/>
</v-col>
<v-col>
<v-radio label="添加国旗" value="ADD"/>
</v-col>
<v-col>
<v-radio label="删除国旗" value="REMOVE"/>
</v-col>
</v-row>
</v-radio-group>
<v-radio-group
v-model="options.udp"
@ -182,8 +164,13 @@ 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";
const AVAILABLE_PROCESSORS = {
"Flag Operator": {
component: "FlagOperator",
name: "国旗"
},
"Type Filter": {
component: "TypeFilter",
name: "类型过滤器"
@ -224,6 +211,7 @@ const AVAILABLE_PROCESSORS = {
export default {
components: {
FlagOperator,
KeywordFilter,
RegexFilter,
RegionFilter,
@ -256,7 +244,6 @@ export default {
url: "",
useless: "KEEP",
udp: "DEFAULT",
flag: "DEFAULT",
scert: "DEFAULT",
tfo: "DEFAULT",
process: [],
@ -350,11 +337,8 @@ function loadSubscription(options, sub) {
case 'Useless Filter':
options.useless = "REMOVE";
break
case 'Flag Operator':
options.flag = p.args[0] ? "ADD" : "REMOVE";
break
case 'Set Property Operator':
options[p.args[0]] = p.args[1] ? "FORCE_OPEN" : "FORCE_CLOSE";
options[p.args.key] = p.args.value ? "FORCE_OPEN" : "FORCE_CLOSE";
break
default:
options.process.push(p);
@ -375,13 +359,6 @@ function buildSubscription(options) {
type: "Useless Filter"
});
}
// flag
if (options.flag !== 'DEFAULT') {
sub.process.push({
type: "Flag Operator",
args: options.flag === 'ADD'
});
}
// udp, tfo, scert
for (const opt of ['udp', 'tfo', 'scert']) {
if (options[opt] !== 'DEFAULT') {