From 92e6c504d77f0bb0de2e11f756258aac1ca99dce Mon Sep 17 00:00:00 2001 From: Su Yang Date: Sun, 27 Oct 2024 15:57:32 +0800 Subject: [PATCH] feat: move to top, https://github.com/ziahamza/webui-aria2/pull/500 --- src/index-template.html | 5 +++++ src/js/ctrls/main.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/index-template.html b/src/index-template.html index 1df212d..48b23f1 100644 --- a/src/index-template.html +++ b/src/index-template.html @@ -539,6 +539,11 @@ {{ 'Remove' | translate }} + +
  • + {{ 'Move to Top' | translate }} +
  • diff --git a/src/js/ctrls/main.js b/src/js/ctrls/main.js index e7f2215..bab49a8 100644 --- a/src/js/ctrls/main.js +++ b/src/js/ctrls/main.js @@ -686,6 +686,9 @@ export default angular scope.moveUp = function(d) { rpc.once("changePosition", [d.gid, -1, "POS_CUR"]); }; + scope.moveToTop = function(d) { + rpc.once("changePosition", [d.gid, 0, "POS_SET"]); + }; } ]) .filter("objFilter", function() {