diff --git a/www/scripts/controllers/settings-controller.js b/www/scripts/controllers/settings-controller.js index 83c4f51..d3586d1 100644 --- a/www/scripts/controllers/settings-controller.js +++ b/www/scripts/controllers/settings-controller.js @@ -18,9 +18,12 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$ $scope.key = ''; $scope.url = ''; $scope.quickUrl = {}; + $scope.loading = false; + $scope.href = ""; $scope.changeForm = async function (index) { console.log("changeForm = ", index); + $scope.href = ""; $scope.form = $scope.form.map(() => false); $scope.form[index] = true; if (index == 0 || index == 1 || index == 4) { @@ -113,8 +116,13 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$ } $scope.exportBookmark = async function () { + $scope.loading = true; let fileName = await get('bookmarkBackup'); - $window.open(`${document.location.origin}/api/bookmarkDownload?fileName=${fileName}`, '_blank'); + $timeout(() => { + $scope.href = `${document.location.origin}/api/bookmarkDownload?fileName=${fileName}`; + $scope.loading = false; + $window.open($scope.href, '_blank'); + }) } setTimeout(function () { diff --git a/www/views/settings.html b/www/views/settings.html index 3461b1b..563a1c9 100644 --- a/www/views/settings.html +++ b/www/views/settings.html @@ -61,7 +61,7 @@
| 快捷键 | +快捷键 | 网站地址 | -操作 | +操作 |
|---|---|---|---|---|
| {{key}} |
- |
- |