Compare commits

...

7 Commits
1.4.0 ... 1.5.0

Author SHA1 Message Date
syuilo
17bb34941b 1.5.0 2018-04-29 22:10:10 +09:00
syuilo
04cd3377ee oops 2018-04-29 22:04:51 +09:00
syuilo
326bd5e094 oops 2018-04-29 21:41:48 +09:00
syuilo
987799e9db Refactor 2018-04-29 21:37:51 +09:00
syuilo
19c846afaf 🎨 2018-04-29 21:35:18 +09:00
syuilo
ea9265b30b Fix bug 2018-04-29 21:28:45 +09:00
syuilo
0516353afd Disable http2
Use https instead
2018-04-29 21:21:32 +09:00
22 changed files with 41 additions and 36 deletions

View File

@@ -1,8 +1,8 @@
{ {
"name": "misskey", "name": "misskey",
"author": "syuilo <i@syuilo.com>", "author": "syuilo <i@syuilo.com>",
"version": "1.4.0", "version": "1.5.0",
"clientVersion": "1.0.5158", "clientVersion": "1.0.5165",
"codename": "nighthike", "codename": "nighthike",
"main": "./built/index.js", "main": "./built/index.js",
"private": true, "private": true,

View File

@@ -1,4 +1,4 @@
import MiOS from '../mios'; import MiOS from '../../mios';
import { version as current } from '../../config'; import { version as current } from '../../config';
export default async function(mios: MiOS, force = false, silent = false) { export default async function(mios: MiOS, force = false, silent = false) {

View File

@@ -1,5 +1,5 @@
import Stream from './stream'; import Stream from './stream';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Channel stream connection * Channel stream connection

View File

@@ -1,6 +1,6 @@
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Drive stream connection * Drive stream connection

View File

@@ -1,6 +1,6 @@
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Global timeline stream connection * Global timeline stream connection

View File

@@ -2,7 +2,7 @@ import * as merge from 'object-assign-deep';
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Home stream connection * Home stream connection

View File

@@ -1,6 +1,6 @@
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Local timeline stream connection * Local timeline stream connection

View File

@@ -1,6 +1,6 @@
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Messaging index stream connection * Messaging index stream connection

View File

@@ -1,5 +1,5 @@
import Stream from './stream'; import Stream from './stream';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Messaging stream connection * Messaging stream connection

View File

@@ -1,5 +1,5 @@
import Stream from './stream'; import Stream from './stream';
import MiOS from '../../mios'; import MiOS from '../../../mios';
export class OthelloGameStream extends Stream { export class OthelloGameStream extends Stream {
constructor(os: MiOS, me, game) { constructor(os: MiOS, me, game) {

View File

@@ -1,6 +1,6 @@
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import Stream from './stream'; import Stream from './stream';
import MiOS from '../../mios'; import MiOS from '../../../mios';
export class OthelloStream extends Stream { export class OthelloStream extends Stream {
constructor(os: MiOS, me) { constructor(os: MiOS, me) {

View File

@@ -1,6 +1,6 @@
import Stream from './stream'; import Stream from './stream';
import StreamManager from './stream-manager'; import StreamManager from './stream-manager';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Server stream connection * Server stream connection

View File

@@ -2,7 +2,7 @@ import { EventEmitter } from 'eventemitter3';
import * as uuid from 'uuid'; import * as uuid from 'uuid';
import * as ReconnectingWebsocket from 'reconnecting-websocket'; import * as ReconnectingWebsocket from 'reconnecting-websocket';
import { wsUrl } from '../../../config'; import { wsUrl } from '../../../config';
import MiOS from '../../mios'; import MiOS from '../../../mios';
/** /**
* Misskey stream connection * Misskey stream connection

View File

@@ -35,4 +35,5 @@ export default Vue.extend({
margin 0 margin 0
border-radius inherit border-radius inherit
vertical-align bottom vertical-align bottom
transition border-radius 1s ease
</style> </style>

View File

@@ -1,4 +1,4 @@
import OS from '../../common/mios'; import OS from '../../mios';
import { apiUrl } from '../../config'; import { apiUrl } from '../../config';
import CropWindow from '../views/components/crop-window.vue'; import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue'; import ProgressDialog from '../views/components/progress-dialog.vue';

View File

@@ -1,4 +1,4 @@
import OS from '../../common/mios'; import OS from '../../mios';
import { apiUrl } from '../../config'; import { apiUrl } from '../../config';
import CropWindow from '../views/components/crop-window.vue'; import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue'; import ProgressDialog from '../views/components/progress-dialog.vue';

View File

@@ -46,9 +46,10 @@ export default Vue.extend({
this.$store.commit('setUiHeaderHeight', 48); this.$store.commit('setUiHeaderHeight', 48);
if ((this as any).os.isSignedIn) { if ((this as any).os.isSignedIn) {
const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000 const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000;
const isHisasiburi = ago >= 3600; const isHisasiburi = ago >= 3600;
(this as any).os.i.lastUsedAt = new Date(); (this as any).os.i.lastUsedAt = new Date();
(this as any).os.bakeMe();
if (isHisasiburi) { if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block'; (this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden'; (this.$refs.main as any).style.overflow = 'hidden';
@@ -132,7 +133,7 @@ root(isDark)
line-height 48px line-height 48px
margin 0 margin 0
text-align center text-align center
color #888 color isDark ? #fff : #888
opacity 0 opacity 0
> .container > .container

View File

@@ -14,7 +14,7 @@ import ElementLocaleJa from 'element-ui/lib/locale/lang/ja';
import App from './app.vue'; import App from './app.vue';
import checkForUpdate from './common/scripts/check-for-update'; import checkForUpdate from './common/scripts/check-for-update';
import MiOS, { API } from './common/mios'; import MiOS, { API } from './mios';
import { version, codename, lang } from './config'; import { version, codename, lang } from './config';
let elementLocale; let elementLocale;

View File

@@ -3,19 +3,19 @@ import { EventEmitter } from 'eventemitter3';
import * as merge from 'object-assign-deep'; import * as merge from 'object-assign-deep';
import * as uuid from 'uuid'; import * as uuid from 'uuid';
import initStore from '../store'; import initStore from './store';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config'; import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from './config';
import Progress from './scripts/loading'; import Progress from './common/scripts/loading';
import Connection from './scripts/streaming/stream'; import Connection from './common/scripts/streaming/stream';
import { HomeStreamManager } from './scripts/streaming/home'; import { HomeStreamManager } from './common/scripts/streaming/home';
import { DriveStreamManager } from './scripts/streaming/drive'; import { DriveStreamManager } from './common/scripts/streaming/drive';
import { ServerStreamManager } from './scripts/streaming/server'; import { ServerStreamManager } from './common/scripts/streaming/server';
import { MessagingIndexStreamManager } from './scripts/streaming/messaging-index'; import { MessagingIndexStreamManager } from './common/scripts/streaming/messaging-index';
import { OthelloStreamManager } from './scripts/streaming/othello'; import { OthelloStreamManager } from './common/scripts/streaming/othello';
import Err from '../common/views/components/connect-failed.vue'; import Err from './common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline'; import { LocalTimelineStreamManager } from './common/scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline'; import { GlobalTimelineStreamManager } from './common/scripts/streaming/global-timeline';
//#region api requests //#region api requests
let spinner = null; let spinner = null;

View File

@@ -59,9 +59,10 @@ export default Vue.extend({
} }
}); });
const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000 const ago = (new Date().getTime() - new Date((this as any).os.i.lastUsedAt).getTime()) / 1000;
const isHisasiburi = ago >= 3600; const isHisasiburi = ago >= 3600;
(this as any).os.i.lastUsedAt = new Date(); (this as any).os.i.lastUsedAt = new Date();
(this as any).os.bakeMe();
if (isHisasiburi) { if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block'; (this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden'; (this.$refs.main as any).style.overflow = 'hidden';

View File

@@ -1,5 +1,5 @@
import Vuex from 'vuex'; import Vuex from 'vuex';
import MiOS from './common/mios'; import MiOS from './mios';
const defaultSettings = { const defaultSettings = {
home: [], home: [],

View File

@@ -4,14 +4,15 @@
import * as fs from 'fs'; import * as fs from 'fs';
import * as http from 'http'; import * as http from 'http';
import * as http2 from 'http2'; import * as https from 'https';
//import * as http2 from 'http2';
import * as zlib from 'zlib'; import * as zlib from 'zlib';
import * as Koa from 'koa'; import * as Koa from 'koa';
import * as Router from 'koa-router'; import * as Router from 'koa-router';
import * as mount from 'koa-mount'; import * as mount from 'koa-mount';
import * as compress from 'koa-compress'; import * as compress from 'koa-compress';
import * as logger from 'koa-logger'; import * as logger from 'koa-logger';
const slow = require('koa-slow'); //const slow = require('koa-slow');
import activityPub from './activitypub'; import activityPub from './activitypub';
import webFinger from './webfinger'; import webFinger from './webfinger';
@@ -67,7 +68,8 @@ function createServer() {
certs[k] = fs.readFileSync(config.https[k]); certs[k] = fs.readFileSync(config.https[k]);
}); });
certs['allowHTTP1'] = true; certs['allowHTTP1'] = true;
return http2.createSecureServer(certs, app.callback()); //return http2.createSecureServer(certs, app.callback());
return https.createServer(certs, app.callback());
} else { } else {
return http.createServer(app.callback()); return http.createServer(app.callback());
} }