Repository: syncthing/syncthing
File: gui/default/syncthing/core/syncthingController.js (JavaScript)

Code before:
            if (notifyCount > 0) {
                return 'notify';
            }

            // all used devices are paused except (this) one
            if (pauseCount === deviceCount - 1) {
                return 'pause';
            }

            return 'default';
        };

        $scope.deviceAddr = function (deviceCfg) {
            var conn = $scope.connections[deviceCfg.deviceID];
            if (conn && conn.connected) {
                return conn.address;
            }
            return '?';
        };

        $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);

            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";
        
            return "wan";
        }

        $scope.rdConnTypeString = function(type){
            switch (type) {
                case "relay":
                    return $translate.instant('Relay');
                case "quic":
                    return $translate.instant('QUIC');

Review comment (suggestion):
```suggestion
            if (conn.type.indexOf('relay') === 0)
```

For the sake of consistency.

Code after:
            if (notifyCount > 0) {
                return 'notify';
            }

            // all used devices are paused except (this) one
            if (pauseCount === deviceCount - 1) {
                return 'pause';
            }

            return 'default';
        };

        $scope.deviceAddr = function (deviceCfg) {
            var conn = $scope.connections[deviceCfg.deviceID];
            if (conn && conn.connected) {
                return conn.address;
            }
            return '?';
        };

        $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);

            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";
        
            return "wan";
        }

        $scope.rdConnTypeString = function(type) {
            switch (type) {
                case "relay":
                    return $translate.instant('Relay');
                case "quic":
                    return $translate.instant('QUIC');