Currently, the name and date filters in the Restore Versions modal are always enabled, even if there are no versioned files present. With this change, they are enabled only when there are no errors and versioned files actually exist. In addition to disabling the filters, also completely skip date picker generation, as it serves no function while still displaying a non-sense date range, which starts today and ends in the past. Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
@@ -2686,6 +2686,8 @@ angular.module('syncthing.core')
|
||||
if (closed) {
|
||||
resetRestoreVersions();
|
||||
return;
|
||||
} else if ($scope.sizeOf($scope.restoreVersions.versions) === '0') {
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.restoreVersions.tree = $("#restoreTree").fancytree({
|
||||
@@ -2702,7 +2704,7 @@ angular.module('syncthing.core')
|
||||
indentation: 24,
|
||||
},
|
||||
strings: {
|
||||
loading: $translate.instant("Loading..."),
|
||||
loading: $translate.instant("Loading data..."),
|
||||
loadError: $translate.instant("Failed to load file versions."),
|
||||
noData: $translate.instant("There are no file versions to restore.")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user