fix: delete group after delete tab by id

This commit is contained in:
夜鹰 2023-02-09 16:04:53 +08:00
parent ef64ca6c3e
commit 34520bfbd1
4 changed files with 172 additions and 118 deletions

View File

@ -20,8 +20,8 @@
"build:static": "npm run clear:electron:tsc&&npm run electron:tsc && electron-builder build",
"electron:build:web": "yarn workspace postcat-web run build",
"electron:static": "npm run electron:tsc && electron .",
"release": "npm-run-all -s build:web electron:tsc && electron-builder --publish=always && node upload.js",
"release:m1": "npm-run-all -s build:web electron:tsc && electron-builder -m=dmg --arm64 -p onTagOrDraft && node upload.js",
"release": "npm-run-all -s electron:build:web electron:tsc && electron-builder --publish=always && node upload.js",
"release:m1": "npm-run-all -s electron:build:web electron:tsc && electron-builder -m=dmg --arm64 -p onTagOrDraft && node upload.js",
"test": "npm-run-all --serial test:*",
"e2e": "yarn build:prod && npx playwright test -c e2e/playwright.config.ts e2e/",
"clear:electron:tsc": "tsc --build --clean",

View File

@ -10,7 +10,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">70</context>
<context context-type="linenumber">88</context>
</context-group>
</trans-unit>
<trans-unit id="962765493084218985" datatype="html">
@ -24,14 +24,14 @@
<source>Release Notes</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/services/notification.service.ts</context>
<context context-type="linenumber">26</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="7980039123734407569" datatype="html">
<source>There will be downtime updates from <x id="PH" equiv-text="logInfo.startTime.getHours()"/>:00 to <x id="PH_1" equiv-text="logInfo.endTime.getHours()"/>:00 today, and may be temporarily inaccessible.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/core/services/notification.service.ts</context>
<context context-type="linenumber">27</context>
<context context-type="linenumber">28</context>
</context-group>
</trans-unit>
<trans-unit id="6115233669498345585" datatype="html">
@ -300,6 +300,9 @@
<context context-type="sourcefile">src/app/layouts/navbar/nav-operate.component.ts</context>
<context context-type="linenumber">17</context>
</context-group>
</trans-unit>
<trans-unit id="5427585391249152016" datatype="html">
<source>Maximize</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/layouts/navbar/nav-operate.component.ts</context>
<context context-type="linenumber">28</context>
@ -366,7 +369,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/list/extension-list.component.html</context>
<context context-type="linenumber">42</context>
<context context-type="linenumber">50</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/overview/workspace-overview.component.html</context>
@ -392,7 +395,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">73</context>
<context context-type="linenumber">74</context>
</context-group>
</trans-unit>
<trans-unit id="2748502583404970194" datatype="html">
@ -428,7 +431,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">51</context>
<context context-type="linenumber">69</context>
</context-group>
</trans-unit>
<trans-unit id="9142814796222630444" datatype="html">
@ -458,11 +461,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">36</context>
<context context-type="linenumber">37</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">53</context>
<context context-type="linenumber">54</context>
</context-group>
</trans-unit>
<trans-unit id="6006604033305558406" datatype="html">
@ -583,11 +586,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">474</context>
<context context-type="linenumber">477</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/websocket/websocket.component.ts</context>
<context context-type="linenumber">318</context>
<context context-type="linenumber">340</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/services/modal.service.ts</context>
@ -676,11 +679,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">37</context>
<context context-type="linenumber">38</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">54</context>
<context context-type="linenumber">55</context>
</context-group>
</trans-unit>
<trans-unit id="6446592578297953811" datatype="html">
@ -709,10 +712,10 @@
</context-group>
</trans-unit>
<trans-unit id="3624831040736127425" datatype="html">
<source> Import like this:<x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br /&gt;"/><x id="START_TAG_PRE" ctype="x-pre" equiv-text="&lt;pre class=&quot;mb-0&quot;&gt;"/><x id="INTERPOLATION" equiv-text="{{ eg }}"/> <x id="CLOSE_TAG_PRE" ctype="x-pre" equiv-text="&lt;/pre&gt;"/></source>
<source> Import like this:<x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br /&gt;"/><x id="START_TAG_PRE" ctype="x-pre" equiv-text="&lt;pre class=&quot;mb-0&quot;&gt;"/><x id="INTERPOLATION" equiv-text="&lt;/pre&gt;"/> <x id="CLOSE_TAG_PRE" ctype="x-pre" equiv-text="&lt;/pre&gt;"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/api-shared/params-import/params-import.component.html</context>
<context context-type="linenumber">8,10</context>
<context context-type="linenumber">9,11</context>
</context-group>
</trans-unit>
<trans-unit id="982864854564645112" datatype="html">
@ -775,18 +778,18 @@
<source>JSON format invalid</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/api-shared/params-import/params-import.component.ts</context>
<context context-type="linenumber">81</context>
<context context-type="linenumber">107</context>
</context-group>
</trans-unit>
<trans-unit id="3714735999945287741" datatype="html">
<source>XML format invalid</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/api-shared/params-import/params-import.component.ts</context>
<context context-type="linenumber">93</context>
<context context-type="linenumber">119</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/api-shared/params-import/params-import.component.ts</context>
<context context-type="linenumber">99</context>
<context context-type="linenumber">125</context>
</context-group>
</trans-unit>
<trans-unit id="3099741642167775297" datatype="html">
@ -818,7 +821,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.component.html</context>
<context context-type="linenumber">4</context>
<context context-type="linenumber">12</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.html</context>
@ -962,11 +965,11 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">41</context>
<context context-type="linenumber">45</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">63</context>
<context context-type="linenumber">67</context>
</context-group>
</trans-unit>
<trans-unit id="7022070615528435141" datatype="html">
@ -993,7 +996,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">49</context>
<context context-type="linenumber">53</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/history/eo-history.component.html</context>
@ -1020,14 +1023,14 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-list/env-list.component.html</context>
<context context-type="linenumber">36</context>
<context context-type="linenumber">37</context>
</context-group>
</trans-unit>
<trans-unit id="7946321398772270161" datatype="html">
<source>Please import the file first</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/extension-select/import-api/import-api.component.ts</context>
<context context-type="linenumber">84</context>
<context context-type="linenumber">102</context>
</context-group>
</trans-unit>
<trans-unit id="8920655194304738099" datatype="html">
@ -1055,11 +1058,18 @@
<context context-type="linenumber">39</context>
</context-group>
</trans-unit>
<trans-unit id="1722727568438964625" datatype="html">
<source>Can&apos;t find the <x id="INTERPOLATION" equiv-text="{{ tipsMap[tipsType].type }}"/> you want? <x id="START_LINK" ctype="x-a" equiv-text="&lt;a (click)=&quot;openExtension()&quot;&gt;"/>find more...<x id="CLOSE_LINK" ctype="x-a" equiv-text="&lt;/a&gt;"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/extension-select/select/extension-select.component.html</context>
<context context-type="linenumber">48,49</context>
</context-group>
</trans-unit>
<trans-unit id="4141575162728577645" datatype="html">
<source>Only files in JSON format are supported</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/modules/extension-select/select/extension-select.component.ts</context>
<context context-type="linenumber">50</context>
<context context-type="linenumber">55</context>
</context-group>
</trans-unit>
<trans-unit id="1638393750541359885" datatype="html">
@ -1161,7 +1171,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">75</context>
<context context-type="linenumber">81</context>
</context-group>
</trans-unit>
<trans-unit id="6862614256726022711" datatype="html">
@ -1317,102 +1327,102 @@
<source>Enable</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">24</context>
<context context-type="linenumber">42</context>
</context-group>
</trans-unit>
<trans-unit id="9187855490716817910" datatype="html">
<source>Disable</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">25</context>
<context context-type="linenumber">43</context>
</context-group>
</trans-unit>
<trans-unit id="4474510732215437338" datatype="html">
<source>Uninstall</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">35</context>
<context context-type="linenumber">53</context>
</context-group>
</trans-unit>
<trans-unit id="6082171864197428613" datatype="html">
<source>Install</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">36</context>
<context context-type="linenumber">54</context>
</context-group>
</trans-unit>
<trans-unit id="ExtensionDetail" datatype="html">
<source>Details</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">59</context>
<context context-type="linenumber">77</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/list/extension-list.component.html</context>
<context context-type="linenumber">45</context>
<context context-type="linenumber">54</context>
</context-group>
</trans-unit>
<trans-unit id="2288513108450439427" datatype="html">
<source>Support</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">67</context>
<context context-type="linenumber">85</context>
</context-group>
</trans-unit>
<trans-unit id="7071470734400948493" datatype="html">
<source>Author</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">69</context>
<context context-type="linenumber">87</context>
</context-group>
</trans-unit>
<trans-unit id="6307174276781140101" datatype="html">
<source>Repository</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">71</context>
<context context-type="linenumber">89</context>
</context-group>
</trans-unit>
<trans-unit id="1305357231288135414" datatype="html">
<source>Homepage</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">76</context>
<context context-type="linenumber">94</context>
</context-group>
</trans-unit>
<trans-unit id="2277965193446993321" datatype="html">
<source>BugReport</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">79</context>
<context context-type="linenumber">97</context>
</context-group>
</trans-unit>
<trans-unit id="1383229426677683575" datatype="html">
<source>ChangeLog</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">85</context>
<context context-type="linenumber">103</context>
</context-group>
</trans-unit>
<trans-unit id="4752062398395712769" datatype="html">
<source>Changelog failed to load</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">88</context>
<context context-type="linenumber">106</context>
</context-group>
</trans-unit>
<trans-unit id="4271489383689390178" datatype="html">
<source>Reacquire</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">90</context>
<context context-type="linenumber">108</context>
</context-group>
</trans-unit>
<trans-unit id="5072832820665879339" datatype="html">
<source>Need Client</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.html</context>
<context context-type="linenumber">98</context>
<context context-type="linenumber">116</context>
</context-group>
</trans-unit>
<trans-unit id="3113924183421204994" datatype="html">
@ -1426,85 +1436,120 @@
<source>This plugin has no documentation yet.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/detail/extension-detail.component.ts</context>
<context context-type="linenumber">64</context>
<context context-type="linenumber">68</context>
</context-group>
</trans-unit>
<trans-unit id="1616102757855967475" datatype="html">
<source>All</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.component.ts</context>
<context context-type="linenumber">23</context>
<context context-type="linenumber">25</context>
</context-group>
</trans-unit>
<trans-unit id="8852490424970169127" datatype="html">
<source>Official</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.component.ts</context>
<context context-type="linenumber">29</context>
<context context-type="linenumber">31</context>
</context-group>
</trans-unit>
<trans-unit id="4894835484717268716" datatype="html">
<source>Installed</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.component.ts</context>
<context context-type="linenumber">34</context>
<context context-type="linenumber">37</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/list/extension-list.component.html</context>
<context context-type="linenumber">23</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="7790845996600319748" datatype="html">
<source>Data Migration</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.model.ts</context>
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="2798270190074840767" datatype="html">
<source>Themes</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.model.ts</context>
<context context-type="linenumber">80</context>
</context-group>
</trans-unit>
<trans-unit id="7037012573233878733" datatype="html">
<source>API Security</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.model.ts</context>
<context context-type="linenumber">85</context>
</context-group>
</trans-unit>
<trans-unit id="8693603235657020323" datatype="html">
<source>Other</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/extension/extension.model.ts</context>
<context context-type="linenumber">90</context>
</context-group>
</trans-unit>
<trans-unit id="6627551976444260400" datatype="html">
<source>or</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/third-login.component.ts</context>
<context context-type="linenumber">21</context>
</context-group>
</trans-unit>
<trans-unit id="417090665951241646" datatype="html">
<source> Sign In/Up with Github </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/third-login.component.ts</context>
<context context-type="linenumber">38,39</context>
</context-group>
</trans-unit>
<trans-unit id="7746219847230371421" datatype="html">
<source>Check your connection</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">25</context>
<context context-type="linenumber">26</context>
</context-group>
</trans-unit>
<trans-unit id="6670466038616853245" datatype="html">
<source> Can&apos;t connect right now, click to retry or </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">29</context>
<context context-type="linenumber">30</context>
</context-group>
</trans-unit>
<trans-unit id="7157352128865582233" datatype="html">
<source> config in the configuration </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">31</context>
</context-group>
</trans-unit>
<trans-unit id="2330577642930707695" datatype="html">
<source> Cancel </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">34,35</context>
<context context-type="linenumber">35,36</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">148,149</context>
<context context-type="linenumber">156,157</context>
</context-group>
</trans-unit>
<trans-unit id="5171192616638755303" datatype="html">
<source> Retry </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">37,38</context>
<context context-type="linenumber">38,39</context>
</context-group>
</trans-unit>
<trans-unit id="2332315133778294910" datatype="html">
<source>Sign In/Up</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">47</context>
</context-group>
</trans-unit>
<trans-unit id="4768749765465246664" datatype="html">
<source>Email</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">54</context>
<context context-type="linenumber">48</context>
</context-group>
</trans-unit>
<trans-unit id="3378481113311905011" datatype="html">
@ -1518,81 +1563,74 @@
<source>Enter Email</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">62</context>
</context-group>
</trans-unit>
<trans-unit id="1431416938026210429" datatype="html">
<source>Password</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">69</context>
<context context-type="linenumber">63</context>
</context-group>
</trans-unit>
<trans-unit id="343410938576058057" datatype="html">
<source>Enter password</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">71</context>
<context context-type="linenumber">76</context>
</context-group>
</trans-unit>
<trans-unit id="8997193598472389068" datatype="html">
<source> Please input your password </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">73</context>
<context context-type="linenumber">80</context>
</context-group>
</trans-unit>
<trans-unit id="3117479673302739706" datatype="html">
<source> Sign In/Up </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">92,93</context>
<context context-type="linenumber">99,100</context>
</context-group>
</trans-unit>
<trans-unit id="4342352304288823613" datatype="html">
<source>Open setting</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">104</context>
<context context-type="linenumber">112</context>
</context-group>
</trans-unit>
<trans-unit id="2810980568784396525" datatype="html">
<source> If you want to collaborate, please </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">108</context>
<context context-type="linenumber">116</context>
</context-group>
</trans-unit>
<trans-unit id="2325931007888087302" datatype="html">
<source> open the settings </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">109</context>
<context context-type="linenumber">117</context>
</context-group>
</trans-unit>
<trans-unit id="8968485714472715480" datatype="html">
<source> and fill in the configuration </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">110</context>
<context context-type="linenumber">118</context>
</context-group>
</trans-unit>
<trans-unit id="51815168613302326" datatype="html">
<source>Add Workspace</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">117</context>
<context context-type="linenumber">125</context>
</context-group>
</trans-unit>
<trans-unit id="6132791254957713421" datatype="html">
<source>Workspace Name</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">123</context>
<context context-type="linenumber">131</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">131</context>
<context context-type="linenumber">139</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/components/edit/workspace-edit.component.ts</context>
@ -1607,67 +1645,67 @@
<source> Confirm </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">151,152</context>
<context context-type="linenumber">159,160</context>
</context-group>
</trans-unit>
<trans-unit id="7576432225554445487" datatype="html">
<source>Oops, server fail</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">223</context>
<context context-type="linenumber">232</context>
</context-group>
</trans-unit>
<trans-unit id="8242579071554232999" datatype="html">
<source>Connect failed</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">228</context>
<context context-type="linenumber">237</context>
</context-group>
</trans-unit>
<trans-unit id="410921040667746587" datatype="html">
<source>Connect success</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">236</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="7989614159698494453" datatype="html">
<source>Please check you username or password</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">375</context>
<context context-type="linenumber">380</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">388</context>
<context context-type="linenumber">393</context>
</context-group>
</trans-unit>
<trans-unit id="6414010749852158762" datatype="html">
<source>Username must a email</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">385</context>
<context context-type="linenumber">390</context>
</context-group>
</trans-unit>
<trans-unit id="4357325080029989758" datatype="html">
<source>New workspace Failed !</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">456</context>
<context context-type="linenumber">459</context>
</context-group>
</trans-unit>
<trans-unit id="8475178885380093675" datatype="html">
<source>New workspace successfully !</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">459</context>
<context context-type="linenumber">462</context>
</context-group>
</trans-unit>
<trans-unit id="3142179252193934984" datatype="html">
<source>Upload local data to the cloud</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">469</context>
<context context-type="linenumber">472</context>
</context-group>
</trans-unit>
<trans-unit id="6521173091722594034" datatype="html">
@ -1675,21 +1713,21 @@
If you do not upload it now, you can also manually export the project data and import it into a new workspace later.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">470,471</context>
<context context-type="linenumber">473,474</context>
</context-group>
</trans-unit>
<trans-unit id="6932865105766151309" datatype="html">
<source>Upload</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">480</context>
<context context-type="linenumber">483</context>
</context-group>
</trans-unit>
<trans-unit id="3351051817560746765" datatype="html">
<source>Create Project Failed !</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/user-modal.component.ts</context>
<context context-type="linenumber">525</context>
<context context-type="linenumber">528</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/shared/store/effect.service.ts</context>
@ -2068,7 +2106,7 @@
<source>Copy</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">45</context>
<context context-type="linenumber">49</context>
</context-group>
<note priority="1" from="description">@Copy</note>
</trans-unit>
@ -2076,70 +2114,70 @@
<source>Add API</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
</trans-unit>
<trans-unit id="6661660398413994526" datatype="html">
<source>Add Subgroup</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">59</context>
<context context-type="linenumber">63</context>
</context-group>
</trans-unit>
<trans-unit id="Delete" datatype="html">
<source>Delete</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">67</context>
<context context-type="linenumber">71</context>
</context-group>
</trans-unit>
<trans-unit id="5908762969513689727" datatype="html">
<source>Edit Group</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">146</context>
<context context-type="linenumber">154</context>
</context-group>
</trans-unit>
<trans-unit id="3596210590059423029" datatype="html">
<source>Delete Group</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">155</context>
<context context-type="linenumber">163</context>
</context-group>
</trans-unit>
<trans-unit id="1623775429516238560" datatype="html">
<source>Deletion Confirmation?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">168</context>
<context context-type="linenumber">176</context>
</context-group>
</trans-unit>
<trans-unit id="9142685431369791033" datatype="html">
<source>Are you sure you want to delete the data &lt;strong title=&quot;<x id="PH" equiv-text="apiInfo.name"/>&quot;&gt;<x id="PH_1" equiv-text="apiInfo.name.length &gt; 50 ? `${apiInfo.name.slice(0, 50)}...` : apiInfo.name"/>&lt;/strong&gt; ? You cannot restore it once deleted!</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">169,171</context>
<context context-type="linenumber">177,179</context>
</context-group>
</trans-unit>
<trans-unit id="9124347207158517893" datatype="html">
<source>Add Group</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">187</context>
<context context-type="linenumber">195</context>
</context-group>
</trans-unit>
<trans-unit id="ImportAPI" datatype="html">
<source>Import API</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">197</context>
<context context-type="linenumber">205</context>
</context-group>
</trans-unit>
<trans-unit id="8216135513462227263" datatype="html">
<source>Failed to <x id="PH" equiv-text="title"/>,Please upgrade extension or try again later</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">207</context>
<context context-type="linenumber">215</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/setting/project-setting.component.ts</context>
@ -2150,7 +2188,7 @@
<source><x id="PH" equiv-text="title"/> successfully</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/tree/api-group-tree.component.ts</context>
<context context-type="linenumber">213</context>
<context context-type="linenumber">221</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/setting/project-setting.component.ts</context>
@ -2206,6 +2244,13 @@
<context context-type="linenumber">101</context>
</context-group>
</trans-unit>
<trans-unit id="1542191914491422952" datatype="html">
<source>Environment name length needs to be less than 32</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-edit/env-edit.component.ts</context>
<context context-type="linenumber">115</context>
</context-group>
</trans-unit>
<trans-unit id="New Environment" datatype="html">
<source>New Environment</source>
<context-group purpose="location">
@ -2224,35 +2269,35 @@
<source>Global variable</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">34</context>
<context context-type="linenumber">35</context>
</context-group>
</trans-unit>
<trans-unit id="6535580217730620642" datatype="html">
<source>No Global variables</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">44</context>
</context-group>
</trans-unit>
<trans-unit id="3387774914247817786" datatype="html">
<source>Environment Host</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">46</context>
<context context-type="linenumber">47</context>
</context-group>
</trans-unit>
<trans-unit id="6722201291617257193" datatype="html">
<source>Environment Global variable</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">51</context>
<context context-type="linenumber">52</context>
</context-group>
</trans-unit>
<trans-unit id="7622799679773767274" datatype="html">
<source>Manage Environment</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/env/env-select/env-select.component.ts</context>
<context context-type="linenumber">79</context>
<context context-type="linenumber">80</context>
</context-group>
</trans-unit>
<trans-unit id="7219712648243615821" datatype="html">
@ -2896,28 +2941,28 @@
<source>Connect to <x id="PH" equiv-text="this.getLink()"/> is failed</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/websocket/websocket.component.ts</context>
<context context-type="linenumber">266</context>
<context context-type="linenumber">288</context>
</context-group>
</trans-unit>
<trans-unit id="1163250179515496919" datatype="html">
<source>Do you want to leave the page?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/websocket/websocket.component.ts</context>
<context context-type="linenumber">313</context>
<context context-type="linenumber">335</context>
</context-group>
</trans-unit>
<trans-unit id="3828705763082853823" datatype="html">
<source>After leaving, the current long connection is no longer maintained, whether to confirm to leave?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/websocket/websocket.component.ts</context>
<context context-type="linenumber">314</context>
<context context-type="linenumber">336</context>
</context-group>
</trans-unit>
<trans-unit id="2273088133016853024" datatype="html">
<source>Leave</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/pages/workspace/project/api/websocket/websocket.component.ts</context>
<context context-type="linenumber">326</context>
<context context-type="linenumber">348</context>
</context-group>
</trans-unit>
<trans-unit id="4157564596155275219" datatype="html">

