fix(gui): don't show local device under remote devices (ref #10563) (#10631)

### Purpose

Regression was introduced in PR #10563 due to new devices grouping
feature not utlising the otherDevices utility function to ensure the
local device is not shown in the remote devices list

### Testing

Open web GUI and ensure your local device isn't listed under Remote
Devices

### Screenshots

Regression before fix 

<img width="589" height="601" alt="Screenshot_20260407_202526"
src="https://github.com/user-attachments/assets/ffa315e4-f901-4d0c-8755-15b0c31464b3"
/>

Fix

<img width="598" height="555" alt="Screenshot_20260407_202656"
src="https://github.com/user-attachments/assets/8f0721c0-3fd2-4ae5-9db5-23c0d46c268e"
/>


### Documentation

N/A

## Authorship

Ben Norcombe [bennorcombe@pm.me](mailto:bennorcombe@pm.me)

Signed-off-by: Ben Norcombe <bennorcombe@pm.me>
Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Ben Norcombe
2026-04-08 17:30:46 +01:00
committed by GitHub
parent a211fafdc4
commit 6b9fa76c01

View File

@@ -561,7 +561,6 @@ angular.module('syncthing.core')
$scope.config.options._urAcceptedStr = "" + $scope.config.options.urAccepted;
$scope.devices = deviceMap($scope.config.devices);
$scope.devicesGrouped = {};
for (var id in $scope.devices) {
$scope.completion[id] = {
_total: 100,
@@ -569,10 +568,15 @@ angular.module('syncthing.core')
_needItems: 0
};
if ($scope.devicesGrouped[$scope.devices[id].group] === undefined) {
$scope.devicesGrouped[$scope.devices[id].group] = [];
};
$scope.devicesGrouped = {};
const otherDevices = $scope.otherDevices();
for (var id in otherDevices) {
if ($scope.devicesGrouped[otherDevices[id].group] === undefined) {
$scope.devicesGrouped[otherDevices[id].group] = [];
}
$scope.devicesGrouped[$scope.devices[id].group].push($scope.devices[id]);
$scope.devicesGrouped[otherDevices[id].group].push(otherDevices[id]);
};
$scope.folders = folderMap($scope.config.folders);