mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-15 22:00:08 -07:00
Merge pull request #35 from Ionic/feature/prepare-aux-data
Prepare for showing additional information.
This commit is contained in:
commit
7afd1173de
@ -136,6 +136,22 @@
|
||||
</div>
|
||||
<p>Flag messages as junk if travel time takes longer than normal.</p>
|
||||
</div>
|
||||
<div class="grouped fields">
|
||||
<div class="field">
|
||||
<label>Additional information</label>
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" id="extrainfo_on" name="extrainfo" value="on" />
|
||||
<label for="extrainfo_on">Show</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" id="extrainfo_off" name="extrainfo" value="off" />
|
||||
<label for="extrainfo_off">Hide</label>
|
||||
</div>
|
||||
</div>
|
||||
<p>Show additional information in authentication results, typically contains more header content.</p>
|
||||
</div>
|
||||
<div class="grouped fields">
|
||||
<div class="field">
|
||||
<label>Debug Messages</label>
|
||||
|
@ -18,8 +18,9 @@ class MailHops {
|
||||
theme: 'light',
|
||||
api_http: 'https://',
|
||||
api_host: 'api.Mailhops.com',
|
||||
debug: false,
|
||||
travel_time_junk: false,
|
||||
extrainfo: false,
|
||||
debug: false,
|
||||
country_filter: []
|
||||
}
|
||||
message = {
|
||||
@ -68,6 +69,9 @@ class MailHops {
|
||||
if (data.travel_time_junk && data.travel_time_junk != 'off') {
|
||||
this.options.travel_time_junk = Boolean(data.travel_time_junk);
|
||||
}
|
||||
if (data.extrainfo) {
|
||||
this.options.extrainfo = Boolean(data.extrainfo);
|
||||
}
|
||||
if (data.debug) {
|
||||
this.options.debug = Boolean(data.debug);
|
||||
}
|
||||
|
@ -3,8 +3,9 @@ const MailHopPreferences = {
|
||||
valid_api_key: false,
|
||||
unit: 'mi',
|
||||
theme: 'light',
|
||||
debug: false,
|
||||
travel_time_junk: false,
|
||||
extrainfo: false,
|
||||
debug: false,
|
||||
owm_key: '', //OpenWeatherMap.org api key
|
||||
countries: [],
|
||||
|
||||
@ -78,6 +79,7 @@ const MailHopPreferences = {
|
||||
this.theme = data.theme || 'light';
|
||||
this.unit = data.unit || 'mi';
|
||||
this.travel_time_junk = Boolean(data.travel_time_junk);
|
||||
this.extrainfo = Boolean(data.extrainfo);
|
||||
this.debug = Boolean(data.debug);
|
||||
|
||||
if (data.countries) {
|
||||
@ -123,6 +125,11 @@ const MailHopPreferences = {
|
||||
else
|
||||
document.getElementById("travel_time_junk_off").setAttribute('checked', 'checked');
|
||||
|
||||
if (this.extrainfo)
|
||||
document.getElementById("extrainfo_on").setAttribute('checked', 'checked');
|
||||
else
|
||||
document.getElementById("extrainfo_off").setAttribute('checked', 'checked');
|
||||
|
||||
if (this.debug)
|
||||
document.getElementById("debug_on").setAttribute('checked', 'checked');
|
||||
else
|
||||
@ -209,6 +216,7 @@ const MailHopPreferences = {
|
||||
unit: document.querySelector('input[name="unit"]:checked').value,
|
||||
theme: document.querySelector('input[name="theme"]:checked').value,
|
||||
travel_time_junk: document.querySelector('input[name="travel_time_junk"]:checked').value == 'on' ? true : false,
|
||||
extrainfo: document.querySelector('input[name="extrainfo"]:checked').value == 'on' ? true : false,
|
||||
debug: document.querySelector('input[name="debug"]:checked').value == 'on' ? true : false,
|
||||
countries: self.countries.join(','),
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user