Added script filter and script opeartor

This commit is contained in:
Peng-YM 2020-09-03 16:16:28 +08:00
parent 82a8c16e51
commit 250afb10a2
8 changed files with 286 additions and 181 deletions

View File

@ -20,8 +20,14 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment=""> <list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../web/src/components/ScriptFilter.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../web/src/components/ScriptOperator.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/views/SubEditor.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/SubEditor.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/views/Subscription.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/Subscription.vue" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -98,7 +104,7 @@
<workItem from="1599095538624" duration="1682000" /> <workItem from="1599095538624" duration="1682000" />
<workItem from="1599098635956" duration="82000" /> <workItem from="1599098635956" duration="82000" />
<workItem from="1599099268523" duration="934000" /> <workItem from="1599099268523" duration="934000" />
<workItem from="1599108801252" duration="56000" /> <workItem from="1599108801252" duration="4543000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -118,7 +124,7 @@
<option name="oldMeFiltersMigrated" value="true" /> <option name="oldMeFiltersMigrated" value="true" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state width="1322" height="440" key="GridCell.Tab.0.bottom" timestamp="1599100319941"> <state width="1322" height="302" key="GridCell.Tab.0.bottom" timestamp="1599120743218">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.0.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" /> <state width="840" height="374" key="GridCell.Tab.0.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
@ -129,8 +135,8 @@
<state width="849" height="374" key="GridCell.Tab.0.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" /> <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/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.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="440" key="GridCell.Tab.0.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319941" /> <state width="1322" height="302" key="GridCell.Tab.0.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743218" />
<state width="1322" height="440" key="GridCell.Tab.0.center" timestamp="1599100319940"> <state width="1322" height="302" key="GridCell.Tab.0.center" timestamp="1599120743218">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.0.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" /> <state width="840" height="374" key="GridCell.Tab.0.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
@ -141,8 +147,8 @@
<state width="849" height="374" key="GridCell.Tab.0.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" /> <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/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.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="440" key="GridCell.Tab.0.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319940" /> <state width="1322" height="302" key="GridCell.Tab.0.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743218" />
<state width="1322" height="440" key="GridCell.Tab.0.left" timestamp="1599100319940"> <state width="1322" height="302" key="GridCell.Tab.0.left" timestamp="1599120743217">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.0.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" /> <state width="840" height="374" key="GridCell.Tab.0.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
@ -153,8 +159,8 @@
<state width="849" height="374" key="GridCell.Tab.0.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992683" /> <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/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.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266531" />
<state width="1322" height="440" key="GridCell.Tab.0.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319940" /> <state width="1322" height="302" key="GridCell.Tab.0.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743217" />
<state width="1322" height="440" key="GridCell.Tab.0.right" timestamp="1599100319941"> <state width="1322" height="302" key="GridCell.Tab.0.right" timestamp="1599120743218">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.0.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" /> <state width="840" height="374" key="GridCell.Tab.0.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
@ -165,8 +171,8 @@
<state width="849" height="374" key="GridCell.Tab.0.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992684" /> <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/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.0.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="440" key="GridCell.Tab.0.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319941" /> <state width="1322" height="302" key="GridCell.Tab.0.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743218" />
<state width="1322" height="440" key="GridCell.Tab.1.bottom" timestamp="1599100319942"> <state width="1322" height="302" key="GridCell.Tab.1.bottom" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.1.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" /> <state width="840" height="374" key="GridCell.Tab.1.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
@ -177,8 +183,8 @@
<state width="849" height="374" key="GridCell.Tab.1.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" /> <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/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.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="440" key="GridCell.Tab.1.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319942" /> <state width="1322" height="302" key="GridCell.Tab.1.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.1.center" timestamp="1599100319941"> <state width="1322" height="302" key="GridCell.Tab.1.center" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.1.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" /> <state width="840" height="374" key="GridCell.Tab.1.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
@ -189,8 +195,8 @@
<state width="849" height="374" key="GridCell.Tab.1.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" /> <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/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.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="440" key="GridCell.Tab.1.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319941" /> <state width="1322" height="302" key="GridCell.Tab.1.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.1.left" timestamp="1599100319941"> <state width="1322" height="302" key="GridCell.Tab.1.left" timestamp="1599120743139">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.1.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" /> <state width="840" height="374" key="GridCell.Tab.1.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
@ -201,8 +207,8 @@
<state width="849" height="374" key="GridCell.Tab.1.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" /> <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/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.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593852" />
<state width="1322" height="440" key="GridCell.Tab.1.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319941" /> <state width="1322" height="302" key="GridCell.Tab.1.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743139" />
<state width="1322" height="440" key="GridCell.Tab.1.right" timestamp="1599100319942"> <state width="1322" height="302" key="GridCell.Tab.1.right" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.1.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" /> <state width="840" height="374" key="GridCell.Tab.1.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
@ -213,8 +219,8 @@
<state width="849" height="374" key="GridCell.Tab.1.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" /> <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/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.1.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="440" key="GridCell.Tab.1.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319942" /> <state width="1322" height="302" key="GridCell.Tab.1.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.2.bottom" timestamp="1599100319943"> <state width="1322" height="302" key="GridCell.Tab.2.bottom" timestamp="1599120743141">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.2.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" /> <state width="840" height="374" key="GridCell.Tab.2.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
@ -225,8 +231,8 @@
<state width="849" height="374" key="GridCell.Tab.2.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.2.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="440" key="GridCell.Tab.2.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319943" /> <state width="1322" height="302" key="GridCell.Tab.2.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.2.center" timestamp="1599100319942"> <state width="1322" height="302" key="GridCell.Tab.2.center" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.2.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" /> <state width="840" height="374" key="GridCell.Tab.2.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
@ -237,8 +243,8 @@
<state width="849" height="374" key="GridCell.Tab.2.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.2.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="440" key="GridCell.Tab.2.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319942" /> <state width="1322" height="302" key="GridCell.Tab.2.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.2.left" timestamp="1599100319942"> <state width="1322" height="302" key="GridCell.Tab.2.left" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.2.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" /> <state width="840" height="374" key="GridCell.Tab.2.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
@ -249,8 +255,8 @@
<state width="849" height="374" key="GridCell.Tab.2.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992587" /> <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="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="1300" height="374" key="GridCell.Tab.2.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="440" key="GridCell.Tab.2.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319942" /> <state width="1322" height="302" key="GridCell.Tab.2.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.2.right" timestamp="1599100319942"> <state width="1322" height="302" key="GridCell.Tab.2.right" timestamp="1599120743140">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.2.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" /> <state width="840" height="374" key="GridCell.Tab.2.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
@ -261,8 +267,8 @@
<state width="849" height="374" key="GridCell.Tab.2.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.2.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="440" key="GridCell.Tab.2.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319942" /> <state width="1322" height="302" key="GridCell.Tab.2.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743140" />
<state width="1322" height="440" key="GridCell.Tab.3.bottom" timestamp="1599100319943"> <state width="1322" height="302" key="GridCell.Tab.3.bottom" timestamp="1599120743141">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.3.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" /> <state width="840" height="374" key="GridCell.Tab.3.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
@ -273,8 +279,8 @@
<state width="849" height="374" key="GridCell.Tab.3.bottom/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.3.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="440" key="GridCell.Tab.3.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319943" /> <state width="1322" height="302" key="GridCell.Tab.3.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743141" />
<state width="1322" height="440" key="GridCell.Tab.3.center" timestamp="1599100319943"> <state width="1322" height="302" key="GridCell.Tab.3.center" timestamp="1599120743141">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.3.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" /> <state width="840" height="374" key="GridCell.Tab.3.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
@ -285,8 +291,8 @@
<state width="849" height="374" key="GridCell.Tab.3.center/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.3.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="440" key="GridCell.Tab.3.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319943" /> <state width="1322" height="302" key="GridCell.Tab.3.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743141" />
<state width="1322" height="440" key="GridCell.Tab.3.left" timestamp="1599100319943"> <state width="1322" height="302" key="GridCell.Tab.3.left" timestamp="1599120743141">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.3.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" /> <state width="840" height="374" key="GridCell.Tab.3.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
@ -297,8 +303,8 @@
<state width="849" height="374" key="GridCell.Tab.3.left/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.3.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="440" key="GridCell.Tab.3.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319943" /> <state width="1322" height="302" key="GridCell.Tab.3.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743141" />
<state width="1322" height="440" key="GridCell.Tab.3.right" timestamp="1599100319943"> <state width="1322" height="302" key="GridCell.Tab.3.right" timestamp="1599120743141">
<screen x="70" y="23" width="2490" height="1417" /> <screen x="70" y="23" width="2490" height="1417" />
</state> </state>
<state width="840" height="374" key="GridCell.Tab.3.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" /> <state width="840" height="374" key="GridCell.Tab.3.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
@ -309,7 +315,7 @@
<state width="849" height="374" key="GridCell.Tab.3.right/62.23.1730.1097@62.23.1730.1097" timestamp="1598899992588" /> <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="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="1300" height="374" key="GridCell.Tab.3.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="440" key="GridCell.Tab.3.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599100319943" /> <state width="1322" height="302" key="GridCell.Tab.3.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599120743141" />
<state x="161" y="268" width="670" height="676" key="search.everywhere.popup" timestamp="1598787117227"> <state x="161" y="268" width="670" height="676" key="search.everywhere.popup" timestamp="1598787117227">
<screen x="53" y="23" width="1739" height="1097" /> <screen x="53" y="23" width="1739" height="1097" />
</state> </state>

