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",
"author": "syuilo <i@syuilo.com>",
"version": "1.4.0",
"clientVersion": "1.0.5158",
"version": "1.5.0",
"clientVersion": "1.0.5165",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,7 +14,7 @@ import ElementLocaleJa from 'element-ui/lib/locale/lang/ja';
import App from './app.vue';
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';
let elementLocale;

View File

@@ -3,19 +3,19 @@ import { EventEmitter } from 'eventemitter3';
import * as merge from 'object-assign-deep';
import * as uuid from 'uuid';
import initStore from '../store';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
import Progress from './scripts/loading';
import Connection from './scripts/streaming/stream';
import { HomeStreamManager } from './scripts/streaming/home';
import { DriveStreamManager } from './scripts/streaming/drive';
import { ServerStreamManager } from './scripts/streaming/server';
import { MessagingIndexStreamManager } from './scripts/streaming/messaging-index';
import { OthelloStreamManager } from './scripts/streaming/othello';
import initStore from './store';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from './config';
import Progress from './common/scripts/loading';
import Connection from './common/scripts/streaming/stream';
import { HomeStreamManager } from './common/scripts/streaming/home';
import { DriveStreamManager } from './common/scripts/streaming/drive';
import { ServerStreamManager } from './common/scripts/streaming/server';
import { MessagingIndexStreamManager } from './common/scripts/streaming/messaging-index';
import { OthelloStreamManager } from './common/scripts/streaming/othello';
import Err from '../common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
import Err from './common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './common/scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './common/scripts/streaming/global-timeline';
//#region api requests
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;
(this as any).os.i.lastUsedAt = new Date();
(this as any).os.bakeMe();
if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden';

View File

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

View File

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