diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-04-13 14:30:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-13 14:30:10 +0900 |
| commit | cdf13d30f2ad47b07d9c366e9324ff6109c15be2 (patch) | |
| tree | c7facc364b259ce64c4fe78da5a0d8f723e51ada /src/client/app | |
| parent | Merge branch 'master' of https://github.com/syuilo/misskey (diff) | |
| parent | Fix bug (diff) | |
| download | misskey-cdf13d30f2ad47b07d9c366e9324ff6109c15be2.tar.gz misskey-cdf13d30f2ad47b07d9c366e9324ff6109c15be2.tar.bz2 misskey-cdf13d30f2ad47b07d9c366e9324ff6109c15be2.zip | |
Merge pull request #1460 from syuilo/koa
Koa
Diffstat (limited to 'src/client/app')
| -rw-r--r-- | src/client/app/boot.js | 2 | ||||
| -rw-r--r-- | src/client/app/common/mios.ts | 5 | ||||
| -rw-r--r-- | src/client/app/common/views/components/url-preview.vue | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 0846e4bd55..ef828d9637 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -97,6 +97,8 @@ // Compare versions if (meta.version != ver) { + localStorage.setItem('v', meta.version); + alert( 'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' + '\n\n' + diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index a09af799be..ccc73eebc3 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -444,9 +444,10 @@ export default class MiOS extends EventEmitter { // Append a credential if (this.isSignedIn) (data as any).i = this.i.token; - const viaStream = localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true; - return new Promise((resolve, reject) => { + const viaStream = this.stream.hasConnection && + (localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true); + if (viaStream) { const stream = this.stream.borrow(); const id = Math.random().toString(); diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index e91e510550..fd25480f61 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -45,7 +45,7 @@ export default Vue.extend({ } else if (url.hostname == 'youtu.be') { this.youtubeId = url.pathname; } else { - fetch('/api:url?url=' + this.url).then(res => { + fetch('/url?url=' + this.url).then(res => { res.json().then(info => { this.title = info.title; this.description = info.description; |