Răsfoiți Sursa

gui: Automatically select device ID on click (ref #8544) (#9065)

The CSS method to select device IDs on click was added in [1]. However,
it was later mistakenly overwritten by [2]. This commit fixes the
regression and also applies the same behaviour to the Edit Device modal
which was omitted in the original commit.

[1] 5baf5fedb5bf3acacc8eb5874a4ed10efd3effb8
[2] 5e384c918567c6b92b9ae63413639dcf9628b98e

Signed-off-by: Tomasz Wilczyński <[email protected]>
tomasz1986 2 ani în urmă
părinte
comite
03590e5ac7

+ 1 - 1
gui/default/syncthing/device/editDeviceModalView.html

@@ -12,7 +12,7 @@
             <label translate for="deviceID">Device ID</label>
             <div class="input-group">
               <input ng-if="editingDeviceNew()" name="deviceID" id="deviceID" class="form-control text-monospace" type="text" ng-model="currentDevice.deviceID" required="" valid-deviceid list="discovery-list" aria-required="true" />
-              <div ng-if="!editingDeviceNew()" class="well well-sm form-control text-monospace" style="height: auto;" select-on-click>{{currentDevice.deviceID}}</div>
+              <div ng-if="!editingDeviceNew()" class="well well-sm form-control text-monospace select-on-click" style="height: auto;">{{currentDevice.deviceID}}</div>
               <div id="shareDeviceIdButtons" class="input-group-btn">
                 <button data-container="body" type="button" class="btn btn-default" ng-click="copyToClipboard($event, currentDevice.deviceID)" ng-disabled="editingDeviceNew() && !deviceEditor.deviceID.$valid" tooltip data-original-title="{{ 'Copy' | translate }}">
                   <span class="fa fa-lg fa-clone"></span>

+ 1 - 1
gui/default/syncthing/device/idqrModalView.html

@@ -1,6 +1,6 @@
 <modal id="idqr" status="info" icon="fas fa-qrcode" heading="{{'Device Identification' | translate}} - {{deviceName(currentDevice)}}" large="yes" closeable="yes">
   <div class="modal-body text-center">
-    <div class="well well-sm text-monospace" select-on-click>{{currentDevice.deviceID}}</div>
+    <div class="well well-sm text-monospace select-on-click">{{currentDevice.deviceID}}</div>
     <div ng-if="currentDevice.deviceID">
       <img class="img-thumbnail" ng-src="qr/?text={{currentDevice.deviceID}}" height="328" width="328" alt="{{'QR code' | translate}}" />
       <div class="btn-group-vertical" style="vertical-align: top;">