Commit 9bb3f763 authored by Adrien Dorsaz's avatar Adrien Dorsaz

settings: don't show the options page in the panel, but use a link instead.

parent fae73a68
......@@ -17,7 +17,7 @@
<label for="websocket">WebSocket URL <span class="explain" title="If discoverable from wellknown URL on the domain name." style="font-size:0.8rem">(optional)</span></label>
<input id="websocket" type="text" placeholder="wss://example.com:5280/"></input>
</fieldset>
<button type="submit">Save</button>
<button type="submit">Save and start !</button>
</form>
<script src="options.js"></script>
......
......@@ -28,6 +28,9 @@ function saveOptions(e) {
browser.storage.local.set({
jid: document.querySelector("#jid").value
});
// Try to connect
chrome.runtime.sendMessage('connect');
}
function restoreOptions() {
......
......@@ -14,10 +14,8 @@
<div id="firstrunpanel" class="panel">
<p>Welcome to XMPP Pane!</p>
<p>First, you'll have to configure first your XMPP account.</p>
<object type="text/html" style="width:100%;height:19rem;" data="../options/options.html"></object>
<p>When you saved your configurations, <button class="connectClient">connect</button> and enjoy!</p>
<p style="font-size: 0.9rem">(this page will be available in extension preferences later)</p>
<p>First, you'll have to <a href="../options/options.html">configure</a> first your XMPP account.</p>
<p>Then, <button class="connectClient">connect</button> and enjoy!</p>
</div>
<div id="connectpanel" class="panel">
......
......@@ -50,7 +50,7 @@ function clientConnected(response) {
}
else if (response.connected == false) {
panel['error'].style.display = 'block';
panel['error'].innerHTML = response.error;
panel['error'].innerHTML = response.error + '<br/>You could try to <a href="../options/options.html">modify</a> your settings';
}
}
......
......@@ -45,7 +45,7 @@ retrieveConfig = function () {
resolve(config);
}
else {
reject(`xmpp-pane-main: Some configuration hasn't been found, please configure xmpp-pane first.`);
reject("xmpp-pane-main: Some configuration hasn't been found, please configure xmpp-pane first.");
}
}));
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment