summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-20 14:51:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-20 14:51:19 +0900
commitb0c1ec31243631ec665813acff492b88538bc873 (patch)
tree3e03e93f54cbcc3dfdccce1d0935161934d1811b /src/web
parentMerge remote-tracking branch 'refs/remotes/origin/master' into no-tag-ls (diff)
downloadmisskey-b0c1ec31243631ec665813acff492b88538bc873.tar.gz
misskey-b0c1ec31243631ec665813acff492b88538bc873.tar.bz2
misskey-b0c1ec31243631ec665813acff492b88538bc873.zip
wip
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/tags/donation.tag5
-rw-r--r--src/web/app/desktop/tags/ui-header.tag2
-rw-r--r--src/web/app/desktop/tags/ui.tag29
3 files changed, 17 insertions, 19 deletions
diff --git a/src/web/app/desktop/tags/donation.tag b/src/web/app/desktop/tags/donation.tag
index 0946e430da..57b36a3054 100644
--- a/src/web/app/desktop/tags/donation.tag
+++ b/src/web/app/desktop/tags/donation.tag
@@ -50,7 +50,7 @@
this.mixin('api');
this.mixin('i');
- this.close = (e) => {
+ this.close = e => {
e.preventDefault();
e.stopPropagation();
@@ -61,7 +61,6 @@
no_donation: this.I.data.no_donation
this.unmount();
-
- this.parent.parent.set-root-layout!
+ };
</script>
</mk-donation>
diff --git a/src/web/app/desktop/tags/ui-header.tag b/src/web/app/desktop/tags/ui-header.tag
index 05d1ff6655..9dd1ace6b9 100644
--- a/src/web/app/desktop/tags/ui-header.tag
+++ b/src/web/app/desktop/tags/ui-header.tag
@@ -21,7 +21,7 @@
<style>
:scope
display block
- position fixed
+ position sticky
top 0
z-index 1024
width 100%
diff --git a/src/web/app/desktop/tags/ui.tag b/src/web/app/desktop/tags/ui.tag
index 1e2cba35be..e6781f4a2d 100644
--- a/src/web/app/desktop/tags/ui.tag
+++ b/src/web/app/desktop/tags/ui.tag
@@ -9,29 +9,28 @@
<style>
:scope
display block
-
</style>
<script>
this.mixin('i');
- this.open-post-form = () => {
- riot.mount document.body.appendChild document.createElement 'mk-post-form-window'
-
- this.set-root-layout = () => {
- this.root.style.padding-top = this.refs.header.root.client-height + 'px'
+ this.openPostForm = () => {
+ riot.mount(document.body.appendChild(document.createElement('mk-post-form-window');
+ };
this.on('mount', () => {
- @set-root-layout!
- document.addEventListener 'keydown' this.onkeydown
+ document.addEventListener('keydown', this.onkeydown);
+ });
this.on('unmount', () => {
- document.removeEventListener 'keydown' this.onkeydown
+ document.removeEventListener('keydown', this.onkeydown);
+ });
+
+ this.onkeydown = e => {
+ if (e.target.tagName == 'input' || e.target.tagName == 'textarea') return;
- this.onkeydown = (e) => {
- tag = e.target.tag-name.to-lower-case!
- if tag != 'input' and tag != 'textarea'
- if e.which == 80 or e.which == 78 // p or n
- e.preventDefault();
- @open-post-form!
+ if (e.which == 80 || e.which == 78) { // p or n
+ e.preventDefault();
+ this.openPostForm();
+ };
</script>
</mk-ui>