aboutsummaryrefslogtreecommitdiff
path: root/wallet-installation.html
diff options
context:
space:
mode:
Diffstat (limited to 'wallet-installation.html')
-rw-r--r--wallet-installation.html144
1 files changed, 144 insertions, 0 deletions
diff --git a/wallet-installation.html b/wallet-installation.html
new file mode 100644
index 00000000..551f97f6
--- /dev/null
+++ b/wallet-installation.html
@@ -0,0 +1,144 @@
1<!DOCTYPE html>
2<html lang="en">
3<head profile="http://www.w3.org/2005/10/profile">
4 <meta charset="utf-8"/>
5 <title>Taler Wallet Installation</title>
6 <link rel="icon" type="image/png" href="/web-common/favicon-taler.ico" />
7 <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/millncjiddlpgdmkklmhfadpacifaonc" />
8 <script src="web-common/taler-wallet-lib.js" type="text/javascript"></script>
9
10 <script type="application/javascript">
11 /*
12 @licstart The following is the entire license notice for the
13 JavaScript code in this page.
14
15 Copyright (C) 2015 GNUnet e.V.
16
17 The JavaScript code in this page is free software: you can
18 redistribute it and/or modify it under the terms of the GNU
19 Lesser General Public License (GNU LGPL) as published by the Free Software
20 Foundation, either version 2.1 of the License, or (at your option)
21 any later version. The code is distributed WITHOUT ANY WARRANTY;
22 without even the implied warranty of MERCHANTABILITY or FITNESS
23 FOR A PARTICULAR PURPOSE. See the GNU LGPL for more details.
24
25 As additional permission under GNU LGPL version 2.1 section 7, you
26 may distribute non-source (e.g., minimized or compacted) forms of
27 that code without the copy of the GNU LGPL normally required by
28 section 4, provided you include this license notice and a URL
29 through which recipients can access the Corresponding Source.
30
31 @licend The above is the entire license notice
32 for the JavaScript code in this page.
33 */
34
35 var chrome_min_version = '47.0.2526';
36
37 function onSuccess() {
38 console.log("installation successful");
39 document.getElementById("install-result").appendChild(document.createTextNode("Installation was successful."));
40 }
41
42 function onFailure(detail) {
43 console.error("installation failed:", detail);
44 document.getElementById("install-result").appendChild(document.createTextNode("Installation failed: " + detail));
45 }
46
47 function installWallet() {
48 if (window.chrome) {
49 chrome.webstore.install("https://chrome.google.com/webstore/detail/millncjiddlpgdmkklmhfadpacifaonc", onSuccess, onFailure);
50 } else {
51 onFailure("Google Chrome or Chromium is required for installation.");
52 }
53 }
54
55 try {
56 taler.onPresent(function () {
57 document.getElementById("box-present").style.display = "inherit";
58 document.getElementById("box-not-present").style.display = "none";
59 });
60 taler.onAbsent(function () {
61 document.getElementById("box-present").style.display = "none";
62 document.getElementById("box-not-present").style.display = "inherit";
63 });
64 } catch (err) {
65 }
66
67 function onLoad() {
68 if (typeof window.chrome != "object") {
69 document.getElementById("error-chrome").style.display = "inherit";
70 } else {
71 var m = navigator.userAgent.match(/Chrome\/([0-9.]+)/);
72 if (null == m || m[1] < chrome_min_version) {
73 document.getElementById('chrome-min-version').appendChild(document.createTextNode(chrome_min_version));
74 document.getElementById('error-chrome-version').style.display = "inherit";
75 }
76 }
77 }
78
79 document.addEventListener('DOMContentLoaded', onLoad);
80 </script>
81
82 <style type="text/css">
83 .greenbox {
84 background-color: #5EFF64;
85 border: solid;
86 border-radius: 5px;
87 padding: 0.5em;
88 }
89 .bluebox {
90 background-color: #C2C6FF;
91 border: solid;
92 border-radius: 5px;
93 padding: 0.5em;
94 }
95 .error {
96 font-style: italic;
97 display: none;
98 }
99 #install-result {
100 font-weight: bold;
101 }
102
103 main ul li {
104 margin-bottom: 1em;
105 }
106 </style>
107</head>
108
109<body>
110 <h1>Install the Taler wallet</h1>
111
112 <main style="display:inline-block;">
113 <h2>Google Chrome / Chromium</h2>
114 <p id="error-chrome" class="error">
115 <a href="https://www.google.com/chrome">Google Chrome</a> or <a href="https://www.chromium.org/">Chromium</a>
116 is required, but it appears you don't have it installed.
117 </p>
118 <p id="error-chrome-version" class="error">
119 <a href="https://www.google.com/chrome">Google Chrome</a> or <a href="https://www.chromium.org/">Chromium</a>
120 version <span id="chrome-min-version"></span> or newer is required, but it appears you have an older version.</p>
121 <ul>
122 <li>
123 <a href="https://chrome.google.com/webstore/detail/gnu-taler-wallet/millncjiddlpgdmkklmhfadpacifaonc">Install from the Chrome Web Store</a>
124 </li>
125 <li id="inline-install-chrome">
126 <button onclick="installWallet()" id="install-button">
127 Install from this page
128 </button>
129 <div id="install-result"></div>
130 </li>
131 </ul>
132
133 <h2>Other browsers</h2>
134 <p>Wallets for other browsers will be provided in the near future.</p>
135 <p class="greenbox" id="box-present" style="display:none">
136 Congratulations, you have installed the Taler wallet.
137 Check out the <a href="https://demo.taler.net/">demo</a>.
138 </p>
139 <p class="bluebox" id="box-not-present" style="display:none">
140 You don't have a wallet installed yet.
141 </p>
142 </main>
143</body>
144</html>