Skip to content

A full-featured download manager.

feat: task show connections

Dr_rOot5e735b513d4c
diff --git a/src/renderer/assets/icons/node.svg b/src/renderer/assets/icons/node.svg
new file mode 100644
index 00000000..b99cfb59
--- /dev/null
+++ b/src/renderer/assets/icons/node.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
+ <g class="nc-icon-wrapper" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor">
+ <polyline data-cap="butt" fill="none" stroke-miterlimit="10" points="12,9 12,13 7.8,16.1 "/>
+ <line data-cap="butt" fill="none" stroke-miterlimit="10" x1="12" y1="13" x2="16.2" y2="16.1"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="12" cy="5" r="4"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="5" cy="19" r="4"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="19" cy="19" r="4"/>
+ </g>
+</svg>
diff --git a/src/renderer/components/Icons/node.js b/src/renderer/components/Icons/node.js
new file mode 100644
index 00000000..9bff2bf3
--- /dev/null
+++ b/src/renderer/components/Icons/node.js
@@ -0,0 +1,20 @@
+import Icon from '@/components/Icons/Icon'
+
+Icon.register({
+ 'node': {
+ 'width': 24,
+ 'height': 24,
+ 'raw': `
+ <polyline data-cap="butt" fill="none" stroke-miterlimit="10" points="12,9 12,13 7.8,16.1 "/>
+ <line data-cap="butt" fill="none" stroke-miterlimit="10" x1="12" y1="13" x2="16.2" y2="16.1"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="12" cy="5" r="4"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="5" cy="19" r="4"/>
+ <circle fill="none" stroke="currentColor" stroke-miterlimit="10" cx="19" cy="19" r="4"/>`,
+ 'g': {
+ 'stroke': 'currentColor',
+ 'stroke-linecap': 'round',
+ 'stroke-linejoin': 'round',
+ 'stroke-width': '2'
+ }
+ }
+})
diff --git a/src/renderer/components/Task/TaskItem.vue b/src/renderer/components/Task/TaskItem.vue
index aa041754..2296e99d 100644
--- a/src/renderer/components/Task/TaskItem.vue
+++ b/src/renderer/components/Task/TaskItem.vue
@@ -29,6 +29,10 @@
})
}}
</span>
+ <span class="task-connections">
+ <i><mo-icon name="node" width="10" height="10" /></i>
+ <i>{{ task.connections }}</i>
+ </span>
</div>
</el-col>
</el-row>
@@ -39,12 +43,7 @@
<script>
import TaskItemActions from './TaskItemActions'
import TaskProgress from './TaskProgress'
- import '@/components/Icons/task-start-line'
- import '@/components/Icons/task-pause-line'
- import '@/components/Icons/delete'
- import '@/components/Icons/folder'
- import '@/components/Icons/link'
- import '@/components/Icons/more'
+ import '@/components/Icons/node'
import {
getTaskName,
getTaskFullPath,
@@ -160,4 +159,10 @@
min-height: 14px;
text-align: right;
}
+ .task-connections {
+ margin-left: 8px;
+ & > i {
+ vertical-align: middle;
+ }
+ }
</style>
diff --git a/src/renderer/components/Task/TaskItemInfo.vue b/src/renderer/components/Task/TaskItemInfo.vue
index b13506ea..f58bd2aa 100644
--- a/src/renderer/components/Task/TaskItemInfo.vue
+++ b/src/renderer/components/Task/TaskItemInfo.vue
@@ -38,6 +38,10 @@
})
}}
</span>
+ <span class="task-connections">
+ <i><mo-icon name="node" width="10" height="10" /></i>
+ <i>{{ task.connections }}</i>
+ </span>
</div>
</el-col>
</el-row>
@@ -158,4 +162,10 @@
min-height: 14px;
text-align: right;
}
+ .task-connections {
+ margin-left: 8px;
+ & > i {
+ vertical-align: middle;
+ }
+ }
</style>
diff --git a/src/renderer/store/modules/preference.js b/src/renderer/store/modules/preference.js
index c7db9bec..efad854f 100644
--- a/src/renderer/store/modules/preference.js
+++ b/src/renderer/store/modules/preference.js
@@ -34,7 +34,7 @@ const actions = {
changeThemeConfig ({ commit }, theme) {
commit('UPDATE_PREFERENCE_DATA', { theme })
},
- fetchBtTracker ({ state }, trackerSource = []) {
+ fetchBtTracker (_, trackerSource = []) {
return api.fetchBtTrackerFromGitHub(trackerSource)
},
toggleEngineMode () {