mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 07:57:02 +03:00
Better info regarding storing keys on server
This commit is contained in:
parent
f8cbd5d129
commit
221136ce1c
3 changed files with 25 additions and 30 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import { PgpUserStore } from 'Stores/User/Pgp';
|
import { PgpUserStore } from 'Stores/User/Pgp';
|
||||||
|
|
||||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
|
||||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||||
|
|
||||||
import { Capa } from 'Common/Enums';
|
import { Capa } from 'Common/Enums';
|
||||||
|
|
@ -25,13 +24,9 @@ export class OpenPgpImportPopupView extends AbstractViewPopup {
|
||||||
this.keyError(false);
|
this.keyError(false);
|
||||||
this.keyErrorMessage('');
|
this.keyErrorMessage('');
|
||||||
});
|
});
|
||||||
|
|
||||||
decorateKoCommands(this, {
|
|
||||||
addOpenPgpKeyCommand: 1
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addOpenPgpKeyCommand() {
|
submitForm() {
|
||||||
let keyTrimmed = this.key().trim();
|
let keyTrimmed = this.key().trim();
|
||||||
|
|
||||||
if (/\n/.test(keyTrimmed)) {
|
if (/\n/.test(keyTrimmed)) {
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,11 @@
|
||||||
<div data-bind="component: {
|
<div data-bind="component: {
|
||||||
name: 'Checkbox',
|
name: 'Checkbox',
|
||||||
params: {
|
params: {
|
||||||
label: 'Store on server',
|
label: 'Store (encrypted) on server',
|
||||||
value: saveServer
|
value: saveServer
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
|
<br/>
|
||||||
<div data-bind="visible: canGnuPG, component: {
|
<div data-bind="visible: canGnuPG, component: {
|
||||||
name: 'Checkbox',
|
name: 'Checkbox',
|
||||||
params: {
|
params: {
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,29 @@
|
||||||
<a href="#" class="close" data-bind="command: cancelCommand">×</a>
|
<a href="#" class="close" data-bind="command: cancelCommand">×</a>
|
||||||
<h3 data-i18n="OPENPGP/POPUP_IMPORT_TITLE"></h3>
|
<h3 data-i18n="OPENPGP/POPUP_IMPORT_TITLE"></h3>
|
||||||
</header>
|
</header>
|
||||||
<div class="modal-body">
|
<form id="openpgp-import" class="modal-body form-horizontal" autocomplete="off" data-bind="submit: submitForm">
|
||||||
<div class="alert" data-bind="visible: keyError() && keyErrorMessage(), text: keyErrorMessage"></div>
|
<div class="alert" data-bind="visible: keyError() && keyErrorMessage(), text: keyErrorMessage"></div>
|
||||||
<div class="form-horizontal">
|
<div class="control-group" data-bind="css: {'error': keyError}">
|
||||||
<div class="control-group" data-bind="css: {'error': keyError}">
|
<textarea class="inputKey input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: key" required=""></textarea>
|
||||||
<textarea class="inputKey input-xxlarge" rows="14" autofocus="" autocomplete="off" data-bind="value: key"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<div data-bind="component: {
|
|
||||||
name: 'Checkbox',
|
|
||||||
params: {
|
|
||||||
label: 'Store on server',
|
|
||||||
value: saveServer
|
|
||||||
}
|
|
||||||
}"></div>
|
|
||||||
<div data-bind="visible: canGnuPG, component: {
|
|
||||||
name: 'Checkbox',
|
|
||||||
params: {
|
|
||||||
label: 'Store on server in GnuPG',
|
|
||||||
value: saveGnuPG
|
|
||||||
}
|
|
||||||
}"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="control-group">
|
||||||
|
<div data-bind="component: {
|
||||||
|
name: 'Checkbox',
|
||||||
|
params: {
|
||||||
|
label: 'Store (encrypted) on server',
|
||||||
|
value: saveServer
|
||||||
|
}
|
||||||
|
}"></div>
|
||||||
|
<br/>
|
||||||
|
<div data-bind="visible: canGnuPG, component: {
|
||||||
|
name: 'Checkbox',
|
||||||
|
params: {
|
||||||
|
label: 'Store on server in GnuPG',
|
||||||
|
value: saveGnuPG
|
||||||
|
}
|
||||||
|
}"></div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<footer>
|
<footer>
|
||||||
<a class="btn" data-bind="command: addOpenPgpKeyCommand" data-icon="✚" data-i18n="OPENPGP/POPUP_IMPORT_BUTTON"></a>
|
<button class="btn" form="openpgp-import" data-icon="✚" data-i18n="OPENPGP/POPUP_IMPORT_BUTTON"></button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue