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:
parent
91fba87ab9
commit
060979276c
@ -38,7 +38,7 @@
|
|||||||
<label>MailHops API Key</label>
|
<label>MailHops API Key</label>
|
||||||
<input type="text" id="mailhop.api_key" placeholder="Enter your MailHops API Key"/>
|
<input type="text" id="mailhop.api_key" placeholder="Enter your MailHops API Key"/>
|
||||||
<br/>
|
<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>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>OpenWeatherMap.org API Key</label>
|
<label>OpenWeatherMap.org API Key</label>
|
||||||
|
BIN
images/openweathermap.png
Normal file
BIN
images/openweathermap.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
2
js/bootstrap.js
vendored
2
js/bootstrap.js
vendored
@ -35,7 +35,7 @@ function connected(p) {
|
|||||||
"message": MailHops.message,
|
"message": MailHops.message,
|
||||||
"response": MailHops.response,
|
"response": MailHops.response,
|
||||||
"meta": MailHops.meta,
|
"meta": MailHops.meta,
|
||||||
"unit": MailHops.unit
|
"options": MailHops.options
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function updateContent(msg) {
|
|||||||
|
|
||||||
const route = msg.response.route || [];
|
const route = msg.response.route || [];
|
||||||
const sender = msg.message.sender || null;
|
const sender = msg.message.sender || null;
|
||||||
const unit = msg.unit || "mi";
|
const unit = msg.options.unit || "mi";
|
||||||
let client = null;
|
let client = null;
|
||||||
let items = [];
|
let items = [];
|
||||||
|
|
||||||
|
@ -40,15 +40,15 @@ var mailHopPreferences = {
|
|||||||
getting.then(data => {
|
getting.then(data => {
|
||||||
if (data.api_key) {
|
if (data.api_key) {
|
||||||
self.api_key.value = 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);
|
document.getElementById("join-link").setAttribute('href', 'https://mailhops.com/account/' + data.api_key);
|
||||||
this.saveAPIKey(true);
|
this.saveAPIKey(true);
|
||||||
}
|
}
|
||||||
if (data.owm_key) {
|
if (data.owm_key) {
|
||||||
self.owm_key.value = data.owm_key;
|
self.owm_key.value = data.owm_key;
|
||||||
}
|
}
|
||||||
if (data.distinace_unit) {
|
if (data.unit) {
|
||||||
if (data.distinace_unit == "mi")
|
if (data.unit == "mi")
|
||||||
document.getElementById("unit_mi").setAttribute('checked', 'checked');
|
document.getElementById("unit_mi").setAttribute('checked', 'checked');
|
||||||
else
|
else
|
||||||
document.getElementById("unit_km").setAttribute('checked', 'checked');
|
document.getElementById("unit_km").setAttribute('checked', 'checked');
|
||||||
@ -117,7 +117,7 @@ var mailHopPreferences = {
|
|||||||
else
|
else
|
||||||
document.getElementById("rate-reset").innerHTML = "Resets in: " + Math.round(data.account.rate.reset / 60 / 60) + " hr.";
|
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);
|
document.getElementById("join-link").setAttribute('href','https://mailhops.com/account/'+api_key);
|
||||||
|
|
||||||
} else if (xmlhttp.status === 401) {
|
} else if (xmlhttp.status === 401) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "__MSG_appName__",
|
"name": "__MSG_appName__",
|
||||||
"description": "__MSG_appDesc__",
|
"description": "__MSG_appDesc__",
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"author": "Hopsware LLC",
|
"author": "Hopsware LLC",
|
||||||
"developer": {
|
"developer": {
|
||||||
"name": "Andrew Van Tassel",
|
"name": "Andrew Van Tassel",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user