Compare commits

...

167 Commits

Author SHA1 Message Date
286da28cd6 5.5.0 2018-07-27 07:05:33 +09:00
a4ee93a355 Fix bug 2018-07-27 07:05:12 +09:00
ab56cb1788 Update doc 2018-07-27 06:07:13 +09:00
32435e4d8e Update docs 2018-07-27 05:58:52 +09:00
900cdf9d9a Update doc 2018-07-27 05:56:00 +09:00
e79019266f Update doc 2018-07-27 05:50:37 +09:00
deee7361f0 5.4.0 2018-07-27 04:26:48 +09:00
bdcf09c618 Update doc 2018-07-27 04:25:38 +09:00
7b5d6dcd9b Update doc 2018-07-27 04:21:48 +09:00
0595d87759 Update doc 2018-07-27 04:10:16 +09:00
fab0a0d6e2 ログインしていないとリバーシを観戦できない問題を修正 2018-07-27 04:01:12 +09:00
3eb6b36866 Fix bug 2018-07-27 03:46:12 +09:00
50327158e2 wip doc 2018-07-27 03:43:23 +09:00
a99756ef85 ✌️ 2018-07-27 03:34:28 +09:00
1c25dbed66 5.3.0 2018-07-27 03:23:17 +09:00
7e8c5c0c3c Improve readability 2018-07-27 03:21:50 +09:00
0b747b901c Merge pull request #1998 from syuilo/greenkeeper/typescript-eslint-parser-17.0.0
Update typescript-eslint-parser to the latest version 🚀
2018-07-27 01:54:09 +09:00
8dd5051201 Merge pull request #1990 from mei23/mei-osurl
オブジェクトストレージの参照URLを上書きできるようにする
2018-07-27 01:53:42 +09:00
f7b0fedc9d Merge pull request #1989 from mei23/mei-oscc
オブジェクトストレージ格納時にCache-Controlを指定する
2018-07-27 01:52:19 +09:00
0411d0b242 fix(package): update typescript-eslint-parser to version 17.0.0 2018-07-26 13:37:52 +00:00
3fcc793269 Fix problem displaying button in profile page 2018-07-26 21:47:02 +09:00
fd27a0efef Hide follow button of my account 2018-07-26 21:45:43 +09:00
4474a2568e Change VisibilityButton's icon when changing visibility 2018-07-26 21:44:21 +09:00
9d944243a3 Add S3 examples 2018-07-26 17:42:08 +09:00
8ef38ebab1 Add config.drive.baseUrl 2018-07-26 17:29:05 +09:00
f457a23eab Merge pull request #1988 from syuilo/greenkeeper/element-ui-2.4.5
Update element-ui to the latest version 🚀
2018-07-26 17:16:45 +09:00
5d1eeaf1d8 fix(package): update element-ui to version 2.4.5 2018-07-26 08:16:21 +00:00
77f732c6a4 5.2.1 2018-07-26 17:15:20 +09:00
ac07f04ad8 Update job queue setting 2018-07-26 17:15:00 +09:00
dddd760efd Fix bug 2018-07-26 17:13:55 +09:00
0f7fbacb17 Fix bug 2018-07-26 17:10:43 +09:00
2697107770 5.2.0 2018-07-26 17:04:33 +09:00
e1e1cd0574 Update job queue settings 2018-07-26 17:02:34 +09:00
93786aa510 Merge branch 'master' of https://github.com/syuilo/misskey 2018-07-26 16:51:00 +09:00
d8b9a8715b ✌️ 2018-07-26 16:50:50 +09:00
e8783b15b1 Set Cache-Control to object-storage 2018-07-26 16:06:43 +09:00
0995d5c5a2 Merge pull request #1986 from acid-chicken/master
Resolves #1985
2018-07-26 13:49:24 +09:00
0852045928 Update misskey-flavored-markdown.ts 2018-07-26 13:48:08 +09:00
04de0e9a50 Update hashtags.vue 2018-07-26 13:47:06 +09:00
951b693d17 Merge pull request #1983 from mei23/mei-osct 2018-07-26 11:56:00 +09:00
308f357c4f Set Content-Type to object-storage 2018-07-26 10:47:12 +09:00
206ddd6d36 5.1.0 2018-07-26 09:22:33 +09:00
b4cf963bd6 Merge branch 'master' of https://github.com/syuilo/misskey 2018-07-26 08:11:49 +09:00
77b493c9b0 Use bee-queue instead of Kue 2018-07-26 08:11:47 +09:00
95a5ff5625 Merge pull request #1981 from syuilo/l10n_master
New Crowdin translations
2018-07-26 05:41:50 +09:00
190753aa99 New translations ja.yml (Polish) 2018-07-26 05:41:28 +09:00
f778696a76 ✌️ 2018-07-26 05:27:27 +09:00
ce4fb49d4c Improve tweet embed 2018-07-26 04:55:39 +09:00
91b89b79d2 Fix bug 2018-07-26 04:29:09 +09:00
3cd3e19199 Update version 2018-07-26 03:46:55 +09:00
ed36ceadbc ✌️ 2018-07-26 03:46:18 +09:00
8736c9dfe6 Merge pull request #1977 from yarnaimo/embedded-tweet
ツイートの埋め込み
2018-07-26 02:31:00 +09:00
e44f33bf14 Embed tweet when tweet url attached 2018-07-26 00:03:32 +09:00
6e39b73f07 Fix #1961 2018-07-25 13:37:40 +09:00
01703e5584 Fix #1975 2018-07-25 13:30:59 +09:00
fee7cb41cb Merge pull request #1965 from syuilo/l10n_master
New Crowdin translations
2018-07-25 13:07:06 +09:00
bb14af8b40 fix(package): update gulp-uglify to version 3.0.1 2018-07-25 12:15:40 +09:00
54b849e548 fix(package): update @types/node to version 10.5.3 2018-07-25 12:15:29 +09:00
8f50482896 Add note 2018-07-25 09:54:03 +09:00
b3b82e7595 Fix bug nado 2018-07-25 08:01:12 +09:00
9c4e0a4ae6 ✌️ 2018-07-25 07:46:56 +09:00
0b656999d8 Clean up 2018-07-25 07:45:38 +09:00
7605a512ba Update appveyor.yml 2018-07-25 07:33:49 +09:00
2018a29968 Update docs 2018-07-25 07:29:55 +09:00
dbf335a05d Refactor: withFile --> requireFile 2018-07-25 07:18:50 +09:00
ad5a7e9d70 Update CHANGELOG 2018-07-25 07:08:53 +09:00
f8477fa88d 🎨 2018-07-25 04:36:02 +09:00
a22ddb05ba Update docs 2018-07-25 04:15:22 +09:00
9455edf2da Update docs 2018-07-25 04:10:56 +09:00
4a2244327f New translations ja.yml (English) 2018-07-25 01:41:43 +09:00
708a800a25 New translations ja.yml (Catalan) 2018-07-25 01:21:58 +09:00
a34193ca16 New translations ja.yml (Portuguese) 2018-07-25 01:21:56 +09:00
a4886975e4 New translations ja.yml (Korean) 2018-07-25 01:21:54 +09:00
8b6a015602 New translations ja.yml (Polish) 2018-07-25 01:21:52 +09:00
f915560752 New translations ja.yml (Chinese Simplified) 2018-07-25 01:21:50 +09:00
f2f0910771 New translations ja.yml (Italian) 2018-07-25 01:21:48 +09:00
9316e2ce15 New translations ja.yml (Russian) 2018-07-25 01:21:46 +09:00
128573e73e New translations ja.yml (English) 2018-07-25 01:21:44 +09:00
3d132ad803 New translations ja.yml (Spanish) 2018-07-25 01:21:42 +09:00
6f671325fa New translations ja.yml (German) 2018-07-25 01:21:40 +09:00
7e6ac77341 New translations ja.yml (French) 2018-07-25 01:21:38 +09:00
51bafe8259 #1893 2018-07-25 01:14:38 +09:00
f1bbbcfedf Fix #1960 2018-07-25 00:51:30 +09:00
7d99b154c0 Update config template: Add missing property definition 2018-07-25 00:40:27 +09:00
575da76235 Clean up: Remove unmaintained codes 2018-07-25 00:33:48 +09:00
c3b3b9b9a6 #1955 2018-07-25 00:29:18 +09:00
7432de3d33 Merge pull request #1968 from syuilo/object-storage
Object storage support
2018-07-24 23:45:19 +09:00
03ce87d710 wip 2018-07-24 23:43:14 +09:00
5e9fb8bd84 wip 2018-07-24 23:35:19 +09:00
68a205486e fix(package): update eslint-plugin-vue to version 4.7.1 2018-07-24 21:41:03 +09:00
94c106a87a fix(package): update @types/webpack to version 4.4.8 2018-07-24 12:06:05 +09:00
1b2a04bd2a fix(package): update gulp-rename to version 1.4.0 2018-07-24 06:24:11 +09:00
a048939cf1 wip 2018-07-24 06:21:21 +09:00
6296846078 New translations ja.yml (French) 2018-07-24 05:41:37 +09:00
e530d12f7f New translations ja.yml (French) 2018-07-24 05:31:39 +09:00
adc3c16ef3 wip 2018-07-24 05:04:43 +09:00
5458b10774 wip 2018-07-24 01:58:11 +09:00
9ad403af00 Enhance #1958 2018-07-23 20:58:59 +09:00
8d7f16caed Update setup.*.md 2018-07-23 20:48:55 +09:00
e5c20ca9a7 Update dependencyInfo.ts 2018-07-23 20:45:21 +09:00
bd4a7d8cbb fix(package): update webpack to version 4.16.2 2018-07-23 20:19:24 +09:00
5b116737b6 Fix typo 2018-07-23 20:11:20 +09:00
8adc799041 Merge pull request #1959 from acid-chicken/top
Go to top
2018-07-23 14:37:18 +09:00
41e657b64e Go to top 2018-07-23 14:35:00 +09:00
f16cda51fb #1957 2018-07-23 14:07:09 +09:00
886510d721 Clean up 2018-07-23 14:04:53 +09:00
427b3dcd73 Fix semantic errors 2018-07-23 13:56:25 +09:00
138fa1454f Fix #1957 2018-07-23 13:37:29 +09:00
7ec9b03990 fix(package): update swagger-jsdoc to version 1.10.3 2018-07-23 12:54:02 +09:00
65a91c5709 Merge pull request #1951 from syuilo/greenkeeper/hard-source-webpack-plugin-0.11.2
Update hard-source-webpack-plugin to the latest version 🚀
2018-07-22 21:56:55 +09:00
e679f47c1a fix(package): update hard-source-webpack-plugin to version 0.11.2 2018-07-22 04:47:40 +00:00
337ecafa56 Merge pull request #1949 from syuilo/greenkeeper/ratelimiter-3.2.0
Update ratelimiter to the latest version 🚀
2018-07-22 00:58:36 +09:00
2c46098fb5 Merge pull request #1950 from syuilo/greenkeeper/ws-6.0.0
Update ws to the latest version 🚀
2018-07-22 00:58:06 +09:00
35247af220 fix(package): update ws to version 6.0.0 2018-07-21 13:49:12 +00:00
e71da1f659 fix(package): update ratelimiter to version 3.2.0 2018-07-21 12:57:47 +00:00
91daa1958b 4.27.0 2018-07-21 19:46:29 +09:00
900a9cb34f sharedInbox対応 2018-07-21 19:33:56 +09:00
297a7f541e #1947 2018-07-21 19:17:15 +09:00
049085fb7a Merge pull request #1945 from syuilo/greenkeeper/@types/mongodb-3.1.2
Update @types/mongodb to the latest version 🚀
2018-07-21 11:26:25 +09:00
f594a2d0f4 fix(package): update @types/mongodb to version 3.1.2 2018-07-21 02:19:33 +00:00
ffd13accca Refactor 2018-07-21 11:08:27 +09:00
edf2503ee5 💯 2018-07-21 11:06:01 +09:00
4d0c303660 Fix #1901 2018-07-21 11:03:32 +09:00
49bc00102b Fix bug 2018-07-21 08:54:41 +09:00
29f074267c Merge pull request #1943 from syuilo/refactor-notes-create
Refactor notes create
2018-07-21 08:51:56 +09:00
7671c37f2a wip 2018-07-21 08:47:48 +09:00
91ad9e4c41 wip 2018-07-21 07:05:51 +09:00
ed48349e39 wip 2018-07-21 06:59:53 +09:00
2df02a9d70 wip 2018-07-21 05:35:43 +09:00
1d027613e4 🎨 2018-07-21 04:33:04 +09:00
e9de73d2f6 Fix 2018-07-21 03:24:39 +09:00
7b9b01688c Merge pull request #1942 from syuilo/l10n_master
New Crowdin translations
2018-07-21 03:21:16 +09:00
afcf2fddb1 Improve hashtag suggestion 2018-07-21 03:15:31 +09:00
78de3ba691 New translations ja.yml (English) 2018-07-21 03:11:10 +09:00
2cfefee94d New translations ja.yml (Catalan) 2018-07-21 03:02:52 +09:00
d50940cdf8 New translations ja.yml (Portuguese) 2018-07-21 03:02:51 +09:00
e38ee663dc New translations ja.yml (Korean) 2018-07-21 03:02:49 +09:00
5a160a76f7 New translations ja.yml (Polish) 2018-07-21 03:02:47 +09:00
c504f27a51 New translations ja.yml (Chinese Simplified) 2018-07-21 03:02:45 +09:00
3f5155e9b5 New translations ja.yml (Italian) 2018-07-21 03:02:43 +09:00
dcb85073da New translations ja.yml (Russian) 2018-07-21 03:02:41 +09:00
2a5f3491a6 New translations ja.yml (English) 2018-07-21 03:02:39 +09:00
6f6b01344d New translations ja.yml (Spanish) 2018-07-21 03:02:37 +09:00
73810758d9 New translations ja.yml (German) 2018-07-21 03:02:35 +09:00
6cb527fd58 New translations ja.yml (French) 2018-07-21 03:02:33 +09:00
7316352ff5 ✌️ 2018-07-21 02:58:44 +09:00
ad76d5d8e2 Merge pull request #1939 from acid-chicken/sushi
🍣回転寿司🍣
2018-07-21 02:23:13 +09:00
539f307500 Merge branch 'master' of https://github.com/syuilo/misskey 2018-07-21 02:18:40 +09:00
5f68d08cbc Improve log 2018-07-21 02:18:35 +09:00
bc8bea11c0 Merge pull request #1940 from acid-chicken/acid-chicken-patch-1
投稿できない際にショートカットキーをトリガーしないようにする
2018-07-21 02:16:11 +09:00
9bb02e5bf6 Update post-form.vue 2018-07-21 02:14:24 +09:00
ae68e6372c Update messaging-room.form.vue 2018-07-21 02:07:50 +09:00
69593994ef Update post-form.vue 2018-07-21 02:06:49 +09:00
cb52ebe65b インデクサーを忘れていた 2018-07-21 01:25:55 +09:00
9b989ebac6 保存し忘れ 2018-07-21 01:24:12 +09:00
f13bef4ac8 回転寿司 2018-07-21 01:21:27 +09:00
29b1aa0d9b Merge pull request #1938 from acid-chicken/vscode
Add extension suggestion for VSCode
2018-07-21 00:49:07 +09:00
5aa2e47c49 Add extension suggestion for VSCode 2018-07-21 00:38:08 +09:00
773d104306 Fix #1868 2018-07-20 21:59:09 +09:00
b8e948b009 Merge pull request #1936 from syuilo/patch-1803
Fix #1803
2018-07-20 21:47:35 +09:00
49298d2f3f Update ISSUE_TEMPLATE 2018-07-20 21:41:06 +09:00
ac19567f2b Fix #1803 2018-07-20 21:39:21 +09:00
bc627fc55c タグサジェストが重複しないようにする 2018-07-20 21:12:28 +09:00
eb6c2d0f73 Update bug_report.md 2018-07-20 21:08:12 +09:00
436757c71d Enrich ISSUE_TEMPLATE
Close #1932
2018-07-20 21:05:58 +09:00
5d09b7e38b mark as read all -> mark all as read
Close #855
2018-07-20 14:16:02 +09:00
a8cf67198f Update README.md 2018-07-20 06:39:30 +09:00
142 changed files with 1428 additions and 1479 deletions

