mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 11:28:59 +00:00
Merge branch 'pr/2625'
* pr/2625: Show device ID QR code from edit dialog (fixes #1494)
This commit is contained in:
commit
be5e5d837b
@ -52,7 +52,7 @@
|
|||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-cog"></span> <span translate>Actions</span> <span class="caret"></span></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-cog"></span> <span translate>Actions</span> <span class="caret"></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="" ng-click="editSettings()"><span class="fa fa-fw fa-cog"></span> <span translate>Settings</span></a></li>
|
<li><a href="" ng-click="editSettings()"><span class="fa fa-fw fa-cog"></span> <span translate>Settings</span></a></li>
|
||||||
<li><a href="" ng-click="idDevice()"><span class="fa fa-fw fa-qrcode"></span> <span translate>Show ID</span></a></li>
|
<li><a href="" ng-click="idDevice(thisDevice())"><span class="fa fa-fw fa-qrcode"></span> <span translate>Show ID</span></a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href="" ng-click="shutdown()"><span class="fa fa-fw fa-power-off"></span> <span translate>Shutdown</span></a></li>
|
<li><a href="" ng-click="shutdown()"><span class="fa fa-fw fa-power-off"></span> <span translate>Shutdown</span></a></li>
|
||||||
<li><a href="" ng-click="restart()"><span class="fa fa-fw fa-refresh"></span> <span translate>Restart</span></a></li>
|
<li><a href="" ng-click="restart()"><span class="fa fa-fw fa-refresh"></span> <span translate>Restart</span></a></li>
|
||||||
|
@ -966,7 +966,9 @@ angular.module('syncthing.core')
|
|||||||
$('#editDevice').modal();
|
$('#editDevice').modal();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.idDevice = function () {
|
$scope.idDevice = function (deviceCfg) {
|
||||||
|
$scope.currentDevice = deviceCfg;
|
||||||
|
$('#editDevice').modal('hide');
|
||||||
$('#idqr').modal('show');
|
$('#idqr').modal('show');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,6 +76,9 @@
|
|||||||
<button type="button" class="btn btn-primary btn-sm" ng-click="saveDevice()" ng-disabled="deviceEditor.$invalid">
|
<button type="button" class="btn btn-primary btn-sm" ng-click="saveDevice()" ng-disabled="deviceEditor.$invalid">
|
||||||
<span class="fa fa-check"></span> <span translate>Save</span>
|
<span class="fa fa-check"></span> <span translate>Save</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm" ng-click="idDevice(currentDevice)" ng-if="editingExisting || deviceEditor.deviceID.$valid">
|
||||||
|
<span class="fa fa-qrcode"></span> <span translate>Show QR</span>
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">
|
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">
|
||||||
<span class="fa fa-times"></span> <span translate>Close</span>
|
<span class="fa fa-times"></span> <span translate>Close</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<modal id="idqr" status="info" icon="qrcode" title="{{'Device Identification' | translate}} - {{deviceName(thisDevice())}}" large="yes" close="yes">
|
<modal id="idqr" status="info" icon="qrcode" title="{{'Device Identification' | translate}} - {{deviceName(currentDevice)}}" large="yes" close="yes">
|
||||||
<div class="well well-sm text-monospace text-center" select-on-click>{{myID}}</div>
|
<div class="well well-sm text-monospace text-center" select-on-click>{{currentDevice.deviceID}}</div>
|
||||||
<img ng-if="myID" class="center-block img-thumbnail" ng-src="qr/?text={{myID}}"/>
|
<img ng-if="currentDevice.deviceID" class="center-block img-thumbnail" ng-src="qr/?text={{currentDevice.deviceID}}"/>
|
||||||
</modal>
|
</modal>
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user