This commit is contained in:
syuilo 2017-02-22 02:05:44 +09:00
parent 1f3e128ed5
commit f0b0718932
13 changed files with 28 additions and 25 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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
});
});

View file

@ -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
});

View file

@ -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');

View file

@ -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();
}

View file

@ -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 => {

View file

@ -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);

View file

@ -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();

View file

@ -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
});

View file

@ -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>

View file

@ -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 => {

View file

@ -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;