Bug 1703164 - convert chat/content/otr-add-fingerprint.xhtml to top level <html>. r=henry
This is the dialog one gets by right clicking a contact "Add OTR Fingerprint" context menu. Differential Revision: https://phabricator.services.mozilla.com/D138525 --HG-- extra : rebase_source : e35e2b4d191a50ebac0d62c81a980c6f706cdfe6
This commit is contained in:
Родитель
8a285a3a5e
Коммит
c1a4d606e3
|
@ -5,6 +5,10 @@
|
|||
var { l10nHelper } = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
var { OTR } = ChromeUtils.import("resource:///modules/OTR.jsm");
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
otrAddFinger.onload();
|
||||
});
|
||||
|
||||
var otrAddFinger = {
|
||||
onload() {
|
||||
let args = window.arguments[0].wrappedJSObject;
|
||||
|
@ -40,8 +44,6 @@ var otrAddFinger = {
|
|||
}
|
||||
OTR.setTrust(finger, true, context);
|
||||
});
|
||||
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
addBlankSpace(value) {
|
||||
|
@ -65,15 +67,11 @@ var otrAddFinger = {
|
|||
this.fingerError.hidden = true;
|
||||
}
|
||||
|
||||
document
|
||||
.getElementById("otrAddFingerDialog")
|
||||
.querySelector("dialog")
|
||||
.getButton("accept").disabled = input.value && !input.validity.valid;
|
||||
document.querySelector("dialog").getButton("accept").disabled =
|
||||
input.value && !input.validity.valid;
|
||||
|
||||
this.keyCount.value = `${hex.length}/40`;
|
||||
input.value = this.addBlankSpace(input.value);
|
||||
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
onblur(input) {
|
||||
|
|
|
@ -6,29 +6,23 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css" ?>
|
||||
<?xml-stylesheet href="chrome://chat/skin/otrFingerprintDialog.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window data-l10n-id="otr-add-finger"
|
||||
id="otrAddFingerDialog"
|
||||
windowtype="OTR:AddFinger"
|
||||
onload="otrAddFinger.onload()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
windowtype="OTR:AddFinger"
|
||||
width="540" height="200"
|
||||
scrolling="false">
|
||||
<head>
|
||||
<title data-l10n-id="otr-add-finger-title"></title>
|
||||
<link rel="localization" href="messenger/otr/add-finger.ftl" />
|
||||
<script defer="defer" src="chrome://global/content/globalOverlay.js"></script>
|
||||
<script defer="defer" src="chrome://global/content/editMenuOverlay.js"></script>
|
||||
<script defer="defer" src="chrome://chat/content/otr-add-fingerprint.js"></script>
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<dialog buttons="accept,cancel"
|
||||
buttondisabledaccept="true">
|
||||
|
||||
<keyset id="mailKeys">
|
||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="messenger/otr/add-finger.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<script src="chrome://chat/content/otr-add-fingerprint.js"/>
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||||
<vbox class="dialog-container" flex="1">
|
||||
<hbox align="center" pack="center" class="header-container">
|
||||
<vbox>
|
||||
<html:img class="header-icon"
|
||||
|
@ -55,7 +49,7 @@
|
|||
</hbox>
|
||||
<html:img id="fingerWarning" class="warning-icon"
|
||||
src="chrome://global/skin/icons/warning.svg" alt=""
|
||||
hidden="hidden" />
|
||||
width="16" height="16" hidden="hidden" />
|
||||
</hbox>
|
||||
<vbox class="input-helper-container" flex="1" align="end">
|
||||
<label id="fingerError"
|
||||
|
@ -64,6 +58,6 @@
|
|||
hidden="true"/>
|
||||
<label id="keyCount" class="input-helper" value="0/40"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
</window>
|
||||
</html:body>
|
||||
</html>
|
||||
|
|
|
@ -9,12 +9,13 @@
|
|||
--error-color: #5A0002;
|
||||
}
|
||||
|
||||
.dialog-container {
|
||||
width: 36em;
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
margin: 0px 10px 5px;
|
||||
dialog {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.label-title {
|
||||
|
@ -31,7 +32,7 @@
|
|||
|
||||
.form-control {
|
||||
position: relative;
|
||||
margin: 0px 0px 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.input-control {
|
||||
|
@ -40,7 +41,8 @@
|
|||
}
|
||||
|
||||
.input-field {
|
||||
padding: 5px 30px 5px 6px;
|
||||
padding-block: 5px;
|
||||
padding-inline: 6px 30px;
|
||||
flex-grow: 1;
|
||||
margin: 2px 4px;
|
||||
}
|
||||
|
@ -49,10 +51,6 @@
|
|||
box-shadow: 0 0 2px 1px var(--warning-color);
|
||||
}
|
||||
|
||||
.input-helper-container {
|
||||
margin-top: -6px;
|
||||
}
|
||||
|
||||
.input-helper {
|
||||
font-family: monospace;
|
||||
font-size: 1em;
|
||||
|
@ -73,7 +71,6 @@
|
|||
cursor: pointer;
|
||||
-moz-context-properties: fill, stroke-opacity;
|
||||
fill: currentColor;
|
||||
margin-left: -26px;
|
||||
margin-right: 10px;
|
||||
margin-inline: -26px 10px;
|
||||
color: var(--warning-color);
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
otr-add-finger =
|
||||
.title = Add OTR Key Fingerprint
|
||||
otr-add-finger-title = Add OTR Key Fingerprint
|
||||
|
||||
# Variables:
|
||||
# $name (String) - name of a chat contact person
|
||||
|
|
Загрузка…
Ссылка в новой задаче