Просмотр исходного кода

Merge pull request #2018 from brgmnn/master

Added select ID text on click to gui
Jakob Borg 10 лет назад
Родитель
Сommit
76822c7c34
5 измененных файлов с 25 добавлено и 7 удалено
  1. 3 2
      AUTHORS
  2. 3 2
      NICKS
  3. 3 1
      gui/index.html
  4. 14 0
      gui/scripts/syncthing/core/directives/selectOnClickDirective.js
  5. 2 2
      internal/auto/gui.files.go

+ 3 - 2
AUTHORS

@@ -3,8 +3,8 @@
 Aaron Bieber <[email protected]>
 Alexander Graf <[email protected]>
 Andrew Dunham <[email protected]>
-Audrius Butkevicius <[email protected]>
 Arthur Axel fREW Schmidt <[email protected]> <[email protected]>
+Audrius Butkevicius <[email protected]>
 Bart De Vries <[email protected]>
 Ben Curthoys <[email protected]>
 Ben Schulz <[email protected]> <[email protected]>
@@ -17,6 +17,7 @@ Cathryne Linenweaver <[email protected]> <[email protected]
 Chris Howie <[email protected]>
 Chris Joel <[email protected]>
 Colin Kennedy <[email protected]>
+Daniel Bergmann <[email protected]> <[email protected]>
 Daniel Martí <[email protected]>
 Dennis Wilson <[email protected]>
 Dominik Heidler <[email protected]>
@@ -39,9 +40,9 @@ Karol Różycki <[email protected]>
 Ken'ichi Kamada <[email protected]>
 Lode Hoste <[email protected]>
 Lord Landon Agahnim <[email protected]>
-Marcin Dziadus <[email protected]>
 Marc Laporte <[email protected]> <[email protected]>
 Marc Pujol <[email protected]>
+Marcin Dziadus <[email protected]>
 Michael Jephcote <[email protected]> <[email protected]>
 Michael Tilli <[email protected]>
 Pascal Jungblut <[email protected]> <[email protected]>

+ 3 - 2
NICKS

@@ -15,6 +15,7 @@ asdil12		<[email protected]>
 bencurthoys	<[email protected]>
 bigbear2nd	<[email protected]>
 brendanlong	<[email protected]>
+brgmnn      <[email protected]> <[email protected]>
 bsidhom		<[email protected]>
 calmh		<[email protected]>
 cdata		<[email protected]>
@@ -36,8 +37,8 @@ kozec		<[email protected]>
 krozycki	<[email protected]>
 marcindziadus	<[email protected]>
 marclaporte <[email protected]>
-moshen		<[email protected]>
 mogwa1	<[email protected]>
+moshen		<[email protected]>
 mvdan		<[email protected]>
 pascalj		<[email protected]> <[email protected]>
 peterhoeg	<[email protected]>
@@ -45,9 +46,9 @@ philips		<[email protected]>
 piobpl		<[email protected]>
 pluby		<[email protected]>
 pyfisch		<[email protected]>
+qbit		<[email protected]>
 ralder		<[email protected]>
 rumpelsepp	<[email protected]>
-qbit		<[email protected]>
 sciurius	<[email protected]>
 seehuhn		<[email protected]>
 snnd		<[email protected]>

+ 3 - 1
gui/index.html

@@ -507,7 +507,7 @@
   <!-- ID modal -->
 
   <modal id="idqr" large="yes" status="info" close="yes" icon="qrcode" title="{{'Device Identification' | translate}} &mdash; {{deviceName(thisDevice())}}">
-    <div class="well well-sm text-monospace text-center">{{myID}}</div>
+    <div select-on-click class="well well-sm text-monospace text-center">{{myID}}</div>
     <img ng-if="myID" class="center-block img-thumbnail" ng-src="qr/?text={{myID}}"/>
   </modal>
 
@@ -1088,6 +1088,7 @@
           <li class="auto-generated">Chris Howie</li>
           <li class="auto-generated">Chris Joel</li>
           <li class="auto-generated">Colin Kennedy</li>
+          <li class="auto-generated">Daniel Bergmann</li>
           <li class="auto-generated">Daniel Martí</li>
           <li class="auto-generated">Dennis Wilson</li>
           <li class="auto-generated">Dominik Heidler</li>
@@ -1167,6 +1168,7 @@
   <script src="scripts/syncthing/core/directives/uniqueFolderDirective.js"></script>
   <script src="scripts/syncthing/core/directives/validDeviceidDirective.js"></script>
   <script src="scripts/syncthing/core/directives/popoverDirective.js"></script>
+  <script src="scripts/syncthing/core/directives/selectOnClickDirective.js"></script>
   <script src="scripts/syncthing/core/filters/alwaysNumberFilter.js"></script>
   <script src="scripts/syncthing/core/filters/basenameFilter.js"></script>
   <script src="scripts/syncthing/core/filters/binaryFilter.js"></script>

+ 14 - 0
gui/scripts/syncthing/core/directives/selectOnClickDirective.js

@@ -0,0 +1,14 @@
+angular.module('syncthing.core')
+    .directive('selectOnClick', function ($window) {
+        return {
+            link: function (scope, element, attrs) {
+                element.on('click', function() {
+                    var selection = $window.getSelection();
+                    var range = document.createRange();
+                    range.selectNodeContents(element[0]);
+                    selection.removeAllRanges();
+                    selection.addRange(range);
+                });
+            }
+        };
+});

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
internal/auto/gui.files.go


Некоторые файлы не были показаны из-за большого количества измененных файлов