From f0b071893296e323df2ed2bdb06dbe794d72258d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 02:05:44 +0900 Subject: [PATCH] Fix bugs --- src/web/app/common/tags/signup.tag | 3 ++- src/web/app/desktop/tags/analog-clock.tag | 12 ++++++------ src/web/app/desktop/tags/crop-window.tag | 2 +- src/web/app/desktop/tags/drive/browser.tag | 6 +++--- src/web/app/desktop/tags/drive/file-contextmenu.tag | 1 - src/web/app/desktop/tags/home-widgets/timeline.tag | 2 +- src/web/app/desktop/tags/post-form.tag | 4 ++-- src/web/app/desktop/tags/ui-header-clock.tag | 5 ++++- src/web/app/desktop/tags/user-photos.tag | 2 +- src/web/app/mobile/tags/drive.tag | 8 ++++---- src/web/app/mobile/tags/drive/folder.tag | 2 +- src/web/app/mobile/tags/post-form.tag | 4 ++-- src/web/app/mobile/tags/timeline-post.tag | 2 +- 13 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/web/app/common/tags/signup.tag b/src/web/app/common/tags/signup.tag index dafdf51e1..f0358e232 100644 --- a/src/web/app/common/tags/signup.tag +++ b/src/web/app/common/tags/signup.tag @@ -249,6 +249,7 @@ const strength = this.getPasswordStrength(password); this.passwordStrength = strength > 0.7 ? 'high' : strength > 0.3 ? 'medium' : 'low'; + this.update(); this.refs.passwordMetar.style.width = `${strength * 100}%`; }; @@ -256,7 +257,7 @@ const password = this.refs.password.value; const retypedPassword = this.refs.passwordRetype.value; - if (retyped-password == '') { + if (retypedPassword == '') { this.passwordRetypeState = null; return; } diff --git a/src/web/app/desktop/tags/analog-clock.tag b/src/web/app/desktop/tags/analog-clock.tag index c7f200746..dcf4acaff 100644 --- a/src/web/app/desktop/tags/analog-clock.tag +++ b/src/web/app/desktop/tags/analog-clock.tag @@ -43,13 +43,13 @@ const uv = new Vec2(Math.sin(angle), -Math.cos(angle)); ctx.beginPath(); ctx.lineWidth = 1; - ctx.moveTo((canv-w / 2) + uv.x * lineStart, (canv-h / 2) + uv.y * lineStart); + ctx.moveTo((canvW / 2) + uv.x * lineStart, (canvH / 2) + uv.y * lineStart); if (i % 5 == 0) { ctx.strokeStyle = 'rgba(255, 255, 255, 0.2)'; - ctx.lineTo((canv-w / 2) + uv.x * longLineEnd, (canv-h / 2) + uv.y * longLineEnd); + ctx.lineTo((canvW / 2) + uv.x * longLineEnd, (canvH / 2) + uv.y * longLineEnd); } else { ctx.strokeStyle = 'rgba(255, 255, 255, 0.1)'; - ctx.lineTo((canv-w / 2) + uv.x * shortLineEnd, (canv-h / 2) + uv.y * shortLineEnd); + ctx.lineTo((canvW / 2) + uv.x * shortLineEnd, (canvH / 2) + uv.y * shortLineEnd); } ctx.stroke(); } @@ -58,7 +58,7 @@ { // 分 const angle = Math.PI * (m + s / 60) / 30; const length = Math.min(canvW, canvH) / 2.6; - const uv = new vec2(Math.sin(angle), -Math.cos(angle)); + const uv = new Vec2(Math.sin(angle), -Math.cos(angle)); ctx.beginPath(); ctx.strokeStyle = '#ffffff'; ctx.lineWidth = 2; @@ -70,7 +70,7 @@ { // 時 const angle = Math.PI * (h % 12 + m / 60) / 6; const length = Math.min(canvW, canvH) / 4; - const uv = new vec2(Math.sin(angle), -Math.cos(angle)); + const uv = new Vec2(Math.sin(angle), -Math.cos(angle)); ctx.beginPath(); ctx.strokeStyle = CONFIG.themeColor; ctx.lineWidth = 2; @@ -82,7 +82,7 @@ { // 秒 const angle = Math.PI * s / 30; const length = Math.min(canvW, canvH) / 2.6; - const uv = new vec2(Math.sin(angle), -Math.cos(angle)); + const uv = new Vec2(Math.sin(angle), -Math.cos(angle)); ctx.beginPath(); ctx.strokeStyle = 'rgba(255, 255, 255, 0.5)'; ctx.lineWidth = 1; diff --git a/src/web/app/desktop/tags/crop-window.tag b/src/web/app/desktop/tags/crop-window.tag index c5c186555..2cadc2994 100644 --- a/src/web/app/desktop/tags/crop-window.tag +++ b/src/web/app/desktop/tags/crop-window.tag @@ -169,7 +169,7 @@ this.img = this.refs.window.refs.img; this.cropper = new this.Cropper(this.img, { aspectRatio: this.aspectRatio, - highlight: no, + highlight: false, viewMode: 1 }); }); diff --git a/src/web/app/desktop/tags/drive/browser.tag b/src/web/app/desktop/tags/drive/browser.tag index 989ec48ae..1e8b17cfc 100644 --- a/src/web/app/desktop/tags/drive/browser.tag +++ b/src/web/app/desktop/tags/drive/browser.tag @@ -659,10 +659,10 @@ }); let flag = false; - complete = () => { + const complete = () => { if (flag) { - fetchedFolders.forEach(folder => this.addFolder); - fetchedFiles.forEach(file => this.addFile); + fetchedFolders.forEach(this.addFolder); + fetchedFiles.forEach(this.addFile); this.update({ fetching: false }); diff --git a/src/web/app/desktop/tags/drive/file-contextmenu.tag b/src/web/app/desktop/tags/drive/file-contextmenu.tag index 733ee853f..29f1befc4 100644 --- a/src/web/app/desktop/tags/drive/file-contextmenu.tag +++ b/src/web/app/desktop/tags/drive/file-contextmenu.tag @@ -39,7 +39,6 @@ this.mixin('i'); this.mixin('update-avatar'); this.mixin('update-banner'); - this.mixin('update-wallpaper'); this.mixin('input-dialog'); this.mixin('NotImplementedException'); diff --git a/src/web/app/desktop/tags/home-widgets/timeline.tag b/src/web/app/desktop/tags/home-widgets/timeline.tag index 138ff5ed1..a0a8790ea 100644 --- a/src/web/app/desktop/tags/home-widgets/timeline.tag +++ b/src/web/app/desktop/tags/home-widgets/timeline.tag @@ -62,7 +62,7 @@ }); this.onDocumentKeydown = e => { - if (e.target.tagName != 'INPUT' && tag != 'TEXTAREA') { + if (e.target.tagName != 'INPUT' && e.target.tagName != 'TEXTAREA') { if (e.which == 84) { // t this.refs.timeline.focus(); } diff --git a/src/web/app/desktop/tags/post-form.tag b/src/web/app/desktop/tags/post-form.tag index 2e3262fed..3b80eee5d 100644 --- a/src/web/app/desktop/tags/post-form.tag +++ b/src/web/app/desktop/tags/post-form.tag @@ -305,7 +305,7 @@ diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag index 397475e3f..353db0154 100644 --- a/src/web/app/mobile/tags/post-form.tag +++ b/src/web/app/mobile/tags/post-form.tag @@ -182,7 +182,7 @@