diff options
| author | Tosuke <tasukeprg@gmail.com> | 2017-01-06 14:39:24 +0900 |
|---|---|---|
| committer | Tosuke <tasukeprg@gmail.com> | 2017-01-06 14:39:24 +0900 |
| commit | 0420fee5d2c6a944a7b2cf13307dfadce9796b59 (patch) | |
| tree | d8c361b2c340c03927a5a417e5a91b3ab58db34b /src/web/app/common | |
| parent | [Swagger]Add /auth/accept (diff) | |
| parent | Update changelog (diff) | |
| download | sharkey-0420fee5d2c6a944a7b2cf13307dfadce9796b59.tar.gz sharkey-0420fee5d2c6a944a7b2cf13307dfadce9796b59.tar.bz2 sharkey-0420fee5d2c6a944a7b2cf13307dfadce9796b59.zip | |
Merge branch 'master' of github.com:syuilo/misskey into swagger
Diffstat (limited to 'src/web/app/common')
| -rw-r--r-- | src/web/app/common/scripts/date-stringify.ls | 2 | ||||
| -rw-r--r-- | src/web/app/common/scripts/messaging-stream.ls | 2 | ||||
| -rw-r--r-- | src/web/app/common/scripts/stream.ls | 5 | ||||
| -rw-r--r-- | src/web/app/common/scripts/text-compiler.js | 6 | ||||
| -rw-r--r-- | src/web/app/common/tags/time.tag | 2 |
5 files changed, 7 insertions, 10 deletions
diff --git a/src/web/app/common/scripts/date-stringify.ls b/src/web/app/common/scripts/date-stringify.ls index 9aa8b3e6c5..7e85192ce7 100644 --- a/src/web/app/common/scripts/date-stringify.ls +++ b/src/web/app/common/scripts/date-stringify.ls @@ -3,7 +3,7 @@ module.exports = (date) -> text = date.get-full-year! + \年 + - date.get-month! + \月 + + date.get-month! + 1 + \月 + date.get-date! + \日 + ' ' + date.get-hours! + \時 + diff --git a/src/web/app/common/scripts/messaging-stream.ls b/src/web/app/common/scripts/messaging-stream.ls index 298285dc93..ac3e74f1f5 100644 --- a/src/web/app/common/scripts/messaging-stream.ls +++ b/src/web/app/common/scripts/messaging-stream.ls @@ -9,7 +9,7 @@ class Connection @event = riot.observable! @me = me host = CONFIG.api.url.replace \http \ws - @socket = new ReconnectingWebSocket "#{host}/messaging?otherparty=#{otherparty}" + @socket = new ReconnectingWebSocket "#{host}/messaging?i=#{me.token}&otherparty=#{otherparty}" @socket.add-event-listener \open @on-open @socket.add-event-listener \message @on-message diff --git a/src/web/app/common/scripts/stream.ls b/src/web/app/common/scripts/stream.ls index 534048248f..64ae03817a 100644 --- a/src/web/app/common/scripts/stream.ls +++ b/src/web/app/common/scripts/stream.ls @@ -9,13 +9,12 @@ module.exports = (me) ~> state-ev = riot.observable! event = riot.observable! - socket = new ReconnectingWebSocket CONFIG.api.url.replace \http \ws + host = CONFIG.api.url.replace \http \ws + socket = new ReconnectingWebSocket "#{host}?i=#{me.token}" socket.onopen = ~> state := \connected state-ev.trigger \connected - socket.send JSON.stringify do - i: me.token socket.onclose = ~> state := \reconnecting diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index f6c531c6ce..8ea2361b87 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -1,4 +1,5 @@ const riot = require('riot'); +const nyaize = require('nyaize').default; module.exports = function(tokens, shouldBreak, escape) { if (shouldBreak == null) { @@ -34,10 +35,7 @@ module.exports = function(tokens, shouldBreak, escape) { }).join(''); if (me && me.data && me.data.nya) { - text = text.replace(/な/g, 'にゃ') - .replace(/ニャ/g, 'にゃ') - .replace(/にゃでにゃで/g, 'なでなで') - .replace(/ニャデニャデ/g, 'ナデナデ'); + text = nyaize(text); } return text; diff --git a/src/web/app/common/tags/time.tag b/src/web/app/common/tags/time.tag index 56c3b8ecc3..52ad89a44f 100644 --- a/src/web/app/common/tags/time.tag +++ b/src/web/app/common/tags/time.tag @@ -11,7 +11,7 @@ script. @absolute = @time.get-full-year! + \年 + - @time.get-month! + \月 + + @time.get-month! + 1 + \月 + @time.get-date! + \日 + ' ' + @time.get-hours! + \時 + |