View File

@ -105,6 +105,13 @@ export class ApiTabService {
}
}
}
batchCloseTabById(uuidList) {
const result = this.apiTabComponent
.getTabs()
.filter(it => uuidList.includes(it.params.uuid))
.map(it => it.uuid);
this.apiTabComponent.batchCloseTab(result);
}
onChildComponentInit(componentRef) {
this.componentRef = componentRef;
}

View File

@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { EoNgFeedbackMessageService } from 'eo-ng-feedback';
import { requestMethodMap } from 'eo/workbench/browser/src/app/modules/api-shared/api.model';
import { ImportApiComponent } from 'eo/workbench/browser/src/app/modules/extension-select/import-api/import-api.component';
import { ApiTabService } from 'eo/workbench/browser/src/app/pages/workspace/project/api/api-tab.service';
import { ApiGroupEditComponent } from 'eo/workbench/browser/src/app/pages/workspace/project/api/components/group/edit/api-group-edit.component';
import { ModalService } from 'eo/workbench/browser/src/app/shared/services/modal.service';
import { GroupCreateDto, GroupUpdateDto } from 'eo/workbench/browser/src/app/shared/services/storage/db/dto/group.dto';
@ -20,9 +21,7 @@ import { ApiStoreService } from '../../../service/store/api-state.service';
export type GroupAction = 'new' | 'edit' | 'delete';
const getAllAPIId = ({ id, children = [] }) => {
return [id, ...children.map(getAllAPIId)];
};
const getAllAPIId = ({ id, children = [] }: any) => [id, ...children.map(getAllAPIId)];
@Component({
selector: 'pc-api-group-tree',
templateUrl: './api-group-tree.component.html',
@ -82,6 +81,7 @@ export class ApiGroupTreeComponent implements OnInit {
private modalService: ModalService,
private router: Router,
private route: ActivatedRoute,
private tab: ApiTabService,
private message: EoNgFeedbackMessageService
) {}
@ -140,8 +140,10 @@ export class ApiGroupTreeComponent implements OnInit {
nzContent: ApiGroupEditComponent,
nzComponentParams: params,
nzOnOk: () => {
console.log('this.apiGroupTree', params.group);
// const idList = getAllAPIId(params.group)
if (params.action === 'delete') {
const idList = [...new Set(getAllAPIId(params.group).flat(Infinity))];
this.tab.batchCloseTabById(idList);
}
return modal.componentInstance.submit().then(data => {
if (params.action !== 'new') return;
this.expandKeys = [...(this.expandKeys || []), modal.componentInstance.group.parentId];