protocol: Add "Hello" message at connection start, also for unauthed peers
This commit is contained in:
@@ -130,14 +130,14 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<span translate translate-value-device="{{ device }}" translate-value-address="{{ event.data.address }}">
|
||||
Device {%device%} ({%address%}) wants to connect. Add new device?
|
||||
<span translate translate-value-device="{{ device }}" translate-value-address="{{ event.data.address }}" translate-value-name="{{ event.data.name }}">
|
||||
Device "{%name%}" ({%device%} at {%address%}) wants to connect. Add new device?
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-footer clearfix">
|
||||
<div class="pull-right">
|
||||
<button type="button" class="btn btn-sm btn-success" ng-click="addDevice(device)">
|
||||
<button type="button" class="btn btn-sm btn-success" ng-click="addDevice(device, event.data.name)">
|
||||
<span class="fa fa-plus"></span> <span translate>Add Device</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" ng-click="ignoreRejectedDevice(device)">
|
||||
|
||||
@@ -977,13 +977,14 @@ angular.module('syncthing.core')
|
||||
$('#idqr').modal('show');
|
||||
};
|
||||
|
||||
$scope.addDevice = function (deviceID) {
|
||||
$scope.addDevice = function (deviceID, name) {
|
||||
return $http.get(urlbase + '/system/discovery')
|
||||
.success(function (registry) {
|
||||
$scope.discovery = registry;
|
||||
})
|
||||
.then(function () {
|
||||
$scope.currentDevice = {
|
||||
name: name,
|
||||
deviceID: deviceID,
|
||||
_addressesStr: 'dynamic',
|
||||
compression: 'metadata',
|
||||
|
||||
Reference in New Issue
Block a user