瀏覽代碼

Merge branch '1708-tos-in-help' into 'master'

Add a link to ToS in Help

Closes #1708

See merge request Isleward/isleward!529
tags/v0.8.6^2
Big Bad Waffle 3 年之前
父節點
當前提交
acfd3920aa
共有 3 個文件被更改,包括 23 次插入1 次删除
  1. +7
    -0
      src/client/ui/templates/help/help.js
  2. +8
    -1
      src/client/ui/templates/help/styles.less
  3. +8
    -0
      src/client/ui/templates/help/template.html

+ 7
- 0
src/client/ui/templates/help/help.js 查看文件

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

this.on('.toslink', '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');
}
};
});

+ 8
- 1
src/client/ui/templates/help/styles.less 查看文件

@@ -58,10 +58,17 @@
padding-left: 20px;
}

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

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

}

}

.mobile .uiHelp {


+ 8
- 0
src/client/ui/templates/help/template.html 查看文件

@@ -39,6 +39,10 @@
<div class="topic">Who's Online</div>
<div class="desc">Hotkey: [O]</div>
</div>
<div class="row">
<div class="topic">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>
<div class="desc">Touch and drag</div>
@@ -67,5 +71,9 @@
<div class="topic">Stats</div>
<div class="desc">Owl Spirits need Int to deal more damage. Lynxes need Dex and Bears need Str</div>
</div>
<div class="row mobile">
<div class="topic">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>

Loading…
取消
儲存