View File

@ -41,12 +41,56 @@ redis:
port: 6379
pass: example-pass
# Drive capacity of a local user (MB)
localDriveCapacityMb: 256
# Drive capacity of a remote user (MB)
remoteDriveCapacityMb: 8
# If enabled:
# Server will not cache remote files (Using direct link instead).
# You can save your storage.
# Users cannot see remote images when they turn off "Show media from a remote server" setting.
preventCache: false
drive:
storage: 'db'
# OR
# storage: 'minio'
# bucket:
# prefix:
# config:
# endPoint:
# port:
# secure:
# accessKey:
# secretKey:
# S3 example
# storage: 'minio'
# bucket: bucket-name
# prefix: files
# config:
# endPoint: s3-us-west-2.amazonaws.com
# region: us-west-2
# secure: true
# accessKey: XXX
# secretKey: YYY
# S3 example (with CDN, custom domain)
# storage: 'minio'
# bucket: drive.example.com
# prefix: files
# baseUrl: https://drive.example.com
# config:
# endPoint: s3-us-west-2.amazonaws.com
# region: us-west-2
# secure: true
# accessKey: XXX
# secretKey: YYY
#
# Below settings are optional
#
@ -82,3 +126,8 @@ preventCache: false
# twitter:
# consumer_key: example-twitter-consumer-key
# consumer_secret: example-twitter-consumer-secret-key
# Ghost
# Ghost account is an account used for the purpose of delegating
# followers when putting users in the list.
# ghost: user-id-of-your-ghost-account

View File

@ -1,16 +0,0 @@
<!--
Thanks for your contribution.
When you report a bug or suggest a new feature, please include these information.
* Your browser
* Desktop version or mobile version
--------
Misskeyへの貢献ありがとうございます。
バグの報告や提案などで、可能であれば以下の情報を含めてください。
* お使いのブラウザ
* デスクトップ版Misskeyかモバイル版Misskeyか
-->

22
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,22 @@
---
name: Bug Report
about: Create a report to help us improve
---
# Summary
<!-- Tell us what the bug is -->
# Expected Behavior
<!--- Tell us what should happen -->
# Actual Behavior
<!--- Tell us what happens instead of the expected behavior -->
# Steps to Reproduce
1.
2.
3.
# Environment
<!-- Tell us where on the platform it happens -->
<!-- e.g. desktop or mobile version, your browser, your OS -->

View File

@ -0,0 +1,11 @@
---
name: Feature Request
about: Suggest an idea for this project
---
# Summary
<!-- Tell us what the suggestion is -->
# Environment
<!-- Tell us where on the platform it related -->
<!-- e.g. desktop or mobile version, your browser, your OS -->

12
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"recommendations": [
"ducksoupdev.vue2",
"editorconfig.editorconfig",
"eg2.tslint",
"eg2.vscode-npm-script",
"hollowtree.vue-snippets",
"ms-vscode.typescript-javascript-grammar",
"octref.vetur",
"sysoev.language-stylus"
]
}

View File

@ -5,6 +5,15 @@ ChangeLog
This document describes breaking changes only.
5.0.0
-----
### Migration
起動する前に、`node cli/migration/5.0.0`してください。
Please run `node cli/migration/5.0.0` before launch.
4.0.0
-----

View File

