diff --git a/src/langs/zh_Hans.txt b/src/langs/zh_Hans.txt index 8ed43f8..db895fe 100644 --- a/src/langs/zh_Hans.txt +++ b/src/langs/zh_Hans.txt @@ -175,6 +175,7 @@ Add New RPC Setting=添加新 RPC 设置 Are you sure you want to remove rpc setting "{{rpcName}}"?=您是否要删除 RPC 设置 "{{rpcName}}"? Updating Global Stat Interval=全局状态更新间隔 Updating Task Information Interval=任务信息更新间隔 +Swipe Gesture=滑动手势 Change Tasks Order by Drag-and-drop=拖拽任务排序 Action After Creating New Tasks=创建新任务后执行操作 Navigate to Task List Page=转到任务列表页面 diff --git a/src/langs/zh_Hant.txt b/src/langs/zh_Hant.txt index fbf8923..e4ced0a 100644 --- a/src/langs/zh_Hant.txt +++ b/src/langs/zh_Hant.txt @@ -175,6 +175,7 @@ Add New RPC Setting=加入新 RPC 設定 Are you sure you want to remove rpc setting "{{rpcName}}"?=您是否要刪除 RPC 設定 "{{rpcName}}"? Updating Global Stat Interval=全域狀態更新間隔 Updating Task Information Interval=工作資訊更新間隔 +Swipe Gesture=滑動手勢 Change Tasks Order by Drag-and-drop=拖拽工作排序 Action After Creating New Tasks=建立新工作後執行操作 Navigate to Task List Page=轉到工作清單頁面 diff --git a/src/scripts/config/constants.js b/src/scripts/config/constants.js index 6a49a71..05ea757 100644 --- a/src/scripts/config/constants.js +++ b/src/scripts/config/constants.js @@ -37,6 +37,7 @@ extendRpcServers: [], globalStatRefreshInterval: 1000, downloadTaskRefreshInterval: 1000, + swipeGesture: true, dragAndDropTasks: true, rpcListDisplayOrder: 'recentlyUsed', afterCreatingNewTask: 'task-list', diff --git a/src/scripts/config/defaultLanguage.js b/src/scripts/config/defaultLanguage.js index 9163424..b087f33 100644 --- a/src/scripts/config/defaultLanguage.js +++ b/src/scripts/config/defaultLanguage.js @@ -179,6 +179,7 @@ 'Are you sure you want to remove rpc setting "{{rpcName}}"?': 'Are you sure you want to remove rpc setting "{{rpcName}}"?', 'Updating Global Stat Interval': 'Updating Global Stat Interval', 'Updating Task Information Interval': 'Updating Task Information Interval', + 'Swipe Gesture': 'Swipe Gesture', 'Change Tasks Order by Drag-and-drop': 'Change Tasks Order by Drag-and-drop', 'Action After Creating New Tasks': 'Action After Creating New Tasks', 'Navigate to Task List Page': 'Navigate to Task List Page', diff --git a/src/scripts/controllers/settings-ariang.js b/src/scripts/controllers/settings-ariang.js index 848a365..e6e2ee6 100644 --- a/src/scripts/controllers/settings-ariang.js +++ b/src/scripts/controllers/settings-ariang.js @@ -185,6 +185,10 @@ ariaNgSettingService.setRPCListDisplayOrder(value); }; + $scope.setSwipeGesture = function (value) { + ariaNgSettingService.setSwipeGesture(value); + }; + $scope.setDragAndDropTasks = function (value) { ariaNgSettingService.setDragAndDropTasks(value); }; diff --git a/src/scripts/core/root.js b/src/scripts/core/root.js index b21168b..034e76a 100644 --- a/src/scripts/core/root.js +++ b/src/scripts/core/root.js @@ -345,6 +345,10 @@ $rootScope.swipeActions = { leftSwipe: function () { + if (!ariaNgSettingService.getSwipeGesture()) { + return; + } + if (isSidebarShowInSmallScreen()) { hideSidebar(); return; @@ -356,6 +360,10 @@ } }, rightSwipe: function () { + if (!ariaNgSettingService.getSwipeGesture()) { + return; + } + if (!this.extendRightSwipe || (angular.isFunction(this.extendRightSwipe) && !this.extendRightSwipe())) { showSidebar(); diff --git a/src/scripts/services/ariaNgSettingService.js b/src/scripts/services/ariaNgSettingService.js index 59fad66..de2172d 100644 --- a/src/scripts/services/ariaNgSettingService.js +++ b/src/scripts/services/ariaNgSettingService.js @@ -395,6 +395,12 @@ setDownloadTaskRefreshInterval: function (value) { setOption('downloadTaskRefreshInterval', Math.max(parseInt(value), 0)); }, + getSwipeGesture: function () { + return getOption('swipeGesture'); + }, + setSwipeGesture: function (value) { + setOption('swipeGesture', value); + }, getDragAndDropTasks: function () { return getOption('dragAndDropTasks'); }, diff --git a/src/views/settings-ariang.html b/src/views/settings-ariang.html index 44dd556..3378599 100644 --- a/src/views/settings-ariang.html +++ b/src/views/settings-ariang.html @@ -135,6 +135,17 @@ +
+
+ Swipe Gesture +
+
+ +
+
Change Tasks Order by Drag-and-drop