View File

@ -139,7 +139,6 @@ async function parseSub(sub, platform) {
$.write(raw, `#${key}`); $.write(raw, `#${key}`);
} else { } else {
raw = cache; raw = cache;
console.log(`Cache hit`);
} }
} else { } else {
// always download from url // always download from url
@ -198,16 +197,19 @@ async function parseSub(sub, platform) {
for (const item of sub.process || []) { for (const item of sub.process || []) {
// process script // process script
if (item.type.indexOf("Script") !== -1) { if (item.type.indexOf("Script") !== -1) {
if (item.args && item.args[0].indexOf("http") !== -1) { const {mode, content} = item.args;
// if this is remote script if (mode === "link") {
item.args[0] = await $.http // if this is remote script, download it
.get(item.args[0]) item.args = await $.http
.get(content)
.then((resp) => resp.body) .then((resp) => resp.body)
.catch((err) => { .catch((err) => {
throw new Error( throw new Error(
`Error when downloading remote script: ${item.args[0]}.\n Reason: ${err}` `Error when downloading remote script: ${item.args.content}.\n Reason: ${err}`
); );
}); });
} else {
item.args = content;
} }
} }
if (item.type.indexOf("Filter") !== -1) { if (item.type.indexOf("Filter") !== -1) {
@ -1854,6 +1856,7 @@ function ScriptOperator(script) {
return { return {
name: "Script Operator", name: "Script Operator",
func: (proxies) => { func: (proxies) => {
let output = proxies;
(function () { (function () {
// interface to get internal operators // interface to get internal operators
const $get = (name, args) => { const $get = (name, args) => {
@ -1865,8 +1868,9 @@ function ScriptOperator(script) {
} }
}; };
eval(script); eval(script);
return func(proxies); output = operator(proxies);
})(); })();
return output;
}, },
}; };
} }
@ -1968,6 +1972,7 @@ function ScriptFilter(script) {
return { return {
name: "Script Filter", name: "Script Filter",
func: (proxies) => { func: (proxies) => {
let output = FULL(proxies.length, true);
!(function () { !(function () {
// interface to get internal filters // interface to get internal filters
const $get = (name, args) => { const $get = (name, args) => {
@ -1979,8 +1984,9 @@ function ScriptFilter(script) {
} }
}; };
eval(script); eval(script);
return func(proxies); output = filter(proxies);
})(); })();
return output;
}, },
}; };
} }

150
web/package-lock.json generated
View File

@ -1325,12 +1325,6 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/html-minifier-terser": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.0.tgz",
"integrity": "sha512-iYCgjm1dGPRuo12+BStjd1HiVQqhlRhWDOQigNxn023HcjnhsiFz9pc6CzJj4HwDCSQca9bxTL4PxJDbkdm3PA==",
"dev": true
},
"@types/http-proxy": { "@types/http-proxy": {
"version": "1.17.4", "version": "1.17.4",
"resolved": "https://registry.npm.taobao.org/@types/http-proxy/download/@types/http-proxy-1.17.4.tgz?cache=0&sync_timestamp=1596839386031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy%2Fdownload%2F%40types%2Fhttp-proxy-1.17.4.tgz", "resolved": "https://registry.npm.taobao.org/@types/http-proxy/download/@types/http-proxy-1.17.4.tgz?cache=0&sync_timestamp=1596839386031&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fhttp-proxy%2Fdownload%2F%40types%2Fhttp-proxy-1.17.4.tgz",
@ -3160,16 +3154,6 @@
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
"dev": true "dev": true
}, },
"camel-case": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz",
"integrity": "sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==",
"dev": true,
"requires": {
"pascal-case": "^3.1.1",
"tslib": "^1.10.0"
}
},
"camelcase": { "camelcase": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.0.0.tgz?cache=0&sync_timestamp=1589682790492&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-6.0.0.tgz", "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.0.0.tgz?cache=0&sync_timestamp=1589682790492&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-6.0.0.tgz",
@ -4602,16 +4586,6 @@
"domelementtype": "1" "domelementtype": "1"
} }
}, },
"dot-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.3.tgz",
"integrity": "sha512-7hwEmg6RiSQfm/GwPL4AAWXKy3YNNZA3oFv2Pdiey0mwkRCPZ9x6SZbkLcn8Ma5PYeVokzoD4Twv2n7LKp5WeA==",
"dev": true,
"requires": {
"no-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"dot-prop": { "dot-prop": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.2.0.tgz?cache=0&sync_timestamp=1597574828045&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.2.0.tgz", "resolved": "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.2.0.tgz?cache=0&sync_timestamp=1597574828045&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.2.0.tgz",
@ -6047,83 +6021,12 @@
} }
} }
}, },
"html-minifier-terser": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
"integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
"dev": true,
"requires": {
"camel-case": "^4.1.1",
"clean-css": "^4.2.3",
"commander": "^4.1.1",
"he": "^1.2.0",
"param-case": "^3.0.3",
"relateurl": "^0.2.7",
"terser": "^4.6.3"
},
"dependencies": {
"commander": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
"dev": true
}
}
},
"html-tags": { "html-tags": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz", "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz",
"integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=", "integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=",
"dev": true "dev": true
}, },
"html-webpack-inline-source-plugin": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/html-webpack-inline-source-plugin/-/html-webpack-inline-source-plugin-0.0.10.tgz",
"integrity": "sha512-0ZNU57u7283vrXSF5a4VDnVOMWiSwypKIp1z/XfXWoVHLA1r3Xmyxx5+Lz+mnthz/UvxL1OAf41w5UIF68Jngw==",
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5",
"slash": "^1.0.0",
"source-map-url": "^0.4.0"
},
"dependencies": {
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
"dev": true
}
}
},
"html-webpack-plugin": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.3.0.tgz",
"integrity": "sha512-C0fzKN8yQoVLTelcJxZfJCE+aAvQiY2VUf3UuKrR4a9k5UMWYOtpDLsaXwATbcVCnI05hUS7L9ULQHWLZhyi3w==",
"dev": true,
"requires": {
"@types/html-minifier-terser": "^5.0.0",
"@types/tapable": "^1.0.5",
"@types/webpack": "^4.41.8",
"html-minifier-terser": "^5.0.1",
"loader-utils": "^1.2.3",
"lodash": "^4.17.15",
"pretty-error": "^2.1.1",
"tapable": "^1.1.3",
"util.promisify": "1.0.0"
},
"dependencies": {
"util.promisify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
"integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
"dev": true,
"requires": {
"define-properties": "^1.1.2",
"object.getownpropertydescriptors": "^2.0.3"
}
}
}
},
"htmlparser2": { "htmlparser2": {
"version": "3.10.1", "version": "3.10.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
@ -7176,15 +7079,6 @@
"js-tokens": "^3.0.0 || ^4.0.0" "js-tokens": "^3.0.0 || ^4.0.0"
} }
}, },
"lower-case": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz",
"integrity": "sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ==",
"dev": true,
"requires": {
"tslib": "^1.10.0"
}
},
"lru-cache": { "lru-cache": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427582110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz", "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz?cache=0&sync_timestamp=1594427582110&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-5.1.1.tgz",
@ -7520,6 +7414,20 @@
"minimist": "^1.2.5" "minimist": "^1.2.5"
} }
}, },
"monaco-editor": {
"version": "0.19.3",
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.19.3.tgz",
"integrity": "sha512-2n1vJBVQF2Hhi7+r1mMeYsmlf18hjVb6E0v5SoMZyb4aeOmYPKun+CE3gYpiNA1KEvtSdaDHFBqH9d7Wd9vREg=="
},
"monaco-editor-vue": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/monaco-editor-vue/-/monaco-editor-vue-1.0.10.tgz",
"integrity": "sha512-FO6rioCXkonKmDZYB2WDhDNekXuNJgjxoAPfzwYX+5NTMaxRJcWl3bcUByRpL6LQQ1bTEYLZ+ZdDpoJ+la2trQ==",
"requires": {
"monaco-editor": "^0.19.3",
"vue": "^2.6.11"
}
},
"move-concurrently": { "move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz",
@ -7623,16 +7531,6 @@
"integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=",
"dev": true "dev": true
}, },
"no-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.3.tgz",
"integrity": "sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw==",
"dev": true,
"requires": {
"lower-case": "^2.0.1",
"tslib": "^1.10.0"
}
},
"node-forge": { "node-forge": {
"version": "0.9.0", "version": "0.9.0",
"resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz", "resolved": "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz",
@ -8083,16 +7981,6 @@
"readable-stream": "^2.1.5" "readable-stream": "^2.1.5"
} }
}, },
"param-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz",
"integrity": "sha512-VWBVyimc1+QrzappRs7waeN2YmoZFCGXWASRYX1/rGHtXqEcrGEIDm+jqIwFa2fRXNgQEwrxaYuIrX0WcAguTA==",
"dev": true,
"requires": {
"dot-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"parent-module": { "parent-module": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz",
@ -8156,16 +8044,6 @@
"integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=",
"dev": true "dev": true
}, },
"pascal-case": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.1.tgz",
"integrity": "sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA==",
"dev": true,
"requires": {
"no-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"pascalcase": { "pascalcase": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz",

View File

@ -14,6 +14,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"material-design-icons-iconfont": "^5.0.1", "material-design-icons-iconfont": "^5.0.1",
"monaco-editor-vue": "^1.0.10",
"v-clipboard": "^2.2.3", "v-clipboard": "^2.2.3",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.4.3", "vue-router": "^3.4.3",

View File

@ -0,0 +1,100 @@
<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="link"/>
</v-col>
<v-col>
<v-radio label="脚本" value="script"/>
</v-col>
</v-row>
</v-radio-group>
</v-card-text>
<v-textarea
solo
:label="hint"
v-model="content"
/>
</v-card>
</template>
<script>
export default {
props: ["args"],
data: function () {
return {
idx: this.$vnode.key,
mode: "link",
content: ""
}
},
computed: {
hint() {
return this.mode === 'link' ? "请输入链接地址" : "请输入一段脚本"
}
},
created() {
if (typeof this.args !== 'undefined') {
this.mode = this.args.mode;
this.content = this.args.content;
}
},
watch: {
mode() {
this.save();
},
content() {
this.save();
}
},
methods: {
save() {
if (this.content) {
this.$emit("dataChanged", {
idx: this.idx,
args: {
mode: this.mode,
content: this.content
}
});
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,100 @@
<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="link"/>
</v-col>
<v-col>
<v-radio label="脚本" value="script"/>
</v-col>
</v-row>
</v-radio-group>
</v-card-text>
<v-textarea
solo
:label="hint"
v-model="content"
/>
</v-card>
</template>
<script>
export default {
props: ["args"],
data: function () {
return {
idx: this.$vnode.key,
mode: "link",
content: ""
}
},
computed: {
hint() {
return this.mode === 'link' ? "请输入链接地址" : "请输入一段脚本"
}
},
created() {
if (typeof this.args !== 'undefined') {
this.mode = this.args.mode;
this.content = this.args.content;
}
},
watch: {
mode() {
this.save();
},
content() {
this.save();
}
},
methods: {
save() {
if (this.content) {
this.$emit("dataChanged", {
idx: this.idx,
args: {
mode: this.mode,
content: this.content
}
});
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -165,6 +165,8 @@ import RegexRenameOperator from "@/components/RegexRenameOperator";
import KeywordDeleteOperator from "@/components/KeywordDeleteOperator"; import KeywordDeleteOperator from "@/components/KeywordDeleteOperator";
import RegexDeleteOperator from "@/components/RegexDeleteOperator"; import RegexDeleteOperator from "@/components/RegexDeleteOperator";
import FlagOperator from "@/components/FlagOperator"; import FlagOperator from "@/components/FlagOperator";
import ScriptFilter from "@/components/ScriptFilter";
import ScriptOperator from "@/components/ScriptOperator";
const AVAILABLE_PROCESSORS = { const AVAILABLE_PROCESSORS = {
"Flag Operator": { "Flag Operator": {
@ -207,6 +209,14 @@ const AVAILABLE_PROCESSORS = {
component: "RegexDeleteOperator", component: "RegexDeleteOperator",
name: "删除正则" name: "删除正则"
}, },
"Script Filter": {
component: "ScriptFilter",
name: "脚本过滤器"
},
"Script Operator": {
component: "ScriptOperator",
name: "脚本操作"
}
} }
export default { export default {
@ -220,7 +230,9 @@ export default {
KeywordRenameOperator, KeywordRenameOperator,
RegexRenameOperator, RegexRenameOperator,
KeywordDeleteOperator, KeywordDeleteOperator,
RegexDeleteOperator RegexDeleteOperator,
ScriptFilter,
ScriptOperator
}, },
data: function () { data: function () {
return { return {
@ -298,7 +310,9 @@ export default {
}, },
dataChanged(content) { dataChanged(content) {
this.options.process[content.idx].args = content.args; const process = this.options.process[content.idx];
process.args = content.args;
this.options.process.splice(content.idx, 1, process);
}, },
addProcess(type) { addProcess(type) {

View File

@ -138,7 +138,7 @@
<v-toolbar-title>节点列表</v-toolbar-title> <v-toolbar-title>节点列表</v-toolbar-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-toolbar-items> <v-toolbar-items>
<v-btn icon @click="refreshProxyList"> <v-btn icon @click="refreshProxyList" v-if="sub">
<v-icon>refresh</v-icon> <v-icon>refresh</v-icon>
</v-btn> </v-btn>
<v-btn icon @click="showProxyList = false"> <v-btn icon @click="showProxyList = false">
@ -229,7 +229,7 @@ export default {
preview(item, type = 'sub') { preview(item, type = 'sub') {
if (type === 'sub') { if (type === 'sub') {
this.url = `${BACKEND_BASE}/download/${item.name}`; this.url = `${BACKEND_BASE}/download/${item.name}`;
this.sub = [item.url]; this.sub = item.url;
} else { } else {
this.url = `${BACKEND_BASE}/download/collection/${item.name}` this.url = `${BACKEND_BASE}/download/collection/${item.name}`
} }