merge some code from AriaNg Native

This commit is contained in:
MaysWind
2022-10-17 00:05:51 +08:00
parent 207cbd1d90
commit b55765be1b
5 changed files with 18 additions and 3 deletions

View File

@@ -6,10 +6,12 @@
var globalStatRefreshPromise = null;
var refreshPageTitle = function () {
$document[0].title = ariaNgTitleService.getFinalTitleByGlobalStat({
var title = ariaNgTitleService.getFinalTitleByGlobalStat({
globalStat: $scope.globalStat,
currentRpcProfile: getCurrentRPCProfile()
});
$document[0].title = title;
};
var refreshGlobalStat = function (silent, callback) {
@@ -63,6 +65,7 @@
$scope.quickSettingContext = null;
$scope.rpcSettings = ariaNgSettingService.getAllRpcSettings();
$scope.currentRpcProfile = getCurrentRPCProfile();
$scope.isCurrentRpcUseWebSocket = ariaNgSettingService.isCurrentRpcUseWebSocket();
$scope.isTaskSelected = function () {

View File

@@ -80,8 +80,8 @@
showInfo: function (title, text, callback, extendSettings) {
this.showDialog(title, text, 'info', callback, extendSettings);
},
showError: function (text, callback) {
this.showDialog('Error', text, 'error', callback);
showError: function (text, callback, extendSettings) {
this.showDialog('Error', text, 'error', callback, extendSettings);
},
showOperationSucceeded: function (text, callback) {
this.showDialog('Operation Succeeded', text, 'success', callback);

View File

@@ -75,6 +75,10 @@
options.type = 'primary';
}
if (!options.positionY) {
options.positionY = 'top';
}
return Notification[options.type](options);
};

View File

@@ -116,6 +116,10 @@
getFinalTitle: function (context) {
var title = ariaNgSettingService.getTitle();
if (!title) {
return ariaNgConstants.title;
}
context = angular.extend({
downloadingCount: 0,
waitingCount: 0,

View File

@@ -8,6 +8,10 @@
padding-bottom: 6px;
}
.btn.btn-xs:not(.is-loading) .btn-spinner:not(:required) {
margin-left: -21px;
}
.progress-bar {
-webkit-transition: initial !important;
-moz-transition: initial !important;