gui: Tweak whitespace (#8587)
This commit is contained in:
parent
7a402409f1
commit
a13bb926b7
|
@ -164,8 +164,8 @@ table.table-auto td {
|
||||||
.reception-4 {
|
.reception-4 {
|
||||||
background: url('../../vendor/bootstrap/fonts/reception-4.svg') no-repeat;
|
background: url('../../vendor/bootstrap/fonts/reception-4.svg') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reception {
|
.reception {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -739,7 +739,7 @@
|
||||||
<h4 class="panel-title">
|
<h4 class="panel-title">
|
||||||
<identicon class="panel-icon" data-value="deviceCfg.deviceID"></identicon>
|
<identicon class="panel-icon" data-value="deviceCfg.deviceID"></identicon>
|
||||||
<span class="pull-right text-{{deviceClass(deviceCfg)}}">
|
<span class="pull-right text-{{deviceClass(deviceCfg)}}">
|
||||||
<span ng-switch="deviceStatus(deviceCfg)" class="remote-devices-panel">
|
<span ng-switch="deviceStatus(deviceCfg)" class="remote-devices-panel">
|
||||||
<span ng-switch-when="insync"><span class="hidden-xs" translate>Up to Date</span><span class="visible-xs" aria-label="{{'Up to Date' | translate}}"><i class="fas fa-fw fa-check"></i></span></span>
|
<span ng-switch-when="insync"><span class="hidden-xs" translate>Up to Date</span><span class="visible-xs" aria-label="{{'Up to Date' | translate}}"><i class="fas fa-fw fa-check"></i></span></span>
|
||||||
<span ng-switch-when="unused-insync"><span class="hidden-xs" translate>Connected (Unused)</span><span class="visible-xs" aria-label="{{'Connected (Unused)' | translate}}"><i class="fas fa-fw fa-unlink"></i></span></span>
|
<span ng-switch-when="unused-insync"><span class="hidden-xs" translate>Connected (Unused)</span><span class="visible-xs" aria-label="{{'Connected (Unused)' | translate}}"><i class="fas fa-fw fa-unlink"></i></span></span>
|
||||||
<span ng-switch-when="syncing">
|
<span ng-switch-when="syncing">
|
||||||
|
@ -753,7 +753,7 @@
|
||||||
<span ng-switch="rdConnType(deviceCfg.deviceID)" class="remote-devices-panel">
|
<span ng-switch="rdConnType(deviceCfg.deviceID)" class="remote-devices-panel">
|
||||||
<span ng-switch-when="tcplan" class="reception reception-4 reception-theme"></span>
|
<span ng-switch-when="tcplan" class="reception reception-4 reception-theme"></span>
|
||||||
<span ng-switch-when="tcpwan" class="reception reception-3 reception-theme"></span>
|
<span ng-switch-when="tcpwan" class="reception reception-3 reception-theme"></span>
|
||||||
<span ng-switch-when="quic" class="reception reception-2 reception-theme"></span>
|
<span ng-switch-when="quic" class="reception reception-2 reception-theme"></span>
|
||||||
<span ng-switch-when="relay" class="reception reception-1 reception-theme"></span>
|
<span ng-switch-when="relay" class="reception reception-1 reception-theme"></span>
|
||||||
<span ng-switch-when="disconnected" class="reception reception-0 reception-theme"></span>
|
<span ng-switch-when="disconnected" class="reception reception-0 reception-theme"></span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -184,7 +184,7 @@ angular.module('syncthing.core')
|
||||||
// A network error, not an HTTP error
|
// A network error, not an HTTP error
|
||||||
$scope.$emit(Events.OFFLINE);
|
$scope.$emit(Events.OFFLINE);
|
||||||
} else if (arg.status >= 400 && arg.status <= 599 && arg.status != 501) {
|
} else if (arg.status >= 400 && arg.status <= 599 && arg.status != 501) {
|
||||||
// A genuine HTTP error. 501/NotImplemented is considered intentional
|
// A genuine HTTP error. 501/NotImplemented is considered intentional
|
||||||
// and not an error which we need to act upon.
|
// and not an error which we need to act upon.
|
||||||
$('#networkError').modal('hide');
|
$('#networkError').modal('hide');
|
||||||
$('#restarting').modal('hide');
|
$('#restarting').modal('hide');
|
||||||
|
@ -627,7 +627,7 @@ angular.module('syncthing.core')
|
||||||
}
|
}
|
||||||
$scope.completion[device][folder] = data;
|
$scope.completion[device][folder] = data;
|
||||||
recalcCompletion(device);
|
recalcCompletion(device);
|
||||||
}).error(function(data, status, headers, config) {
|
}).error(function (data, status, headers, config) {
|
||||||
if (status === 404) {
|
if (status === 404) {
|
||||||
console.log("refreshCompletion:", data);
|
console.log("refreshCompletion:", data);
|
||||||
} else {
|
} else {
|
||||||
|
@ -814,7 +814,7 @@ angular.module('syncthing.core')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.pendingIsRemoteEncrypted = function(folderID, deviceID) {
|
$scope.pendingIsRemoteEncrypted = function (folderID, deviceID) {
|
||||||
var pending = $scope.pendingFolders[folderID];
|
var pending = $scope.pendingFolders[folderID];
|
||||||
if (!pending || !pending.offeredBy || !pending.offeredBy[deviceID]) {
|
if (!pending || !pending.offeredBy || !pending.offeredBy[deviceID]) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1193,32 +1193,22 @@ angular.module('syncthing.core')
|
||||||
return '?';
|
return '?';
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.rdConnType = function(deviceID) {
|
$scope.rdConnType = function (deviceID) {
|
||||||
var conn = $scope.connections[deviceID];
|
var conn = $scope.connections[deviceID];
|
||||||
if(!conn)
|
if (!conn) return "-1";
|
||||||
return "-1";
|
if (conn.type.indexOf('relay') === 0) return "relay";
|
||||||
|
if (conn.type.indexOf('quic') === 0) return "quic";
|
||||||
if (conn.type.indexOf('relay') === 0)
|
if (conn.type.indexOf('tcp') === 0) return "tcp" + rdAddrType(conn.address);
|
||||||
return "relay";
|
|
||||||
|
|
||||||
if (conn.type.indexOf('quic') === 0)
|
|
||||||
return "quic";
|
|
||||||
|
|
||||||
if(conn.type.indexOf('tcp') === 0)
|
|
||||||
return "tcp"+rdAddrType(conn.address);
|
|
||||||
|
|
||||||
return "disconnected";
|
return "disconnected";
|
||||||
}
|
}
|
||||||
|
|
||||||
function rdAddrType(address) {
|
function rdAddrType(address) {
|
||||||
var re = /(^(?:127\.|0?10\.|172\.0?1[6-9]\.|172\.0?2[0-9]\.|172\.0?3[01]\.|192\.168\.|169\.254\.|::1|[fF][cCdD][0-9a-fA-F]{2}:|[fF][eE][89aAbB][0-9a-fA-F]:))/
|
var re = /(^(?:127\.|0?10\.|172\.0?1[6-9]\.|172\.0?2[0-9]\.|172\.0?3[01]\.|192\.168\.|169\.254\.|::1|[fF][cCdD][0-9a-fA-F]{2}:|[fF][eE][89aAbB][0-9a-fA-F]:))/
|
||||||
if(re.test(address))
|
if (re.test(address)) return "lan";
|
||||||
return "lan";
|
|
||||||
|
|
||||||
return "wan";
|
return "wan";
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.rdConnTypeString = function(type) {
|
$scope.rdConnTypeString = function (type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "relay":
|
case "relay":
|
||||||
return $translate.instant('Relay');
|
return $translate.instant('Relay');
|
||||||
|
@ -1233,7 +1223,7 @@ angular.module('syncthing.core')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.rdConnDetails = function(type) {
|
$scope.rdConnDetails = function (type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "relay":
|
case "relay":
|
||||||
return $translate.instant('Connections via relays might be rate limited by the relay');
|
return $translate.instant('Connections via relays might be rate limited by the relay');
|
||||||
|
@ -2106,7 +2096,7 @@ angular.module('syncthing.core')
|
||||||
editFolderModal(initialTab);
|
editFolderModal(initialTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.internalVersioningEnabled = function(guiVersioning) {
|
$scope.internalVersioningEnabled = function (guiVersioning) {
|
||||||
if (!$scope.currentFolder._guiVersioning) {
|
if (!$scope.currentFolder._guiVersioning) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2143,7 +2133,7 @@ angular.module('syncthing.core')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.editFolderExisting = function(folderCfg, initialTab) {
|
$scope.editFolderExisting = function (folderCfg, initialTab) {
|
||||||
$scope.currentFolder = angular.copy(folderCfg);
|
$scope.currentFolder = angular.copy(folderCfg);
|
||||||
$scope.currentFolder._editing = "existing";
|
$scope.currentFolder._editing = "existing";
|
||||||
editFolderLoadIgnores();
|
editFolderLoadIgnores();
|
||||||
|
@ -2158,7 +2148,7 @@ angular.module('syncthing.core')
|
||||||
|
|
||||||
function editFolderGetIgnores() {
|
function editFolderGetIgnores() {
|
||||||
return $http.get(urlbase + '/db/ignores?folder=' + encodeURIComponent($scope.currentFolder.id))
|
return $http.get(urlbase + '/db/ignores?folder=' + encodeURIComponent($scope.currentFolder.id))
|
||||||
.then(function(r) {
|
.then(function (r) {
|
||||||
return r.data;
|
return r.data;
|
||||||
}, function (response) {
|
}, function (response) {
|
||||||
$scope.ignores.text = $translate.instant("Failed to load ignore patterns.");
|
$scope.ignores.text = $translate.instant("Failed to load ignore patterns.");
|
||||||
|
@ -2168,7 +2158,7 @@ angular.module('syncthing.core')
|
||||||
|
|
||||||
function editFolderLoadIgnores() {
|
function editFolderLoadIgnores() {
|
||||||
editFolderLoadingIgnores();
|
editFolderLoadingIgnores();
|
||||||
return editFolderGetIgnores().then(function(data) {
|
return editFolderGetIgnores().then(function (data) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2365,7 +2355,7 @@ angular.module('syncthing.core')
|
||||||
$scope.currentFolder._editing = "new-ignores";
|
$scope.currentFolder._editing = "new-ignores";
|
||||||
$('.nav-tabs a[href="#folder-ignores"]').tab('show');
|
$('.nav-tabs a[href="#folder-ignores"]').tab('show');
|
||||||
return editFolderGetIgnores();
|
return editFolderGetIgnores();
|
||||||
}).then(function(data) {
|
}).then(function (data) {
|
||||||
// Error getting ignores -> leave error message.
|
// Error getting ignores -> leave error message.
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
|
@ -2373,7 +2363,7 @@ angular.module('syncthing.core')
|
||||||
if ((data.ignore && data.ignore.length > 0) || data.error) {
|
if ((data.ignore && data.ignore.length > 0) || data.error) {
|
||||||
editFolderInitIgnores(data.ignore, data.error);
|
editFolderInitIgnores(data.ignore, data.error);
|
||||||
} else {
|
} else {
|
||||||
getDefaultIgnores().then(function(lines) {
|
getDefaultIgnores().then(function (lines) {
|
||||||
setIgnoresText(lines);
|
setIgnoresText(lines);
|
||||||
$scope.ignores.defaultLines = lines;
|
$scope.ignores.defaultLines = lines;
|
||||||
$scope.ignores.disabled = false;
|
$scope.ignores.disabled = false;
|
||||||
|
@ -2389,7 +2379,7 @@ angular.module('syncthing.core')
|
||||||
var ignores = ignoresArray();
|
var ignores = ignoresArray();
|
||||||
|
|
||||||
function arrayDiffers(a, b) {
|
function arrayDiffers(a, b) {
|
||||||
return !a !== !b || a.length !== b.length || a.some(function(v, i) { return v !== b[i]; });
|
return !a !== !b || a.length !== b.length || a.some(function (v, i) { return v !== b[i]; });
|
||||||
}
|
}
|
||||||
if (arrayDiffers(ignores, $scope.ignores.originalLines)) {
|
if (arrayDiffers(ignores, $scope.ignores.originalLines)) {
|
||||||
return saveIgnores(ignores);
|
return saveIgnores(ignores);
|
||||||
|
@ -2693,7 +2683,7 @@ angular.module('syncthing.core')
|
||||||
source: buildTree($scope.restoreVersions.versions),
|
source: buildTree($scope.restoreVersions.versions),
|
||||||
renderColumns: function (event, data) {
|
renderColumns: function (event, data) {
|
||||||
// Case insensitive sort with folders on top.
|
// Case insensitive sort with folders on top.
|
||||||
var cmp = function(a, b) {
|
var cmp = function (a, b) {
|
||||||
var x = (a.isFolder() ? "0" : "1") + a.title.toLowerCase(),
|
var x = (a.isFolder() ? "0" : "1") + a.title.toLowerCase(),
|
||||||
y = (b.isFolder() ? "0" : "1") + b.title.toLowerCase();
|
y = (b.isFolder() ? "0" : "1") + b.title.toLowerCase();
|
||||||
return x === y ? 0 : x > y ? 1 : -1;
|
return x === y ? 0 : x > y ? 1 : -1;
|
||||||
|
@ -3193,7 +3183,7 @@ angular.module('syncthing.core')
|
||||||
folderType: '@',
|
folderType: '@',
|
||||||
untrusted: '=',
|
untrusted: '=',
|
||||||
},
|
},
|
||||||
link: function(scope, elem, attrs) {
|
link: function (scope, elem, attrs) {
|
||||||
var plain = false;
|
var plain = false;
|
||||||
scope.togglePasswordVisibility = function() {
|
scope.togglePasswordVisibility = function() {
|
||||||
scope.plain = !scope.plain;
|
scope.plain = !scope.plain;
|
||||||
|
|
Loading…
Reference in New Issue