summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/common/tags/signup.tag3
-rw-r--r--src/web/app/desktop/tags/analog-clock.tag12
-rw-r--r--src/web/app/desktop/tags/crop-window.tag2
-rw-r--r--src/web/app/desktop/tags/drive/browser.tag6
-rw-r--r--src/web/app/desktop/tags/drive/file-contextmenu.tag1
-rw-r--r--src/web/app/desktop/tags/home-widgets/timeline.tag2
-rw-r--r--src/web/app/desktop/tags/post-form.tag4
-rw-r--r--src/web/app/desktop/tags/ui-header-clock.tag5
-rw-r--r--src/web/app/desktop/tags/user-photos.tag2
-rw-r--r--src/web/app/mobile/tags/drive.tag8
-rw-r--r--src/web/app/mobile/tags/drive/folder.tag2
-rw-r--r--src/web/app/mobile/tags/post-form.tag4
-rw-r--r--src/web/app/mobile/tags/timeline-post.tag2
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 dafdf51e17..f0358e2328 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 c7f2007467..dcf4acaff8 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 c5c1865550..2cadc29948 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 989ec48ae2..1e8b17cfcd 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 733ee853f5..29f1befc44 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 138ff5ed14..a0a8790eaa 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 2e3262fedb..3b80eee5d5 100644
--- a/src/web/app/desktop/tags/post-form.tag
+++ b/src/web/app/desktop/tags/post-form.tag
@@ -305,7 +305,7 @@
</style>
<script>
- getCat = require('../../common/scripts/get-cat');
+ const getCat = require('../../common/scripts/get-cat');
this.mixin('api');
this.mixin('notify');
@@ -379,7 +379,7 @@
};
this.onkeydown = e => {
- if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.meta-key)) this.post();
+ if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
};
this.onpaste = e => {
diff --git a/src/web/app/desktop/tags/ui-header-clock.tag b/src/web/app/desktop/tags/ui-header-clock.tag
index ce41083fc9..48b142509a 100644
--- a/src/web/app/desktop/tags/ui-header-clock.tag
+++ b/src/web/app/desktop/tags/ui-header-clock.tag
@@ -2,6 +2,7 @@
<div class="header">
<time ref="time">
<span class="yyyymmdd">{ yyyy }/{ mm }/{ dd }</span>
+ <br>
<span class="hhnn">{ hh }<span style="visibility:{ now.getSeconds() % 2 == 0 ? 'visible' : 'hidden' }">:</span>{ nn }</span>
</time>
</div>
@@ -61,8 +62,10 @@
</style>
<script>
+ this.now = new Date();
+
this.draw = () => {
- this.now = new Date();
+ const now = this.now = new Date();
this.yyyy = now.getFullYear();
this.mm = ('0' + (now.getMonth() + 1)).slice(-2);
this.dd = ('0' + now.getDate()).slice(-2);
diff --git a/src/web/app/desktop/tags/user-photos.tag b/src/web/app/desktop/tags/user-photos.tag
index a72b1f3020..86f12aceb9 100644
--- a/src/web/app/desktop/tags/user-photos.tag
+++ b/src/web/app/desktop/tags/user-photos.tag
@@ -81,7 +81,7 @@
this.initializing = false;
posts.forEach(post => {
post.media.forEach(media => {
- if (this.images.length < 9) this.images.push(image);
+ if (this.images.length < 9) this.images.push(media);
});
});
this.update();
diff --git a/src/web/app/mobile/tags/drive.tag b/src/web/app/mobile/tags/drive.tag
index 707ec9478e..35b9b65417 100644
--- a/src/web/app/mobile/tags/drive.tag
+++ b/src/web/app/mobile/tags/drive.tag
@@ -198,7 +198,7 @@
};
this.move = ev => {
- this.move(ev.item.folder);
+ this.cd(ev.item.folder);
};
this.cd = (target, silent = false) => {
@@ -333,10 +333,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/mobile/tags/drive/folder.tag b/src/web/app/mobile/tags/drive/folder.tag
index 093e742929..27e86662c7 100644
--- a/src/web/app/mobile/tags/drive/folder.tag
+++ b/src/web/app/mobile/tags/drive/folder.tag
@@ -41,7 +41,7 @@
this.folder = this.opts.folder;
this.onclick = () => {
- this.browser.move(this.folder);
+ this.browser.cd(this.folder);
};
</script>
</mk-drive-folder>
diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag
index 397475e3f5..353db01540 100644
--- a/src/web/app/mobile/tags/post-form.tag
+++ b/src/web/app/mobile/tags/post-form.tag
@@ -182,7 +182,7 @@
</style>
<script>
- getCat = require('../../common/scripts/get-cat');
+ const getCat = require('../../common/scripts/get-cat');
this.mixin('api');
@@ -204,7 +204,7 @@
});
this.onkeydown = e => {
- if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.meta-key)) this.post();
+ if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
};
this.onpaste = e => {
diff --git a/src/web/app/mobile/tags/timeline-post.tag b/src/web/app/mobile/tags/timeline-post.tag
index 0a6db9a92d..8662eadb8c 100644
--- a/src/web/app/mobile/tags/timeline-post.tag
+++ b/src/web/app/mobile/tags/timeline-post.tag
@@ -298,7 +298,7 @@
this.mixin('api');
this.mixin('text');
this.mixin('get-post-summary');
- this.mixin('openPostForm');
+ this.mixin('open-post-form');
this.post = this.opts.post;
this.isRepost = this.post.repost != null && this.post.text == null;