1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-16 06:10:08 -07:00

Fixed km option

This commit is contained in:
Andrew Van Tassel 2020-11-12 16:58:13 -07:00
parent 91fba87ab9
commit 060979276c
6 changed files with 8 additions and 8 deletions

View File

@ -38,7 +38,7 @@
<label>MailHops API Key</label>
<input type="text" id="mailhop.api_key" placeholder="Enter your MailHops API Key"/>
<br/>
<a href="https://www.mailhops.com/#pricing" id="join-link" target="_blank">Join MailHops</a>
<a href="https://www.mailhops.com/#pricing" id="join-link" target="_blank">Join MailHops</a>
</div>
<div class="field">
<label>OpenWeatherMap.org API Key</label>

BIN
images/openweathermap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

2
js/bootstrap.js vendored
View File

@ -35,7 +35,7 @@ function connected(p) {
"message": MailHops.message,
"response": MailHops.response,
"meta": MailHops.meta,
"unit": MailHops.unit
"options": MailHops.options
});
break;
}

View File

@ -25,7 +25,7 @@ function updateContent(msg) {
const route = msg.response.route || [];
const sender = msg.message.sender || null;
const unit = msg.unit || "mi";
const unit = msg.options.unit || "mi";
let client = null;
let items = [];

View File

@ -40,15 +40,15 @@ var mailHopPreferences = {
getting.then(data => {
if (data.api_key) {
self.api_key.value = data.api_key;
document.getElementById("join-link").innerHTML = 'My Account';
document.getElementById("join-link").innerHTML = 'My Account and Dashboard';
document.getElementById("join-link").setAttribute('href', 'https://mailhops.com/account/' + data.api_key);
this.saveAPIKey(true);
}
if (data.owm_key) {
self.owm_key.value = data.owm_key;
}
if (data.distinace_unit) {
if (data.distinace_unit == "mi")
if (data.unit) {
if (data.unit == "mi")
document.getElementById("unit_mi").setAttribute('checked', 'checked');
else
document.getElementById("unit_km").setAttribute('checked', 'checked');
@ -117,7 +117,7 @@ var mailHopPreferences = {
else
document.getElementById("rate-reset").innerHTML = "Resets in: " + Math.round(data.account.rate.reset / 60 / 60) + " hr.";
document.getElementById("join-link").innerHTML = 'My Account';
document.getElementById("join-link").innerHTML = 'My Account and Dashboard';
document.getElementById("join-link").setAttribute('href','https://mailhops.com/account/'+api_key);
} else if (xmlhttp.status === 401) {

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_appName__",
"description": "__MSG_appDesc__",
"version": "4.0.2",
"version": "4.0.3",
"author": "Hopsware LLC",
"developer": {
"name": "Andrew Van Tassel",