Selaa lähdekoodia

Rework the ToS link to not use <a>

tags/v0.8.6^2
Vildravn 3 vuotta sitten
vanhempi
commit
1952613ca5
3 muutettua tiedostoa jossa 16 lisäystä ja 5 poistoa
  1. +7
    -0
      src/client/ui/templates/help/help.js
  2. +7
    -3
      src/client/ui/templates/help/styles.less
  3. +2
    -2
      src/client/ui/templates/help/template.html

+ 7
- 0
src/client/ui/templates/help/help.js Näytä tiedosto

@@ -18,11 +18,18 @@ define([
postRender: function () {
this.onEvent('onKeyDown', this.onKeyDown.bind(this));
this.onEvent('onShowHelp', this.toggle.bind(this));

$('.uiHelp').find('.toslink').on('click', this.redirect.bind(this));
},

onKeyDown: function (key) {
if (key === 'h')
this.toggle();
},

redirect: function (e) {
let currentLocation = $(e.currentTarget).attr('location');
window.open(currentLocation, '_blank');
}
};
});

+ 7
- 3
src/client/ui/templates/help/styles.less Näytä tiedosto

@@ -56,12 +56,16 @@
width: 70%;
max-width: 400px;
padding-left: 20px;
}

.toslink {
color: @white;
cursor: pointer;

a {
color: @white;
&:hover {
color: @blueA;
}
}

}

}


+ 2
- 2
src/client/ui/templates/help/template.html Näytä tiedosto

@@ -41,7 +41,7 @@
</div>
<div class="row">
<div class="topic">Terms of Service</div>
<div class="desc">Click <a href="https://www.isleward.com/termsofservice/" target="_blank">this link</a> to read the Terms of Service</div>
<div class="desc toslink" location="https://www.isleward.com/termsofservice/">Click here to read the Terms of Service</div>
</div>
<div class="row mobile">
<div class="topic">Movement</div>
@@ -73,7 +73,7 @@
</div>
<div class="row mobile">
<div class="topic">Terms of Service</div>
<div class="desc">Tap <a href="https://www.isleward.com/termsofservice/" target="_blank">this link</a> to read the Terms of Service</div>
<div class="desc toslink" location="https://www.isleward.com/termsofservice/">Tap here to read the Terms of Service</div>
</div>
</div>
</div>

Ladataan…
Peruuta
Tallenna