summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Colomb <src@andre.colomb.de>2022-10-07 08:10:17 +0200
committerGitHub <noreply@github.com>2022-10-07 08:10:17 +0200
commita13bb926b731e744c88c75fa931a7a730e6050c9 (patch)
treecf5059a67c2a2ad69df5bd1fddfb1c2b9168aaee
parent7a402409f15f888e38ca0fef489d5ad369e8a9ac (diff)
gui: Tweak whitespace (#8587)
-rw-r--r--gui/default/assets/css/overrides.css4
-rw-r--r--gui/default/index.html4
-rwxr-xr-xgui/default/syncthing/core/syncthingController.js50
3 files changed, 24 insertions, 34 deletions
diff --git a/gui/default/assets/css/overrides.css b/gui/default/assets/css/overrides.css
index 5186ec5c26..0afa7ece9c 100644
--- a/gui/default/assets/css/overrides.css
+++ b/gui/default/assets/css/overrides.css
@@ -164,8 +164,8 @@ table.table-auto td {
.reception-4 {
background: url('../../vendor/bootstrap/fonts/reception-4.svg') no-repeat;
}
-
-.reception {
+
+.reception {
width: 1em;
height: 1em;
display: inline-block;
diff --git a/gui/default/index.html b/gui/default/index.html
index d197b0e092..e1a200584d 100644
--- a/gui/default/index.html
+++ b/gui/default/index.html
@@ -739,7 +739,7 @@
<h4 class="panel-title">
<identicon class="panel-icon" data-value="deviceCfg.deviceID"></identicon>
<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="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">
@@ -753,7 +753,7 @@
<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="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="disconnected" class="reception reception-0 reception-theme"></span>
</span>
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js
index 1280145f59..96e29e6312 100755
--- a/gui/default/syncthing/core/syncthingController.js
+++ b/gui/default/syncthing/core/syncthingController.js
@@ -184,7 +184,7 @@ angular.module('syncthing.core')
// A network error, not an HTTP error
$scope.$emit(Events.OFFLINE);
} 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.
$('#networkError').modal('hide');
$('#restarting').modal('hide');
@@ -627,7 +627,7 @@ angular.module('syncthing.core')
}
$scope.completion[device][folder] = data;
recalcCompletion(device);
- }).error(function(data, status, headers, config) {
+ }).error(function (data, status, headers, config) {
if (status === 404) {
console.log("refreshCompletion:", data);
} else {
@@ -814,7 +814,7 @@ angular.module('syncthing.core')
});
}
- $scope.pendingIsRemoteEncrypted = function(folderID, deviceID) {
+ $scope.pendingIsRemoteEncrypted = function (folderID, deviceID) {
var pending = $scope.pendingFolders[folderID];
if (!pending || !pending.offeredBy || !pending.offeredBy[deviceID]) {
return false;
@@ -1193,32 +1193,22 @@ angular.module('syncthing.core')
return '?';
};
- $scope.rdConnType = function(deviceID) {
+ $scope.rdConnType = function (deviceID) {
var conn = $scope.connections[deviceID];
- if(!conn)
- return "-1";
-
- if (conn.type.indexOf('relay') === 0)
- return "relay";
-
- if (conn.type.indexOf('quic') === 0)
- return "quic";
-
- if(conn.type.indexOf('tcp') === 0)
- return "tcp"+rdAddrType(conn.address);
-
+ if (!conn) return "-1";
+ if (conn.type.indexOf('relay') === 0) return "relay";
+ if (conn.type.indexOf('quic') === 0) return "quic";
+ if (conn.type.indexOf('tcp') === 0) return "tcp" + rdAddrType(conn.address);
return "disconnected";
}
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]:))/
- if(re.test(address))
- return "lan";
-
+ if (re.test(address)) return "lan";
return "wan";
}
- $scope.rdConnTypeString = function(type) {
+ $scope.rdConnTypeString = function (type) {
switch (type) {
case "relay":
return $translate.instant('Relay');
@@ -1233,7 +1223,7 @@ angular.module('syncthing.core')
}
}
- $scope.rdConnDetails = function(type) {
+ $scope.rdConnDetails = function (type) {
switch (type) {
case "relay":
return $translate.instant('Connections via relays might be rate limited by the relay');
@@ -2106,7 +2096,7 @@ angular.module('syncthing.core')
editFolderModal(initialTab);
}
- $scope.internalVersioningEnabled = function(guiVersioning) {
+ $scope.internalVersioningEnabled = function (guiVersioning) {
if (!$scope.currentFolder._guiVersioning) {
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._editing = "existing";
editFolderLoadIgnores();
@@ -2158,7 +2148,7 @@ angular.module('syncthing.core')
function editFolderGetIgnores() {
return $http.get(urlbase + '/db/ignores?folder=' + encodeURIComponent($scope.currentFolder.id))
- .then(function(r) {
+ .then(function (r) {
return r.data;
}, function (response) {
$scope.ignores.text = $translate.instant("Failed to load ignore patterns.");
@@ -2168,7 +2158,7 @@ angular.module('syncthing.core')
function editFolderLoadIgnores() {
editFolderLoadingIgnores();
- return editFolderGetIgnores().then(function(data) {
+ return editFolderGetIgnores().then(function (data) {
if (!data) {
return;
}
@@ -2365,7 +2355,7 @@ angular.module('syncthing.core')
$scope.currentFolder._editing = "new-ignores";
$('.nav-tabs a[href="#folder-ignores"]').tab('show');
return editFolderGetIgnores();
- }).then(function(data) {
+ }).then(function (data) {
// Error getting ignores -> leave error message.
if (!data) {
return;
@@ -2373,7 +2363,7 @@ angular.module('syncthing.core')
if ((data.ignore && data.ignore.length > 0) || data.error) {
editFolderInitIgnores(data.ignore, data.error);
} else {
- getDefaultIgnores().then(function(lines) {
+ getDefaultIgnores().then(function (lines) {
setIgnoresText(lines);
$scope.ignores.defaultLines = lines;
$scope.ignores.disabled = false;
@@ -2389,7 +2379,7 @@ angular.module('syncthing.core')
var ignores = ignoresArray();
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)) {
return saveIgnores(ignores);
@@ -2693,7 +2683,7 @@ angular.module('syncthing.core')
source: buildTree($scope.restoreVersions.versions),
renderColumns: function (event, data) {
// 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(),
y = (b.isFolder() ? "0" : "1") + b.title.toLowerCase();
return x === y ? 0 : x > y ? 1 : -1;
@@ -3193,7 +3183,7 @@ angular.module('syncthing.core')
folderType: '@',
untrusted: '=',
},
- link: function(scope, elem, attrs) {
+ link: function (scope, elem, attrs) {
var plain = false;
scope.togglePasswordVisibility = function() {
scope.plain = !scope.plain;