@ -18,14 +18,13 @@ ultimately sophisticated professional microblogging software.
:sparkles: Features
----------------------------------------------------------------
* Rich text contents
* Reactions
* User lists
* Customizable column view (called MisskeyDeck)
* and widgets!
* Private messages
* Mute
* Real-time timelines
* ActivityPub compatible
* ActivityPub support
and more! You can see it with your own eyes at [misskey.xyz](https://misskey.xyz).

View File

@ -1,41 +0,0 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
environment:
matrix:
- nodejs_version: 10.1.0
cache:
- node_modules
build: off
install:
# Update Node.js
# 標準で入っている Node.js を更新します (2014/11/13 時点では、v0.10.32 が標準)
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- node --version
# Update NPM
- npm install -g npm
- npm --version
# Update node-gyp
# 必須! node-gyp のバージョンを上げないと、ネイティブモジュールのコンパイルに失敗します
- npm install -g node-gyp
- npm install
init:
# git clone の際の改行を変換しないようにします
- git config --global core.autocrlf false
before_test:
# 設定ファイルを配置
- cp ./.travis/default.yml ./.config
- cp ./.travis/test.yml ./.config
- npm run build
test_script:
- npm test

View File

@ -9,7 +9,7 @@ const q = {
'metadata._user.host': {
$ne: null
},
'metadata.isMetaOnly': false
'metadata.withoutChunks': false
};
async function main() {
@ -57,7 +57,7 @@ async function main() {
DriveFile.update({ _id: file._id }, {
$set: {
'metadata.isMetaOnly': true
'metadata.withoutChunks': true
}
})
]).then(async () => {

23
cli/mark-admin.js Normal file
View File

@ -0,0 +1,23 @@
const mongo = require('mongodb');
const User = require('../built/models/user').default;
const args = process.argv.slice(2);
const user = args[0];
const q = user.startsWith('@') ? {
username: user.split('@')[1],
host: user.split('@')[2] || null
} : { _id: new mongo.ObjectID(user) };
console.log(`Mark as admin ${user}...`);
User.update(q, {
$set: {
isAdmin: true
}
}).then(() => {
console.log(`Done ${user}`);
}, e => {
console.error(e);
});

23
cli/mark-verified.js Normal file
View File

@ -0,0 +1,23 @@
const mongo = require('mongodb');
const User = require('../built/models/user').default;
const args = process.argv.slice(2);
const user = args[0];
const q = user.startsWith('@') ? {
username: user.split('@')[1],
host: user.split('@')[2] || null
} : { _id: new mongo.ObjectID(user) };
console.log(`Mark as verfied ${user}...`);
User.update(q, {
$set: {
isVerified: true
}
}).then(() => {
console.log(`Done ${user}`);
}, e => {
console.error(e);
});

View File

@ -3,8 +3,8 @@
const chalk = require('chalk');
const sequential = require('promise-sequential');
const { default: User } = require('../built/models/user');
const { default: DriveFile } = require('../built/models/drive-file');
const { default: User } = require('../../built/models/user');
const { default: DriveFile } = require('../../built/models/drive-file');
async function main() {
const promiseGens = [];

View File

@ -3,8 +3,8 @@
const chalk = require('chalk');
const sequential = require('promise-sequential');
const { default: User } = require('../built/models/user');
const { default: DriveFile } = require('../built/models/drive-file');
const { default: User } = require('../../built/models/user');
const { default: DriveFile } = require('../../built/models/drive-file');
async function main() {
const promiseGens = [];

9
cli/migration/5.0.0.js Normal file
View File

@ -0,0 +1,9 @@
const { default: DriveFile } = require('../../built/models/drive-file');
DriveFile.update({}, {
$rename: {
'metadata.isMetaOnly': 'metadata.withoutChunks'
}
}, {
multi: true
});

View File

@ -14,7 +14,7 @@ RUN pacman -S --noconfirm pacman
RUN pacman-db-upgrade
RUN pacman -S --noconfirm archlinux-keyring
RUN pacman -Syyu --noconfirm
RUN pacman -S --noconfirm git nodejs npm mongodb redis imagemagick
RUN pacman -S --noconfirm git nodejs npm mongodb redis
COPY misskey.sh /root/misskey.sh
RUN chmod u+x /root/misskey.sh

View File

@ -1,11 +1,17 @@
# Management guide
## Check the status of the job queue
In the directory of Misskey:
coming soon
## Mark as 'admin' user
``` shell
node_modules/kue/bin/kue-dashboard -p 3050
node cli/mark-admin (User-ID or Username)
```
## Mark as 'verified' user
``` shell
node cli/mark-verified (User-ID or Username)
```
When you access port 3050, you will see the UI.
## Suspend users
``` shell

View File

@ -1,11 +1,17 @@
# 運営ガイド
## ジョブキューの状態を調べる
Misskeyのディレクトリで:
coming soon
## 管理者ユーザーを設定する
``` shell
node_modules/kue/bin/kue-dashboard -p 3050
node cli/mark-admin (ユーザーID または ユーザー名)
```
## 'verified'ユーザーを設定する
``` shell
node cli/mark-verified (ユーザーID または ユーザー名)
```
ポート3050にアクセスするとUIが表示されます
## ユーザーを凍結する
``` shell

View File

@ -22,16 +22,15 @@ adduser --disabled-password --disabled-login misskey
Please install and setup these softwares:
#### Dependencies :package:
* *Node.js* and *npm*
* **[Node.js](https://nodejs.org/en/)**
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
* **[Redis](https://redis.io/)**
* **[ImageMagick](http://www.imagemagick.org/script/index.php)** >= 7.0
##### Optional
* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB
*3.* Setup Mongodb Database
*3.* Setup MongoDB
----------------------------------------------------------------
In root :
1. `mongo` Go to the mongo shell
@ -125,3 +124,7 @@ You can check if the service is running with `systemctl status misskey`.
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
3. `npm install`
4. `npm run build`
----------------------------------------------------------------
If you have any questions or troubles, feel free to contact us!

View File

@ -22,15 +22,14 @@ adduser --disabled-password --disabled-login misskey
これらのソフトウェアをインストール・設定してください:
#### 依存関係 :package:
* *Node.js* と *npm*
* **[Node.js](https://nodejs.org/en/)**
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
* **[Redis](https://redis.io/)**
* **[ImageMagick](http://www.imagemagick.org/script/index.php)**
##### オプション
* [Elasticsearch](https://www.elastic.co/) - 検索機能を向上させるために用います。
*3.* Mongodbの設定
*3.* MongoDBの設定
----------------------------------------------------------------
ルートで:
1. `mongo` mongoシェルを起動
@ -122,13 +121,6 @@ WantedBy=multi-user.target
3. `npm install`
4. `npm run build`
## メモリが足りなくてビルドできない場合
Misskeyの(クライアントの)ビルドには、目安として8GBくらいのメモリを必要とします。
VPSなどでビルドする時は、もしかしたらメモリが足りなくなる可能性があります。
そうなった場合、もしVPSではなくあなたのPCが十分なメモリを搭載しているなら、あなたのPC上でビルドし、生成されたファイルをVPSにFTPでアップロードする方法を採ることができます。
----------------------------------------------------------------
1. あなたのPC上にMisskeyをインストールする
2. 設定ファイルを用意する。設定ファイルは、サーバーに合わせた設定にします。
3. npm run webpack
4. built/client をサーバーにアップロードする
5. サーバー上で、npm run gulp
なにかお困りのことがありましたらお気軽にご連絡ください。

View File

@ -90,10 +90,10 @@ gulp.task('format', () =>
);
gulp.task('mocha', () =>
gulp.src([])
gulp.src('./test/**/*.ts')
.pipe(mocha({
exit: true,
compilers: 'ts:ts-node/register'
require: 'ts-node/register'
} as any))
);

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "Dein Token wurde generiert. Du wirst jetzt abgemeldet."
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "Eine Abstimmung erstellen"
text-remain: "{} Zeichen verbleibend"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "Neue Notiz"
reply: "Antworten"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "Your token has been regenerated, so you will be signed out."
i-like-sushi: "I prefer sushi rather than pudding"
show-reversi-board-labels: "Show row and column labels in Reversi"
verified-user: "Verified user"
reversi:
drawn: "Draw"
my-turn: "Your turn"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "Create a poll"
text-remain: "{} characters remaining"
recent-tags: "Recent"
click-to-tagging: "Click to tagging"
desktop/views/components/post-form-window.vue:
note: "New note"
reply: "Reply"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "Tu token se ha regenerado vas a ser desconectado."
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "Crea una encuesta"
text-remain: "quedan {} caracteres"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "Nota nueva"
reply: "Responder"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "Votre token vient d'être généré, vous allez maintenant être déconnecté."
i-like-sushi: "Je préfère les sushis (au pudding)"
show-reversi-board-labels: "Afficher les étiquettes des lignes et colonnes dans Reversi"
verified-user: "認証済みのユーザー"
reversi:
drawn: "Partie nulle"
my-turn: "Cest votre tour"
@ -288,8 +289,8 @@ desktop/views/components/drive.file.vue:
banner: "Bannière"
contextmenu:
rename: "Renommer"
mark-as-sensitive: "閲覧注意に設定"
unmark-as-sensitive: "閲覧注意を解除"
mark-as-sensitive: "Marquer comme sensible"
unmark-as-sensitive: "Ne pas marquer comme sensible"
copy-url: "Copier l'URL"
download: "Télécharger"
else-files: "Autres..."
@ -335,10 +336,10 @@ desktop/views/components/drive.vue:
url-upload: "Uploader d'un URL"
desktop/views/components/media-image.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
click-to-show: "Cliquer pour afficher"
desktop/views/components/media-video.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "Le contenu est NSFW"
click-to-show: "Cliquer pour afficher"
desktop/views/components/follow-button.vue:
following: "Abonnements"
follow: "Suivre"
@ -390,7 +391,7 @@ desktop/views/components/notes.note.vue:
desktop/views/components/notes.vue:
error: "Échec du chargement."
retry: "Réessayer"
load-more: "もっと読み込む"
load-more: "Afficher plus"
desktop/views/components/notifications.vue:
more: "Plus"
empty: "Pas de notifications"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "Créer un sondage"
text-remain: "{} charactères restants"
recent-tags: "Récent"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "Nouvelle note"
reply: "Répondre"
@ -453,8 +456,8 @@ desktop/views/components/settings.vue:
api-via-stream-desc: "この設定をオンにすると、websocket接続を経由してAPIリクエストが行われます(パフォーマンス向上が期待できます)。オフにすると、ネイティブの fetch APIが利用されます。この設定はこのデバイスのみ有効です。"
display: "Affichage et design"
customize: "Personnaliser l'Accueil"
choose-wallpaper: "壁紙を選択"
delete-wallpaper: "壁紙を削除"
choose-wallpaper: "Sélectionner un fond d'écran"
delete-wallpaper: "Supprimer le fond d'écran"
dark-mode: "Mode nuit"
circle-icons: "Utiliser des icônes circulaires"
gradient-window-header: "Utiliser les dégradés sur la barre de titre de la fenêtre"
@ -482,7 +485,7 @@ desktop/views/components/settings.vue:
cache-warn: "クリーンアップを行うと、ブラウザに記憶されたアカウント情報のキャッシュ、書きかけの投稿・返信・メッセージ、およびその他のデータ(設定情報含む)が削除されます。クリーンアップを行った後はページを再度読み込みする必要があります。"
cache-cleared: "Cache nettoyé"
cache-cleared-desc: "Veuillez recharger la page."
auto-watch: "投稿の自動ウォッチ"
auto-watch: "Montre automatique"
auto-watch-desc: "リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。"
about: "À propose de Misskey"
operator: "L'admin de cette instance"
@ -550,9 +553,9 @@ desktop/views/components/settings.profile.vue:
description: "Description"
birthday: "Date de naissance"
save: "Mettre à jour le profil"
locked-account: "アカウントの保護"
locked-account: "Protéger votre compte"
is-locked: "投稿を非公開にする"
other: "その他"
other: "Autre"
is-bot: "Ce compte est un Bot"
is-cat: "Ce compte est un Chat"
desktop/views/components/sub-note-content.vue:
@ -565,7 +568,7 @@ desktop/views/components/taskmanager.vue:
desktop/views/components/timeline.vue:
home: "Accueil"
local: "Local"
hybrid: "ソーシャル"
hybrid: "Social"
global: "Global"
list: "Listes"
desktop/views/components/ui.header.vue:
@ -615,7 +618,7 @@ desktop/views/components/window.vue:
desktop/views/pages/deck/deck.tl-column.vue:
is-media-only: "Les publications médias uniquement"
is-media-view: "Vue média"
edit: "オプション"
edit: "Options"
desktop/views/pages/deck/deck.note.vue:
reposted-by: "Reposté par {}"
private: "cette publication est privée"
@ -673,7 +676,7 @@ desktop/views/pages/user/user.profile.vue:
muted: "Muting"
unmute: "Enlever la sourdine"
desktop/views/pages/user/user.header.vue:
posts: "投稿"
posts: "Notes"
following: "Suit"
followers: "Abonnés"
is-bot: "Ce compte est un Bot"
@ -734,11 +737,11 @@ mobile/views/components/drive.file-detail.vue:
hash: "Hash (md5)"
exif: "EXIF"
mobile/views/components/media-image.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "Le contenu est NSFW"
click-to-show: "Cliquer pour afficher"
mobile/views/components/media-video.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "Le contenu est NSFW"
click-to-show: "Cliquer pour afficher"
mobile/views/components/follow-button.vue:
following: "Abonnements"
follow: "Suivre"
@ -834,7 +837,7 @@ mobile/views/pages/following.vue:
mobile/views/pages/home.vue:
home: "Accueil"
local: "Local"
hybrid: "ソーシャル"
hybrid: "Social"
global: "Global"
mobile/views/pages/messaging.vue:
messaging: "Messagerie"
@ -948,7 +951,7 @@ docs:
properties: "Propriétés"
endpoints:
params: "Paramètres"
no-params: "パラメータはありません"
no-params: "Aucun paramètre"
res: "Réponse"
require-credential: "このエンドポイントは認証情報が必須です。"
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
@ -956,7 +959,7 @@ docs:
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
show-src: "このエンドポイントのソースコードも閲覧できます。"
show-src-link: "コードをGitHubで見る"
show-src-link: "Consulter le code sur GitHub"
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
props:
name: "Nom"

View File

@ -19,7 +19,7 @@ const langs = {
'es': loadLang('es')
};
Object.entries(langs).map(([, locale]) => {
Object.values(langs).forEach(locale => {
// Extend native language (Japanese)
locale = Object.assign({}, native, locale);
});

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -56,6 +56,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
@ -476,6 +477,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "Twój token został wygenerowany. Zostaniesz wylogowany."
i-like-sushi: "Wolę sushi od puddingu"
show-reversi-board-labels: "Pokazuj podpisy wierszy i kolumn w Reversi"
verified-user: "Zweryfikowany użytkownik"
reversi:
drawn: "Remis"
my-turn: "Twoja kolej"
@ -288,8 +289,8 @@ desktop/views/components/drive.file.vue:
banner: "Baner"
contextmenu:
rename: "Zmień nazwę"
mark-as-sensitive: "閲覧注意に設定"
unmark-as-sensitive: "閲覧注意を解除"
mark-as-sensitive: "Oznacz jako zawartość wrażliwą"
unmark-as-sensitive: "Cofnij oznaczenie jako zawartość wrażliwą"
copy-url: "Skopiuj adres"
download: "Pobierz"
else-files: "Inne"
@ -334,11 +335,11 @@ desktop/views/components/drive.vue:
upload: "Wyślij plik"
url-upload: "Wyślij z adresu URL"
desktop/views/components/media-image.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "To jest zawartość NSFW"
click-to-show: "Naciśnij aby wyświetlić"
desktop/views/components/media-video.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "To jest zawartość NSFW"
click-to-show: "Naciśnij aby wyświetlić"
desktop/views/components/follow-button.vue:
following: "Śledzisz"
follow: "Śledź"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "Utwórz ankietę"
text-remain: "pozostałe znaki: {}"
recent-tags: "Ostatnie"
click-to-tagging: "Naciśnij aby oznaczyć"
desktop/views/components/post-form-window.vue:
note: "Nowy wpis"
reply: "Odpowiedz"
@ -734,11 +737,11 @@ mobile/views/components/drive.file-detail.vue:
hash: "Hash (md5)"
exif: "EXIF"
mobile/views/components/media-image.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "To jest zawartość NSFW"
click-to-show: "Naciśnij aby wyświetlić"
mobile/views/components/media-video.vue:
sensitive: "閲覧注意"
click-to-show: "クリックして表示"
sensitive: "To jest zawartość NSFW"
click-to-show: "Naciśnij aby wyświetlić"
mobile/views/components/follow-button.vue:
following: "Śledzisz"
follow: "Śledź"
@ -948,14 +951,14 @@ docs:
properties: "Właściwości"
endpoints:
params: "Parametry"
no-params: "パラメータはありません"
no-params: "Brak parametrów."
res: "Odpowiedź"
require-credential: "このエンドポイントは認証情報が必須です。"
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
has-limit: "レートリミットがあります。"
require-credential: "Punkt końcowy wymaga informacji o uwierzytelnieniu."
require-permission: "Ten punkt końcowy wymaga uprawnienia {permission}."
has-limit: "Istnieje limit częstotliwości."
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
show-src: "このエンドポイントのソースコードも閲覧できます。"
min-interval-limit: "Nie możesz wykonać żądania przed upłynięciem {interval} od ostatniego żądania."
show-src: "Możesz zobaczyć kod źródłowy tego punktu końcowego."
show-src-link: "Zobacz kod na GitHubie"
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
props:

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -51,6 +51,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
verified-user: "認証済みのユーザー"
reversi:
drawn: "引き分け"
my-turn: "あなたのターンです"
@ -413,6 +414,8 @@ desktop/views/components/post-form.vue:
insert-a-kao: "v('ω')v"
create-poll: "アンケートを作成"
text-remain: "残り{}文字"
recent-tags: "最近"
click-to-tagging: "クリックでタグ付け"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"

View File

@ -1,11 +0,0 @@
Misskeyの破壊的変更に対応するいくつかのスニペットがあります。
MongoDBシェルで実行する必要のあるものとnodeで直接実行する必要のあるものがあります。
ファイル名が `shell.` から始まるものは前者、 `node.` から始まるものは後者です。
MongoDBシェルで実行する場合、`use`でデータベースを選択しておく必要があります。
nodeで実行するいくつかのスニペットは、並列処理させる数を引数で設定できるものがあります。
処理中にエラーで落ちる場合は、メモリが足りていない可能性があるので、少ない数に設定してみてください。
※デフォルトは`5`です。
ファイルを作成する際は `../init-migration-file.sh -t _type_ -n _name_` を実行すると _type_._unixtime_._name_.js が生成されます

View File

@ -1,37 +0,0 @@
#!/bin/bash
usage() {
echo "$0 [-t type] [-n name]"
echo " type: [node | shell]"
echo " name: if no present, set untitled"
exit 0
}
while getopts :t:n:h OPT
do
case $OPT in
t) type=$OPTARG
;;
n) name=$OPTARG
;;
h) usage
;;
\?) usage
;;
:) usage
;;
esac
done
if [ "$type" = "" ]
then
echo "no type present!!!"
usage
fi
if [ "$name" = "" ]
then
name="untitled"
fi
touch "$(realpath $(dirname $BASH_SOURCE))/migration/$type.$(date +%s).$name.js"

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "4.26.0",
"clientVersion": "1.0.7435",
"version": "5.5.0",
"clientVersion": "1.0.7602",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
@ -33,7 +33,6 @@
"@types/deep-equal": "1.0.1",
"@types/elasticsearch": "5.0.25",
"@types/file-type": "5.2.1",
"@types/gm": "1.18.0",
"@types/gulp": "3.8.36",
"@types/gulp-htmlmin": "1.3.32",
"@types/gulp-mocha": "0.0.32",
@ -56,12 +55,12 @@
"@types/koa-send": "4.1.1",
"@types/koa-views": "2.0.3",
"@types/koa__cors": "2.2.2",
"@types/kue": "0.11.9",
"@types/minio": "6.0.2",
"@types/mkdirp": "0.5.2",
"@types/mocha": "5.2.3",
"@types/mongodb": "3.1.1",
"@types/mongodb": "3.1.2",
"@types/ms": "0.7.30",
"@types/node": "10.5.2",
"@types/node": "10.5.3",
"@types/parse5": "5.0.0",
"@types/portscanner": "2.1.0",
"@types/pug": "2.0.4",
@ -72,12 +71,13 @@
"@types/request-promise-native": "1.0.15",
"@types/rimraf": "2.0.2",
"@types/seedrandom": "2.4.27",
"@types/sharp": "0.17.9",
"@types/showdown": "1.7.5",
"@types/single-line-log": "1.1.0",
"@types/speakeasy": "2.0.2",
"@types/tmp": "0.0.33",
"@types/uuid": "3.4.3",
"@types/webpack": "4.4.7",
"@types/webpack": "4.4.8",
"@types/webpack-stream": "3.2.10",
"@types/websocket": "0.0.39",
"@types/ws": "5.1.2",
@ -85,6 +85,7 @@
"autosize": "4.0.2",
"autwh": "0.1.0",
"bcryptjs": "2.4.3",
"bee-queue": "1.2.2",
"bootstrap-vue": "2.0.0-rc.11",
"cafy": "11.3.0",
"chalk": "2.4.1",
@ -97,32 +98,31 @@
"diskusage": "0.2.4",
"dompurify": "1.0.5",
"elasticsearch": "15.1.1",
"element-ui": "2.4.4",
"element-ui": "2.4.5",
"emojilib": "2.3.0",
"escape-regexp": "0.0.1",
"eslint": "5.0.1",
"eslint-plugin-vue": "4.7.0",
"eslint-plugin-vue": "4.7.1",
"eventemitter3": "3.1.0",
"exif-js": "2.3.0",
"file-loader": "1.1.11",
"file-type": "8.1.0",
"fuckadblock": "3.2.1",
"gm": "1.23.1",
"gulp": "3.9.1",
"gulp-cssnano": "2.1.3",
"gulp-htmlmin": "4.0.0",
"gulp-imagemin": "4.1.0",
"gulp-mocha": "6.0.0",
"gulp-pug": "4.0.1",
"gulp-rename": "1.3.0",
"gulp-rename": "1.4.0",
"gulp-replace": "1.0.0",
"gulp-sourcemaps": "2.6.4",
"gulp-stylus": "2.7.0",
"gulp-tslint": "8.1.3",
"gulp-typescript": "4.0.2",
"gulp-uglify": "3.0.0",
"gulp-uglify": "3.0.1",
"gulp-util": "3.0.8",
"hard-source-webpack-plugin": "0.11.1",
"hard-source-webpack-plugin": "0.11.2",
"highlight.js": "9.12.0",
"html-minifier": "3.5.19",
"http-signature": "1.2.0",
@ -144,9 +144,9 @@
"koa-send": "5.0.0",
"koa-slow": "2.1.0",
"koa-views": "6.1.4",
"kue": "0.11.6",
"loader-utils": "1.1.0",
"mecab-async": "0.1.2",
"minio": "6.0.0",
"mkdirp": "0.5.1",
"mocha": "5.2.0",
"moji": "0.5.1",
@ -163,12 +163,11 @@
"parse5": "5.0.0",
"portscanner": "2.2.0",
"progress-bar-webpack-plugin": "1.11.0",
"prominence": "0.2.0",
"promise-sequential": "1.1.1",
"pug": "2.0.3",
"punycode": "2.1.1",
"qrcode": "1.2.0",
"ratelimiter": "3.1.0",
"ratelimiter": "3.2.0",
"recaptcha-promise": "0.1.3",
"reconnecting-websocket": "3.2.2",
"redis": "2.8.0",
@ -179,6 +178,7 @@
"s-age": "1.1.2",
"sass-loader": "7.0.3",
"seedrandom": "2.4.3",
"sharp": "0.20.5",
"showdown": "1.8.6",
"showdown-highlightjs-extension": "0.1.2",
"single-line-log": "1.1.2",
@ -187,7 +187,6 @@
"stylus": "0.54.5",
"stylus-loader": "3.0.2",
"summaly": "2.0.6",
"swagger-jsdoc": "1.10.2",
"syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0",
"tmp": "0.0.33",
@ -195,7 +194,7 @@
"ts-node": "7.0.0",
"tslint": "5.10.0",
"typescript": "2.9.2",
"typescript-eslint-parser": "16.0.1",
"typescript-eslint-parser": "17.0.0",
"uglify-es": "3.3.9",
"url-loader": "1.0.1",
"uuid": "3.3.2",
@ -213,10 +212,10 @@
"vuex-persistedstate": "2.5.4",
"web-push": "3.3.2",
"webfinger.js": "2.6.6",
"webpack": "4.16.1",
"webpack": "4.16.2",
"webpack-cli": "3.1.0",
"websocket": "1.0.26",
"ws": "5.2.2",
"ws": "6.0.0",
"xev": "2.0.1"
},
"greenkeeper": {

View File

@ -2,7 +2,7 @@
<div class="form">
<header>
<h1><i>{{ app.name }}</i>があなたのアカウントにアクセスすることを<b>許可</b>しますか</h1>
<img :src="`${app.iconUrl}?thumbnail&size=64`"/>
<img :src="app.iconUrl"/>
</header>
<div class="app">
<section>

View File

@ -17,21 +17,21 @@ export default function(type, data): Notification {
return {
title: 'ファイルがアップロードされました',
body: data.name,
icon: data.url + '?thumbnail&size=64'
icon: data.url
};
case 'unread_messaging_message':
return {
title: `${getUserName(data.user)}さんからメッセージ:`,
body: data.text, // TODO: getMessagingMessageSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
icon: data.user.avatarUrl
};
case 'reversi_invited':
return {
title: '対局への招待があります',
body: `${getUserName(data.parent)}さんから`,
icon: data.parent.avatarUrl + '?thumbnail&size=64'
icon: data.parent.avatarUrl
};
case 'notification':
@ -40,28 +40,28 @@ export default function(type, data): Notification {
return {
title: `${getUserName(data.user)}さんから:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
icon: data.user.avatarUrl
};
case 'reply':
return {
title: `${getUserName(data.user)}さんから返信:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
icon: data.user.avatarUrl
};
case 'quote':
return {
title: `${getUserName(data.user)}さんが引用:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
icon: data.user.avatarUrl
};
case 'reaction':
return {
title: `${getUserName(data.user)}: ${getReactionEmoji(data.reaction)}:`,
body: getNoteSummary(data.note),
icon: data.user.avatarUrl + '?thumbnail&size=64'
icon: data.user.avatarUrl
};
default:

View File

@ -2,7 +2,7 @@
<div class="mk-autocomplete" @contextmenu.prevent="() => {}">
<ol class="users" ref="suggests" v-if="users.length > 0">
<li v-for="user in users" @click="complete(type, user)" @keydown="onKeydown" tabindex="-1">
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=32`" alt=""/>
<img class="avatar" :src="user.avatarUrl" alt=""/>
<span class="name">{{ user | userName }}</span>
<span class="username">@{{ user | acct }}</span>
</li>
@ -144,23 +144,28 @@ export default Vue.extend({
});
}
} else if (this.type == 'hashtag') {
const cacheKey = 'autocomplete:hashtag:' + this.q;
const cache = sessionStorage.getItem(cacheKey);
if (cache) {
const hashtags = JSON.parse(cache);
this.hashtags = hashtags;
if (this.q == null || this.q == '') {
this.hashtags = JSON.parse(localStorage.getItem('hashtags') || '[]');
this.fetching = false;
} else {
(this as any).api('hashtags/search', {
query: this.q,
limit: 30
}).then(hashtags => {
const cacheKey = 'autocomplete:hashtag:' + this.q;
const cache = sessionStorage.getItem(cacheKey);
if (cache) {
const hashtags = JSON.parse(cache);
this.hashtags = hashtags;
this.fetching = false;
} else {
(this as any).api('hashtags/search', {
query: this.q,
limit: 30
}).then(hashtags => {
this.hashtags = hashtags;
this.fetching = false;
// キャッシュ
sessionStorage.setItem(cacheKey, JSON.stringify(hashtags));
});
// キャッシュ
sessionStorage.setItem(cacheKey, JSON.stringify(hashtags));
});
}
}
} else if (this.type == 'emoji') {
const matched = [];
@ -328,7 +333,6 @@ root(isDark)
> .hashtags > li
.name
margin 0 8px 0 0
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
> .emojis > li

View File

@ -31,7 +31,7 @@ export default Vue.extend({
: this.user.avatarColor && this.user.avatarColor.length == 3
? `rgb(${ this.user.avatarColor.join(',') })`
: null,
backgroundImage: this.lightmode ? null : `url(${ this.user.avatarUrl }?thumbnail)`,
backgroundImage: this.lightmode ? null : `url(${ this.user.avatarUrl })`,
borderRadius: this.$store.state.settings.circleIcons ? '100%' : null
};
}

View File

@ -26,8 +26,8 @@
:class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }"
@click="set(i)"
:title="`${String.fromCharCode(65 + o.transformPosToXy(i)[0])}${o.transformPosToXy(i)[1] + 1}`">
<img v-if="stone === true" :src="`${blackUser.avatarUrl}?thumbnail&size=128`" alt="">
<img v-if="stone === false" :src="`${whiteUser.avatarUrl}?thumbnail&size=128`" alt="">
<img v-if="stone === true" :src="blackUser.avatarUrl" alt="">
<img v-if="stone === false" :src="whiteUser.avatarUrl" alt="">
</div>
</div>
<div class="labels-y" v-if="this.$store.state.settings.reversiBoardLabels">
@ -105,7 +105,8 @@ export default Vue.extend({
}
},
isMyTurn(): boolean {
if (this.turnUser == null) return null;
if (!this.iAmPlayer) return false;
if (this.turnUser == null) return false;
return this.turnUser.id == this.$store.state.i.id;
},
cellsStyle(): any {

View File

@ -112,7 +112,7 @@ export default Vue.extend({
computed: {
mapCategories(): string[] {
const categories = Object.entries(maps).map(x => x[1].category);
const categories = Object.values(maps).map(x => x.category);
return categories.filter((item, pos) => categories.indexOf(item) == pos);
},
isAccepted(): boolean {
@ -179,8 +179,8 @@ export default Vue.extend({
if (this.game.settings.map == null) {
this.mapName = null;
} else {
const foundMap = Object.entries(maps).find(x => x[1].data.join('') == this.game.settings.map.join(''));
this.mapName = foundMap ? foundMap[1].name : '-Custom-';
const found = Object.values(maps).find(x => x.data.join('') == this.game.settings.map.join(''));
this.mapName = found ? found.name : '-Custom-';
}
},
@ -206,7 +206,7 @@ export default Vue.extend({
if (v == null) {
this.game.settings.map = null;
} else {
this.game.settings.map = Object.entries(maps).find(x => x[1].name == v)[1].data;
this.game.settings.map = Object.values(maps).find(x => x.name == v).data;
}
this.$forceUpdate();
this.updateSettings();
@ -217,9 +217,9 @@ export default Vue.extend({
const y = Math.floor(pos / this.game.settings.map[0].length);
const newPixel =
pixel == ' ' ? '-' :
pixel == '-' ? 'b' :
pixel == 'b' ? 'w' :
' ';
pixel == '-' ? 'b' :
pixel == 'b' ? 'w' :
' ';
const line = this.game.settings.map[y].split('');
line[x] = newPixel;
this.$set(this.game.settings.map, y, line.join(''));

View File

@ -67,7 +67,9 @@ export default Vue.extend({
components: {
XGameroom
},
props: ['initGame'],
data() {
return {
game: null,
@ -82,54 +84,63 @@ export default Vue.extend({
pingClock: null
};
},
watch: {
game(g) {
this.$emit('gamed', g);
}
},
created() {
if (this.initGame) {
this.game = this.initGame;
}
},
mounted() {
this.connection = (this as any).os.streams.reversiStream.getConnection();
this.connectionId = (this as any).os.streams.reversiStream.use();
if (this.$store.getters.isSignedIn) {
this.connection = (this as any).os.streams.reversiStream.getConnection();
this.connectionId = (this as any).os.streams.reversiStream.use();
this.connection.on('matched', this.onMatched);
this.connection.on('invited', this.onInvited);
this.connection.on('matched', this.onMatched);
this.connection.on('invited', this.onInvited);
(this as any).api('games/reversi/games', {
my: true
}).then(games => {
this.myGames = games;
});
(this as any).api('games/reversi/games', {
my: true
}).then(games => {
this.myGames = games;
});
(this as any).api('games/reversi/invitations').then(invitations => {
this.invitations = this.invitations.concat(invitations);
});
this.pingClock = setInterval(() => {
if (this.matching) {
this.connection.send({
type: 'ping',
id: this.matching.id
});
}
}, 3000);
}
(this as any).api('games/reversi/games').then(games => {
this.games = games;
this.gamesFetching = false;
});
(this as any).api('games/reversi/invitations').then(invitations => {
this.invitations = this.invitations.concat(invitations);
});
this.pingClock = setInterval(() => {
if (this.matching) {
this.connection.send({
type: 'ping',
id: this.matching.id
});
}
}, 3000);
},
beforeDestroy() {
this.connection.off('matched', this.onMatched);
this.connection.off('invited', this.onInvited);
(this as any).os.streams.reversiStream.dispose(this.connectionId);
if (this.connection) {
this.connection.off('matched', this.onMatched);
this.connection.off('invited', this.onInvited);
(this as any).os.streams.reversiStream.dispose(this.connectionId);
clearInterval(this.pingClock);
clearInterval(this.pingClock);
}
},
methods: {
go(game) {
(this as any).api('games/reversi/games/show', {
@ -139,6 +150,7 @@ export default Vue.extend({
this.game = game;
});
},
match() {
(this as any).apis.input({
title: 'ユーザー名を入力してください'
@ -158,10 +170,12 @@ export default Vue.extend({
});
});
},
cancel() {
this.matching = null;
(this as any).api('games/reversi/match/cancel');
},
accept(invitation) {
(this as any).api('games/reversi/match', {
userId: invitation.parent.id
@ -172,10 +186,12 @@ export default Vue.extend({
}
});
},
onMatched(game) {
this.matching = null;
this.game = game;
},
onInvited(invite) {
this.invitations.unshift(invite);
}

View File

@ -119,7 +119,7 @@ export default Vue.extend({
},
onKeypress(e) {
if ((e.which == 10 || e.which == 13) && e.ctrlKey) {
if ((e.which == 10 || e.which == 13) && e.ctrlKey && this.canSend) {
this.send();
}
},

View File

@ -3,7 +3,6 @@
<mk-avatar class="avatar" :user="message.user" target="_blank"/>
<div class="content">
<div class="balloon" :data-no-text="message.text == null">
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
<!-- <button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
</button> -->
@ -23,6 +22,7 @@
<div></div>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
<footer>
<span class="read" v-if="isMe && message.isRead">%i18n:@is-read%</span>
<mk-time :time="message.createdAt"/>
<template v-if="message.is_edited">%fa:pencil-alt%</template>
</footer>
@ -120,17 +120,6 @@ root(isDark)
height 16px
cursor pointer
> .read
user-select none
display block
position absolute
z-index 1
bottom -4px
left -12px
margin 0
color isDark ? rgba(#fff, 0.5) : rgba(#000, 0.5)
font-size 11px
> .content
> .is-deleted
@ -258,6 +247,12 @@ root(isDark)
> footer
text-align right
> .read
user-select none
margin 0 4px 0 0
color isDark ? rgba(#fff, 0.5) : rgba(#000, 0.5)
font-size 11px
&[data-is-deleted]
> .baloon
opacity 0.5

View File

@ -92,7 +92,7 @@ export default Vue.component('misskey-flavored-markdown', {
case 'hashtag':
return createElement('a', {
attrs: {
href: `${url}/tags/${token.hashtag}`,
href: `${url}/tags/${encodeURIComponent(token.hashtag)}`,
target: '_blank'
}
}, token.content);

View File

@ -2,6 +2,7 @@
<header class="bvonvjxbwzaiskogyhbwgyxvcgserpmu">
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle == 'smart'"/>
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
<span class="is-verified" v-if="note.user.isVerified" title="%i18n:common.verified-user%">%fa:bookmark%</span>
<span class="is-admin" v-if="note.user.isAdmin">admin</span>
<span class="is-bot" v-if="note.user.isBot">bot</span>
<span class="is-cat" v-if="note.user.isCat">cat</span>
@ -69,6 +70,10 @@ root(isDark)
&:hover
text-decoration underline
> .is-verified
margin-right 8px
color #4dabf7
> .is-admin
> .is-bot
> .is-cat

View File

@ -2,6 +2,11 @@
<iframe v-if="youtubeId" type="text/html" height="250"
:src="`https://www.youtube.com/embed/${youtubeId}?origin=${misskeyUrl}`"
frameborder="0"/>
<div v-else-if="tweetUrl && detail" class="twitter">
<blockquote ref="tweet" class="twitter-tweet" :data-theme="$store.state.device.darkmode ? 'dark' : null">
<a :href="url"></a>
</blockquote>
</div>
<div v-else class="mk-url-preview">
<a :href="url" target="_blank" :title="url" v-if="!fetching">
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url(${thumbnail})`"></div>
@ -24,7 +29,17 @@ import Vue from 'vue';
import { url as misskeyUrl } from '../../../config';
export default Vue.extend({
props: ['url'],
props: {
url: {
type: String,
require: true
},
detail: {
type: Boolean,
required: false,
default: false
}
},
data() {
return {
fetching: true,
@ -34,6 +49,7 @@ export default Vue.extend({
icon: null,
sitename: null,
youtubeId: null,
tweetUrl: null,
misskeyUrl
};
},
@ -44,6 +60,25 @@ export default Vue.extend({
this.youtubeId = url.searchParams.get('v');
} else if (url.hostname == 'youtu.be') {
this.youtubeId = url.pathname;
} else if (this.detail && url.hostname == 'twitter.com' && /^\/.+\/status(es)?\/\d+/.test(url.pathname)) {
this.tweetUrl = url;
const twttr = (window as any).twttr || {};
const loadTweet = () => twttr.widgets.load(this.$refs.tweet);
if (twttr.widgets) {
Vue.nextTick(loadTweet);
} else {
const wjsId = 'twitter-wjs';
if (!document.getElementById(wjsId)) {
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('id', wjsId);
script.setAttribute('src', 'https://platform.twitter.com/widgets.js');
head.appendChild(script);
}
twttr.ready = loadTweet;
(window as any).twttr = twttr;
}
} else {
fetch('/url?url=' + encodeURIComponent(this.url)).then(res => {
res.json().then(info => {

View File

@ -1,5 +1,6 @@
import * as getCaretCoordinates from 'textarea-caret';
import MkAutocomplete from '../components/autocomplete.vue';
import renderAcct from '../../../../../misc/acct/render';
export default {
bind(el, binding, vn) {
@ -79,7 +80,10 @@ class Autocomplete {
hashtagIndex == -1 ? Infinity : hashtagIndex,
emojiIndex == -1 ? Infinity : emojiIndex);
if (start == Infinity) return;
if (start == Infinity) {
this.close();
return;
}
const isMention = mentionIndex == start;
const isHashtag = hashtagIndex == start;
@ -97,7 +101,7 @@ class Autocomplete {
if (isHashtag || opened == false) {
const hashtag = text.substr(hashtagIndex + 1);
if (hashtag != '' && !hashtag.includes(' ') && !hashtag.includes('\n')) {
if (!hashtag.includes(' ') && !hashtag.includes('\n')) {
this.open('hashtag', hashtag);
opened = true;
}
@ -184,13 +188,15 @@ class Autocomplete {
const trimmedBefore = before.substring(0, before.lastIndexOf('@'));
const after = source.substr(caret);
const acct = renderAcct(value);
// 挿入
this.text = trimmedBefore + '@' + value.username + ' ' + after;
this.text = trimmedBefore + '@' + acct + ' ' + after;
// キャレットを戻す
this.vm.$nextTick(() => {
this.textarea.focus();
const pos = trimmedBefore.length + (value.username.length + 2);
const pos = trimmedBefore.length + (acct.length + 2);
this.textarea.setSelectionRange(pos, pos);
});
} else if (type == 'hashtag') {

View File

@ -11,7 +11,7 @@
<div>
<div v-for="stat in stats" :key="stat.tag">
<div class="tag">
<router-link :to="`/tags/${ stat.tag }`" :title="stat.tag">#{{ stat.tag }}</router-link>
<router-link :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</router-link>
<p>{{ '%i18n:@count%'.replace('{}', stat.usersCount) }}</p>
</div>
<x-chart class="chart" :src="stat.chart"/>

View File

@ -5,7 +5,7 @@
<p :class="$style.fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
<div :class="$style.stream" v-if="!fetching && images.length > 0">
<div v-for="image in images" :class="$style.img" :style="`background-image: url(${image.url}?thumbnail&size=256)`"></div>
<div v-for="image in images" :class="$style.img" :style="`background-image: url(${image.url})`"></div>
</div>
<p :class="$style.empty" v-if="!fetching && images.length == 0">%i18n:@no-photos%</p>
</mk-widget-container>

View File

@ -72,7 +72,7 @@ export default define({
if (this.images.length == 0) return;
const index = Math.floor(Math.random() * this.images.length);
const img = `url(${ this.images[index].url }?thumbnail&size=1024)`;
const img = `url(${ this.images[index].url })`;
(this.$refs.slideB as any).style.backgroundImage = img;

View File

@ -28,7 +28,7 @@ export default Vue.extend({
default: false
},
title: {
default: '%fa:R file%%i18n:@choose-prompt%s'
default: '%fa:R file%%i18n:@choose-prompt%'
}
},
data() {

View File

@ -1,5 +1,5 @@
<template>
<div class="root file"
<div class="gvfdktuvdgwhmztnuekzkswkjygptfcv"
:data-is-selected="isSelected"
:data-is-contextmenu-showing="isContextmenuShowing"
@click="onClick"
@ -16,7 +16,7 @@
<p>%i18n:@banner%</p>
</div>
<div class="thumbnail" ref="thumbnail" :style="`background-color: ${ background }`">
<img :src="`${file.url}?thumbnail&size=128`" alt="" @load="onThumbnailLoaded"/>
<img :src="file.url" alt="" @load="onThumbnailLoaded"/>
</div>
<p class="name">
<span>{{ file.name.lastIndexOf('.') != -1 ? file.name.substr(0, file.name.lastIndexOf('.')) : file.name }}</span>
@ -324,10 +324,10 @@ root(isDark)
> .ext
opacity 0.5
.root.file[data-darkmode]
.gvfdktuvdgwhmztnuekzkswkjygptfcv[data-darkmode]
root(true)
.root.file:not([data-darkmode])
.gvfdktuvdgwhmztnuekzkswkjygptfcv:not([data-darkmode])
root(false)
</style>

View File

@ -1,5 +1,5 @@
<template>
<div class="root folder"
<div class="ynntpczxvnusfwdyxsfuhvcmuypqopdd"
:data-is-contextmenu-showing="isContextmenuShowing"
:data-draghover="draghover"
@click="onClick"
@ -216,10 +216,10 @@ export default Vue.extend({
<style lang="stylus" scoped>
@import '~const.styl'
.root.folder
root(isDark)
padding 8px
height 64px
background lighten($theme-color, 95%)
background isDark ? rgba($theme-color, 0.2) : lighten($theme-color, 95%)
border-radius 4px
&, *
@ -229,10 +229,10 @@ export default Vue.extend({
pointer-events none
&:hover
background lighten($theme-color, 90%)
background isDark ? rgba(lighten($theme-color, 10%), 0.2) : lighten($theme-color, 90%)
&:active
background lighten($theme-color, 85%)
background isDark ? rgba(darken($theme-color, 10%), 0.2) : lighten($theme-color, 85%)
&[data-is-contextmenu-showing]
&[data-draghover]
@ -248,16 +248,22 @@ export default Vue.extend({
border-radius 4px
&[data-draghover]
background lighten($theme-color, 90%)
background isDark ? rgba(darken($theme-color, 10%), 0.2) : lighten($theme-color, 90%)
> .name
margin 0
font-size 0.9em
color darken($theme-color, 30%)
color isDark ? #fff : darken($theme-color, 30%)
> [data-fa]
margin-right 4px
margin-left 2px
text-align left
.ynntpczxvnusfwdyxsfuhvcmuypqopdd[data-darkmode]
root(true)
.ynntpczxvnusfwdyxsfuhvcmuypqopdd:not([data-darkmode])
root(false)
</style>

View File

@ -1,7 +1,7 @@
<template>
<mk-window width="400px" height="550px" @closed="$destroy">
<span slot="header" :class="$style.header">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ '%i18n:@followers%'.replace('{}', name) }}
<img :src="user.avatarUrl" alt=""/>{{ '%i18n:@followers%'.replace('{}', name) }}
</span>
<mk-followers :user="user"/>
</mk-window>

View File

@ -1,7 +1,7 @@
<template>
<mk-window width="400px" height="550px" @closed="$destroy">
<span slot="header" :class="$style.header">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ '%i18n:@following%'.replace('{}', name) }}
<img :src="user.avatarUrl" alt=""/>{{ '%i18n:@following%'.replace('{}', name) }}
</span>
<mk-following :user="user"/>
</mk-window>

View File

@ -37,7 +37,7 @@ export default Vue.extend({
style(): any {
return {
'background-color': this.image.properties.avgColor && this.image.properties.avgColor.length == 3 ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
'background-image': this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
'background-image': this.raw ? `url(${this.image.url})` : `url(${this.image.url})`
};
}
},

View File

@ -45,7 +45,7 @@ export default Vue.extend({
computed: {
imageStyle(): any {
return {
'background-image': `url(${this.video.url}?thumbnail&size=512)`
'background-image': `url(${this.video.url})`
};
}
},

View File

@ -46,7 +46,7 @@
<mk-media-list :media-list="p.media" :raw="true"/>
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">

View File

@ -11,7 +11,8 @@
<a @click="addVisibleUser">+ユーザーを追加</a>
</div>
<div class="hashtags" v-if="recentHashtags.length > 0">
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
<b>%i18n:@recent-tags%:</b>
<a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)" title="%@click-to-tagging%">#{{ tag }}</a>
</div>
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
<textarea :class="{ with: (files.length != 0 || poll) }"
@ -22,7 +23,7 @@
<div class="medias" :class="{ with: poll }" v-show="files.length != 0">
<x-draggable :list="files" :options="{ animation: 150 }">
<div v-for="file in files" :key="file.id">
<div class="img" :style="{ backgroundImage: `url(${file.url}?thumbnail&size=64)` }" :title="file.name"></div>
<div class="img" :style="{ backgroundImage: `url(${file.url})` }" :title="file.name"></div>
<img class="remove" @click="detachMedia(file.id)" src="/assets/desktop/remove.png" title="%i18n:@attach-cancel%" alt=""/>
</div>
</x-draggable>
@ -37,7 +38,13 @@
<button class="poll" title="%i18n:@create-poll%" @click="poll = true">%fa:chart-pie%</button>
<button class="poll" title="内容を隠す" @click="useCw = !useCw">%fa:eye-slash%</button>
<button class="geo" title="位置情報を添付する" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
<button class="visibility" title="公開範囲" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
<button class="visibility" title="公開範囲" @click="setVisibility" ref="visibilityButton">
<span v-if="visibility === 'public'">%fa:globe%</span>
<span v-if="visibility === 'home'">%fa:home%</span>
<span v-if="visibility === 'followers'">%fa:unlock%</span>
<span v-if="visibility === 'specified'">%fa:envelope%</span>
<span v-if="visibility === 'private'">%fa:lock%</span>
</button>
<p class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</p>
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
{{ posting ? '%i18n:@posting%' : submitText }}<mk-ellipsis v-if="posting"/>
@ -136,7 +143,9 @@ export default Vue.extend({
},
canPost(): boolean {
return !this.posting && (this.text.length != 0 || this.files.length != 0 || this.poll || this.renote);
return !this.posting &&
(1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
(this.text.trim().length <= 1000);
}
},
@ -244,7 +253,7 @@ export default Vue.extend({
},
onKeydown(e) {
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey) && this.canPost) this.post();
},
onPaste(e) {
@ -306,8 +315,8 @@ export default Vue.extend({
}, err => {
alert('エラー: ' + err.message);
}, {
enableHighAccuracy: true
});
enableHighAccuracy: true
});
},
removeGeo() {
@ -382,9 +391,8 @@ export default Vue.extend({
if (this.text && this.text != '') {
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
history = history.filter(x => !hashtags.includes(x));
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
const history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history).reduce((a, c) => a.includes(c) ? a : [...a, c], [])));
}
},
@ -468,7 +476,7 @@ root(isDark)
margin 0
max-width 100%
min-width 100%
min-height 64px
min-height 84px
&:hover
& + *
@ -495,8 +503,17 @@ root(isDark)
color isDark ? #fff : #666
> .hashtags
margin 0 0 8px 0
overflow hidden
white-space nowrap
font-size 14px
> b
color isDark ? #9baec8 : darken($theme-color, 20%)
> *
margin-right 8px
white-space nowrap
> .medias
margin 0

View File

@ -2,7 +2,7 @@
<div class="profile">
<label class="avatar ui from group">
<p>%i18n:@avatar%</p>
<img class="avatar" :src="`${$store.state.i.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<img class="avatar" :src="$store.state.i.avatarUrl" alt="avatar"/>
<button class="ui" @click="updateAvatar">%i18n:@choice-avatar%</button>
</label>
<label class="ui from group">

View File

@ -2,13 +2,13 @@
<div class="nav">
<ul>
<template v-if="$store.getters.isSignedIn">
<li class="home" :class="{ active: $route.name == 'index' }">
<li class="home" :class="{ active: $route.name == 'index' }" @click="goToTop">
<router-link to="/">
%fa:home%
<p>%i18n:@home%</p>
</router-link>
</li>
<li class="deck" :class="{ active: $route.name == 'deck' }">
<li class="deck" :class="{ active: $route.name == 'deck' }" @click="goToTop">
<router-link to="/deck">
%fa:columns%
<p>%i18n:@deck% <small>(beta)</small></p>
@ -82,6 +82,13 @@ export default Vue.extend({
game() {
(this as any).os.new(MkGameWindow);
},
goToTop() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
}
});

View File

@ -9,6 +9,9 @@
<div class="left">
<x-nav/>
</div>
<div class="center">
<div class="icon" @click="goToTop"></div>
</div>
<div class="right">
<x-search/>
<x-account v-if="$store.getters.isSignedIn"/>
@ -42,6 +45,7 @@ export default Vue.extend({
XPost,
XClock,
},
mounted() {
this.$store.commit('setUiHeaderHeight', 48);
@ -93,7 +97,16 @@ export default Vue.extend({
}, 2500);
}
}
}
},
methods: {
goToTop() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
},
});
</script>
@ -142,26 +155,24 @@ root(isDark)
max-width 1300px
margin 0 auto
&:before
content ""
position absolute
top 0
left 0
display block
width 100%
height 48px
background-image isDark ? url('/assets/desktop/header-icon.dark.svg') : url('/assets/desktop/header-icon.light.svg')
background-size 24px
background-position center
background-repeat no-repeat
opacity 0.3
> .center
margin auto
> .icon
display block
width 48px
height 48px
background-image isDark ? url('/assets/desktop/header-icon.dark.svg') : url('/assets/desktop/header-icon.light.svg')
background-size 24px
background-position center
background-repeat no-repeat
opacity 0.3
cursor pointer
> .left
margin 0 auto 0 0
height 48px
> .right
margin 0 0 0 auto
height 48px
> *

View File

@ -1,7 +1,7 @@
<template>
<div class="mk-user-preview">
<template v-if="u != null">
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl})` : ''"></div>
<mk-avatar class="avatar" :user="u" :disable-preview="true"/>
<div class="title">
<router-link class="name" :to="u | userPage">{{ u | userName }}</router-link>
@ -19,7 +19,7 @@
<p>%i18n:@followers%</p><a>{{ u.followersCount }}</a>
</div>
</div>
<mk-follow-button v-if="$store.getters.isSignedIn && user.id != $store.state.i.id" :user="u"/>
<mk-follow-button v-if="$store.getters.isSignedIn && u.id != $store.state.i.id" :user="u"/>
</template>
</div>
</template>

View File

@ -49,7 +49,8 @@ export default Vue.extend({
add() {
(this as any).apis.input({
title: '%i18n:@username%',
}).then(async username => {
}).then(async (username: string) => {
if (username.startsWith('@')) username = username.slice(1);
const user = await (this as any).api('users/show', {
username
});

View File

@ -4,7 +4,7 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
<div v-if="!fetching && users.length > 0">
<router-link v-for="user in users" :to="user | userPage" :key="user.id">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user | userName" v-user-preview="user.id"/>
<img :src="user.avatarUrl" :alt="user | userName" v-user-preview="user.id"/>
</router-link>
</div>
<p class="empty" v-if="!fetching && users.length == 0">%i18n:@no-users%</p>

View File

@ -4,7 +4,7 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
<div class="stream" v-if="!fetching && images.length > 0">
<div v-for="image in images" class="img"
:style="`background-image: url(${image.url}?thumbnail&size=256)`"
:style="`background-image: url(${image.url})`"
></div>
</div>
<p class="empty" v-if="!fetching && images.length == 0">%i18n:@no-photos%</p>

View File

@ -1,6 +1,6 @@
<template>
<div class="profile">
<div class="friend-form" v-if="$store.getters.isSignedIn && $store.state.i.id != user.id">
<div class="profile" v-if="$store.getters.isSignedIn">
<div class="friend-form" v-if="$store.state.i.id != user.id">
<mk-follow-button :user="user" size="big"/>
<p class="followed" v-if="user.isFollowed">%i18n:@follows-you%</p>
<p class="stalk" v-if="user.isFollowing">
@ -9,7 +9,7 @@
</p>
</div>
<div class="action-form">
<button class="mute ui" @click="user.isMuted ? unmute() : mute()">
<button class="mute ui" @click="user.isMuted ? unmute() : mute()" v-if="$store.state.i.id != user.id">
<span v-if="user.isMuted">%fa:eye% %i18n:@unmute%</span>
<span v-if="!user.isMuted">%fa:eye-slash% %i18n:@mute%</span>
</button>

View File

@ -45,7 +45,7 @@ export default define({
this.save();
},
onKeydown(e) {
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey) && !this.posting && this.text) this.post();
},
post() {
this.posting = true;

View File

@ -4,7 +4,7 @@
:data-melt="props.design == 2"
>
<div class="banner"
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl}?thumbnail&size=256)` : ''"
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl})` : ''"
title="%i18n:@update-banner%"
@click="os.apis.updateBanner"
></div>

View File

@ -43,7 +43,7 @@ export default Vue.extend({
thumbnail(): any {
return {
'background-color': this.file.properties.avgColor && this.file.properties.avgColor.length == 3 ? `rgb(${this.file.properties.avgColor.join(',')})` : 'transparent',
'background-image': `url(${this.file.url}?thumbnail&size=128)`
'background-image': `url(${this.file.url})`
};
}
},

View File

@ -27,7 +27,7 @@ export default Vue.extend({
},
computed: {
style(): any {
let url = `url(${this.image.url}?thumbnail)`;
let url = `url(${this.image.url})`;
if (this.$store.state.device.loadRemoteMedia || this.$store.state.device.lightmode) {
url = null;

View File

@ -30,7 +30,7 @@ export default Vue.extend({
computed: {
imageStyle(): any {
return {
'background-image': `url(${this.video.url}?thumbnail&size=512)`
'background-image': `url(${this.video.url})`
};
}
},})

View File

@ -2,7 +2,7 @@
<div class="mk-note-card">
<a :href="note | notePage">
<header>
<img :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/><h3>{{ note.user | userName }}</h3>
<img :src="note.user.avatarUrl" alt="avatar"/><h3>{{ note.user | userName }}</h3>
</header>
<div>
{{ text }}

View File

@ -44,7 +44,7 @@
<mk-media-list :media-list="p.media" :raw="true"/>
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">

View File

@ -21,7 +21,7 @@
<div class="attaches" v-show="files.length != 0">
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
<div class="file" v-for="file in files" :key="file.id">
<div class="img" :style="`background-image: url(${file.url}?thumbnail&size=128)`" @click="detachMedia(file)"></div>
<div class="img" :style="`background-image: url(${file.url})`" @click="detachMedia(file)"></div>
</div>
</x-draggable>
</div>
@ -40,7 +40,7 @@
</div>
</div>
<div class="hashtags" v-if="recentHashtags.length > 0">
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
<a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)">#{{ tag }}</a>
</div>
</div>
</template>
@ -132,7 +132,9 @@ export default Vue.extend({
},
canPost(): boolean {
return !this.posting && (this.text.length != 0 || this.files.length != 0 || this.poll || this.renote);
return !this.posting &&
(1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
(this.text.trim().length <= 1000);
}
},
@ -221,8 +223,8 @@ export default Vue.extend({
}, err => {
alert('%i18n:@error%: ' + err.message);
}, {
enableHighAccuracy: true
});
enableHighAccuracy: true
});
},
removeGeo() {
@ -295,9 +297,8 @@ export default Vue.extend({
if (this.text && this.text != '') {
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
history = history.filter(x => !hashtags.includes(x));
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
const history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history).reduce((a, c) => a.includes(c) ? a : [...a, c], [])));
}
},

View File

@ -10,7 +10,7 @@
<transition name="nav">
<div class="body" v-if="isOpen">
<router-link class="me" v-if="$store.getters.isSignedIn" :to="`/@${$store.state.i.username}`">
<img class="avatar" :src="`${$store.state.i.avatarUrl}?thumbnail&size=128`" alt="avatar"/>
<img class="avatar" :src="$store.state.i.avatarUrl" alt="avatar"/>
<p class="name">{{ $store.state.i | userName }}</p>
</router-link>
<div class="links">

View File

@ -1,6 +1,6 @@
<template>
<div class="mk-user-card">
<header :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=1024)` : ''">
<header :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''">
<mk-avatar class="avatar" :user="user"/>
</header>
<a class="name" :href="user | userPage" target="_blank">{{ user | userName }}</a>

View File

@ -1,7 +1,7 @@
<template>
<mk-ui>
<template slot="header" v-if="!fetching">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt="">
<img :src="user.avatarUrl" alt="">
{{ '%i18n:@followers-of%'.replace('{}', name) }}
</template>
<mk-users-list

View File

@ -1,7 +1,7 @@
<template>
<mk-ui>
<template slot="header" v-if="!fetching">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" alt="">
<img :src="user.avatarUrl" alt="">
{{ '%i18n:@following-of%'.replace('{}', name) }}
</template>
<mk-users-list

View File

@ -24,7 +24,7 @@ export default Vue.extend({
const ok = window.confirm('%i18n:@read-all%');
if (!ok) return;
(this as any).api('notifications/mark_as_read_all');
(this as any).api('notifications/mark_all_as_read');
},
onFetched() {
Progress.done();

View File

@ -1,6 +1,6 @@
<template>
<mk-ui>
<template slot="header" v-if="!fetching"><img :src="`${user.avatarUrl}?thumbnail&size=64`" alt="">{{ user | userName }}</template>
<template slot="header" v-if="!fetching"><img :src="user.avatarUrl" alt="">{{ user | userName }}</template>
<main v-if="!fetching" :data-darkmode="$store.state.device.darkmode">
<div class="is-suspended" v-if="user.isSuspended"><p>%fa:exclamation-triangle% %i18n:@is-suspended%</p></div>
<div class="is-remote" v-if="user.host != null"><p>%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></p></div>

View File

@ -3,7 +3,7 @@
<p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:@loading%<mk-ellipsis/></p>
<div v-if="!fetching && users.length > 0">
<a v-for="user in users" :key="user.id" :href="user | userPage">
<img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user | userName"/>
<img :src="user.avatarUrl" :alt="user | userName"/>
</a>
</div>
<p class="empty" v-if="!fetching && users.length == 0">%i18n:@no-users%</p>

View File

@ -4,7 +4,7 @@
<div class="stream" v-if="!fetching && images.length > 0">
<a v-for="image in images"
class="img"
:style="`background-image: url(${image.media.url}?thumbnail&size=256)`"
:style="`background-image: url(${image.media.url})`"
:href="image.note | notePage"
></a>
</div>

View File

@ -2,10 +2,10 @@
<div class="mkw-profile">
<mk-widget-container>
<div :class="$style.banner"
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl}?thumbnail&size=256)` : ''"
:style="$store.state.i.bannerUrl ? `background-image: url(${$store.state.i.bannerUrl})` : ''"
></div>
<img :class="$style.avatar"
:src="`${$store.state.i.avatarUrl}?thumbnail&size=96`"
:src="$store.state.i.avatarUrl"
alt="avatar"
/>
<router-link :class="$style.name" :to="$store.state.i | userPage">{{ $store.state.i | userName }}</router-link>

View File

@ -44,6 +44,9 @@ export default function load() {
mixin.status_url = `${mixin.scheme}://${mixin.host}/status`;
mixin.drive_url = `${mixin.scheme}://${mixin.host}/files`;
if (config.localDriveCapacityMb == null) config.localDriveCapacityMb = 256;
if (config.remoteDriveCapacityMb == null) config.remoteDriveCapacityMb = 8;
return Object.assign(config, mixin);
}

View File

@ -45,8 +45,18 @@ export type Source = {
secret_key: string;
};
localDriveCapacityMb: number;
remoteDriveCapacityMb: number;
preventCacheRemoteFiles: boolean;
drive?: {
storage: string;
bucket?: string;
prefix?: string;
baseUrl?: string;
config?: any;
};
/**
* ゴーストアカウントのID
*/

View File

@ -27,7 +27,7 @@ const nativeDbConn = async (): Promise<mongodb.Db> => {
if (mdb) return mdb;
const db = await ((): Promise<mongodb.Db> => new Promise((resolve, reject) => {
mongodb.MongoClient.connect(uri, (e: Error, client: any) => {
mongodb.MongoClient.connect(uri, { useNewUrlParser: true }, (e: Error, client: any) => {
if (e) return reject(e);
resolve(client.db(config.mongodb.db));
});

View File

@ -71,6 +71,9 @@ APIの詳しい使用法は「Misskey APIの利用」セクションをご覧く
## Misskey APIの利用
APIはすべてリクエストのパラメータ・レスポンスともにJSON形式です。また、すべてのエンドポイントはPOSTメソッドのみ受け付けます。
ストリーミングAPIも提供しています。
APIリファレンスもご確認ください。
### レートリミット

View File

@ -115,13 +115,6 @@ props:
ja: "ピン留めされた投稿のID"
en: "The ID of the pinned note of this user"
driveCapacity:
type: "number"
optional: false
desc:
ja: "ドライブの容量(bytes)"
en: "The capacity of drive of this user (bytes)"
host:
type: "string | null"
optional: false

183
src/docs/stream.ja.md Normal file
View File

@ -0,0 +1,183 @@
# ストリーミングAPI
ストリーミングAPIを使うと、リアルタイムで様々な情報(例えばタイムラインに新しい投稿が流れてきた、メッセージが届いた、フォローされた、など)を受け取ったり、HTTPリクエストを発生させることなくAPIにアクセスしたりすることができます。
ストリーミングAPIは複数の種類がありますが、ここではメインとなる「ホームストリーム」について説明します。
## ストリームに接続する
以下のURLに**websocket**接続します。
```
%URL%
```
接続する際は、`i`というパラメータ名で認証情報を含めます。例:
```
%URL%/?i=xxxxxxxxxxxxxxx
```
認証情報は、自分のAPIキーや、アプリケーションからストリームに接続する際はユーザーのアクセストークンのことを指します。
<div class="ui info">
<p><i class="fas fa-info-circle"></i> 認証情報の取得については、<a href="./api">こちらのドキュメント</a>をご確認ください。</p>
</div>
## ストリームを経由してAPIリクエストする
ストリームを経由してAPIリクエストすると、HTTPリクエストを発生させずにAPIを利用できます。そのため、コードを簡潔にできたり、パフォーマンスの向上を見込めるかもしれません。
ストリームを経由してAPIリクエストするには、次のようなメッセージをストリームに送信します:
```json
{
type: 'api',
id: 'xxxxxxxxxxxxxxxx',
endpoint: 'notes/create',
data: {
text: 'yee haw!'
}
}
```
`id`には、APIのレスポンスを識別するための、APIリクエストごとの一意なIDを設定する必要があります。UUIDや、簡単な乱数のようなもので構いません。
`endpoint`には、あなたがリクエストしたいAPIのエンドポイントを指定します。
`data`には、エンドポイントのパラメータを含めます。
<div class="ui info">
<p><i class="fas fa-info-circle"></i> APIのエンドポイントやパラメータについてはAPIリファレンスをご確認ください。</p>
</div>
### レスポンスの受信
APIへリクエストすると、レスポンスがストリームから次のような形式で流れてきます。
```json
{
type: 'api-res:xxxxxxxxxxxxxxxx',
body: {
...
}
}
```
`xxxxxxxxxxxxxxxx`の部分には、リクエストの際に設定された`id`が含まれています。これにより、どのリクエストに対するレスポンスなのか判別することができます。
`body`には、レスポンスが含まれています。
## 投稿のキャプチャ
Misskeyは投稿のキャプチャと呼ばれる仕組みを提供しています。これは、指定した投稿のイベントをストリームで受け取る機能です。
例えばタイムラインを取得してユーザーに表示したとします。ここで誰かがそのタイムラインに含まれるどれかの投稿に対してリアクションしたとします。
しかし、クライアントからするとある投稿にリアクションが付いたことなどは知る由がないため、リアルタイムでリアクションをタイムライン上の投稿に反映して表示するといったことができません。
この問題を解決するために、Misskeyは投稿のキャプチャ機構を用意しています。投稿をキャプチャすると、その投稿に関するイベントを受け取ることができるため、リアルタイムでリアクションを反映させたりすることが可能になります。
### 投稿をキャプチャする
投稿をキャプチャするには、ストリームに次のようなメッセージを送信します:
```json
{
type: 'capture',
id: 'xxxxxxxxxxxxxxxx'
}
```
`id`には、キャプチャしたい投稿の`id`を設定します。
このメッセージを送信すると、Misskeyにキャプチャを要請したことになり、以後、その投稿に関するイベントが流れてくるようになります。
例えば投稿にリアクションが付いたとすると、次のようなメッセージが流れてきます:
```json
{
type: 'note-updated',
body: {
note: {
...
}
}
}
```
`body`内の`note`には、その投稿の最新の情報が含まれています。
---
このように、投稿の情報が更新されると、`note-updated`イベントが流れてくるようになります。`note-updated`イベントが発生するのは、以下の場合です:
- 投稿にリアクションが付いた
- 投稿に添付されたアンケートに投票がされた
- 投稿が削除された
### 投稿のキャプチャを解除する
その投稿がもう画面に表示されなくなったりして、その投稿に関するイベントをもう受け取る必要がなくなったときは、キャプチャの解除を申請してください。
次のメッセージを送信します:
```json
{
type: 'decapture',
id: 'xxxxxxxxxxxxxxxx'
}
```
`id`には、キャプチャを解除したい投稿の`id`を設定します。
このメッセージを送信すると、以後、その投稿に関するイベントは流れてこないようになります。
## 流れてくるイベント一覧
流れてくるすべてのメッセージはJSON形式で、必ず`type`というプロパティが含まれています。これにより、メッセージの種類(イベント)を判別することができます。
### `note`
タイムラインに新しい投稿が流れてきたときに発生するイベントです。
`body`プロパティの中に、投稿情報が含まれています。
### `renote`
自分の投稿がRenoteされた時に発生するイベントです。自分自身の投稿をRenoteしたときは発生しません。
`body`プロパティの中に、Renoteされた投稿情報が含まれています。
### `mention`
誰かからメンションされたときに発生するイベントです。
`body`プロパティの中に、投稿情報が含まれています。
### `read_all_notifications`
自分宛ての通知がすべて既読になったことを表すイベントです。このイベントを利用して、「通知があることを示すアイコン」のようなものをオフにしたりする等のケースが想定されます。
### `meUpdated`
自分の情報が更新されたことを表すイベントです。
`body`プロパティの中に、最新の自分のアカウントの情報が含まれています。
### `follow`
自分が誰かをフォローしたときに発生するイベントです。
`body`プロパティの中に、フォローしたユーザーの情報が含まれています。
### `unfollow`
自分が誰かのフォローを解除したときに発生するイベントです。
`body`プロパティの中に、フォロー解除したユーザーの情報が含まれています。
### `followed`
自分が誰かにフォローされたときに発生するイベントです。
`body`プロパティの中に、フォローしてきたユーザーの情報が含まれています。

View File

@ -36,6 +36,10 @@ main
margin 1em 0
line-height 1.6em
hr
border none
border-bottom solid 2px #eee
footer
margin 32px 0 0 0
border-top solid 2px #eee

View File

@ -1,25 +0,0 @@
import * as stream from 'stream';
import * as Gm from 'gm';
import { IDriveFile, getDriveFileBucket } from '../models/drive-file';
const gm = Gm.subClass({
imageMagick: true
});
export default async function(file: IDriveFile): Promise<stream.Readable> {
if (!/^image\/.*$/.test(file.contentType)) return null;
const bucket = await getDriveFileBucket();
const readable = bucket.openDownloadStream(file._id);
const g = gm(readable);
const stream = g
.resize(256, 256)
.compress('jpeg')
.quality(70)
.interlace('line')
.stream();
return stream;
}

View File

@ -31,9 +31,6 @@ if (process.env.NODE_ENV != 'production') {
process.env.DEBUG = 'misskey:*';
}
// https://github.com/Automattic/kue/issues/822
require('events').EventEmitter.prototype._maxListeners = 512;
// Start app
main();

View File

@ -1,5 +1,8 @@
import { IUser } from '../../models/user';
type UserLike = {
host: string;
username: string;
};
export default (user: IUser) => {
export default (user: UserLike) => {
return user.host === null ? user.username : `${user.username}@${user.host}`;
};

View File

@ -1,35 +0,0 @@
import * as readline from 'readline';
/**
* Indicator
*/
export default class {
private clock: NodeJS.Timer;
constructor(text: string) {
let i = 0; // Dots counter
draw();
this.clock = setInterval(draw, 300);
function draw(): void {
cll();
i = (i + 1) % 4;
const dots = new Array(i + 1).join('.');
process.stdout.write(text + dots); // Write text
}
}
public end(): void {
clearInterval(this.clock);
cll();
}
}
/**
* Clear current line
*/
function cll(): void {
readline.clearLine(process.stdout, 0); // Clear current text
readline.cursorTo(process.stdout, 0, null); // Move cursor to the head of line
}

View File

@ -9,9 +9,8 @@ export default class {
}
public showAll(): void {
this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/));
this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? v(.*)\r?\n/));
this.show('Redis', 'redis-server --version', x => x.match(/v=([0-9\.]*)/));
this.show('ImageMagick', 'magick -version', x => x.match(/^Version: ImageMagick ([^ ]*)/));
}
public show(serviceName: string, command: string, transform: (x: string) => RegExpMatchArray): void {

5
src/misc/is-quote.ts Normal file
View File

@ -0,0 +1,5 @@
import { INote } from '../models/note';
export default function(note: INote): boolean {
return note.renoteId != null && (note.text != null || note.poll != null || (note.mediaIds != null && note.mediaIds.length > 0));
}

View File

@ -31,9 +31,17 @@ export type IMetadata = {
comment: string;
uri?: string;
url?: string;
src?: string;
deletedAt?: Date;
isMetaOnly?: boolean;
withoutChunks?: boolean;
storage?: string;
storageProps?: any;
isSensitive?: boolean;
/**
* 外部の(信頼されていない)URLへの直リンクか否か
*/
isRemote?: boolean;
};
export type IDriveFile = {
@ -155,9 +163,8 @@ export const pack = (
_target = Object.assign(_target, _file.metadata);
_target.src = _file.metadata.url;
_target.url = _file.metadata.isMetaOnly ? _file.metadata.url : `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
_target.isRemote = _file.metadata.isMetaOnly;
_target.url = _file.metadata.url ? _file.metadata.url : `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
_target.isRemote = _file.metadata.isRemote;
if (_target.properties == null) _target.properties = {};

Some files were not shown because too many files have changed in this diff Show More