mirror of
https://github.com/syncthing/syncthing.git
synced 2026-03-28 11:11:14 -04:00
gui: Fix & improve sharing with untrusted device (#7148)
This commit is contained in:
@@ -15,8 +15,13 @@
|
||||
<input class="form-control input-sm" type="password" placeholder="{{'Received data is already encrypted' | translate}}" disabled />
|
||||
</span>
|
||||
<span ng-switch-default ng-switch="selected[id]">
|
||||
<span ng-switch-when='true' ng-class="{'has-error': untrusted && !encryptionPasswords[id]}">
|
||||
<input class="form-control input-sm" type="{{plain ? 'text' : 'password'}}" ng-model="encryptionPasswords[id]" ng-required="untrusted" placeholder="{{'If untrusted, enter encryption password' | translate}}" />
|
||||
<span ng-switch-when='true' ng-switch="untrusted">
|
||||
<span ng-switch-when='true' ng-class="{'has-error': !encryptionPasswords[id]}">
|
||||
<input class="form-control input-sm" type="{{plain ? 'text' : 'password'}}" ng-model="encryptionPasswords[id]" required placeholder="{{'Device is untrusted, enter encryption password' | translate}}" />
|
||||
</span>
|
||||
<span ng-switch-default>
|
||||
<input class="form-control input-sm" type="{{plain ? 'text' : 'password'}}" ng-model="encryptionPasswords[id]" placeholder="{{'If untrusted, enter encryption password' | translate}}" />
|
||||
</span>
|
||||
</span>
|
||||
<span ng-switch-default>
|
||||
<input class="form-control input-sm" type="password" placeholder="{{'Not shared' | translate}}" disabled />
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<a href="#" ng-click="selectAllSharedFolders(false)" translate>Deselect All</a></small>
|
||||
</p>
|
||||
<div class="form-group" ng-repeat="folder in currentSharing.shared">
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabel(folder.id)}}" folder-type="{{folder.type}}" untrusted="{{device.untrusted}}" />
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabel(folder.id)}}" folder-type="{{folder.type}}" untrusted="{{currentDevice.untrusted}}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal" ng-if="currentSharing.unrelated.length">
|
||||
@@ -83,7 +83,7 @@
|
||||
<a href="#" ng-click="selectAllUnrelatedFolders(false)" translate>Deselect All</a></small>
|
||||
</p>
|
||||
<div class="form-group" ng-repeat="folder in currentSharing.unrelated">
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabel(folder.id)}}" folder-type="{{folder.type}}" untrusted="{{device.untrusted}}" />
|
||||
<share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{folder.id}}" label="{{folderLabel(folder.id)}}" folder-type="{{folder.type}}" untrusted="{{currentDevice.untrusted}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user