2014-03-20 06:39:36 +08:00
|
|
|
<div class="popups">
|
|
|
|
<div class="modal hide b-compose-open-pgp-content g-ui-user-select-none" data-bind="modal: modalVisibility">
|
|
|
|
<div>
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-bind="command: cancelCommand">×</button>
|
|
|
|
<h3>
|
2015-03-21 04:23:41 +08:00
|
|
|
<span class="i18n" data-i18n="POPUPS_COMPOSE_OPEN_PGP/TITLE_COMPOSE_OPEN_PGP"></span>
|
2014-03-20 06:39:36 +08:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2015-07-30 01:21:24 +08:00
|
|
|
<div class="alert" data-bind="visible: '' !== notification()">
|
|
|
|
<span data-bind="text: notification"></span>
|
|
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
<div class="span5">
|
|
|
|
|
|
|
|
<div data-bind="component: {
|
2014-10-30 05:08:53 +08:00
|
|
|
name: 'Checkbox',
|
|
|
|
params: {
|
|
|
|
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_SIGN',
|
|
|
|
value: sign
|
|
|
|
}
|
|
|
|
}"></div>
|
2015-07-30 01:21:24 +08:00
|
|
|
|
|
|
|
<div class="key-list" data-bind="visible: sign">
|
|
|
|
<div class="key-list-wrp empty" data-bind="visible: !signKey()">
|
|
|
|
No private key found
|
|
|
|
</div>
|
|
|
|
<div class="key-list-wrp" data-bind="visible: signKey">
|
2016-04-07 02:26:29 +08:00
|
|
|
<div class="key-list__item row-fluid">
|
|
|
|
<div class="key-list__item-hash span4">
|
2015-07-30 01:21:24 +08:00
|
|
|
(<span data-bind="text: signKey() ? signKey().hash : ''"></span>)
|
|
|
|
</div>
|
2016-04-07 02:26:29 +08:00
|
|
|
<div class="key-list__item-names span8">
|
|
|
|
<div data-bind="if: signKey()">
|
|
|
|
<div data-bind="foreach: signKey().users">
|
|
|
|
<div class="key-list__item-name" data-bind="text: $data"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-30 01:21:24 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span7">
|
|
|
|
|
|
|
|
<div data-bind="component: {
|
2014-10-30 05:08:53 +08:00
|
|
|
name: 'Checkbox',
|
|
|
|
params: {
|
|
|
|
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_ENCRYPT',
|
|
|
|
value: encrypt
|
|
|
|
}
|
|
|
|
}"></div>
|
2015-07-30 01:21:24 +08:00
|
|
|
|
|
|
|
<div class="key-list" data-bind="visible: encrypt">
|
|
|
|
<div class="key-list-wrp empty" data-bind="visible: !encryptKeys() || encryptKeys().length === 0">
|
|
|
|
No public keys selected
|
|
|
|
</div>
|
|
|
|
<div class="key-list-wrp" data-bind="visible: encryptKeys() && encryptKeys().length > 0">
|
|
|
|
<div data-bind="foreach: encryptKeys">
|
2016-04-07 02:26:29 +08:00
|
|
|
<div class="key-list__item row-fluid">
|
|
|
|
<div class="key-list__item-delete span1" data-bind="click: $parent.deletePublickKey">
|
2015-07-30 01:21:24 +08:00
|
|
|
<i class="icon-trash"></i>
|
|
|
|
</div>
|
2016-04-07 02:26:29 +08:00
|
|
|
<div class="key-list__item-hash span3" data-bind="visible: !empty">
|
2015-07-30 01:21:24 +08:00
|
|
|
(<span data-bind="text: hash"></span>)
|
|
|
|
</div>
|
2016-04-07 02:26:29 +08:00
|
|
|
<div class="span8">
|
|
|
|
<span class="key-list__item-names" data-bind="css: {'empty': empty}">
|
|
|
|
<span data-bind="foreach: users">
|
|
|
|
<div class="key-list__item-name" data-bind="text: $data"></div>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="key-list__item-error" data-bind="visible: empty">
|
|
|
|
(Public key not found)
|
|
|
|
</span>
|
2015-07-30 01:21:24 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-04-02 07:58:24 +08:00
|
|
|
</div>
|
2014-03-20 06:39:36 +08:00
|
|
|
</div>
|
2015-07-30 01:21:24 +08:00
|
|
|
</div>
|
|
|
|
<div class="row-fluid key-actions">
|
|
|
|
<div class="span5">
|
|
|
|
<input type="password" class="inputPassword input-block-level i18n"
|
|
|
|
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
|
|
|
data-i18n="[placeholder]POPUPS_COMPOSE_OPEN_PGP/LABEL_PASSWORD"
|
|
|
|
data-bind="visible: sign, value: password, hasfocus: password.focus, onEnter: doCommand" />
|
|
|
|
</div>
|
|
|
|
<div class="span7" data-bind="visible: encrypt() && 0 < publicKeysOptions().length">
|
|
|
|
<div class="form-inline">
|
|
|
|
<select class="input-block-level" data-bind="options: publicKeysOptions, value: selectedPublicKey,
|
|
|
|
optionsCaption: optionsCaption, optionsText: 'name', optionsValue: 'id',
|
2016-04-07 02:26:29 +08:00
|
|
|
optionsAfterRender: addOptionClass"></select>
|
2014-03-20 06:39:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2014-04-11 05:07:23 +08:00
|
|
|
<button class="btn buttonDo" data-bind="command: doCommand, hasfocus: buttonFocus">
|
2014-03-21 07:47:13 +08:00
|
|
|
<i data-bind="css: {'icon-key': !submitRequest(), 'icon-spinner animated': submitRequest()}"></i>
|
2014-03-20 06:39:36 +08:00
|
|
|
|
2015-03-21 04:23:41 +08:00
|
|
|
<span class="i18n" data-bind="visible: sign() && !encrypt()" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_SIGN"></span>
|
|
|
|
<span class="i18n" data-bind="visible: !sign() && encrypt()" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_ENCRYPT"></span>
|
|
|
|
<span class="i18n" data-bind="visible: (sign() && encrypt()) || (!sign() && !encrypt())" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_SIGN_AND_ENCRYPT"></span>
|
2014-04-11 05:07:23 +08:00
|
|
|
</button>
|
2014-03-20 06:39:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|