OLD | NEW |
(Empty) | |
| 1 <html i18n-values="dir:textdirection;"> |
| 2 <head> |
| 3 <title></title> |
| 4 <style type="text/css"> |
| 5 body { |
| 6 line-height: 1.5em; |
| 7 background: #FFFFFF; |
| 8 font-size: 11pt; |
| 9 } |
| 10 html[os='mac'] body { |
| 11 line-height: 1.5em; |
| 12 background: #FFFFFF; |
| 13 } |
| 14 form { |
| 15 -webkit-user-select: none; |
| 16 } |
| 17 .sync-header { |
| 18 font-size: 1.2em; |
| 19 font-weight: bold; |
| 20 margin-bottom: 10px; |
| 21 } |
| 22 .sync-instructions { |
| 23 margin-top: 10px; |
| 24 } |
| 25 .sync-footer { |
| 26 position: fixed; |
| 27 right: 0px; |
| 28 bottom: 0px; |
| 29 margin-right: 10px; |
| 30 margin-bottom: 10px; |
| 31 } |
| 32 html[dir='rtl'] .sync-footer { |
| 33 text-align: left; |
| 34 left: 0px; |
| 35 bottom: 0px; |
| 36 margin-left: 20px; |
| 37 } |
| 38 input[type='button'], |
| 39 input[type='submit'] { |
| 40 min-width: 87px; |
| 41 min-height: 26px; |
| 42 } |
| 43 html[os='mac'] input[type='button'], |
| 44 html[os='mac'] input[type='submit'] { |
| 45 font-size: 12pt; |
| 46 } |
| 47 |
| 48 #new-passphrase, |
| 49 #enter-passphrase { |
| 50 display: none; |
| 51 } |
| 52 |
| 53 </style> |
| 54 <script src="chrome://resources/js/cr.js"></script> |
| 55 <script> |
| 56 var currentTab; |
| 57 |
| 58 // Called once, when this html/js is loaded. |
| 59 function setupPassphraseDialog(args) { |
| 60 // Allow platform specific rules |
| 61 if (cr.isMac) { |
| 62 document.documentElement.setAttribute('os', 'mac'); |
| 63 } else if (!cr.isWindows) { |
| 64 document.documentElement.setAttribute('os', 'linux'); |
| 65 } |
| 66 |
| 67 if (args) { |
| 68 currentMode = args['mode']; |
| 69 switchToMode(currentMode); |
| 70 } |
| 71 } |
| 72 |
| 73 function switchToMode(mode) { |
| 74 if (mode == "new") { |
| 75 document.getElementById("enter-passphrase").style.display = "none"; |
| 76 document.getElementById("gaia-passphrase").style.display = "none"; |
| 77 document.getElementById("new-passphrase").style.display = "block"; |
| 78 } else if (mode =="enter") { |
| 79 document.getElementById("enter-passphrase").style.display = "block"; |
| 80 document.getElementById("gaia-passphrase").style.display = "none"; |
| 81 document.getElementById("new-passphrase").style.display = "none"; |
| 82 } |
| 83 } |
| 84 |
| 85 function sendPassphraseAndClose() { |
| 86 var f = document.getElementById("passphraseForm"); |
| 87 var result = JSON.stringify({"passphrase": f.passphrase.value}); |
| 88 chrome.send("Passphrase", [result]); |
| 89 } |
| 90 </script> |
| 91 </head> |
| 92 <body i18n-values=".style.fontFamily:fontfamily" |
| 93 onload="setupPassphraseDialog();"> |
| 94 <form id="passphraseForm" |
| 95 onSubmit="sendPassphraseAndClose(); return false;"> |
| 96 <div id="new-passphrase"> |
| 97 <div class="sync-header" id="newTitle" |
| 98 i18n-content="newPassphraseTitle"></div> |
| 99 <div class="sync-instructions" id="newInstructions" |
| 100 i18n-content="newPassphraseBody"></div> |
| 101 </div> |
| 102 |
| 103 <div id="enter-passphrase"> |
| 104 <div class="sync-header" id="enterTitle" |
| 105 i18n-content="enterPassphraseTitle"></div> |
| 106 <div class="sync-instructions" id="enterInstructions" |
| 107 i18n-content="enterPassphraseBody"></div> |
| 108 </div> |
| 109 |
| 110 <div id="gaia-passphrase"> |
| 111 <div class="sync-header" id="gaiaTitle" |
| 112 i18n-content="gaiaPassphraseTitle"></div> |
| 113 <div class="sync-instructions" id="gaiaInstructions" |
| 114 i18n-content="gaiaPassphraseBody"></div> |
| 115 </div> |
| 116 |
| 117 <div id="passphrase-input"> |
| 118 <label id="passphraseLabel" name="passphraseLabel" |
| 119 for="passphrase" i18n-content="passphraseLabel"> |
| 120 </label> |
| 121 <input id="passphrase" name="passphrase" type="password" /> |
| 122 </div> |
| 123 |
| 124 <div class="sync-footer"> |
| 125 <input id="okButton" type="submit" i18n-values="value:ok" /> |
| 126 <input id="cancelButton" type="button" i18n-values="value:cancel" |
| 127 onclick='chrome.send("DialogClose", [""])' /> |
| 128 </div> |
| 129 </form> |
| 130 </body> |
| 131 </html> |
OLD | NEW |