Compare commits
273 Commits
10.93.0
...
11.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
b247be80cc | |||
343f2f1f33 | |||
2d590df900 | |||
ba56b2b9fd | |||
bf472b0c5e | |||
f7961f34c5 | |||
e369031a28 | |||
186d7bbfd9 | |||
60a11f8da5 | |||
1181fcdceb | |||
8cb9852058 | |||
53d46d1cbe | |||
275e1c8de9 | |||
d46eca4c87 | |||
2927fb1597 | |||
8c72e011d2 | |||
69662e24c3 | |||
96099ffe98 | |||
ae16b45c11 | |||
cfee87d3ef | |||
5fcf5bc635 | |||
14bcb813cc | |||
6af19794b6 | |||
8316186695 | |||
85d3023cd5 | |||
78414dee29 | |||
084135141f | |||
467a21f028 | |||
6e284c44d6 | |||
daf9a449e8 | |||
960268fd33 | |||
8c331da315 | |||
b0d626d862 | |||
a51fbd7316 | |||
063f372f3c | |||
987168b863 | |||
4ee40c3345 | |||
654daff7ce | |||
64e10e9619 | |||
b89cffe98d | |||
bd76ba702f | |||
5d52e9ce6b | |||
3c29027ca3 | |||
2ff3069d23 | |||
4198246351 | |||
2b6389b4dc | |||
d7df75ae6c | |||
11c30eccb3 | |||
ab8c6515b8 | |||
d4ad36fa41 | |||
4d688be3df | |||
d2b75f3501 | |||
46b78cb4ff | |||
5d6e0d0f37 | |||
e19d0a37bb | |||
dea3e2132e | |||
91c1ceefbd | |||
5c50989970 | |||
2a7e3b9c51 | |||
ab302df0ae | |||
21e5809993 | |||
c58afc67e8 | |||
8e344f2deb | |||
c28f4ffb3f | |||
2a40240310 | |||
0e9fba9287 | |||
2e3dd2a30a | |||
dda5f6559d | |||
4152e59638 | |||
9d5a92bce6 | |||
30172b92e6 | |||
8468a9d4c7 | |||
626cfb61ac | |||
9603f3fa4f | |||
619a1b9e53 | |||
62e76ad588 | |||
236d72685d | |||
72a5f7b1e2 | |||
d1c16a90b4 | |||
33a9783ae5 | |||
4d64fd665e | |||
96443384fe | |||
69939f1edb | |||
e3c0058942 | |||
3dc2361654 | |||
ec2f709018 | |||
ea06665c51 | |||
74a4bd704c | |||
c62f3e0e45 | |||
a56a969433 | |||
1016f94bbb | |||
e98cce9aee | |||
d4bdb5d327 | |||
db4378415e | |||
9b594880c8 | |||
d44fc3db2f | |||
5133b0a0c0 | |||
815469304f | |||
c651921c79 | |||
d18c835221 | |||
e38335077e | |||
34c150cf73 | |||
24cb3ba091 | |||
c07eaef2d1 | |||
5df708ac9f | |||
38ffbe95e9 | |||
8bec4042fc | |||
ee7ef89dfb | |||
54a5246061 | |||
fa6eae2937 | |||
795be20ee1 | |||
87d3a06dcd | |||
8b5c917195 | |||
c7da0e59ff | |||
eb14acbe0c | |||
56860a6bef | |||
735687be21 | |||
fab0cc51b3 | |||
3a26acbdb2 | |||
8d0c31bcda | |||
0b99293d4c | |||
802153ff9b | |||
ec73e2d237 | |||
c32b020535 | |||
c4441804e2 | |||
6c9d80d4e8 | |||
a231f8d26c | |||
08da258b63 | |||
5994926440 | |||
30f2da4215 | |||
1a2229f886 | |||
1e166490d9 | |||
1c57e6f80a | |||
a6537a8748 | |||
842b75977b | |||
9b3dccf60c | |||
2d533e0cd8 | |||
9e1925c808 | |||
142d59be85 | |||
d9a5e06b5b | |||
b6889e9ac6 | |||
dc82203e9b | |||
6a30d32e7d | |||
d9780606b3 | |||
fffa32df48 | |||
cad49892d3 | |||
f0a29721c9 | |||
13caf37991 | |||
b71a602107 | |||
e6ce0dd43a | |||
094a5214f1 | |||
0932fcd114 | |||
f26643cea3 | |||
63b1689155 | |||
59dc929431 | |||
deaadc33db | |||
0ba92a4f29 | |||
7dc5009ec7 | |||
0ee827afd3 | |||
551d1b7f86 | |||
7ed1b695f5 | |||
7ad31b9b33 | |||
edd8992f7f | |||
96fe42cfcb | |||
c3872b4a38 | |||
762945113d | |||
037e9230fc | |||
3f59ebf986 | |||
e51e1d2b09 | |||
26cc49eb69 | |||
7987bb491c | |||
16b7ac5a87 | |||
5932cb8609 | |||
dfe694d39f | |||
278624f2c8 | |||
899f42c070 | |||
8ce1d4d6a3 | |||
52225d703b | |||
81739af7cb | |||
25473222cc | |||
0b7be70935 | |||
818b71abd6 | |||
25575e8510 | |||
6c85adcf23 | |||
5dc92d7a40 | |||
4e2b966b80 | |||
d34f8c3cb9 | |||
9049ecb1cf | |||
7bebea087c | |||
1c79e30436 | |||
1d7933349b | |||
d002f67140 | |||
da3447765b | |||
cbf5663179 | |||
b217fba235 | |||
7f7e6d5aba | |||
87c5a9d9a6 | |||
8ca1fe3f0a | |||
763ae8f1a6 | |||
c65256d02b | |||
bd2ac515d1 | |||
681f372889 | |||
c2eec272e6 | |||
bd720491a9 | |||
a408226509 | |||
c015e99e6e | |||
de47a17be7 | |||
d38fc490ad | |||
662167e792 | |||
36c91f03d9 | |||
33ccee26b5 | |||
ed5cb991e3 | |||
bea84ec2bf | |||
08c176e549 | |||
810ed50976 | |||
2684541693 | |||
a5b12bac54 | |||
fea1b06e43 | |||
182ca5d434 | |||
facde9a75d | |||
41385640b9 | |||
7bad9db32e | |||
af66f0a497 | |||
95e1b80f41 | |||
556e2eba95 | |||
efe530cb17 | |||
34e7c99283 | |||
4157ea8bc3 | |||
550517bbf3 | |||
eb910cd8a1 | |||
75131c4e8a | |||
ee29ab95be | |||
e97951fc51 | |||
dfabdef60f | |||
5a87763193 | |||
6bb90f56fa | |||
c883ae1350 | |||
09e25e6a02 | |||
bf5d43054b | |||
63b3c65691 | |||
f193da7f67 | |||
40f38c2c0a | |||
db439ef804 | |||
56eb896a03 | |||
68d43e43b6 | |||
c60517e49a | |||
3f59d261f2 | |||
4068d220e5 | |||
18968e7208 | |||
38656103c0 | |||
0f65b1bcc5 | |||
a628821834 | |||
6ceff60c1e | |||
d762a6ce58 | |||
75a8037a46 | |||
1179920790 | |||
b323a160e3 | |||
b157e9535e | |||
7668475bd6 | |||
8bda2a1fb7 | |||
b092086b5b | |||
69a0d9034f | |||
f5be8fd313 | |||
7f835d7f76 | |||
ddbb7c5993 | |||
00a3fe39e8 | |||
7537fb88d4 | |||
a81bc71a1e | |||
0a0aa0e2db | |||
c56b94ae96 | |||
e90712706d | |||
eb0623331f | |||
d15bd59109 |
5
.config/docker_example.env
Normal file
5
.config/docker_example.env
Normal file
@ -0,0 +1,5 @@
|
||||
# db settings
|
||||
POSTGRES_PASSWORD="example-misskey-pass"
|
||||
POSTGRES_USER="example-misskey-user"
|
||||
POSTGRES_DB="misskey"
|
||||
|
@ -1,8 +1,16 @@
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# Misskey configuration
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
# ┌─────┐
|
||||
#───┘ URL └─────────────────────────────────────────────────────
|
||||
|
||||
# Final accessible URL seen by a user.
|
||||
url: https://example.tld/
|
||||
|
||||
# ┌───────────────────────┐
|
||||
#───┘ Port and TLS settings └───────────────────────────────────
|
||||
|
||||
### Port and TLS settings ######################################
|
||||
#
|
||||
# Misskey supports two deployment options for public.
|
||||
#
|
||||
@ -30,28 +38,51 @@ url: https://example.tld/
|
||||
# You need to set Certificate in 'https' section.
|
||||
|
||||
# To use option 1, uncomment below line.
|
||||
# port: 3000 # A port that your Misskey server should listen.
|
||||
#port: 3000 # A port that your Misskey server should listen.
|
||||
|
||||
# To use option 2, uncomment below lines.
|
||||
# port: 443
|
||||
#
|
||||
# https:
|
||||
# # path for certification
|
||||
# key: /etc/letsencrypt/live/example.tld/privkey.pem
|
||||
# cert: /etc/letsencrypt/live/example.tld/fullchain.pem
|
||||
#port: 443
|
||||
|
||||
################################################################
|
||||
#https:
|
||||
# # path for certification
|
||||
# key: /etc/letsencrypt/live/example.tld/privkey.pem
|
||||
# cert: /etc/letsencrypt/live/example.tld/fullchain.pem
|
||||
|
||||
# ┌──────────────────────────┐
|
||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||
|
||||
mongodb:
|
||||
db:
|
||||
host: localhost
|
||||
port: 27017
|
||||
port: 5432
|
||||
|
||||
# Database name
|
||||
db: misskey
|
||||
|
||||
# Auth
|
||||
user: example-misskey-user
|
||||
pass: example-misskey-pass
|
||||
|
||||
# ┌─────────────────────┐
|
||||
#───┘ Redis configuration └─────────────────────────────────────
|
||||
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
#pass: example-pass
|
||||
|
||||
# ┌─────────────────────────────┐
|
||||
#───┘ Elasticsearch configuration └─────────────────────────────
|
||||
|
||||
#elasticsearch:
|
||||
# host: localhost
|
||||
# port: 9200
|
||||
# pass: null
|
||||
|
||||
# ┌────────────────────────────────────┐
|
||||
#───┘ File storage (Drive) configuration └──────────────────────
|
||||
|
||||
drive:
|
||||
storage: 'db'
|
||||
storage: 'fs'
|
||||
|
||||
# OR
|
||||
|
||||
@ -88,26 +119,44 @@ drive:
|
||||
# accessKey: XXX
|
||||
# secretKey: YYY
|
||||
|
||||
# ┌───────────────┐
|
||||
#───┘ ID generation └───────────────────────────────────────────
|
||||
|
||||
# You can select the ID generation method.
|
||||
# You don't usually need to change this setting, but you can
|
||||
# change it according to your preferences.
|
||||
|
||||
# Available methods:
|
||||
# aid1 ... Use AID for ID generation (with random 1 char)
|
||||
# aid2 ... Use AID for ID generation (with random 2 chars)
|
||||
# aid3 ... Use AID for ID generation (with random 3 chars)
|
||||
# aid4 ... Use AID for ID generation (with random 4 chars)
|
||||
# ulid ... Use ulid for ID generation
|
||||
# objectid ... This is left for backward compatibility.
|
||||
|
||||
# AID(n) is the original ID generation method.
|
||||
# The trailing n represents the number of random characters that
|
||||
# will be suffixed.
|
||||
# The larger n is the safer. If n is small, the possibility of
|
||||
# collision at the same time increases, but there are also
|
||||
# advantages such as shortening of the URL.
|
||||
|
||||
# ULID: Universally Unique Lexicographically Sortable Identifier.
|
||||
# for more details: https://github.com/ulid/spec
|
||||
# * Normally, AID should be sufficient.
|
||||
|
||||
# ObjectID is the method used in previous versions of Misskey.
|
||||
# * Choose this if you are migrating from a previous Misskey.
|
||||
|
||||
id: 'aid2'
|
||||
|
||||
# ┌─────────────────────┐
|
||||
#───┘ Other configuration └─────────────────────────────────────
|
||||
|
||||
# If enabled:
|
||||
# The first account created is automatically marked as Admin.
|
||||
autoAdmin: true
|
||||
|
||||
#
|
||||
# Below settings are optional
|
||||
#
|
||||
|
||||
# Redis
|
||||
#redis:
|
||||
# host: localhost
|
||||
# port: 6379
|
||||
# pass: example-pass
|
||||
|
||||
# Elasticsearch
|
||||
#elasticsearch:
|
||||
# host: localhost
|
||||
# port: 9200
|
||||
# pass: null
|
||||
|
||||
# Whether disable HSTS
|
||||
#disableHsts: true
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
var user = {
|
||||
user: 'example-misskey-user',
|
||||
pwd: 'example-misskey-pass',
|
||||
roles: [
|
||||
{
|
||||
role: 'readWrite',
|
||||
db: 'misskey'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
db.createUser(user);
|
||||
|
6
.dockerignore
Executable file → Normal file
6
.dockerignore
Executable file → Normal file
@ -5,8 +5,8 @@
|
||||
.vscode
|
||||
Dockerfile
|
||||
build/
|
||||
db/
|
||||
docker-compose.yml
|
||||
node_modules/
|
||||
mongo/
|
||||
redis/
|
||||
elasticsearch/
|
||||
node_modules/
|
||||
redis/
|
||||
|
10
.github/ISSUE_TEMPLATE/01_bug-report.md
vendored
10
.github/ISSUE_TEMPLATE/01_bug-report.md
vendored
@ -7,24 +7,24 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
## 💡 Summary
|
||||
|
||||
<!-- Tell us what the bug is -->
|
||||
|
||||
## Expected Behavior
|
||||
## 🙂 Expected Behavior
|
||||
|
||||
<!--- Tell us what should happen -->
|
||||
|
||||
## Actual Behavior
|
||||
## ☹️ Actual Behavior
|
||||
|
||||
<!--- Tell us what happens instead of the expected behavior -->
|
||||
|
||||
## Steps to Reproduce
|
||||
## 📝 Steps to Reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## Environment
|
||||
## 📌 Environment
|
||||
|
||||
<!-- Tell us where on the platform it happens -->
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -8,14 +8,15 @@
|
||||
built
|
||||
/data
|
||||
/.cache-loader
|
||||
/db
|
||||
/elasticsearch
|
||||
npm-debug.log
|
||||
*.pem
|
||||
run.bat
|
||||
api-docs.json
|
||||
*.log
|
||||
/redis
|
||||
/mongo
|
||||
/elasticsearch
|
||||
*.code-workspace
|
||||
yarn.lock
|
||||
.DS_Store
|
||||
/files
|
||||
|
121
CHANGELOG.md
121
CHANGELOG.md
@ -5,6 +5,127 @@ If you encounter any problems with updating, please try the following:
|
||||
1. `npm run clean` or `npm run cleanall`
|
||||
2. Retry update (Don't forget `npm i`)
|
||||
|
||||
11.0.0
|
||||
----------
|
||||
* **データベースがMongoDBからPostgreSQLに変更されました**
|
||||
* **Redisが必須に**
|
||||
* アカウントを完全に削除できるように
|
||||
* ミュート/ブロック時にそのユーザーの投稿のウォッチをすべて解除するように
|
||||
* フォロー申請数が実際より1すくなくなる問題を修正
|
||||
* リストからアカウント削除したユーザーを削除できない問題を修正
|
||||
* リストTLでフォローしていないユーザーの非公開投稿が流れる問題を修正
|
||||
* リストTLでダイレクト投稿が流れない問題を修正
|
||||
* ミュートしているユーザーの投稿がタイムラインに流れてくることがある問題を修正
|
||||
|
||||
### APIの破壊的変更
|
||||
* v10時点で deprecated だったパラメータなどを削除
|
||||
* ユーザーリストの title が name に
|
||||
* リバーシの対局の`settings`プロパティがなくなり、その中にあったプロパティがすべて上の階層に
|
||||
* 例えば`game.settings.map`は`game.map`になる
|
||||
|
||||
### 既知の問題
|
||||
* アプリが作成できない
|
||||
* 依存ライブラリの問題と思わるため、対応が難しい
|
||||
|
||||
### Migration
|
||||
coming soon...
|
||||
|
||||
10.100.0
|
||||
----------
|
||||
* ユーザーリストでフォローボタンを表示するように
|
||||
* ドライブのファイルのサムネイルを修正
|
||||
* 投稿ウィジットでローカルのみの公開範囲で投稿できない問題を修正
|
||||
* TLを遡った時に抜けがある時がある問題を修正
|
||||
* ユーザータイムラインが投稿日時順ではなくなっているのを修正
|
||||
* 10.99.0 でチャートのレンダリングがおかしい問題を修正
|
||||
|
||||
10.99.0
|
||||
----------
|
||||
* manifest.json にインスタンス名を反映させるように
|
||||
* Metaに投稿やユーザーのIDを設定するように
|
||||
* 設定でポートが指定されていない場合、環境変数を参照するように
|
||||
* フォローインポートで途中にエラーになるユーザーがいると途中で終了してしまう問題を修正
|
||||
* フォローインポートで自分が含まれていた場合自分をフォローしてしまう問題を修正
|
||||
* ServiceWorkerの設定がUIで有効にならない問題を修正
|
||||
* ユーザー一覧でのユーザーの自己紹介が複数行になることがある問題を修正
|
||||
* フォローインポートでAPI limitに達していても正常にリクエストされたように表示されてしまう問題を修正
|
||||
* DBに保存されたrepository urlを変更する方法がない問題を修正
|
||||
* デスクトップDeckだとviaが投稿内に2箇所表示される問題を修正
|
||||
* デザインの調整
|
||||
* 依存関係の更新
|
||||
* ローカリゼーション
|
||||
|
||||
10.98.3
|
||||
----------
|
||||
* リアクションのカスタム絵文字の情報がNoteに添付されない問題を修正
|
||||
* フォルダーの移動をするとき親フォルダーに自分自身を指定できてしまう問題を修正
|
||||
* デザインの調整
|
||||
|
||||
10.98.2
|
||||
----------
|
||||
* 他のインスタンスから添付画像が見れない問題を修正
|
||||
|
||||
10.98.1
|
||||
----------
|
||||
* ドライブのファイルのサムネイルが表示されない問題を修正
|
||||
* APでカスタム絵文字を送る時に常にimage/pngで送っている問題を修正
|
||||
* いくらいじってもページリロードするとmisskeyのテーマがdark(future)になっちゃう問題を修正
|
||||
|
||||
10.98.0
|
||||
----------
|
||||
* ドライブのファイルダウンロード時に元のファイル名を尊重するように
|
||||
* ドライブで画像以外のファイルを分かりやすく表示するように
|
||||
* TwemojiのCDNを変更
|
||||
* モバイルで通知の設定がない問題を修正
|
||||
* デザインの調整
|
||||
|
||||
10.97.2
|
||||
----------
|
||||
* ビルド時に警告が出ないように修正
|
||||
|
||||
10.97.1
|
||||
----------
|
||||
* デザインの調整
|
||||
|
||||
10.97.0
|
||||
----------
|
||||
* リアクションに絵文字やカスタム絵文字を使えるように
|
||||
* 不明なリアクションのフォールバックに star を使えるように
|
||||
* デザインの調整
|
||||
|
||||
10.96.0
|
||||
----------
|
||||
* 連合ユーザーの投稿に対してActivityPubオブジェクトを要求されたら元のインスタンスにリダイレクトするように
|
||||
* updatePersonを試行した時点でもlastFetchedAtを更新するように
|
||||
* 管理画面でリモートインスタンスの登録日時を表示
|
||||
* ユーザーサジェストが機能しなくなっていた問題を修正
|
||||
* 最近使ったハッシュタグ表示が機能していない問題を修正
|
||||
* バグ修正
|
||||
* デザインの調整
|
||||
|
||||
10.95.0
|
||||
----------
|
||||
* ジョブを一覧できるように
|
||||
* MFMでURLを明示する構文の追加
|
||||
* Articleタイプのアクティビティを受け入れるように
|
||||
* 凍結されたユーザーをサジェストしないように
|
||||
* ファビコンが保存されないのを修正
|
||||
* キューのジョブクリアの動作を修正
|
||||
* デザインの調整
|
||||
|
||||
10.94.0
|
||||
----------
|
||||
* Faviconを設定できるように
|
||||
* アカウントを凍結したときすべてのフォローを解除するように
|
||||
* シェアページが機能していない問題を修正
|
||||
* インスタンスブロックをしていてもRenote等すると取得されてしまう問題を修正
|
||||
* デザインの調整
|
||||
|
||||
10.93.1
|
||||
----------
|
||||
* データのエクスポートとインポートの動作を修正
|
||||
* デザインの調整
|
||||
|
||||
10.93.0
|
||||
----------
|
||||
* フォローリストをインポートできるように
|
||||
|
@ -46,6 +46,9 @@ Convert な(na) to にゃ(nya)
|
||||
Revert Nyaize
|
||||
|
||||
## Code style
|
||||
### Use semicolon
|
||||
To avoid ASI Hazard
|
||||
|
||||
### Don't use `export default`
|
||||
Bad:
|
||||
``` ts
|
||||
@ -72,3 +75,95 @@ src ... Source code
|
||||
test ... Test code
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
### placeholder
|
||||
SQLをクエリビルダで組み立てる際、使用するプレースホルダは重複してはならない
|
||||
例えば
|
||||
``` ts
|
||||
query.andWhere(new Brackets(qb => {
|
||||
for (const type of ps.fileType) {
|
||||
qb.orWhere(`:type = ANY(note.attachedFileTypes)`, { type: type });
|
||||
}
|
||||
}));
|
||||
```
|
||||
と書くと、ループ中で`type`というプレースホルダが複数回使われてしまいおかしくなる
|
||||
だから次のようにする必要がある
|
||||
```ts
|
||||
query.andWhere(new Brackets(qb => {
|
||||
for (const type of ps.fileType) {
|
||||
const i = ps.fileType.indexOf(type);
|
||||
qb.orWhere(`:type${i} = ANY(note.attachedFileTypes)`, { [`type${i}`]: type });
|
||||
}
|
||||
}));
|
||||
```
|
||||
|
||||
### `null` in SQL
|
||||
SQLを発行する際、パラメータが`null`になる可能性のある場合はSQL文を出し分けなければならない
|
||||
例えば
|
||||
``` ts
|
||||
query.where('file.folderId = :folderId', { folderId: ps.folderId });
|
||||
```
|
||||
という処理で、`ps.folderId`が`null`だと結果的に`file.folderId = null`のようなクエリが発行されてしまい、これは正しいSQLではないので期待した結果が得られない
|
||||
だから次のようにする必要がある
|
||||
``` ts
|
||||
if (ps.folderId) {
|
||||
query.where('file.folderId = :folderId', { folderId: ps.folderId });
|
||||
} else {
|
||||
query.where('file.folderId IS NULL');
|
||||
}
|
||||
```
|
||||
|
||||
### `[]` in SQL
|
||||
SQLを発行する際、`IN`のパラメータが`[]`(空の配列)になる可能性のある場合はSQL文を出し分けなければならない
|
||||
例えば
|
||||
``` ts
|
||||
const users = await Users.find({
|
||||
id: In(userIds)
|
||||
});
|
||||
```
|
||||
という処理で、`userIds`が`[]`だと結果的に`user.id IN ()`のようなクエリが発行されてしまい、これは正しいSQLではないので期待した結果が得られない
|
||||
だから次のようにする必要がある
|
||||
``` ts
|
||||
const users = userIds.length > 0 ? await Users.find({
|
||||
id: In(userIds)
|
||||
}) : [];
|
||||
```
|
||||
|
||||
### 配列のインデックス in SQL
|
||||
SQLでは配列のインデックスは**1始まり**。
|
||||
`[a, b, c]`の `a`にアクセスしたいなら`[0]`ではなく`[1]`と書く
|
||||
|
||||
### `undefined`にご用心
|
||||
MongoDBの時とは違い、findOneでレコードを取得する時に対象レコードが存在しない場合 **`undefined`** が返ってくるので注意。
|
||||
MongoDBは`null`で返してきてたので、その感覚で`if (x === null)`とか書くとバグる。代わりに`if (x == null)`と書いてください
|
||||
|
||||
### 簡素な`undefined`チェック
|
||||
データベースからレコードを取得するときに、プログラムの流れ的に(ほぼ)絶対`undefined`にはならない場合でも、`undefined`チェックしないとTypeScriptに怒られます。
|
||||
でもいちいち複数行を費やして、発生するはずのない`undefined`をチェックするのも面倒なので、`ensure`というユーティリティ関数を用意しています。
|
||||
例えば、
|
||||
``` ts
|
||||
const user = await Users.findOne(userId);
|
||||
// この時点で user の型は User | undefined
|
||||
if (user == null) {
|
||||
throw 'missing user';
|
||||
}
|
||||
// この時点で user の型は User
|
||||
```
|
||||
という処理を`ensure`を使うと
|
||||
``` ts
|
||||
const user = await Users.findOne(userId).then(ensure);
|
||||
// この時点で user の型は User
|
||||
```
|
||||
という風に書けます。
|
||||
もちろん`ensure`内部でエラーを握りつぶすようなことはしておらず、万が一`undefined`だった場合はPromiseがRejectされ後続の処理は実行されません。
|
||||
``` ts
|
||||
const user = await Users.findOne(userId).then(ensure);
|
||||
// 万が一 Users.findOne の結果が undefined だったら、ensure でエラーが発生するので
|
||||
// この行に到達することは無い
|
||||
// なので、.then(ensure) は
|
||||
// if (user == null) {
|
||||
// throw 'missing user';
|
||||
// }
|
||||
// の糖衣構文のような扱いです
|
||||
```
|
||||
|
@ -23,8 +23,9 @@ RUN apk add --no-cache \
|
||||
zlib-dev
|
||||
RUN npm i -g yarn
|
||||
|
||||
COPY . ./
|
||||
COPY package.json ./
|
||||
RUN yarn install
|
||||
COPY . ./
|
||||
RUN yarn build
|
||||
|
||||
FROM base AS runner
|
||||
|
26
README.md
26
README.md
@ -1,4 +1,4 @@
|
||||
<a href="https://ai.misskey.xyz/"><img src="https://github.com/syuilo/misskey/blob/develop/assets/ai-orig.png?raw=true" align="right" height="320px"/></a>
|
||||
<a href="https://xn--931a.moe/"><img src="https://github.com/syuilo/misskey/blob/develop/assets/ai-orig.png?raw=true" align="right" height="320px"/></a>
|
||||
|
||||
[](https://misskey.xyz/)
|
||||
================================================================
|
||||
@ -101,42 +101,44 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
|
||||
----------------------------------------------------------------
|
||||
<!-- PATREON_START -->
|
||||
<table><tr>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12190916/fb7fa7983c14425f890369535b1506a4/1?token-time=2145916800&token-hash=WeuDzzz24cRXJogyIkU-mxARqkdyms-rcZKbO-GpGjw%3D" alt="weep" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5888816/36da0f7c15954df0ab13f9abdf227f66/1?token-time=2145916800&token-hash=HGkZJ7s4bSaQVoOJ5q30mTWHTxDLiw1LuyaogKPLy24%3D" alt="Hiroshi Seki" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12190916/fb7fa7983c14425f890369535b1506a4/3?token-time=2145916800&token-hash=gr7DF8BuwflHvNoP24He4aa-5j8_KycrAQe3fHwQIUE%3D" alt="weep" width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/12059069" alt="naga_rus" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12913507/f7181eacafe8469a93033d85f5969c29/4?token-time=2145916800&token-hash=vZdDTTF-ahiKBjjgppS2ev4rkD8H7TTKkXXoxsucs6Y%3D" alt="Melilot" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5670915/ee175f0bfb6347ffa4ea101a8c097bff/1?token-time=2145916800&token-hash=ubqJzjhBQUo8Nw6h_8jMDlJ5ocIO46EflpiRkp2jIw4%3D" alt="osapon" width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/16869916" alt="見当かなみ" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12999811/5f349fafcce44dd1824a8b1ebbec4564/3?token-time=2145916800&token-hash=LtV2lRi3L2jOWMLwccr9qWYfPrFlzIo2jYZHKzHEb6k%3D" alt="Xeltica" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12021162/963128bb8d14476dbd8407943db8f31a/1?token-time=2145916800&token-hash=1FlxS9MEgmNGH_RHUVHbO5hIXB5I1z0lvA33CTvYvjA%3D" alt="gutfuckllc" width="100"></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://www.patreon.com/rane_hs">Hiroshi Seki</a></td>
|
||||
<td><a href="https://www.patreon.com/weepjp">weep</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=12059069">naga_rus</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=12913507">Melilot</a></td>
|
||||
<td><a href="https://www.patreon.com/osapon">osapon</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=16869916">見当かなみ</a></td>
|
||||
<td><a href="https://www.patreon.com/Xeltica">Xeltica</a></td>
|
||||
<td><a href="https://www.patreon.com/gutfuckllc">gutfuckllc</a></td>
|
||||
</tr></table>
|
||||
<table><tr>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12021162/963128bb8d14476dbd8407943db8f31a/1?token-time=2145916800&token-hash=1FlxS9MEgmNGH_RHUVHbO5hIXB5I1z0lvA33CTvYvjA%3D" alt="gutfuckllc" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/11357794/923ce94cd8c44ba788ee931907881839/1?token-time=2145916800&token-hash=0xgcpqvFDqRcV_YIEhcPNVH7gs9sLg_BBnTJXCkN4ao%3D" alt="mydarkstar" width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/12718187" alt="Peter G." width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/18833336" alt="itiradi" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/13039004/509d0c412eb14ae08d6a812a3054f7d6/1?token-time=2145916800&token-hash=2PsbFNw0tnubZzgSXD01R6hIgncfiElG7H7HX2Y3dyo%3D" alt="nemu" width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/17866454" alt="sikyosyounin" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5881381/6235ca5d3fb04c8e95ef5b4ff2abcc18/3?token-time=2145916800&token-hash=9JtETp0X8gI280Ne1E8bxn6j4Lw5o2k4mJkICx97V_k%3D" alt="YUKIMOCHI" width="100"></td>
|
||||
<td><img src="https://c8.patreon.com/2/200/17463605" alt="Sampot" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/17880724/311738c8a48f4a6b9443c2445a75adde/1?token-time=2145916800&token-hash=95p8VdGX45E8BitZR_eOcDlqCjumjzNLBPQJrJdeCpI%3D" alt="takimura" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/17195955/be45e5e14c3e48b2bee0456c84e19df4/4?token-time=2145916800&token-hash=SbdZeN5SmsuT9stD6v0jN1z0hftg0FmRiCTxysU0Ihw%3D" alt="Damillora" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/16900731/935a10339daa4ede8e555903a0707060/1?token-time=2145916800&token-hash=3CrpqH-XtKs_NoIlSsTyVs8wCzP1WFCsG2xwps1IJq0%3D" alt="Atsuko Tominaga" width="100"></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://www.patreon.com/gutfuckllc">gutfuckllc</a></td>
|
||||
<td><a href="https://www.patreon.com/mydarkstar">mydarkstar</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=12718187">Peter G.</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=18833336">itiradi</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=13039004">nemu</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=17866454">sikyosyounin</a></td>
|
||||
<td><a href="https://www.patreon.com/yukimochi">YUKIMOCHI</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=17463605">Sampot</a></td>
|
||||
<td><a href="https://www.patreon.com/takimura">takimura</a></td>
|
||||
<td><a href="https://www.patreon.com/damillora">Damillora</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=16900731">Atsuko Tominaga</a></td>
|
||||
</tr></table>
|
||||
<table><tr>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/17195955/be45e5e14c3e48b2bee0456c84e19df4/4?token-time=2145916800&token-hash=SbdZeN5SmsuT9stD6v0jN1z0hftg0FmRiCTxysU0Ihw%3D" alt="Damillora" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/16900731/935a10339daa4ede8e555903a0707060/1?token-time=2145916800&token-hash=3CrpqH-XtKs_NoIlSsTyVs8wCzP1WFCsG2xwps1IJq0%3D" alt="Atsuko Tominaga" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/4389829/9f709180ac714651a70f74a82f3ffdb9/3?token-time=2145916800&token-hash=-iJszBqgYBhsM5qMdA1knf9wvprhEfESzKfR2oh7mIA%3D" alt="natalie" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/13034746/c711c7f58e204ecfbc2fd646bc8a4eee/1?token-time=2145916800&token-hash=5T8XcaAf9Zyzfg3QubR06s_kJZkArVEM2dwObrBVAU4%3D" alt="Hiratake" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/18072312/98e894d960314fa7bc236a72a39488fe/1?token-time=2145916800&token-hash=D6QK3fPyqiYKJfOzc-QqaSSairUrWdjld-ewp2waj6s%3D" alt="Hekovic" width="100"></td>
|
||||
@ -145,6 +147,8 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5731881/4b6038e6cda34c04b83a5fcce3806a93/1?token-time=2145916800&token-hash=xhR1n6NAAyEb-IUXLD6_dshkFa3mefU5ZZuk1L8qKTs%3D" alt="Nokotaro Takeda" width="100"></td>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12531784/93a45137841849329ba692da92ac7c60/1?token-time=2145916800&token-hash=uR-48MQ0A4j0irQSrCAQZJ-sJUSs_Fkihlg3-l59b7c%3D" alt="Takashi Shibuya" width="100"></td>
|
||||
</tr><tr>
|
||||
<td><a href="https://www.patreon.com/damillora">Damillora</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=16900731">Atsuko Tominaga</a></td>
|
||||
<td><a href="https://www.patreon.com/user?u=4389829">natalie</a></td>
|
||||
<td><a href="https://www.patreon.com/hiratake">Hiratake</a></td>
|
||||
<td><a href="https://www.patreon.com/hekovic">Hekovic</a></td>
|
||||
@ -154,7 +158,7 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
|
||||
<td><a href="https://www.patreon.com/user?u=12531784">Takashi Shibuya</a></td>
|
||||
</tr></table>
|
||||
|
||||
**Last updated:** Tue, 12 Mar 2019 00:50:06 UTC
|
||||
**Last updated:** Sun, 07 Apr 2019 19:21:08 UTC
|
||||
<!-- PATREON_END -->
|
||||
|
||||
:four_leaf_clover: Copyright
|
||||
|
@ -1,23 +0,0 @@
|
||||
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);
|
||||
});
|
@ -1,57 +0,0 @@
|
||||
// for Node.js interpret
|
||||
|
||||
const chalk = require('chalk');
|
||||
const sequential = require('promise-sequential');
|
||||
|
||||
const { default: User } = require('../../built/models/user');
|
||||
const { default: DriveFile } = require('../../built/models/drive-file');
|
||||
|
||||
async function main() {
|
||||
const promiseGens = [];
|
||||
|
||||
const count = await DriveFile.count({});
|
||||
|
||||
let prev;
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
promiseGens.push(() => {
|
||||
const promise = new Promise(async (res, rej) => {
|
||||
const file = await DriveFile.findOne(prev ? {
|
||||
_id: { $gt: prev._id }
|
||||
} : {}, {
|
||||
sort: {
|
||||
_id: 1
|
||||
}
|
||||
});
|
||||
|
||||
prev = file;
|
||||
|
||||
const user = await User.findOne({ _id: file.metadata.userId });
|
||||
|
||||
DriveFile.update({
|
||||
_id: file._id
|
||||
}, {
|
||||
$set: {
|
||||
'metadata._user': {
|
||||
host: user.host
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
res([i, file]);
|
||||
}).catch(rej);
|
||||
});
|
||||
|
||||
promise.then(([i, file]) => {
|
||||
console.log(chalk`{gray ${i}} {green done: {bold ${file._id}} ${file.filename}}`);
|
||||
});
|
||||
|
||||
return promise;
|
||||
});
|
||||
}
|
||||
|
||||
return await sequential(promiseGens);
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log('ALL DONE');
|
||||
}).catch(console.error);
|
@ -1,71 +0,0 @@
|
||||
// for Node.js interpret
|
||||
|
||||
const chalk = require('chalk');
|
||||
const sequential = require('promise-sequential');
|
||||
|
||||
const { default: User } = require('../../built/models/user');
|
||||
const { default: DriveFile } = require('../../built/models/drive-file');
|
||||
|
||||
async function main() {
|
||||
const promiseGens = [];
|
||||
|
||||
const count = await User.count({});
|
||||
|
||||
let prev;
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
promiseGens.push(() => {
|
||||
const promise = new Promise(async (res, rej) => {
|
||||
const user = await User.findOne(prev ? {
|
||||
_id: { $gt: prev._id }
|
||||
} : {}, {
|
||||
sort: {
|
||||
_id: 1
|
||||
}
|
||||
});
|
||||
|
||||
prev = user;
|
||||
|
||||
const set = {};
|
||||
|
||||
if (user.avatarId != null) {
|
||||
const file = await DriveFile.findOne({ _id: user.avatarId });
|
||||
|
||||
if (file && file.metadata.properties.avgColor) {
|
||||
set.avatarColor = file.metadata.properties.avgColor;
|
||||
}
|
||||
}
|
||||
|
||||
if (user.bannerId != null) {
|
||||
const file = await DriveFile.findOne({ _id: user.bannerId });
|
||||
|
||||
if (file && file.metadata.properties.avgColor) {
|
||||
set.bannerColor = file.metadata.properties.avgColor;
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(set).length === 0) return res([i, user]);
|
||||
|
||||
User.update({
|
||||
_id: user._id
|
||||
}, {
|
||||
$set: set
|
||||
}).then(() => {
|
||||
res([i, user]);
|
||||
}).catch(rej);
|
||||
});
|
||||
|
||||
promise.then(([i, user]) => {
|
||||
console.log(chalk`{gray ${i}} {green done: {bold ${user._id}} @${user.username}}`);
|
||||
});
|
||||
|
||||
return promise;
|
||||
});
|
||||
}
|
||||
|
||||
return await sequential(promiseGens);
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log('ALL DONE');
|
||||
}).catch(console.error);
|
@ -1,9 +0,0 @@
|
||||
const { default: DriveFile } = require('../../built/models/drive-file');
|
||||
|
||||
DriveFile.update({}, {
|
||||
$rename: {
|
||||
'metadata.isMetaOnly': 'metadata.withoutChunks'
|
||||
}
|
||||
}, {
|
||||
multi: true
|
||||
});
|
@ -1,134 +0,0 @@
|
||||
const { default: Stats } = require('../../built/models/stats');
|
||||
const { default: User } = require('../../built/models/user');
|
||||
const { default: Note } = require('../../built/models/note');
|
||||
const { default: DriveFile } = require('../../built/models/drive-file');
|
||||
|
||||
const now = new Date();
|
||||
const y = now.getFullYear();
|
||||
const m = now.getMonth();
|
||||
const d = now.getDate();
|
||||
const today = new Date(y, m, d);
|
||||
|
||||
async function main() {
|
||||
const localUsersCount = await User.count({
|
||||
host: null
|
||||
});
|
||||
|
||||
const remoteUsersCount = await User.count({
|
||||
host: { $ne: null }
|
||||
});
|
||||
|
||||
const localNotesCount = await Note.count({
|
||||
'_user.host': null
|
||||
});
|
||||
|
||||
const remoteNotesCount = await Note.count({
|
||||
'_user.host': { $ne: null }
|
||||
});
|
||||
|
||||
const localDriveFilesCount = await DriveFile.count({
|
||||
'metadata._user.host': null
|
||||
});
|
||||
|
||||
const remoteDriveFilesCount = await DriveFile.count({
|
||||
'metadata._user.host': { $ne: null }
|
||||
});
|
||||
|
||||
const localDriveFilesSize = await DriveFile
|
||||
.aggregate([{
|
||||
$match: {
|
||||
'metadata._user.host': null,
|
||||
'metadata.deletedAt': { $exists: false }
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
length: true
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: null,
|
||||
usage: { $sum: '$length' }
|
||||
}
|
||||
}])
|
||||
.then(aggregates => {
|
||||
if (aggregates.length > 0) {
|
||||
return aggregates[0].usage;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
const remoteDriveFilesSize = await DriveFile
|
||||
.aggregate([{
|
||||
$match: {
|
||||
'metadata._user.host': { $ne: null },
|
||||
'metadata.deletedAt': { $exists: false }
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
length: true
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: null,
|
||||
usage: { $sum: '$length' }
|
||||
}
|
||||
}])
|
||||
.then(aggregates => {
|
||||
if (aggregates.length > 0) {
|
||||
return aggregates[0].usage;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
await Stats.insert({
|
||||
date: today,
|
||||
users: {
|
||||
local: {
|
||||
total: localUsersCount,
|
||||
diff: 0
|
||||
},
|
||||
remote: {
|
||||
total: remoteUsersCount,
|
||||
diff: 0
|
||||
}
|
||||
},
|
||||
notes: {
|
||||
local: {
|
||||
total: localNotesCount,
|
||||
diff: 0,
|
||||
diffs: {
|
||||
normal: 0,
|
||||
reply: 0,
|
||||
renote: 0
|
||||
}
|
||||
},
|
||||
remote: {
|
||||
total: remoteNotesCount,
|
||||
diff: 0,
|
||||
diffs: {
|
||||
normal: 0,
|
||||
reply: 0,
|
||||
renote: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
drive: {
|
||||
local: {
|
||||
totalCount: localDriveFilesCount,
|
||||
totalSize: localDriveFilesSize,
|
||||
diffCount: 0,
|
||||
diffSize: 0
|
||||
},
|
||||
remote: {
|
||||
totalCount: remoteDriveFilesCount,
|
||||
totalSize: remoteDriveFilesSize,
|
||||
diffCount: 0,
|
||||
diffSize: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
console.log('done');
|
||||
}
|
||||
|
||||
main();
|
@ -1,144 +0,0 @@
|
||||
const { default: Stats } = require('../../built/models/stats');
|
||||
const { default: User } = require('../../built/models/user');
|
||||
const { default: Note } = require('../../built/models/note');
|
||||
const { default: DriveFile } = require('../../built/models/drive-file');
|
||||
|
||||
const now = new Date();
|
||||
const y = now.getFullYear();
|
||||
const m = now.getMonth();
|
||||
const d = now.getDate();
|
||||
const h = now.getHours();
|
||||
const date = new Date(y, m, d, h);
|
||||
|
||||
async function main() {
|
||||
await Stats.update({}, {
|
||||
$set: {
|
||||
span: 'day'
|
||||
}
|
||||
}, {
|
||||
multi: true
|
||||
});
|
||||
|
||||
const localUsersCount = await User.count({
|
||||
host: null
|
||||
});
|
||||
|
||||
const remoteUsersCount = await User.count({
|
||||
host: { $ne: null }
|
||||
});
|
||||
|
||||
const localNotesCount = await Note.count({
|
||||
'_user.host': null
|
||||
});
|
||||
|
||||
const remoteNotesCount = await Note.count({
|
||||
'_user.host': { $ne: null }
|
||||
});
|
||||
|
||||
const localDriveFilesCount = await DriveFile.count({
|
||||
'metadata._user.host': null
|
||||
});
|
||||
|
||||
const remoteDriveFilesCount = await DriveFile.count({
|
||||
'metadata._user.host': { $ne: null }
|
||||
});
|
||||
|
||||
const localDriveFilesSize = await DriveFile
|
||||
.aggregate([{
|
||||
$match: {
|
||||
'metadata._user.host': null,
|
||||
'metadata.deletedAt': { $exists: false }
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
length: true
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: null,
|
||||
usage: { $sum: '$length' }
|
||||
}
|
||||
}])
|
||||
.then(aggregates => {
|
||||
if (aggregates.length > 0) {
|
||||
return aggregates[0].usage;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
const remoteDriveFilesSize = await DriveFile
|
||||
.aggregate([{
|
||||
$match: {
|
||||
'metadata._user.host': { $ne: null },
|
||||
'metadata.deletedAt': { $exists: false }
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
length: true
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: null,
|
||||
usage: { $sum: '$length' }
|
||||
}
|
||||
}])
|
||||
.then(aggregates => {
|
||||
if (aggregates.length > 0) {
|
||||
return aggregates[0].usage;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
await Stats.insert({
|
||||
date: date,
|
||||
span: 'hour',
|
||||
users: {
|
||||
local: {
|
||||
total: localUsersCount,
|
||||
diff: 0
|
||||
},
|
||||
remote: {
|
||||
total: remoteUsersCount,
|
||||
diff: 0
|
||||
}
|
||||
},
|
||||
notes: {
|
||||
local: {
|
||||
total: localNotesCount,
|
||||
diff: 0,
|
||||
diffs: {
|
||||
normal: 0,
|
||||
reply: 0,
|
||||
renote: 0
|
||||
}
|
||||
},
|
||||
remote: {
|
||||
total: remoteNotesCount,
|
||||
diff: 0,
|
||||
diffs: {
|
||||
normal: 0,
|
||||
reply: 0,
|
||||
renote: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
drive: {
|
||||
local: {
|
||||
totalCount: localDriveFilesCount,
|
||||
totalSize: localDriveFilesSize,
|
||||
diffCount: 0,
|
||||
diffSize: 0
|
||||
},
|
||||
remote: {
|
||||
totalCount: remoteDriveFilesCount,
|
||||
totalSize: remoteDriveFilesSize,
|
||||
diffCount: 0,
|
||||
diffSize: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
console.log('done');
|
||||
}
|
||||
|
||||
main();
|
@ -5,7 +5,7 @@ services:
|
||||
build: .
|
||||
restart: always
|
||||
links:
|
||||
- mongo
|
||||
- db
|
||||
# - redis
|
||||
# - es
|
||||
ports:
|
||||
@ -19,21 +19,18 @@ services:
|
||||
# image: redis:4.0-alpine
|
||||
# networks:
|
||||
# - internal_network
|
||||
### Uncomment to enable Redis persistance
|
||||
## volumes:
|
||||
## - ./redis:/data
|
||||
# volumes:
|
||||
# - ./redis:/data
|
||||
|
||||
mongo:
|
||||
db:
|
||||
restart: always
|
||||
image: mongo:4.1
|
||||
image: postgres:11.2-alpine
|
||||
networks:
|
||||
- internal_network
|
||||
environment:
|
||||
MONGO_INITDB_DATABASE: "misskey"
|
||||
env_file:
|
||||
- .config/docker.env
|
||||
volumes:
|
||||
- ./.config/mongo_initdb.js:/docker-entrypoint-initdb.d/mongo_initdb.js:ro
|
||||
### Uncomment to enable MongoDB persistance
|
||||
# - ./mongo:/data
|
||||
- ./db:/var/lib/postgresql/data
|
||||
|
||||
# es:
|
||||
# restart: always
|
||||
@ -42,9 +39,8 @@ services:
|
||||
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
# networks:
|
||||
# - internal_network
|
||||
#### Uncomment to enable ES persistence
|
||||
## volumes:
|
||||
## - ./elasticsearch:/usr/share/elasticsearch/data
|
||||
# volumes:
|
||||
# - ./elasticsearch:/usr/share/elasticsearch/data
|
||||
|
||||
networks:
|
||||
internal_network:
|
||||
|
@ -1,22 +0,0 @@
|
||||
Comment faire une sauvegarde de votre Misskey ?
|
||||
==========================
|
||||
|
||||
Assurez-vous d'avoir installé **mongodb-tools**.
|
||||
|
||||
---
|
||||
|
||||
Dans votre terminal :
|
||||
``` shell
|
||||
$ mongodump --archive=db-backup -u <VotreNomdUtilisateur> -p <VotreMotDePasse>
|
||||
```
|
||||
|
||||
Pour plus de détails, merci de consulter [la documentation de mongodump](https://docs.mongodb.com/manual/reference/program/mongodump/).
|
||||
|
||||
Restauration
|
||||
-------
|
||||
|
||||
``` shell
|
||||
$ mongorestore --archive=db-backup
|
||||
```
|
||||
|
||||
Pour plus de détails, merci de consulter [la documentation de mongorestore](https://docs.mongodb.com/manual/reference/program/mongorestore/).
|
@ -1,22 +0,0 @@
|
||||
How to backup your Misskey
|
||||
==========================
|
||||
|
||||
Make sure **mongodb-tools** installed.
|
||||
|
||||
---
|
||||
|
||||
In your shell:
|
||||
``` shell
|
||||
$ mongodump --archive=db-backup -u <YourUserName> -p <YourPassword>
|
||||
```
|
||||
|
||||
For details, please see [mongodump docs](https://docs.mongodb.com/manual/reference/program/mongodump/).
|
||||
|
||||
Restore
|
||||
-------
|
||||
|
||||
``` shell
|
||||
$ mongorestore --archive=db-backup
|
||||
```
|
||||
|
||||
For details, please see [mongorestore docs](https://docs.mongodb.com/manual/reference/program/mongorestore/).
|
@ -11,13 +11,41 @@ This guide describes how to install and setup Misskey with Docker.
|
||||
----------------------------------------------------------------
|
||||
1. `git clone -b master git://github.com/syuilo/misskey.git` Clone Misskey repository's master branch.
|
||||
2. `cd misskey` Move to misskey directory.
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` Checkout to the [latest release](https://github.com/syuilo/misskey/releases/latest) tag.
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` Checkout to the [latest release](https://github.com/syuilo/misskey/releases/latest) tag.
|
||||
|
||||
*2.* Configure Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
|
||||
2. `cp .config/mongo_initdb_example.js .config/mongo_initdb.js` Copy the `.config/mongo_initdb_example.js` and rename it to `mongo_initdb.js`.
|
||||
3. Edit `default.yml` and `mongo_initdb.js`.
|
||||
|
||||
Create configuration files with following:
|
||||
|
||||
```bash
|
||||
cd .config
|
||||
cp example.yml default.yml
|
||||
cp docker_example.env docker.env
|
||||
```
|
||||
|
||||
### `default.yml`
|
||||
|
||||
Edit this file the same as non-Docker environment.
|
||||
However hostname of Postgresql, Redis and Elasticsearch are not `localhost`, they are set in `docker-compose.yml`.
|
||||
The following is default hostname:
|
||||
|
||||
| Service | Hostname |
|
||||
|---------------|----------|
|
||||
| Postgresql | `db` |
|
||||
| Redis | `redis` |
|
||||
| Elasticsearch | `es` |
|
||||
|
||||
### `docker.env`
|
||||
|
||||
Configure Postgresql in this file.
|
||||
The minimum required settings are:
|
||||
|
||||
| name | Description |
|
||||
|---------------------|---------------|
|
||||
| `POSTGRES_PASSWORD` | Password |
|
||||
| `POSTGRES_USER` | Username |
|
||||
| `POSTGRES_DB` | Database name |
|
||||
|
||||
*3.* Configure Docker
|
||||
----------------------------------------------------------------
|
||||
@ -39,7 +67,7 @@ Just `docker-compose up -d`. GLHF!
|
||||
### How to update your Misskey server to the latest version
|
||||
1. `git fetch`
|
||||
2. `git stash`
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
4. `git stash pop`
|
||||
5. `docker-compose build`
|
||||
6. Check [ChangeLog](../CHANGELOG.md) for migration information
|
||||
|
@ -12,7 +12,7 @@ Ce guide explique comment installer et configurer Misskey avec Docker.
|
||||
----------------------------------------------------------------
|
||||
1. `git clone -b master git://github.com/syuilo/misskey.git` Clone le dépôt de Misskey sur la branche master.
|
||||
2. `cd misskey` Naviguez dans le dossier du dépôt.
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` Checkout sur le tag de la [dernière version](https://github.com/syuilo/misskey/releases/latest).
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` Checkout sur le tag de la [dernière version](https://github.com/syuilo/misskey/releases/latest).
|
||||
|
||||
*2.* Configuration de Misskey
|
||||
----------------------------------------------------------------
|
||||
@ -40,7 +40,7 @@ Utilisez la commande `docker-compose up -d`. GLHF!
|
||||
### How to update your Misskey server to the latest version
|
||||
1. `git fetch`
|
||||
2. `git stash`
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
4. `git stash pop`
|
||||
5. `docker-compose build`
|
||||
6. Consultez le [ChangeLog](../CHANGELOG.md) pour avoir les éventuelles informations de migration
|
||||
|
@ -11,13 +11,41 @@ Dockerを使ったMisskey構築方法
|
||||
----------------------------------------------------------------
|
||||
1. `git clone -b master git://github.com/syuilo/misskey.git` masterブランチからMisskeyレポジトリをクローン
|
||||
2. `cd misskey` misskeyディレクトリに移動
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
|
||||
|
||||
*2.* 設定ファイルを作成する
|
||||
*2.* 設定ファイルの作成と編集
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする
|
||||
2. `cp .config/mongo_initdb_example.js .config/mongo_initdb.js` `.config/mongo_initdb_example.js`をコピーし名前を`mongo_initdb.js`にする
|
||||
3. `default.yml`と`mongo_initdb.js`を編集する
|
||||
|
||||
下記コマンドで設定ファイルを作成してください。
|
||||
|
||||
```bash
|
||||
cd .config
|
||||
cp example.yml default.yml
|
||||
cp docker_example.env docker.env
|
||||
```
|
||||
|
||||
### `default.yml`の編集
|
||||
|
||||
非Docker環境と同じ様に編集してください。
|
||||
ただし、Postgresql、RedisとElasticsearchのホストは`localhost`ではなく、`docker-compose.yml`で設定されたサービス名になっています。
|
||||
標準設定では次の通りです。
|
||||
|
||||
| サービス | ホスト名 |
|
||||
|---------------|---------|
|
||||
| Postgresql |`db` |
|
||||
| Redis |`redis` |
|
||||
| Elasticsearch |`es` |
|
||||
|
||||
### `docker.env`の編集
|
||||
|
||||
このファイルはPostgresqlの設定を記述します。
|
||||
最低限記述する必要がある設定は次の通りです。
|
||||
|
||||
| 設定 | 内容 |
|
||||
|---------------------|--------------|
|
||||
| `POSTGRES_PASSWORD` | パスワード |
|
||||
| `POSTGRES_USER` | ユーザー名 |
|
||||
| `POSTGRES_DB` | データベース名 |
|
||||
|
||||
*3.* Dockerの設定
|
||||
----------------------------------------------------------------
|
||||
@ -39,7 +67,7 @@ Dockerを使ったMisskey構築方法
|
||||
### Misskeyを最新バージョンにアップデートする方法:
|
||||
1. `git fetch`
|
||||
2. `git stash`
|
||||
3. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
3. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
4. `git stash pop`
|
||||
5. `docker-compose build`
|
||||
6. [ChangeLog](../CHANGELOG.md)でマイグレーション情報を確認する
|
||||
|
@ -22,37 +22,28 @@ adduser --disabled-password --disabled-login misskey
|
||||
Please install and setup these softwares:
|
||||
|
||||
#### Dependencies :package:
|
||||
* **[Node.js](https://nodejs.org/en/)** >= 10.0.0
|
||||
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
||||
* **[Node.js](https://nodejs.org/en/)** >= 11.7.0
|
||||
* **[PostgreSQL](https://www.postgresql.org/)** >= 10
|
||||
* **[Redis](https://redis.io/)**
|
||||
|
||||
##### Optional
|
||||
* [Redis](https://redis.io/)
|
||||
* Redis is optional, but we strongly recommended to install it
|
||||
* [Elasticsearch](https://www.elastic.co/) - required to enable the search feature
|
||||
* [FFmpeg](https://www.ffmpeg.org/)
|
||||
|
||||
*3.* Setup MongoDB
|
||||
----------------------------------------------------------------
|
||||
As root:
|
||||
1. `mongo` Go to the mongo shell
|
||||
2. `use misskey` Use the misskey database
|
||||
3. `db.createUser( { user: "misskey", pwd: "<password>", roles: [ { role: "readWrite", db: "misskey" } ] } )` Create the misskey user.
|
||||
4. `exit` You're done!
|
||||
|
||||
*4.* Install Misskey
|
||||
*3.* Install Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `su - misskey` Connect to misskey user.
|
||||
2. `git clone -b master git://github.com/syuilo/misskey.git` Clone the misskey repo from master branch.
|
||||
3. `cd misskey` Navigate to misskey directory
|
||||
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` Checkout to the [latest release](https://github.com/syuilo/misskey/releases/latest)
|
||||
4. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` Checkout to the [latest release](https://github.com/syuilo/misskey/releases/latest)
|
||||
5. `npm install` Install misskey dependencies.
|
||||
|
||||
*5.* Configure Misskey
|
||||
*4.* Configure Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
|
||||
2. Edit `default.yml`
|
||||
|
||||
*6.* Build Misskey
|
||||
*5.* Build Misskey
|
||||
----------------------------------------------------------------
|
||||
|
||||
Build misskey with the following:
|
||||
@ -68,6 +59,12 @@ If you're still encountering errors about some modules, use node-gyp:
|
||||
3. `node-gyp build`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
|
||||
*6.* Init DB
|
||||
----------------------------------------------------------------
|
||||
``` shell
|
||||
npm run init
|
||||
```
|
||||
|
||||
*7.* That is it.
|
||||
----------------------------------------------------------------
|
||||
Well done! Now, you have an environment that run to Misskey.
|
||||
@ -107,7 +104,7 @@ You can check if the service is running with `systemctl status misskey`.
|
||||
|
||||
### How to update your Misskey server to the latest version
|
||||
1. `git fetch`
|
||||
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
2. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
3. `npm install`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
5. Check [ChangeLog](../CHANGELOG.md) for migration information
|
||||
|
@ -22,37 +22,28 @@ adduser --disabled-password --disabled-login misskey
|
||||
Installez les paquets suivants :
|
||||
|
||||
#### Dépendences :package:
|
||||
* **[Node.js](https://nodejs.org/en/)** >= 10.0.0
|
||||
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
||||
* **[Node.js](https://nodejs.org/en/)** >= 11.7.0
|
||||
* **[PostgreSQL](https://www.postgresql.org/)** >= 10
|
||||
* **[Redis](https://redis.io/)**
|
||||
|
||||
##### Optionnels
|
||||
* [Redis](https://redis.io/)
|
||||
* Redis est optionnel mais nous vous recommandons vivement de l'installer
|
||||
* [Elasticsearch](https://www.elastic.co/) - requis pour pouvoir activer la fonctionnalité de recherche
|
||||
* [FFmpeg](https://www.ffmpeg.org/)
|
||||
|
||||
*3.* Paramètrage de MongoDB
|
||||
----------------------------------------------------------------
|
||||
En root :
|
||||
1. `mongo` Ouvrez le shell mongo
|
||||
2. `use misskey` Utilisez la base de données misskey
|
||||
3. `db.createUser( { user: "misskey", pwd: "<password>", roles: [ { role: "readWrite", db: "misskey" } ] } )` Créez l'utilisateur misskey.
|
||||
4. `exit` Vous avez terminé !
|
||||
|
||||
*4.* Installation de Misskey
|
||||
*3.* Installation de Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `su - misskey` Basculez vers l'utilisateur misskey.
|
||||
2. `git clone -b master git://github.com/syuilo/misskey.git` Clonez la branche master du dépôt misskey.
|
||||
3. `cd misskey` Accédez au dossier misskey.
|
||||
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` Checkout sur le tag de la [version la plus récente](https://github.com/syuilo/misskey/releases/latest)
|
||||
4. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` Checkout sur le tag de la [version la plus récente](https://github.com/syuilo/misskey/releases/latest)
|
||||
5. `npm install` Installez les dépendances de misskey.
|
||||
|
||||
*5.* Création du fichier de configuration
|
||||
*4.* Création du fichier de configuration
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` Copiez le fichier `.config/example.yml` et renommez-le`default.yml`.
|
||||
2. Editez le fichier `default.yml`
|
||||
|
||||
*6.* Construction de Misskey
|
||||
*5.* Construction de Misskey
|
||||
----------------------------------------------------------------
|
||||
|
||||
Construisez Misskey comme ceci :
|
||||
@ -68,7 +59,7 @@ Si vous rencontrez des erreurs concernant certains modules, utilisez node-gyp:
|
||||
3. `node-gyp build`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
|
||||
*7.* C'est tout.
|
||||
*6.* C'est tout.
|
||||
----------------------------------------------------------------
|
||||
Excellent ! Maintenant, vous avez un environnement prêt pour lancer Misskey
|
||||
|
||||
@ -107,7 +98,7 @@ Vous pouvez vérifier si le service a démarré en utilisant la commande `system
|
||||
|
||||
### Méthode de mise à jour vers la plus récente version de Misskey
|
||||
1. `git fetch`
|
||||
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
2. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
3. `npm install`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
5. Consultez [ChangeLog](../CHANGELOG.md) pour les information de migration.
|
||||
|
@ -22,44 +22,29 @@ adduser --disabled-password --disabled-login misskey
|
||||
これらのソフトウェアをインストール・設定してください:
|
||||
|
||||
#### 依存関係 :package:
|
||||
* **[Node.js](https://nodejs.org/en/)** (10.0.0以上)
|
||||
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
|
||||
* **[Node.js](https://nodejs.org/en/)** (11.7.0以上)
|
||||
* **[PostgreSQL](https://www.postgresql.org/)** (10以上)
|
||||
* **[Redis](https://redis.io/)**
|
||||
|
||||
##### オプション
|
||||
* [Redis](https://redis.io/)
|
||||
* Redisはオプションですが、インストールすることを強く推奨します。
|
||||
* インストールしなくていいのは、あなたのインスタンスが自分専用のときだけとお考えください。
|
||||
* 具体的には、Redisをインストールしないと、次の事が出来なくなります:
|
||||
* Misskeyプロセスを複数起動しての負荷分散
|
||||
* レートリミット
|
||||
* ジョブキュー
|
||||
* Twitter連携
|
||||
* [Elasticsearch](https://www.elastic.co/)
|
||||
* 検索機能を有効にするためにはインストールが必要です。
|
||||
* [FFmpeg](https://www.ffmpeg.org/)
|
||||
|
||||
*3.* MongoDBの設定
|
||||
----------------------------------------------------------------
|
||||
ルートで:
|
||||
1. `mongo` mongoシェルを起動
|
||||
2. `use misskey` misskeyデータベースを使用
|
||||
3. `db.createUser( { user: "misskey", pwd: "<password>", roles: [ { role: "readWrite", db: "misskey" } ] } )` misskeyユーザーを作成
|
||||
4. `exit` mongoシェルを終了
|
||||
|
||||
*4.* Misskeyのインストール
|
||||
*3.* Misskeyのインストール
|
||||
----------------------------------------------------------------
|
||||
1. `su - misskey` misskeyユーザーを使用
|
||||
2. `git clone -b master git://github.com/syuilo/misskey.git` masterブランチからMisskeyレポジトリをクローン
|
||||
3. `cd misskey` misskeyディレクトリに移動
|
||||
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
|
||||
4. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
|
||||
5. `npm install` Misskeyの依存パッケージをインストール
|
||||
|
||||
*5.* 設定ファイルを作成する
|
||||
*4.* 設定ファイルを作成する
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする。
|
||||
2. `default.yml` を編集する。
|
||||
|
||||
*6.* Misskeyのビルド
|
||||
*5.* Misskeyのビルド
|
||||
----------------------------------------------------------------
|
||||
|
||||
次のコマンドでMisskeyをビルドしてください:
|
||||
@ -74,6 +59,12 @@ Debianをお使いであれば、`build-essential`パッケージをインスト
|
||||
3. `node-gyp build`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
|
||||
*6.* データベースを初期化
|
||||
----------------------------------------------------------------
|
||||
``` shell
|
||||
npm run init
|
||||
```
|
||||
|
||||
*7.* 以上です!
|
||||
----------------------------------------------------------------
|
||||
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
||||
@ -113,7 +104,7 @@ CentOSで1024以下のポートを使用してMisskeyを使用する場合は`Ex
|
||||
|
||||
### Misskeyを最新バージョンにアップデートする方法:
|
||||
1. `git fetch`
|
||||
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
2. `git checkout $(git tag -l | grep -Ev -- '-(rc|alpha)\.[0-9]+$' | sort -V | tail -n 1)`
|
||||
3. `npm install`
|
||||
4. `NODE_ENV=production npm run build`
|
||||
5. [ChangeLog](../CHANGELOG.md)でマイグレーション情報を確認する
|
||||
|
@ -120,7 +120,7 @@ gulp.task('copy:client', () =>
|
||||
])
|
||||
.pipe(isProduction ? (imagemin as any)() : gutil.noop())
|
||||
.pipe(rename(path => {
|
||||
path.dirname = path.dirname.replace('assets', '.');
|
||||
path.dirname = path.dirname!.replace('assets', '.');
|
||||
}))
|
||||
.pipe(gulp.dest('./built/client/assets/'))
|
||||
);
|
||||
|
@ -2,12 +2,12 @@
|
||||
meta:
|
||||
lang: "Čeština"
|
||||
common:
|
||||
misskey: "⭐ ve fediverse"
|
||||
about-title: "⭐ ve fediverse."
|
||||
about: "Děkujeme, že jste našli Misskey. Misskey je <b>decentralizovaná mikroblogovací platforma</b> zrozená na Zemi. Neboť existuje ve Fediverse (vesmíru, kde jsou organizovány různé sociální sítě), je vzájemně propojena s jinými sociálními sítěmi. Co takhle si chvilku odpočinout od ruchu a shonu města a ponořit se do nového internetu?"
|
||||
misskey: "⭐ ve fedivesmíru"
|
||||
about-title: "⭐ ve fedivesmíru."
|
||||
about: "Děkujeme, že jste našli Misskey. Misskey je <b>decentralizovaná mikroblogovací platforma</b> zrozená na Zemi. Neboť existuje ve fedivesmíru (vesmíru, kde jsou organizovány různé sociální sítě), je vzájemně propojena s jinými sociálními sítěmi. Co takhle si chvilku odpočinout od ruchu a shonu města a ponořit se do nového internetu?"
|
||||
intro:
|
||||
title: "Co je Misskey?"
|
||||
about: "Misskey je open-source <b>decentralizovaný mikroblogovací software</b>. Má sofistikované, zcela přizpůsobitelné uživatelské rozhraní, různé způsoby reagování na příspěvky, bezplatné úložiště souborů nabízející integrovaný management system, a další pokročilé vlastnosti. Misskey je navíc připojeno k systému sítí zvanému „fediverse“, který nám dovoluje komunikovat s uživateli na jiných sociálních sítí. Pokud například něco napíšete, nebude to posláno pouze uživatelů Misskey, ale také lidem na sítích Mastodon a Pleroma. Jen si představte, že planeta posílá jiné planetě rádiový signál, aby s ní komunikovala."
|
||||
about: "Misskey je open-source <b>decentralizovaný mikroblogovací software</b>. Má sofistikované, zcela přizpůsobitelné uživatelské rozhraní, různé způsoby reagování na příspěvky, bezplatné úložiště souborů nabízející integrovaný management system, a další pokročilé vlastnosti. Misskey je navíc připojeno k systému sítí zvanému „fedivesmír“ nebo „fediverse“, který nám dovoluje komunikovat s uživateli na jiných sociálních sítí. Pokud například něco napíšete, nebude to posláno pouze uživatelů Misskey, ale také lidem na sítích Mastodon a Pleroma. Jen si představte, že planeta posílá jiné planetě rádiový signál, aby s ní komunikovala."
|
||||
features: "Vlastnosti"
|
||||
rich-contents: "Příspěvky"
|
||||
rich-contents-desc: "Pouze napište svoje nápady, žhavá témata a cokoliv, co chcete sdílet. Můžete ozdobit svá slova, připojit vaše oblíbené obrázky, posílat soubory včetně videí či vytvořit hlasování – to je jen několik věcí, co můžete dělat s Misskey!"
|
||||
@ -131,7 +131,7 @@ common:
|
||||
other: "Ostatní"
|
||||
appearance: "Vzhled"
|
||||
behavior: "Chování"
|
||||
fetch-on-scroll: "Nekonečné rolování"
|
||||
fetch-on-scroll: "Nekonečné načítaní posuvem"
|
||||
fetch-on-scroll-desc: "Pokud budete rolovat dolů po stránce, automaticky bude načten další obsah."
|
||||
note-visibility: "Viditelnost příspěvku"
|
||||
default-note-visibility: "Výchozí viditelnost příspěvku"
|
||||
@ -300,10 +300,11 @@ common/views/pages/explore.vue:
|
||||
recently-updated-users: "Nedávno aktívni uživatelé"
|
||||
recently-registered-users: "Nedávno registrovaní uživatelé"
|
||||
popular-tags: "Populární tagy"
|
||||
federated: "Z fediverse"
|
||||
federated: "Z fedivesmíru"
|
||||
explore: "Prozkoumat {host}"
|
||||
common/views/components/url-preview.vue:
|
||||
enable-player: "Otevřít v přehrávači"
|
||||
disable-player: "Zavřít přehrávač"
|
||||
common/views/components/user-list.vue:
|
||||
no-users: "Žádní uživatelé"
|
||||
common/views/components/games/reversi/reversi.vue:
|
||||
@ -435,17 +436,23 @@ common/views/components/user-menu.vue:
|
||||
push-to-list: "Přidat do seznamu"
|
||||
select-list: "Vyberte seznam"
|
||||
report-abuse-reported: "Problém byl nahlášen administrátorovi. Děkujeme za Vaší kooperaci."
|
||||
silence: "Ztlumit"
|
||||
suspend: "Zmrazit"
|
||||
common/views/components/poll.vue:
|
||||
vote-count: "{} hlasů"
|
||||
vote: "Hlasovat"
|
||||
show-result: "Podívat se na výsledky"
|
||||
voted: "Už jste hlasovaly"
|
||||
closed: "Ukončeno"
|
||||
remaining-days: "zbývá {d} dnů, {h} hodin"
|
||||
remaining-hours: "zbývá {h} hodin, a {m} minut"
|
||||
remaining-minutes: "zbývá {m} minut, a {s} sekund"
|
||||
remaining-seconds: "zbývá {s} sekund"
|
||||
common/views/components/poll-editor.vue:
|
||||
no-only-one-choice: "Musíte vybrat alespoň dvě možnosti"
|
||||
destroy: "Zahodit dotazník"
|
||||
infinite: "Nekonečne"
|
||||
at: "Výběr data a času"
|
||||
day: "Ne"
|
||||
common/views/components/emoji-picker.vue:
|
||||
custom-emoji: "Emoji"
|
||||
@ -602,6 +609,8 @@ common/views/widgets/memo.vue:
|
||||
save: "Uložit"
|
||||
common/views/widgets/slideshow.vue:
|
||||
no-image: "V této složce nebyly nalezeny žádné fotky."
|
||||
common/views/pages/not-found.vue:
|
||||
page-not-found: "Stránka nenalezena"
|
||||
desktop:
|
||||
banner: "Baner"
|
||||
avatar-crop-title: "Vyberte část, která se zobrazí jako avatar"
|
||||
@ -686,10 +695,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Zrušit"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Zprávy:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Zprávy"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "Tento příspěvek je soukromý"
|
||||
deleted: "Tento příspěvek byl odstraněn"
|
||||
@ -795,7 +800,6 @@ desktop/views/components/timeline.vue:
|
||||
local: "Lokální"
|
||||
global: "Globální"
|
||||
mentions: "Zmínění"
|
||||
messages: "Zprávy"
|
||||
list: "Seznamy"
|
||||
hashtag: "Hashtag"
|
||||
add-list: "Přidat do seznamu"
|
||||
@ -835,7 +839,7 @@ admin/views/index.vue:
|
||||
emoji: "Emoji"
|
||||
moderators: "Moderátoři"
|
||||
users: "Uživatelé"
|
||||
federation: "Z fediversu"
|
||||
federation: "Federovaná"
|
||||
announcements: "Oznámení"
|
||||
hashtags: "Hashtagy"
|
||||
queue: "Fronta úloh"
|
||||
@ -847,9 +851,7 @@ admin/views/dashboard.vue:
|
||||
drive: "Disk"
|
||||
instances: "Instance"
|
||||
this-instance: "Tato instance"
|
||||
federated: "Z fediversu"
|
||||
admin/views/queue.vue:
|
||||
operation: "Akce"
|
||||
federated: "Federovaná"
|
||||
admin/views/abuse.vue:
|
||||
details: "Popis"
|
||||
remove-report: "Odstranit"
|
||||
@ -996,14 +998,15 @@ admin/views/announcements.vue:
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "Skryté tagy"
|
||||
admin/views/federation.vue:
|
||||
federation: "Z fediversu"
|
||||
instance: "Instance"
|
||||
host: "Hostitel"
|
||||
notes: "Poznámky"
|
||||
users: "Uživatelé"
|
||||
caught-at: "Vytvořeno"
|
||||
status: "Status"
|
||||
latest-request-received-at: "Poslední požadavek přijat"
|
||||
block: "Blokován"
|
||||
instances: "Instance"
|
||||
instances: "Federovaná"
|
||||
states:
|
||||
all: "Všechny"
|
||||
blocked: "Blokován"
|
||||
@ -1057,8 +1060,6 @@ desktop/views/pages/user/user.header.vue:
|
||||
posts: "Poznámky"
|
||||
month: "Po"
|
||||
day: "Ne"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Zprávy"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Oznámení"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1139,7 +1140,6 @@ mobile/views/pages/home.vue:
|
||||
local: "Lokální"
|
||||
global: "Globální"
|
||||
mentions: "Zmínění"
|
||||
messages: "Zprávy"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "Nebyly nalezeny žádné příspěvky s \"{q}\"."
|
||||
mobile/views/pages/widgets.vue:
|
||||
|
@ -445,10 +445,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Abbrechen"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Nachrichten:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Nachrichten"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "Dieser Post ist privat"
|
||||
deleted: "Dieser Beitrag wurde entfernt"
|
||||
@ -534,7 +530,6 @@ desktop/views/components/timeline.vue:
|
||||
home: "Home"
|
||||
local: "Lokal"
|
||||
global: "Global"
|
||||
messages: "Nachrichten"
|
||||
list: "Listen"
|
||||
desktop/views/components/ui.header.account.vue:
|
||||
profile: "Dein Profil"
|
||||
@ -600,8 +595,6 @@ desktop/views/pages/user/user.photos.vue:
|
||||
desktop/views/pages/user/user.header.vue:
|
||||
month: "Mo"
|
||||
day: "So"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Nachrichten"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Benachrichtigungen"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -647,7 +640,6 @@ mobile/views/pages/home.vue:
|
||||
home: "Home"
|
||||
local: "Lokal"
|
||||
global: "Global"
|
||||
messages: "Nachrichten"
|
||||
mobile/views/pages/widgets.vue:
|
||||
add-widget: "Hinzufügen"
|
||||
customization-tips: "Anpassung-Tipps"
|
||||
|
@ -169,9 +169,9 @@ common:
|
||||
deck-column-align-flexible: "Flexible"
|
||||
deck-column-width: "Deck column width"
|
||||
deck-column-width-narrow: "Narrow"
|
||||
deck-column-width-narrower: "Somewhat narrow"
|
||||
deck-column-width-narrower: "Narrower"
|
||||
deck-column-width-normal: "Regular"
|
||||
deck-column-width-wider: "Somewhat wide"
|
||||
deck-column-width-wider: "Slightly wide"
|
||||
deck-column-width-wide: "Wide"
|
||||
use-shadow: "Use shadows in the UI"
|
||||
rounded-corners: "Round the corners of the UI"
|
||||
@ -224,7 +224,7 @@ common:
|
||||
delete: "Delete"
|
||||
loading: "Loading"
|
||||
ok: "Confirm"
|
||||
cancel: "Exit"
|
||||
cancel: "Cancel"
|
||||
update-available-title: "Update available"
|
||||
update-available: "A new version of Misskey is now available({newer}, the current version is {current}). Reload the page to apply updates."
|
||||
my-token-regenerated: "Your token has been regenerated, so you will be signed out."
|
||||
@ -483,8 +483,8 @@ common/views/components/user-menu.vue:
|
||||
report-abuse: "Report abuse"
|
||||
report-abuse-detail: "What kind of nuisance did you encounter?"
|
||||
report-abuse-reported: "The issue has been reported to the administrator. Your cooperation is much appreciated."
|
||||
silence: "Mute"
|
||||
unsilence: "Unmute"
|
||||
silence: "Silence"
|
||||
unsilence: "Unsilence"
|
||||
suspend: "Suspend"
|
||||
unsuspend: "Unsuspend"
|
||||
common/views/components/poll.vue:
|
||||
@ -839,10 +839,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Cancel"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Messages:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Messaging"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "Post is private"
|
||||
deleted: "Post has been removed"
|
||||
@ -992,7 +988,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
mentions: "Mentions"
|
||||
messages: "Messages"
|
||||
messages: "Direct posts"
|
||||
list: "Lists"
|
||||
hashtag: "Hashtag"
|
||||
add-tag-timeline: "Add hashtag cloud"
|
||||
@ -1057,7 +1053,7 @@ admin/views/dashboard.vue:
|
||||
this-instance: "This instance"
|
||||
federated: "Federated"
|
||||
admin/views/queue.vue:
|
||||
operation: "Action(s)"
|
||||
title: "Queue"
|
||||
remove-all-jobs: "Clear all queued jobs"
|
||||
admin/views/abuse.vue:
|
||||
title: "Abuse"
|
||||
@ -1113,6 +1109,8 @@ admin/views/instance.vue:
|
||||
disable-local-timeline: "Disable the Local Timeline"
|
||||
disable-global-timeline: "Disable global timeline"
|
||||
disabling-timelines-info: "Even if you disable these timelines, the administrator as well as moderators can use them continually."
|
||||
enable-emoji-reaction: "Enable pictograms for reactions"
|
||||
use-star-for-reaction-fallback: "Use the star as fallback for unknown reaction"
|
||||
invite: "Invite"
|
||||
save: "Save"
|
||||
saved: "Saved"
|
||||
@ -1201,8 +1199,8 @@ admin/views/users.vue:
|
||||
unsuspend: "Unsuspend"
|
||||
unsuspend-confirm: "Are you sure you want to unsuspend this account?"
|
||||
unsuspended: "The user has successfully unsuspended."
|
||||
make-silence: "Mute"
|
||||
unmake-silence: "Unmute"
|
||||
make-silence: "Silence"
|
||||
unmake-silence: "Unsilence"
|
||||
verify: "Verify account"
|
||||
verify-confirm: "Do you want this to be a verified account?"
|
||||
verified: "The account is now being verified"
|
||||
@ -1275,12 +1273,13 @@ admin/views/announcements.vue:
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "Hidden Tags"
|
||||
admin/views/federation.vue:
|
||||
federation: "Federation"
|
||||
instance: "Instance"
|
||||
host: "Host"
|
||||
notes: "Notes"
|
||||
users: "Users"
|
||||
following: "Following"
|
||||
followers: "Followers"
|
||||
caught-at: "Created at"
|
||||
status: "Statuses"
|
||||
latest-request-sent-at: "Time of last request sent"
|
||||
latest-request-received-at: "Last request received at"
|
||||
@ -1289,7 +1288,7 @@ admin/views/federation.vue:
|
||||
block: "Block"
|
||||
marked-as-closed: "Marked as closed"
|
||||
lookup: "Look up"
|
||||
instances: "Instances"
|
||||
instances: "Federated"
|
||||
instance-not-registered: "The instance has not been discovered"
|
||||
sort: "Sort by"
|
||||
sorts:
|
||||
@ -1386,8 +1385,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-replies: "Posts and replies"
|
||||
with-media: "Media"
|
||||
my-posts: "My posts"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Messaging"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Notifications"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1509,7 +1506,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
mentions: "Mentions"
|
||||
messages: "Messages"
|
||||
messages: "Direct posts"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "No posts contains \"{q}\" found."
|
||||
mobile/views/pages/widgets.vue:
|
||||
|
@ -595,10 +595,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Cancelar"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Mensajes:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Mensajes"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "Esta publicación es privada"
|
||||
deleted: "Esta publicación ha sido removida"
|
||||
@ -714,7 +710,6 @@ desktop/views/components/timeline.vue:
|
||||
local: "Local"
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
messages: "Mensajes"
|
||||
list: "Listas"
|
||||
hashtag: "Hashtags"
|
||||
list-name: "Nombre de lista"
|
||||
@ -815,11 +810,11 @@ admin/views/announcements.vue:
|
||||
remove: "eliminar"
|
||||
add: "Agregar"
|
||||
admin/views/federation.vue:
|
||||
instance: "Instancia"
|
||||
host: "Host"
|
||||
following: "Siguiendo"
|
||||
status: "Estado"
|
||||
block: "Bloquear"
|
||||
instances: "Instancia"
|
||||
states:
|
||||
all: "Todo"
|
||||
blocked: "Bloquear"
|
||||
@ -841,8 +836,6 @@ desktop/views/pages/user/user.photos.vue:
|
||||
desktop/views/pages/user/user.header.vue:
|
||||
month: "lunes"
|
||||
day: "domingo"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Mensajes"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Notificaciones"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -907,7 +900,6 @@ mobile/views/pages/home.vue:
|
||||
local: "Local"
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
messages: "Mensajes"
|
||||
mobile/views/pages/widgets.vue:
|
||||
dashboard: "Panel de control"
|
||||
add-widget: "Agregar"
|
||||
|
@ -29,6 +29,10 @@ common:
|
||||
2fa: "Authentification à deux facteurs"
|
||||
customize-home: "Personnaliser la disposition de votre accueil"
|
||||
featured-notes: "Les notes mises en avant"
|
||||
dark-mode: "Mode nuit"
|
||||
signin: "Se connecter"
|
||||
signup: "S'enregistrer"
|
||||
signout: "Se déconnecter"
|
||||
got-it: "J’ai compris !"
|
||||
customization-tips:
|
||||
title: "Conseils de personnalisation"
|
||||
@ -111,17 +115,54 @@ common:
|
||||
d: "Désirez-vous publier quelques mots ?"
|
||||
e: "Écrivez ici"
|
||||
f: "En attente de vos écrits"
|
||||
settings: "Paramètres"
|
||||
_settings:
|
||||
profile: "Votre profil"
|
||||
notification: "Notifications"
|
||||
apps: "Applications"
|
||||
tags: "Hashtags"
|
||||
blocking: "En cours blocage"
|
||||
security: "Sécurité"
|
||||
signin: "Historique des connexions"
|
||||
password: "Mot de passe"
|
||||
other: "Avancé"
|
||||
appearance: "Apparence"
|
||||
behavior: "Comportement"
|
||||
fetch-on-scroll: "Chargement automatique lors du défilement"
|
||||
note-visibility: "Visibilité de la publication"
|
||||
default-note-visibility: "Visibilité par défaut"
|
||||
remember-note-visibility: "Se souvenir du mode de visibilité de la publication"
|
||||
web-search-engine: "Moteur de recherche Web"
|
||||
web-search-engine-desc: "Exemple : https://www.google.com/?#q={{query}}"
|
||||
show-via: "Afficher via"
|
||||
reduce-motion: "Réduire les animations dans l’interface utilisateur"
|
||||
this-setting-is-this-device-only: "Uniquement sur cet appareil"
|
||||
use-os-default-emojis: "Utiliser les émojis standards du système"
|
||||
line-width: "Epaisseur du trait"
|
||||
line-width-thin: "Fine"
|
||||
line-width-normal: "Normale"
|
||||
line-width-thick: "Épaisse"
|
||||
font-size: "Taille du texte"
|
||||
font-size-medium: "Normale"
|
||||
font-size-x-large: "Large"
|
||||
deck-column-align-center: "Centrer"
|
||||
deck-column-align-left: "À gauche"
|
||||
deck-column-align-flexible: "Flexible"
|
||||
deck-column-width: "Largeur des colonnes du Deck"
|
||||
deck-column-width-normal: "Normale"
|
||||
timeline: "Fil d’actualité"
|
||||
navbar-position-top: "en haut"
|
||||
navbar-position-left: "À gauche"
|
||||
navbar-position-right: "à droite"
|
||||
post-style-standard: "Standard"
|
||||
post-style-smart: "Intelligent"
|
||||
notification-position: "Afficher les notifications"
|
||||
notification-position-bottom: "en bas"
|
||||
notification-position-top: "en haut"
|
||||
search: "Recherche"
|
||||
delete: "Supprimer"
|
||||
loading: "Chargement en cours …"
|
||||
cancel: "Quitter"
|
||||
update-available-title: "Mise à jour disponible"
|
||||
update-available: "Une nouvelle version de Misskey est disponible ({newer}, version actuelle: {current}). Veuillez recharger la page pour appliquer la mise à jour."
|
||||
my-token-regenerated: "Votre jeton vient d’être généré, vous allez maintenant être déconnecté."
|
||||
@ -392,6 +433,10 @@ common/views/components/poll-editor.vue:
|
||||
remove: "Supprimer ce choix"
|
||||
add: "+ Ajouter un choix"
|
||||
destroy: "Annuler ce sondage"
|
||||
interval: "Durée"
|
||||
unit: "Unité"
|
||||
second: "secondes"
|
||||
minute: "Minutes"
|
||||
day: "D"
|
||||
common/views/components/reaction-picker.vue:
|
||||
choose-reaction: "Choisissez votre réaction"
|
||||
@ -710,10 +755,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Annuler"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Messages :"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Messagerie"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "cette publication est privée"
|
||||
deleted: "cette publication a été supprimée"
|
||||
@ -863,7 +904,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
mentions: "Mentions"
|
||||
messages: "Messages"
|
||||
messages: "Messages directs"
|
||||
list: "Listes"
|
||||
hashtag: "Hashtag"
|
||||
add-tag-timeline: "Ajouter un fil de hashtags"
|
||||
@ -927,7 +968,7 @@ admin/views/dashboard.vue:
|
||||
this-instance: "Cette instance"
|
||||
federated: "Fédérées"
|
||||
admin/views/queue.vue:
|
||||
operation: "Action(s)"
|
||||
title: "File d'attente"
|
||||
remove-all-jobs: "Enlever toutes les tâches en attente"
|
||||
admin/views/abuse.vue:
|
||||
title: "Abus"
|
||||
@ -1143,12 +1184,13 @@ admin/views/announcements.vue:
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "Tags cachés"
|
||||
admin/views/federation.vue:
|
||||
federation: "Fédération"
|
||||
instance: "Instance"
|
||||
host: "Hôte"
|
||||
notes: "Notes"
|
||||
users: "Utilisateur·rice·s"
|
||||
following: "Abonnements"
|
||||
followers: "Abonné·e·s"
|
||||
caught-at: "Créé le"
|
||||
status: "Statuts"
|
||||
latest-request-sent-at: "Dernière requête envoyée"
|
||||
latest-request-received-at: "Dernière requête reçue"
|
||||
@ -1156,7 +1198,7 @@ admin/views/federation.vue:
|
||||
block: "Bloquer"
|
||||
marked-as-closed: "Marquées comme fermées"
|
||||
lookup: "Recherche"
|
||||
instances: "Instances"
|
||||
instances: "Fédérées"
|
||||
sort: "Trier par"
|
||||
sorts:
|
||||
caughtAtAsc: "Date d’inscription (Ascendant)"
|
||||
@ -1243,8 +1285,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-replies: "Publications et réponses"
|
||||
with-media: "Média"
|
||||
my-posts: "Mes Messages"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Messagerie"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Notifications"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1365,7 +1405,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
mentions: "Mentions"
|
||||
messages: "Messages"
|
||||
messages: "Messages directs"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "Aucune publication ayant pour hashtag « {q} » n’a été trouvée."
|
||||
mobile/views/pages/widgets.vue:
|
||||
|
@ -14,6 +14,7 @@ const merge = (...args) => args.reduce((a, c) => ({
|
||||
}), {});
|
||||
|
||||
const languages = [
|
||||
'cs-CZ',
|
||||
'de-DE',
|
||||
'en-US',
|
||||
'es-ES',
|
||||
@ -24,9 +25,11 @@ const languages = [
|
||||
'nl-NL',
|
||||
'pl-PL',
|
||||
'zh-CN',
|
||||
'zh-TW',
|
||||
];
|
||||
|
||||
const primaries = {
|
||||
'en': 'US',
|
||||
'ja': 'JP',
|
||||
'zh': 'CN',
|
||||
};
|
||||
|
@ -73,6 +73,12 @@ common:
|
||||
followers: "フォロワー"
|
||||
favorites: "お気に入り"
|
||||
|
||||
permissions:
|
||||
'read:account': "アカウントの情報を見る"
|
||||
'write:account': "アカウントの情報を変更する"
|
||||
'read:drive': "ドライブを見る"
|
||||
'write:drive': "ドライブを操作する"
|
||||
|
||||
empty-timeline-info:
|
||||
follow-users-to-make-your-timeline: "ユーザーをフォローすると投稿がタイムラインに表示されます。"
|
||||
explore: "ユーザーを探索する"
|
||||
@ -299,15 +305,6 @@ common:
|
||||
auth/views/form.vue:
|
||||
share-access: "<i>{name}</i>があなたのアカウントにアクセスすることを許可しますか?"
|
||||
permission-ask: "このアプリは次の権限を要求しています:"
|
||||
account-read: "アカウントの情報を見る。"
|
||||
account-write: "アカウントの情報を操作する。"
|
||||
note-write: "投稿する。"
|
||||
like-write: "いいねしたりいいね解除する。"
|
||||
following-write: "フォローしたりフォロー解除する。"
|
||||
drive-read: "ドライブを見る。"
|
||||
drive-write: "ドライブを操作する。"
|
||||
notification-read: "通知を見る。"
|
||||
notification-write: "通知を操作する。"
|
||||
cancel: "キャンセル"
|
||||
accept: "アクセスを許可"
|
||||
|
||||
@ -925,12 +922,6 @@ desktop/views/input-dialog.vue:
|
||||
cancel: "キャンセル"
|
||||
ok: "決定"
|
||||
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "メッセージ:"
|
||||
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "メッセージ"
|
||||
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "この投稿は非公開です"
|
||||
deleted: "この投稿は削除されました"
|
||||
@ -1091,16 +1082,13 @@ desktop/views/components/settings.tags.vue:
|
||||
add: "追加"
|
||||
save: "保存"
|
||||
|
||||
desktop/views/components/taskmanager.vue:
|
||||
title: "タスクマネージャ"
|
||||
|
||||
desktop/views/components/timeline.vue:
|
||||
home: "ホーム"
|
||||
local: "ローカル"
|
||||
hybrid: "ソーシャル"
|
||||
global: "グローバル"
|
||||
mentions: "あなた宛て"
|
||||
messages: "メッセージ"
|
||||
messages: "ダイレクト投稿"
|
||||
list: "リスト"
|
||||
hashtag: "ハッシュタグ"
|
||||
add-tag-timeline: "ハッシュタグを追加"
|
||||
@ -1238,15 +1226,12 @@ admin/views/instance.vue:
|
||||
disable-local-timeline: "ローカルタイムラインを無効にする"
|
||||
disable-global-timeline: "グローバルタイムラインを無効にする"
|
||||
disabling-timelines-info: "これらのタイムラインを無効にしても、管理者およびモデレーターは引き続き利用できます。"
|
||||
enable-emoji-reaction: "リアクションに絵文字を使えるようにする"
|
||||
use-star-for-reaction-fallback: "不明なリアクションのフォールバックに star を使う"
|
||||
invite: "招待"
|
||||
save: "保存"
|
||||
saved: "保存しました"
|
||||
user-recommendation-config: "おすすめユーザー"
|
||||
enable-external-user-recommendation: "外部ユーザーレコメンデーションを有効にする"
|
||||
external-user-recommendation-engine: "エンジン"
|
||||
external-user-recommendation-engine-desc: "例: https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}"
|
||||
external-user-recommendation-timeout: "タイムアウト"
|
||||
external-user-recommendation-timeout-desc: "ミリ秒単位 (例: 300000)"
|
||||
email-config: "メールサーバーの設定"
|
||||
email-config-info: "メールアドレス確認やパスワードリセットの際に使われます。"
|
||||
enable-email: "メール配信を有効にする"
|
||||
@ -1408,12 +1393,13 @@ admin/views/hashtags.vue:
|
||||
hided-tags: "Hidden Tags"
|
||||
|
||||
admin/views/federation.vue:
|
||||
federation: "連合"
|
||||
instance: "インスタンス"
|
||||
host: "ホスト"
|
||||
notes: "投稿"
|
||||
users: "ユーザー"
|
||||
following: "フォロー中"
|
||||
followers: "フォロワー"
|
||||
caught-at: "登録日時"
|
||||
status: "ステータス"
|
||||
latest-request-sent-at: "直近のリクエスト送信"
|
||||
latest-request-received-at: "直近のリクエスト受信"
|
||||
@ -1422,7 +1408,7 @@ admin/views/federation.vue:
|
||||
block: "ブロック"
|
||||
marked-as-closed: "閉鎖されているとマーク"
|
||||
lookup: "照会"
|
||||
instances: "インスタンス"
|
||||
instances: "連合"
|
||||
instance-not-registered: "そのインスタンスは登録されていません"
|
||||
sort: "ソート"
|
||||
sorts:
|
||||
@ -1532,9 +1518,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-media: "メディア"
|
||||
my-posts: "私の投稿"
|
||||
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "メッセージ"
|
||||
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "通知"
|
||||
|
||||
@ -1682,7 +1665,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "ソーシャル"
|
||||
global: "グローバル"
|
||||
mentions: "あなた宛て"
|
||||
messages: "メッセージ"
|
||||
messages: "ダイレクト投稿"
|
||||
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "ハッシュタグ「{q}」が付けられた投稿は見つかりませんでした。"
|
||||
@ -1829,12 +1812,3 @@ dev/views/new-app.vue:
|
||||
authority: "権限"
|
||||
authority-desc: "ここで要求した機能だけがAPIからアクセスできます。"
|
||||
authority-warning: "アプリ作成後も変更できますが、新たな権限を付与する場合、その時点で関連付けられているユーザーキーはすべて無効になります。"
|
||||
account-read: "アカウントの情報を見る。"
|
||||
account-write: "アカウントの情報を操作する。"
|
||||
note-write: "投稿する。"
|
||||
reaction-write: "リアクションしたりリアクションをキャンセルする。"
|
||||
following-write: "フォローしたりフォロー解除する。"
|
||||
drive-read: "ドライブを見る。"
|
||||
drive-write: "ドライブを操作する。"
|
||||
notification-read: "通知を見る。"
|
||||
notification-write: "通知を操作する。"
|
||||
|
@ -652,10 +652,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "やめとくわ"
|
||||
ok: "これや!"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "メッセージ:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "メッセージ"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "この投稿は見せられへんわ"
|
||||
deleted: "この投稿なんか無くなってもうたわ"
|
||||
@ -799,7 +795,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "ソーシャル"
|
||||
global: "グローバル"
|
||||
mentions: "あんた宛て"
|
||||
messages: "メッセージ"
|
||||
messages: "ダイレクト投稿"
|
||||
list: "リスト"
|
||||
hashtag: "ハッシュタグ"
|
||||
add-tag-timeline: "ハッシュタグ増やす"
|
||||
@ -860,8 +856,6 @@ admin/views/dashboard.vue:
|
||||
instances: "インスタンス"
|
||||
this-instance: "ワイのインスタンス"
|
||||
federated: "連合"
|
||||
admin/views/queue.vue:
|
||||
operation: "操作"
|
||||
admin/views/abuse.vue:
|
||||
details: "もっと"
|
||||
remove-report: "削除"
|
||||
@ -990,7 +984,7 @@ admin/views/announcements.vue:
|
||||
add: "増やす"
|
||||
saved: "保存したで!"
|
||||
admin/views/federation.vue:
|
||||
federation: "連合"
|
||||
instance: "インスタンス"
|
||||
host: "ホスト"
|
||||
notes: "投稿"
|
||||
users: "ユーザー"
|
||||
@ -999,7 +993,7 @@ admin/views/federation.vue:
|
||||
status: "ステータス"
|
||||
block: "ブロック"
|
||||
lookup: "照会"
|
||||
instances: "インスタンス"
|
||||
instances: "連合"
|
||||
states:
|
||||
all: "すべて"
|
||||
blocked: "ブロック"
|
||||
@ -1063,8 +1057,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
default: "投稿"
|
||||
with-replies: "投稿と返信"
|
||||
with-media: "メディア"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "メッセージ"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "通知"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1185,7 +1177,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "ソーシャル"
|
||||
global: "グローバル"
|
||||
mentions: "あんた宛て"
|
||||
messages: "メッセージ"
|
||||
messages: "ダイレクト投稿"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "ハッシュタグ「{q}」が付けられた投稿はあらへんかった。"
|
||||
mobile/views/pages/widgets.vue:
|
||||
|
@ -7,7 +7,7 @@ common:
|
||||
about: "Misskey를 찾아주셔서 감사합니다. Misskey는 지구에서 태어난 <b>분산 마이크로 블로그 SNS </b> 입니다. Fediverse(다양한 SNS로 구성되는 우주)에 존재하는 다른 SNS와 상호 연결되어 있습니다. 잠시 도시의 번잡함에서 벗어나 새로운 인터넷에 다이브 해 보지 않겠습니까."
|
||||
intro:
|
||||
title: "Misskey란?"
|
||||
about: "Misskey는 오픈소스 <b>분산형 마이크로블로그 SNS</b>입니다. 다양하고 폭넓게 커스터마이징할 수 있는 UI, 글에 대한 반응, 파일을 관리할 수 있는 드라이브 등의 선진적인 기능을 갖추고 있습니다. 더하여 Fediverse라고 부르는 네트워크에 연결할 수 있어 다른 SNS와도 주고받을 수 있습니다. 예를 들자면, 당신이 무언가를 게시하면, 해당 게시물은 Misskey 뿐만 아니라 다른 SNS에도 전해집니다. 살짝 어떤 행성에서 다른 행성으로 전파를 발신하고 있는 모습을 상상해주세요."
|
||||
about: "Misskey는 오픈소스 <b>분산형 마이크로블로그 SNS</b>입니다. 다양하고 폭넓게 커스터마이징할 수 있는 UI, 글에 대한 리액션, 파일을 관리할 수 있는 드라이브 등의 선진적인 기능을 갖추고 있습니다. 더하여 Fediverse라고 부르는 네트워크에 연결할 수 있어 다른 SNS와도 주고받을 수 있습니다. 예를 들자면, 당신이 무언가를 게시하면, 해당 게시물은 Misskey 뿐만 아니라 다른 SNS에도 전해집니다. 살짝 어떤 행성에서 다른 행성으로 전파를 발신하고 있는 모습을 상상해주세요."
|
||||
features: "특징"
|
||||
rich-contents: "글"
|
||||
rich-contents-desc: "자신의 생각, 화제의 사건, 모두와 공유하고 싶은 것을 올려주세요. 필요한 경우 다양한 스타일을 사용하여 글을 장식하거나 마음에 드는 이미지, 영상 등의 파일이나 투표를 올리는 것도 가능합니다."
|
||||
@ -314,6 +314,7 @@ common/views/pages/explore.vue:
|
||||
users-info: "현재 {users} 사용자가 등록되어 있습니다"
|
||||
common/views/components/url-preview.vue:
|
||||
enable-player: "플레이어 열기"
|
||||
disable-player: "플레이어 닫기"
|
||||
common/views/components/user-list.vue:
|
||||
no-users: "사용자가 없습니다"
|
||||
common/views/components/games/reversi/reversi.vue:
|
||||
@ -519,7 +520,7 @@ common/views/components/poll-editor.vue:
|
||||
hour: "시간"
|
||||
day: "일"
|
||||
common/views/components/reaction-picker.vue:
|
||||
choose-reaction: "반응 선택"
|
||||
choose-reaction: "리액션 선택"
|
||||
common/views/components/emoji-picker.vue:
|
||||
custom-emoji: "커스텀 이모지"
|
||||
people: "사람들"
|
||||
@ -838,10 +839,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "취소"
|
||||
ok: "확인"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "메시지:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "메시지"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "이 글은 비공개입니다"
|
||||
deleted: "이 글은 삭제되었습니다"
|
||||
@ -991,7 +988,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "소셜"
|
||||
global: "글로벌"
|
||||
mentions: "받은 멘션"
|
||||
messages: "메시지"
|
||||
messages: "다이렉트 게시글"
|
||||
list: "리스트"
|
||||
hashtag: "해시태그"
|
||||
add-tag-timeline: "해시태그 추가"
|
||||
@ -1056,7 +1053,7 @@ admin/views/dashboard.vue:
|
||||
this-instance: "이 인스턴스"
|
||||
federated: "연합"
|
||||
admin/views/queue.vue:
|
||||
operation: "동작"
|
||||
title: "큐"
|
||||
remove-all-jobs: "모든 작업 제거"
|
||||
admin/views/abuse.vue:
|
||||
title: "스팸 신고"
|
||||
@ -1112,6 +1109,8 @@ admin/views/instance.vue:
|
||||
disable-local-timeline: "로컬 타임라인 비활성화"
|
||||
disable-global-timeline: "글로벌 타임라인 비활성화"
|
||||
disabling-timelines-info: "이 타임라인들을 비활성화해도 관리자 및 모더레이터는 계속 사용할 수 있습니다."
|
||||
enable-emoji-reaction: "리액션에 이모지를 사용할 수 있게 함"
|
||||
use-star-for-reaction-fallback: "알 수 없는 리액션을 star로 대체하여 사용"
|
||||
invite: "초대"
|
||||
save: "저장"
|
||||
saved: "저장하였습니다"
|
||||
@ -1274,12 +1273,13 @@ admin/views/announcements.vue:
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "Hidden Tags"
|
||||
admin/views/federation.vue:
|
||||
federation: "연합"
|
||||
instance: "인스턴스"
|
||||
host: "호스트"
|
||||
notes: "글"
|
||||
users: "사용자"
|
||||
following: "팔로우 중"
|
||||
followers: "팔로워"
|
||||
caught-at: "등록 날짜"
|
||||
status: "상태"
|
||||
latest-request-sent-at: "마지막으로 요청을 전송한 시간"
|
||||
latest-request-received-at: "마지막으로 요청을 받은 시간"
|
||||
@ -1288,7 +1288,7 @@ admin/views/federation.vue:
|
||||
block: "차단"
|
||||
marked-as-closed: "폐쇄된 것으로 표시"
|
||||
lookup: "조회"
|
||||
instances: "인스턴스"
|
||||
instances: "연합"
|
||||
instance-not-registered: "해당 인스턴스가 등록되어 있지 않습니다"
|
||||
sort: "정렬"
|
||||
sorts:
|
||||
@ -1385,8 +1385,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-replies: "글과 답글"
|
||||
with-media: "미디어"
|
||||
my-posts: "내 글"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "메시지"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "알림"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1508,7 +1506,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "소셜"
|
||||
global: "글로벌"
|
||||
mentions: "받은 멘션"
|
||||
messages: "메시지"
|
||||
messages: "다이렉트 게시글"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "해시태그 \"{q}\"가 붙은 글을 찾을 수 없습니다."
|
||||
mobile/views/pages/widgets.vue:
|
||||
|
@ -307,10 +307,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Annuleren"
|
||||
ok: "Oké"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Berichten:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Gesprekken"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "(dit bericht is privé)"
|
||||
location: "Locatie"
|
||||
@ -394,7 +390,6 @@ desktop/views/components/timeline.vue:
|
||||
home: "Startpagina"
|
||||
local: "Lokaal"
|
||||
global: "Algemeen"
|
||||
messages: "Gesprekken"
|
||||
list: "Lijsten"
|
||||
desktop/views/components/ui.header.account.vue:
|
||||
profile: "Je profiel"
|
||||
@ -497,8 +492,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
default: "Berichten"
|
||||
with-replies: "Berichten en antwoorden"
|
||||
with-media: "Media"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Gesprekken"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Meldingen"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -571,7 +564,6 @@ mobile/views/pages/home.vue:
|
||||
home: "Startpagina"
|
||||
local: "Lokaal"
|
||||
global: "Algemeen"
|
||||
messages: "Gesprekken"
|
||||
mobile/views/pages/widgets.vue:
|
||||
add-widget: "Toevoegen"
|
||||
mobile/views/pages/widgets/activity.vue:
|
||||
|
@ -244,8 +244,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Avbryt"
|
||||
ok: "Ok"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Samtaler"
|
||||
desktop/views/components/note-detail.vue:
|
||||
location: "Lokasjon"
|
||||
desktop/views/components/note.vue:
|
||||
@ -290,7 +288,6 @@ desktop/views/components/timeline.vue:
|
||||
home: "Hjem"
|
||||
local: "Lokalt"
|
||||
global: "Globalt"
|
||||
messages: "Samtaler"
|
||||
list: "Lister"
|
||||
list-name: "Liste navn"
|
||||
desktop/views/components/ui.header.vue:
|
||||
@ -394,8 +391,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
default: "Innlegg"
|
||||
with-replies: "Innlegg og svar"
|
||||
with-media: "Media"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Melding"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Notifikasjon"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -456,7 +451,6 @@ mobile/views/pages/home.vue:
|
||||
home: "Hjem"
|
||||
local: "Lokalt"
|
||||
global: "Globalt"
|
||||
messages: "Samtaler"
|
||||
mobile/views/pages/widgets.vue:
|
||||
add-widget: "Legg til"
|
||||
mobile/views/pages/received-follow-requests.vue:
|
||||
|
@ -121,12 +121,17 @@ common:
|
||||
other: "Inne"
|
||||
appearance: "Wygląd"
|
||||
behavior: "Zachowanie"
|
||||
fetch-on-scroll: "Automatycznie ładuj po przeciągnięciu w dół"
|
||||
note-visibility: "Widoczność wpisów"
|
||||
web-search-engine: "Wyszukiwarka internetowa"
|
||||
line-width: "Szerokości linii"
|
||||
line-width-thin: "Cienka"
|
||||
line-width-normal: "Normalna"
|
||||
line-width-thick: "Gruba"
|
||||
font-size: "Rozmiar tekstu"
|
||||
font-size-x-small: "Małe"
|
||||
font-size-medium: "Normalna"
|
||||
font-size-large: "Trochę duży"
|
||||
font-size-x-large: "Duży"
|
||||
deck-column-align-center: "Po środku"
|
||||
deck-column-align-left: "Z lewej"
|
||||
@ -137,7 +142,15 @@ common:
|
||||
deck-column-width-normal: "Normalna"
|
||||
deck-column-width-wider: "Trochę szerokie"
|
||||
deck-column-width-wide: "Szeroka"
|
||||
wallpaper: "Tapeta"
|
||||
choose-wallpaper: "Wybierz tapetę"
|
||||
timeline: "Oś czasu"
|
||||
sound: "Dźwięk"
|
||||
volume: "Głośność"
|
||||
test: "Test"
|
||||
update: "Aktualizacja Misskey"
|
||||
version: "Wersja:"
|
||||
do-update: "Sprawdź dostępność nowych aktualizacji"
|
||||
navbar-position-left: "Z lewej"
|
||||
search: "Szukaj"
|
||||
delete: "Usuń"
|
||||
@ -666,10 +679,6 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "Anuluj"
|
||||
ok: "OK"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "Wiadomości:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "Wiadomości"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "ten wpis jest prywatny"
|
||||
deleted: "ten wpis został usunięty"
|
||||
@ -804,7 +813,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "Społeczność"
|
||||
global: "Globalne"
|
||||
mentions: "Wspomnienia"
|
||||
messages: "Wiadomości"
|
||||
messages: "Bezpośrednie wpisy"
|
||||
list: "Listy"
|
||||
hashtag: "Hashtag"
|
||||
add-tag-timeline: "Dodaj hashtag"
|
||||
@ -936,13 +945,14 @@ admin/views/announcements.vue:
|
||||
are-you-sure: "Usunąć \"$1\"?"
|
||||
removed: "Usunięto"
|
||||
admin/views/federation.vue:
|
||||
instance: "Instancja"
|
||||
notes: "Wpis"
|
||||
users: "Użytkownicy"
|
||||
following: "Śledzisz"
|
||||
followers: "Śledzący"
|
||||
caught-at: "Utworzono"
|
||||
status: "Stan"
|
||||
block: "Zablokuj"
|
||||
instances: "Instancja"
|
||||
sort: "Sortuj"
|
||||
states:
|
||||
all: "Wszyscy"
|
||||
@ -997,8 +1007,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-replies: "Wpisy i odpowiedzi"
|
||||
with-media: "Multimedia"
|
||||
my-posts: "Moje wpisy"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "Wiadomości"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "Powiadomienia"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1114,7 +1122,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "Społeczność"
|
||||
global: "Globalne"
|
||||
mentions: "Wspomnienia"
|
||||
messages: "Wiadomości"
|
||||
messages: "Bezpośrednie wpisy"
|
||||
mobile/views/pages/widgets.vue:
|
||||
dashboard: "Kokpit"
|
||||
add-widget: "Dodaj"
|
||||
|
@ -314,6 +314,7 @@ common/views/pages/explore.vue:
|
||||
users-info: "当前有{users}个注册用户"
|
||||
common/views/components/url-preview.vue:
|
||||
enable-player: "打开播放器"
|
||||
disable-player: "关闭播放器"
|
||||
common/views/components/user-list.vue:
|
||||
no-users: "无用户"
|
||||
common/views/components/games/reversi/reversi.vue:
|
||||
@ -576,7 +577,7 @@ common/views/components/notification-settings.vue:
|
||||
mark-as-read-all-unread-notes: "将所有帖子标为已读"
|
||||
mark-as-read-all-talk-messages: "将所有对话标为已读"
|
||||
auto-watch: "自动查看帖子"
|
||||
auto-watch-desc: "自动接收有关您做出反应或回复的帖子的通知。"
|
||||
auto-watch-desc: "自动接收有关您做出回应或回复的帖子的通知。"
|
||||
common/views/components/integration-settings.vue:
|
||||
title: "服务合作"
|
||||
connect: "连接"
|
||||
@ -838,22 +839,18 @@ desktop/views/components/home.vue:
|
||||
desktop/views/input-dialog.vue:
|
||||
cancel: "取消"
|
||||
ok: "确定"
|
||||
desktop/views/components/messaging-room-window.vue:
|
||||
title: "信息:"
|
||||
desktop/views/components/messaging-window.vue:
|
||||
title: "正在聊天"
|
||||
desktop/views/components/note-detail.vue:
|
||||
private: "私密投稿"
|
||||
deleted: "投稿已删除"
|
||||
location: "位置信息"
|
||||
renote: "转发"
|
||||
add-reaction: "添加一个反应"
|
||||
undo-reaction: "取消反应"
|
||||
add-reaction: "回应"
|
||||
undo-reaction: "取消回应"
|
||||
desktop/views/components/note.vue:
|
||||
reply: "回复"
|
||||
renote: "Renote"
|
||||
add-reaction: "添加一个反应"
|
||||
undo-reaction: "取消反应"
|
||||
add-reaction: "回应"
|
||||
undo-reaction: "取消回应"
|
||||
detail: "详细信息"
|
||||
private: "这个投稿是私密的"
|
||||
deleted: "投稿已删除"
|
||||
@ -991,7 +988,7 @@ desktop/views/components/timeline.vue:
|
||||
hybrid: "社交"
|
||||
global: "全球"
|
||||
mentions: "提到的"
|
||||
messages: "信息"
|
||||
messages: "直接发布"
|
||||
list: "列表"
|
||||
hashtag: "标签"
|
||||
add-tag-timeline: "添加标签"
|
||||
@ -1056,7 +1053,7 @@ admin/views/dashboard.vue:
|
||||
this-instance: "此实例"
|
||||
federated: "联合"
|
||||
admin/views/queue.vue:
|
||||
operation: "操作"
|
||||
title: "队列"
|
||||
remove-all-jobs: "清除所有作业"
|
||||
admin/views/abuse.vue:
|
||||
title: "举报垃圾信息"
|
||||
@ -1112,6 +1109,8 @@ admin/views/instance.vue:
|
||||
disable-local-timeline: "停用本地时间线功能"
|
||||
disable-global-timeline: "禁用全局时间线"
|
||||
disabling-timelines-info: "即使禁用时间线,管理员和版主仍然可用。"
|
||||
enable-emoji-reaction: "在回应上使用表情符号"
|
||||
use-star-for-reaction-fallback: "使用默认的star来表示未知的回应"
|
||||
invite: "邀请"
|
||||
save: "保存"
|
||||
saved: "保存完毕"
|
||||
@ -1274,12 +1273,13 @@ admin/views/announcements.vue:
|
||||
admin/views/hashtags.vue:
|
||||
hided-tags: "隐藏标签"
|
||||
admin/views/federation.vue:
|
||||
federation: "联合"
|
||||
instance: "例"
|
||||
host: "主机名"
|
||||
notes: "帖子"
|
||||
users: "用户"
|
||||
following: "正在关注"
|
||||
followers: "关注者"
|
||||
caught-at: "注册日期"
|
||||
status: "状态"
|
||||
latest-request-sent-at: "上次发送的请求"
|
||||
latest-request-received-at: "上次收到的请求"
|
||||
@ -1288,7 +1288,7 @@ admin/views/federation.vue:
|
||||
block: "拉黑"
|
||||
marked-as-closed: "标记为已关闭"
|
||||
lookup: "查询"
|
||||
instances: "实例"
|
||||
instances: "联合"
|
||||
instance-not-registered: "实例未注册"
|
||||
sort: "排序"
|
||||
sorts:
|
||||
@ -1385,8 +1385,6 @@ desktop/views/pages/user/user.timeline.vue:
|
||||
with-replies: "帖子与回复"
|
||||
with-media: "媒体"
|
||||
my-posts: "我的帖子"
|
||||
desktop/views/widgets/messaging.vue:
|
||||
title: "信息"
|
||||
desktop/views/widgets/notifications.vue:
|
||||
title: "通知"
|
||||
desktop/views/widgets/polls.vue:
|
||||
@ -1450,7 +1448,7 @@ mobile/views/components/note.vue:
|
||||
location: "位置信息"
|
||||
mobile/views/components/note-detail.vue:
|
||||
reply: "回复"
|
||||
reaction: "反应"
|
||||
reaction: "回应"
|
||||
private: "这个帖子是私密的"
|
||||
deleted: "帖子已删除"
|
||||
location: "位置信息"
|
||||
@ -1508,7 +1506,7 @@ mobile/views/pages/home.vue:
|
||||
hybrid: "Social"
|
||||
global: "Global"
|
||||
mentions: "Mentions"
|
||||
messages: "信息"
|
||||
messages: "直接发布"
|
||||
mobile/views/pages/tag.vue:
|
||||
no-posts-found: "没有找到带有主题标签“{q}”的帖子"
|
||||
mobile/views/pages/widgets.vue:
|
||||
@ -1637,7 +1635,7 @@ dev/views/new-app.vue:
|
||||
account-read: "查看账户信息"
|
||||
account-write: "修改账户信息"
|
||||
note-write: "投稿。"
|
||||
reaction-write: "添加或删除反应。"
|
||||
reaction-write: "添加或删除回应。"
|
||||
following-write: "关注和不关注"
|
||||
drive-read: "查看网盘"
|
||||
drive-write: "管理网盘文件。"
|
||||
|
95
package.json
95
package.json
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "10.93.0",
|
||||
"codename": "nighthike",
|
||||
"version": "11.0.0-beta.11",
|
||||
"codename": "daybreak",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/syuilo/misskey.git"
|
||||
@ -11,6 +11,8 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node ./index.js",
|
||||
"init": "node ./built/init.js",
|
||||
"migrate": "node ./built/migrate.js",
|
||||
"debug": "DEBUG=misskey:* node ./index.js",
|
||||
"build": "webpack && gulp build",
|
||||
"webpack": "webpack",
|
||||
@ -46,7 +48,6 @@
|
||||
"@types/gulp-uglify": "3.0.6",
|
||||
"@types/gulp-util": "3.0.34",
|
||||
"@types/is-root": "1.0.0",
|
||||
"@types/is-svg": "3.0.0",
|
||||
"@types/is-url": "1.2.28",
|
||||
"@types/js-yaml": "3.12.0",
|
||||
"@types/jsdom": "12.2.3",
|
||||
@ -63,10 +64,11 @@
|
||||
"@types/koa-send": "4.1.1",
|
||||
"@types/koa-views": "2.0.3",
|
||||
"@types/koa__cors": "2.2.3",
|
||||
"@types/lolex": "3.1.1",
|
||||
"@types/minio": "7.0.1",
|
||||
"@types/mkdirp": "0.5.2",
|
||||
"@types/mocha": "5.2.5",
|
||||
"@types/mongodb": "3.1.20",
|
||||
"@types/mocha": "5.2.6",
|
||||
"@types/mongodb": "3.1.22",
|
||||
"@types/monk": "6.0.0",
|
||||
"@types/node": "11.10.4",
|
||||
"@types/nodemailer": "4.6.6",
|
||||
"@types/nprogress": "0.0.29",
|
||||
@ -78,6 +80,7 @@
|
||||
"@types/qrcode": "1.3.0",
|
||||
"@types/ratelimiter": "2.1.28",
|
||||
"@types/redis": "2.8.10",
|
||||
"@types/rename": "1.0.1",
|
||||
"@types/request": "2.48.1",
|
||||
"@types/request-promise-native": "1.0.15",
|
||||
"@types/request-stats": "3.0.0",
|
||||
@ -96,34 +99,34 @@
|
||||
"@types/websocket": "0.0.40",
|
||||
"@types/ws": "6.0.1",
|
||||
"animejs": "3.0.1",
|
||||
"apexcharts": "3.5.0",
|
||||
"apexcharts": "3.6.6",
|
||||
"autobind-decorator": "2.4.0",
|
||||
"autosize": "4.0.2",
|
||||
"autwh": "0.1.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"bootstrap-vue": "2.0.0-rc.13",
|
||||
"bull": "3.7.0",
|
||||
"cafy": "15.1.0",
|
||||
"cafy": "15.1.1",
|
||||
"chai": "4.2.0",
|
||||
"chai-http": "4.2.1",
|
||||
"chalk": "2.4.2",
|
||||
"commander": "2.19.0",
|
||||
"cli-highlight": "2.1.0",
|
||||
"commander": "2.20.0",
|
||||
"content-disposition": "0.5.3",
|
||||
"crc-32": "1.2.0",
|
||||
"css-loader": "2.1.0",
|
||||
"css-loader": "2.1.1",
|
||||
"cssnano": "4.1.10",
|
||||
"dateformat": "3.0.3",
|
||||
"deep-equal": "1.0.1",
|
||||
"deepcopy": "0.6.3",
|
||||
"diskusage": "1.0.0",
|
||||
"double-ended-queue": "2.1.0-0",
|
||||
"elasticsearch": "15.3.1",
|
||||
"elasticsearch": "15.4.1",
|
||||
"emojilib": "2.4.0",
|
||||
"escape-regexp": "0.0.1",
|
||||
"eslint": "5.15.0",
|
||||
"eslint": "5.15.1",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"eventemitter3": "3.1.0",
|
||||
"feed": "2.0.2",
|
||||
"file-type": "10.9.0",
|
||||
"feed": "2.0.4",
|
||||
"file-type": "10.10.0",
|
||||
"fuckadblock": "3.2.1",
|
||||
"gulp": "4.0.0",
|
||||
"gulp-cssnano": "2.1.3",
|
||||
@ -131,20 +134,20 @@
|
||||
"gulp-mocha": "6.0.0",
|
||||
"gulp-rename": "1.4.0",
|
||||
"gulp-replace": "1.0.0",
|
||||
"gulp-sourcemaps": "2.6.4",
|
||||
"gulp-sourcemaps": "2.6.5",
|
||||
"gulp-stylus": "2.7.0",
|
||||
"gulp-tslint": "8.1.3",
|
||||
"gulp-tslint": "8.1.4",
|
||||
"gulp-typescript": "5.0.0",
|
||||
"gulp-uglify": "3.0.1",
|
||||
"gulp-uglify": "3.0.2",
|
||||
"gulp-util": "3.0.8",
|
||||
"hard-source-webpack-plugin": "0.13.1",
|
||||
"html-minifier": "3.5.21",
|
||||
"http-signature": "1.2.0",
|
||||
"insert-text-at-cursor": "0.1.2",
|
||||
"is-root": "2.0.0",
|
||||
"is-svg": "3.0.0",
|
||||
"js-yaml": "3.12.1",
|
||||
"jsdom": "13.2.0",
|
||||
"is-svg": "4.0.0",
|
||||
"js-yaml": "3.13.0",
|
||||
"jsdom": "14.0.0",
|
||||
"json5": "2.1.0",
|
||||
"json5-loader": "1.0.1",
|
||||
"katex": "0.10.1",
|
||||
@ -159,29 +162,31 @@
|
||||
"koa-router": "7.4.0",
|
||||
"koa-send": "5.0.0",
|
||||
"koa-slow": "2.1.0",
|
||||
"koa-views": "6.1.5",
|
||||
"koa-views": "6.2.0",
|
||||
"langmap": "0.0.16",
|
||||
"loader-utils": "1.2.3",
|
||||
"lolex": "3.1.0",
|
||||
"lookup-dns-cache": "2.1.0",
|
||||
"minio": "7.0.5",
|
||||
"mkdirp": "0.5.1",
|
||||
"mocha": "5.2.0",
|
||||
"mocha": "6.0.2",
|
||||
"moji": "0.5.1",
|
||||
"moment": "2.24.0",
|
||||
"mongodb": "3.1.13",
|
||||
"mongodb": "3.2.3",
|
||||
"monk": "6.0.6",
|
||||
"ms": "2.1.1",
|
||||
"nan": "2.12.1",
|
||||
"nested-property": "0.0.7",
|
||||
"node-fetch": "2.3.0",
|
||||
"nodemailer": "5.1.1",
|
||||
"nprogress": "0.2.0",
|
||||
"object-assign-deep": "0.4.0",
|
||||
"os-utils": "0.0.14",
|
||||
"parse5": "5.1.0",
|
||||
"parsimmon": "1.12.0",
|
||||
"pg": "7.9.0",
|
||||
"portscanner": "2.2.0",
|
||||
"postcss-loader": "3.0.0",
|
||||
"prismjs": "1.15.0",
|
||||
"prismjs": "1.16.0",
|
||||
"progress-bar-webpack-plugin": "1.12.1",
|
||||
"promise-any": "0.2.0",
|
||||
"promise-limit": "2.7.0",
|
||||
@ -189,19 +194,22 @@
|
||||
"pug": "2.0.3",
|
||||
"punycode": "2.1.1",
|
||||
"qrcode": "1.3.3",
|
||||
"randomcolor": "0.5.3",
|
||||
"ratelimiter": "3.2.0",
|
||||
"randomcolor": "0.5.4",
|
||||
"ratelimiter": "3.3.0",
|
||||
"recaptcha-promise": "0.1.3",
|
||||
"reconnecting-websocket": "4.1.10",
|
||||
"redis": "2.8.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rename": "1.0.4",
|
||||
"request": "2.88.0",
|
||||
"request-promise-native": "1.0.5",
|
||||
"request-promise-native": "1.0.7",
|
||||
"request-stats": "3.0.0",
|
||||
"require-all": "3.0.0",
|
||||
"rimraf": "2.6.3",
|
||||
"rndstr": "1.0.0",
|
||||
"s-age": "1.1.2",
|
||||
"seedrandom": "2.4.4",
|
||||
"sharp": "0.21.3",
|
||||
"sharp": "0.22.0",
|
||||
"showdown": "1.9.0",
|
||||
"showdown-highlightjs-extension": "0.1.2",
|
||||
"speakeasy": "2.0.0",
|
||||
@ -210,49 +218,50 @@
|
||||
"stylus": "0.54.5",
|
||||
"stylus-loader": "3.0.2",
|
||||
"summaly": "2.2.0",
|
||||
"systeminformation": "4.0.14",
|
||||
"systeminformation": "4.0.16",
|
||||
"syuilo-password-strength": "0.0.1",
|
||||
"terser-webpack-plugin": "1.2.3",
|
||||
"textarea-caret": "3.1.0",
|
||||
"tinycolor2": "1.4.1",
|
||||
"tmp": "0.0.33",
|
||||
"ts-loader": "5.3.3",
|
||||
"ts-node": "8.0.2",
|
||||
"ts-node": "7.0.1",
|
||||
"tslint": "5.13.1",
|
||||
"tslint-sonarts": "1.9.0",
|
||||
"typeorm": "0.2.16-rc.1",
|
||||
"typescript": "3.3.3333",
|
||||
"typescript-eslint-parser": "22.0.0",
|
||||
"uglify-es": "3.3.9",
|
||||
"ulid": "2.3.0",
|
||||
"url-loader": "1.1.2",
|
||||
"uuid": "3.3.2",
|
||||
"v-animate-css": "0.0.3",
|
||||
"v-debounce": "0.1.2",
|
||||
"video-thumbnail-generator": "1.1.3",
|
||||
"vue": "2.6.8",
|
||||
"vue": "2.6.10",
|
||||
"vue-color": "2.7.0",
|
||||
"vue-content-loading": "1.5.3",
|
||||
"vue-content-loading": "1.6.0",
|
||||
"vue-cropperjs": "3.0.0",
|
||||
"vue-i18n": "8.8.2",
|
||||
"vue-i18n": "8.10.0",
|
||||
"vue-js-modal": "1.3.28",
|
||||
"vue-json-pretty": "1.4.1",
|
||||
"vue-json-pretty": "1.6.0",
|
||||
"vue-loader": "15.7.0",
|
||||
"vue-marquee-text-component": "1.1.1",
|
||||
"vue-prism-component": "1.1.1",
|
||||
"vue-router": "3.0.2",
|
||||
"vue-router": "3.0.3",
|
||||
"vue-sequential-entrance": "1.1.3",
|
||||
"vue-style-loader": "4.1.2",
|
||||
"vue-svg-inline-loader": "1.2.12",
|
||||
"vue-template-compiler": "2.6.8",
|
||||
"vuedraggable": "2.18.1",
|
||||
"vue-svg-inline-loader": "1.2.15",
|
||||
"vue-template-compiler": "2.6.10",
|
||||
"vuedraggable": "2.20.0",
|
||||
"vuewordcloud": "18.7.11",
|
||||
"vuex": "3.1.0",
|
||||
"vuex-persistedstate": "2.5.4",
|
||||
"web-push": "3.3.3",
|
||||
"webfinger.js": "2.7.0",
|
||||
"webpack": "4.28.4",
|
||||
"webpack-cli": "3.2.3",
|
||||
"websocket": "1.0.28",
|
||||
"ws": "6.1.4",
|
||||
"ws": "6.2.1",
|
||||
"xev": "2.0.1"
|
||||
}
|
||||
}
|
||||
|
17
src/@types/deepcopy.d.ts
vendored
17
src/@types/deepcopy.d.ts
vendored
@ -1,17 +0,0 @@
|
||||
declare module 'deepcopy';
|
||||
|
||||
declare namespace deepcopy {
|
||||
type DeepcopyCustomizerValueType = 'Object';
|
||||
|
||||
type DeepcopyCustomizer<T> = (
|
||||
value: T,
|
||||
valueType: DeepcopyCustomizerValueType) => T;
|
||||
|
||||
interface DeepcopyOptions<T> {
|
||||
customizer: DeepcopyCustomizer<T>;
|
||||
}
|
||||
|
||||
export function deepcopy<T>(
|
||||
value: T,
|
||||
options?: DeepcopyOptions<T> | DeepcopyCustomizer<T>): T;
|
||||
}
|
7
src/@types/escape-regexp.d.ts
vendored
7
src/@types/escape-regexp.d.ts
vendored
@ -1,7 +0,0 @@
|
||||
declare module 'escape-regexp' {
|
||||
function escapeRegExp(str: string): string;
|
||||
|
||||
namespace escapeRegExp {} // Hack
|
||||
|
||||
export = escapeRegExp;
|
||||
}
|
2
src/@types/koa-slow.d.ts
vendored
2
src/@types/koa-slow.d.ts
vendored
@ -8,7 +8,7 @@ declare module 'koa-slow' {
|
||||
|
||||
function slow(options?: ISlowOptions): Middleware;
|
||||
|
||||
namespace slow { } // Hack
|
||||
namespace slow {} // Hack
|
||||
|
||||
export = slow;
|
||||
}
|
||||
|
65
src/@types/webfinger.js.d.ts
vendored
65
src/@types/webfinger.js.d.ts
vendored
@ -1,65 +0,0 @@
|
||||
declare module 'webfinger.js' {
|
||||
interface IWebFingerConstructorConfig {
|
||||
tls_only?: boolean;
|
||||
webfist_fallback?: boolean;
|
||||
uri_fallback?: boolean;
|
||||
request_timeout?: number;
|
||||
}
|
||||
|
||||
type JRDProperties = { [type: string]: string };
|
||||
|
||||
interface IJRDLink {
|
||||
rel: string;
|
||||
type?: string;
|
||||
href?: string;
|
||||
template?: string;
|
||||
titles?: { [lang: string]: string };
|
||||
properties?: JRDProperties;
|
||||
}
|
||||
|
||||
interface IJRD {
|
||||
subject?: string;
|
||||
expires?: Date;
|
||||
aliases?: string[];
|
||||
properties?: JRDProperties;
|
||||
links?: IJRDLink[];
|
||||
}
|
||||
|
||||
interface IIDXLinks {
|
||||
'avatar': IJRDLink[];
|
||||
'remotestorage': IJRDLink[];
|
||||
'blog': IJRDLink[];
|
||||
'vcard': IJRDLink[];
|
||||
'updates': IJRDLink[];
|
||||
'share': IJRDLink[];
|
||||
'profile': IJRDLink[];
|
||||
'webfist': IJRDLink[];
|
||||
'camlistore': IJRDLink[];
|
||||
[type: string]: IJRDLink[];
|
||||
}
|
||||
|
||||
interface IIDXProperties {
|
||||
'name': string;
|
||||
[type: string]: string;
|
||||
}
|
||||
|
||||
interface IIDX {
|
||||
links: IIDXLinks;
|
||||
properties: IIDXProperties;
|
||||
}
|
||||
|
||||
interface ILookupCallbackResult {
|
||||
object: IJRD;
|
||||
json: string;
|
||||
idx: IIDX;
|
||||
}
|
||||
|
||||
type LookupCallback = (err: Error | string, result?: ILookupCallbackResult) => void;
|
||||
|
||||
export class WebFinger {
|
||||
constructor(config?: IWebFingerConstructorConfig);
|
||||
|
||||
public lookup(address: string, cb: LookupCallback): NodeJS.Timeout;
|
||||
public lookupLink(address: string, rel: string, cb: IJRDLink): void;
|
||||
}
|
||||
}
|
@ -15,5 +15,8 @@ program
|
||||
.parse(process.argv);
|
||||
|
||||
if (process.env.MK_ONLY_QUEUE) program.onlyQueue = true;
|
||||
if (process.env.NODE_ENV === 'test') program.disableClustering = true;
|
||||
if (process.env.NODE_ENV === 'test') program.quiet = true;
|
||||
if (process.env.NODE_ENV === 'test') program.noDaemons = true;
|
||||
|
||||
export { program };
|
||||
|
77
src/boot/index.ts
Normal file
77
src/boot/index.ts
Normal file
@ -0,0 +1,77 @@
|
||||
import * as cluster from 'cluster';
|
||||
import chalk from 'chalk';
|
||||
import Xev from 'xev';
|
||||
|
||||
import Logger from '../services/logger';
|
||||
import { program } from '../argv';
|
||||
|
||||
// for typeorm
|
||||
import 'reflect-metadata';
|
||||
import { masterMain } from './master';
|
||||
import { workerMain } from './worker';
|
||||
|
||||
const logger = new Logger('core', 'cyan');
|
||||
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
|
||||
const ev = new Xev();
|
||||
|
||||
/**
|
||||
* Init process
|
||||
*/
|
||||
export default async function() {
|
||||
process.title = `Misskey (${cluster.isMaster ? 'master' : 'worker'})`;
|
||||
|
||||
if (cluster.isMaster || program.disableClustering) {
|
||||
await masterMain();
|
||||
|
||||
if (cluster.isMaster) {
|
||||
ev.mount();
|
||||
}
|
||||
}
|
||||
|
||||
if (cluster.isWorker || program.disableClustering) {
|
||||
await workerMain();
|
||||
}
|
||||
|
||||
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
|
||||
// それ以外のときは process.send は使えないので弾く
|
||||
if (process.send) {
|
||||
process.send('ok');
|
||||
}
|
||||
}
|
||||
|
||||
//#region Events
|
||||
|
||||
// Listen new workers
|
||||
cluster.on('fork', worker => {
|
||||
clusterLogger.debug(`Process forked: [${worker.id}]`);
|
||||
});
|
||||
|
||||
// Listen online workers
|
||||
cluster.on('online', worker => {
|
||||
clusterLogger.debug(`Process is now online: [${worker.id}]`);
|
||||
});
|
||||
|
||||
// Listen for dying workers
|
||||
cluster.on('exit', worker => {
|
||||
// Replace the dead worker,
|
||||
// we're not sentimental
|
||||
clusterLogger.error(chalk.red(`[${worker.id}] died :(`));
|
||||
cluster.fork();
|
||||
});
|
||||
|
||||
// Display detail of unhandled promise rejection
|
||||
if (!program.quiet) {
|
||||
process.on('unhandledRejection', console.dir);
|
||||
}
|
||||
|
||||
// Display detail of uncaught exception
|
||||
process.on('uncaughtException', err => {
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
// Dying away...
|
||||
process.on('exit', code => {
|
||||
logger.info(`The process is going to exit with code ${code}`);
|
||||
});
|
||||
|
||||
//#endregion
|
176
src/boot/master.ts
Normal file
176
src/boot/master.ts
Normal file
@ -0,0 +1,176 @@
|
||||
import * as os from 'os';
|
||||
import * as cluster from 'cluster';
|
||||
import chalk from 'chalk';
|
||||
import * as portscanner from 'portscanner';
|
||||
import * as isRoot from 'is-root';
|
||||
|
||||
import Logger from '../services/logger';
|
||||
import loadConfig from '../config/load';
|
||||
import { Config } from '../config/types';
|
||||
import { lessThan } from '../prelude/array';
|
||||
import * as pkg from '../../package.json';
|
||||
import { program } from '../argv';
|
||||
import { showMachineInfo } from '../misc/show-machine-info';
|
||||
import { initDb } from '../db/postgre';
|
||||
|
||||
const logger = new Logger('core', 'cyan');
|
||||
const bootLogger = logger.createSubLogger('boot', 'magenta', false);
|
||||
|
||||
function greet() {
|
||||
if (!program.quiet) {
|
||||
//#region Misskey logo
|
||||
const v = `v${pkg.version}`;
|
||||
console.log(' _____ _ _ ');
|
||||
console.log(' | |_|___ ___| |_ ___ _ _ ');
|
||||
console.log(' | | | | |_ -|_ -| \'_| -_| | |');
|
||||
console.log(' |_|_|_|_|___|___|_,_|___|_ |');
|
||||
console.log(' ' + chalk.gray(v) + (' |___|\n'.substr(v.length)));
|
||||
//#endregion
|
||||
|
||||
console.log(' Misskey is maintained by @syuilo, @AyaMorisawa, @mei23, and @acid-chicken.');
|
||||
console.log(chalk.keyword('orange')(' If you like Misskey, please donate to support development. https://www.patreon.com/syuilo'));
|
||||
|
||||
console.log('');
|
||||
console.log(chalk`< ${os.hostname()} {gray (PID: ${process.pid.toString()})} >`);
|
||||
}
|
||||
|
||||
bootLogger.info('Welcome to Misskey!');
|
||||
bootLogger.info(`Misskey v${pkg.version}`, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Init master process
|
||||
*/
|
||||
export async function masterMain() {
|
||||
greet();
|
||||
|
||||
let config!: Config;
|
||||
|
||||
try {
|
||||
// initialize app
|
||||
config = await init();
|
||||
|
||||
if (config.port == null) {
|
||||
bootLogger.error('The port is not configured. Please configure port.', null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.platform === 'linux' && isWellKnownPort(config.port) && !isRoot()) {
|
||||
bootLogger.error('You need root privileges to listen on well-known port on Linux', null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!await isPortAvailable(config.port)) {
|
||||
bootLogger.error(`Port ${config.port} is already in use`, null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (e) {
|
||||
bootLogger.error('Fatal error occurred during initialization', null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
bootLogger.succ('Misskey initialized');
|
||||
|
||||
if (!program.disableClustering) {
|
||||
await spawnWorkers(config.clusterLimit);
|
||||
}
|
||||
|
||||
if (!program.noDaemons) {
|
||||
require('../daemons/server-stats').default();
|
||||
require('../daemons/notes-stats').default();
|
||||
require('../daemons/queue-stats').default();
|
||||
}
|
||||
|
||||
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
|
||||
}
|
||||
|
||||
const runningNodejsVersion = process.version.slice(1).split('.').map(x => parseInt(x, 10));
|
||||
const requiredNodejsVersion = [11, 7, 0];
|
||||
const satisfyNodejsVersion = !lessThan(runningNodejsVersion, requiredNodejsVersion);
|
||||
|
||||
function isWellKnownPort(port: number): boolean {
|
||||
return port < 1024;
|
||||
}
|
||||
|
||||
async function isPortAvailable(port: number): Promise<boolean> {
|
||||
return await portscanner.checkPortStatus(port, '127.0.0.1') === 'closed';
|
||||
}
|
||||
|
||||
function showEnvironment(): void {
|
||||
const env = process.env.NODE_ENV;
|
||||
const logger = bootLogger.createSubLogger('env');
|
||||
logger.info(typeof env == 'undefined' ? 'NODE_ENV is not set' : `NODE_ENV: ${env}`);
|
||||
|
||||
if (env !== 'production') {
|
||||
logger.warn('The environment is not in production mode.');
|
||||
logger.warn('DO NOT USE FOR PRODUCTION PURPOSE!', null, true);
|
||||
}
|
||||
|
||||
logger.info(`You ${isRoot() ? '' : 'do not '}have root privileges`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Init app
|
||||
*/
|
||||
async function init(): Promise<Config> {
|
||||
showEnvironment();
|
||||
|
||||
const nodejsLogger = bootLogger.createSubLogger('nodejs');
|
||||
|
||||
nodejsLogger.info(`Version ${runningNodejsVersion.join('.')}`);
|
||||
|
||||
if (!satisfyNodejsVersion) {
|
||||
nodejsLogger.error(`Node.js version is less than ${requiredNodejsVersion.join('.')}. Please upgrade it.`, null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await showMachineInfo(bootLogger);
|
||||
|
||||
const configLogger = bootLogger.createSubLogger('config');
|
||||
let config;
|
||||
|
||||
try {
|
||||
config = loadConfig();
|
||||
} catch (exception) {
|
||||
if (typeof exception === 'string') {
|
||||
configLogger.error(exception);
|
||||
process.exit(1);
|
||||
}
|
||||
if (exception.code === 'ENOENT') {
|
||||
configLogger.error('Configuration file not found', null, true);
|
||||
process.exit(1);
|
||||
}
|
||||
throw exception;
|
||||
}
|
||||
|
||||
configLogger.succ('Loaded');
|
||||
|
||||
// Try to connect to DB
|
||||
try {
|
||||
bootLogger.info('Connecting database...');
|
||||
await initDb();
|
||||
} catch (e) {
|
||||
bootLogger.error('Cannot connect to database', null, true);
|
||||
bootLogger.error(e);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
async function spawnWorkers(limit: number = Infinity) {
|
||||
const workers = Math.min(limit, os.cpus().length);
|
||||
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
|
||||
await Promise.all([...Array(workers)].map(spawnWorker));
|
||||
bootLogger.succ('All workers started');
|
||||
}
|
||||
|
||||
function spawnWorker(): Promise<void> {
|
||||
return new Promise(res => {
|
||||
const worker = cluster.fork();
|
||||
worker.on('message', message => {
|
||||
if (message !== 'ready') return;
|
||||
res();
|
||||
});
|
||||
});
|
||||
}
|
20
src/boot/worker.ts
Normal file
20
src/boot/worker.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import * as cluster from 'cluster';
|
||||
import { initDb } from '../db/postgre';
|
||||
|
||||
/**
|
||||
* Init worker process
|
||||
*/
|
||||
export async function workerMain() {
|
||||
await initDb();
|
||||
|
||||
// start server
|
||||
await require('../server').default();
|
||||
|
||||
// start job queue
|
||||
require('../queue').default();
|
||||
|
||||
if (cluster.isWorker) {
|
||||
// Send a 'ready' message to parent process
|
||||
process.send!('ready');
|
||||
}
|
||||
}
|
@ -181,7 +181,12 @@ export default Vue.extend({
|
||||
},
|
||||
grid: {
|
||||
clipMarkers: false,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)'
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
xaxis: {
|
||||
lines: {
|
||||
show: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
stroke: {
|
||||
curve: 'straight',
|
||||
@ -240,6 +245,7 @@ export default Vue.extend({
|
||||
federationInstancesChart(total: boolean): any {
|
||||
return {
|
||||
series: [{
|
||||
name: 'Instances',
|
||||
data: this.format(total
|
||||
? this.stats.federation.instance.total
|
||||
: sum(this.stats.federation.instance.inc, negate(this.stats.federation.instance.dec))
|
196
src/client/app/admin/views/dashboard.queue-charts.vue
Normal file
196
src/client/app/admin/views/dashboard.queue-charts.vue
Normal file
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div class="mzxlfysy">
|
||||
<div>
|
||||
<header>
|
||||
<span><fa :icon="faInbox"/> In</span>
|
||||
<span v-if="latestStats">{{ latestStats.inbox.activeSincePrevTick | number }} / {{ latestStats.inbox.delayed | number }}</span>
|
||||
</header>
|
||||
<div ref="in"></div>
|
||||
</div>
|
||||
<div>
|
||||
<header>
|
||||
<span><fa :icon="faPaperPlane"/> Out</span>
|
||||
<span v-if="latestStats">{{ latestStats.deliver.activeSincePrevTick | number }} / {{ latestStats.deliver.delayed | number }}</span>
|
||||
</header>
|
||||
<div ref="out"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faInbox } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
|
||||
import ApexCharts from 'apexcharts';
|
||||
|
||||
const limit = 150;
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
stats: [],
|
||||
inChart: null,
|
||||
outChart: null,
|
||||
faInbox, faPaperPlane
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
latestStats(): any {
|
||||
return this.stats[this.stats.length - 1];
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
stats(stats) {
|
||||
this.inChart.updateSeries([{
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.active }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.waiting }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed }))
|
||||
}]);
|
||||
this.outChart.updateSeries([{
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.active }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.waiting }))
|
||||
}, {
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed }))
|
||||
}]);
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
const chartOpts = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 200,
|
||||
animations: {
|
||||
dynamicAnimation: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
toolbar: {
|
||||
show: false
|
||||
},
|
||||
zoom: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: false
|
||||
},
|
||||
grid: {
|
||||
clipMarkers: false,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)'
|
||||
},
|
||||
stroke: {
|
||||
curve: 'straight',
|
||||
width: 2
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
colors: ['#00E396', '#00BCD4', '#FFB300', '#e53935'],
|
||||
series: [{ data: [] }, { data: [] }, { data: [] }, { data: [] }] as any,
|
||||
xaxis: {
|
||||
type: 'numeric',
|
||||
labels: {
|
||||
show: false
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
show: false,
|
||||
min: 0,
|
||||
}
|
||||
};
|
||||
|
||||
this.inChart = new ApexCharts(this.$refs.in, chartOpts);
|
||||
this.outChart = new ApexCharts(this.$refs.out, chartOpts);
|
||||
|
||||
this.inChart.render();
|
||||
this.outChart.render();
|
||||
|
||||
const connection = this.$root.stream.useSharedConnection('queueStats');
|
||||
connection.on('stats', this.onStats);
|
||||
connection.on('statsLog', this.onStatsLog);
|
||||
connection.send('requestLog', {
|
||||
id: Math.random().toString().substr(2, 8),
|
||||
length: limit
|
||||
});
|
||||
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
connection.dispose();
|
||||
this.inChart.destroy();
|
||||
this.outChart.destroy();
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
onStats(stats) {
|
||||
this.stats.push(stats);
|
||||
if (this.stats.length > limit) this.stats.shift();
|
||||
},
|
||||
|
||||
onStatsLog(statsLog) {
|
||||
for (const stats of statsLog.reverse()) {
|
||||
this.onStats(stats);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mzxlfysy
|
||||
display flex
|
||||
|
||||
> div
|
||||
display block
|
||||
flex 1
|
||||
padding 20px 12px 0 12px
|
||||
box-shadow 0 2px 4px rgba(0, 0, 0, 0.1)
|
||||
background var(--face)
|
||||
border-radius 8px
|
||||
|
||||
&:first-child
|
||||
margin-right 16px
|
||||
|
||||
> header
|
||||
display flex
|
||||
padding 0 8px
|
||||
margin-bottom -16px
|
||||
color var(--adminDashboardCardFg)
|
||||
font-size 14px
|
||||
|
||||
> span
|
||||
&:last-child
|
||||
margin-left auto
|
||||
opacity 0.7
|
||||
|
||||
> span
|
||||
opacity 0.7
|
||||
|
||||
> div
|
||||
margin-bottom -10px
|
||||
|
||||
@media (max-width 1000px)
|
||||
display block
|
||||
margin-bottom 26px
|
||||
|
||||
> div
|
||||
&:first-child
|
||||
margin-right 0
|
||||
margin-bottom 26px
|
||||
|
||||
</style>
|
@ -73,6 +73,10 @@
|
||||
<x-charts ref="charts"/>
|
||||
</div>
|
||||
|
||||
<div class="queue">
|
||||
<x-queue/>
|
||||
</div>
|
||||
|
||||
<div class="cpu-memory">
|
||||
<x-cpu-memory :connection="connection"/>
|
||||
</div>
|
||||
@ -86,9 +90,10 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import i18n from '../../i18n';
|
||||
import XCpuMemory from "./cpu-memory.vue";
|
||||
import XCharts from "./charts.vue";
|
||||
import XApLog from "./ap-log.vue";
|
||||
import XCpuMemory from "./dashboard.cpu-memory.vue";
|
||||
import XQueue from "./dashboard.queue-charts.vue";
|
||||
import XCharts from "./dashboard.charts.vue";
|
||||
import XApLog from "./dashboard.ap-log.vue";
|
||||
import { faDatabase } from '@fortawesome/free-solid-svg-icons';
|
||||
import MarqueeText from 'vue-marquee-text-component';
|
||||
import randomColor from 'randomcolor';
|
||||
@ -98,6 +103,7 @@ export default Vue.extend({
|
||||
|
||||
components: {
|
||||
XCpuMemory,
|
||||
XQueue,
|
||||
XCharts,
|
||||
XApLog,
|
||||
MarqueeText
|
||||
@ -274,6 +280,9 @@ export default Vue.extend({
|
||||
> .charts
|
||||
margin-bottom 16px
|
||||
|
||||
> .queue
|
||||
margin-bottom 16px
|
||||
|
||||
> .cpu-memory
|
||||
margin-bottom 16px
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
<div>
|
||||
<div>
|
||||
<span style="margin-right:16px;">{{ file.type }}</span>
|
||||
<span>{{ file.datasize | bytes }}</span>
|
||||
<span>{{ file.size | bytes }}</span>
|
||||
</div>
|
||||
<div><mk-time :time="file.createdAt" mode="detail"/></div>
|
||||
</div>
|
||||
@ -153,7 +153,7 @@ export default Vue.extend({
|
||||
|
||||
thumbnail(file: any): any {
|
||||
return {
|
||||
'background-color': file.properties.avgColor && file.properties.avgColor.length == 3 ? `rgb(${file.properties.avgColor.join(',')})` : 'transparent',
|
||||
'background-color': file.properties.avgColor || 'transparent',
|
||||
'background-image': `url(${file.thumbnailUrl})`
|
||||
};
|
||||
},
|
||||
|
@ -1,43 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<ui-card>
|
||||
<template #title><fa :icon="faTerminal"/> {{ $t('federation') }}</template>
|
||||
<template #title><fa :icon="faTerminal"/> {{ $t('instance') }}</template>
|
||||
<section class="fit-top">
|
||||
<ui-input class="target" v-model="target" type="text" @enter="showInstance()">
|
||||
<span>{{ $t('host') }}</span>
|
||||
<template #prefix><fa :icon="faServer"/></template>
|
||||
</ui-input>
|
||||
<ui-button @click="showInstance()"><fa :icon="faSearch"/> {{ $t('lookup') }}</ui-button>
|
||||
|
||||
<div class="instance" v-if="instance">
|
||||
<ui-input :value="instance.host" type="text" readonly>
|
||||
<span>{{ $t('host') }}</span>
|
||||
</ui-input>
|
||||
<ui-horizon-group inputs>
|
||||
<ui-input :value="instance.host" type="text" readonly>
|
||||
<span>{{ $t('host') }}</span>
|
||||
<template #prefix><fa :icon="faServer"/></template>
|
||||
</ui-input>
|
||||
<ui-input :value="instance.caughtAt | date" type="text" readonly>
|
||||
<span>{{ $t('caught-at') }}</span>
|
||||
<template #prefix><fa :icon="faCrosshairs"/></template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<ui-horizon-group inputs>
|
||||
<ui-input :value="instance.notesCount | number" type="text" readonly>
|
||||
<span>{{ $t('notes') }}</span>
|
||||
<template #prefix><fa :icon="faEnvelopeOpenText"/></template>
|
||||
</ui-input>
|
||||
<ui-input :value="instance.usersCount | number" type="text" readonly>
|
||||
<span>{{ $t('users') }}</span>
|
||||
<template #prefix><fa :icon="faUsers"/></template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<ui-horizon-group inputs>
|
||||
<ui-input :value="instance.followingCount | number" type="text" readonly>
|
||||
<span>{{ $t('following') }}</span>
|
||||
<template #prefix><fa :icon="faCaretDown"/></template>
|
||||
</ui-input>
|
||||
<ui-input :value="instance.followersCount | number" type="text" readonly>
|
||||
<span>{{ $t('followers') }}</span>
|
||||
<template #prefix><fa :icon="faCaretUp"/></template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<ui-horizon-group inputs>
|
||||
<ui-input :value="instance.latestRequestSentAt" type="text" readonly>
|
||||
<ui-input :value="instance.latestRequestSentAt | date" type="text" readonly>
|
||||
<span>{{ $t('latest-request-sent-at') }}</span>
|
||||
<template #prefix><fa :icon="faPaperPlane"/></template>
|
||||
</ui-input>
|
||||
<ui-input :value="instance.latestStatus" type="text" readonly>
|
||||
<span>{{ $t('status') }}</span>
|
||||
<template #prefix><fa :icon="faTrafficLight"/></template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<ui-input :value="instance.latestRequestReceivedAt" type="text" readonly>
|
||||
<ui-input :value="instance.latestRequestReceivedAt | date" type="text" readonly>
|
||||
<span>{{ $t('latest-request-received-at') }}</span>
|
||||
<template #prefix><fa :icon="faInbox"/></template>
|
||||
</ui-input>
|
||||
<ui-switch v-model="instance.isBlocked" @change="updateInstance()">{{ $t('block') }}</ui-switch>
|
||||
<ui-switch v-model="instance.isMarkedAsClosed" @change="updateInstance()">{{ $t('marked-as-closed') }}</ui-switch>
|
||||
@ -133,7 +148,8 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import i18n from '../../i18n';
|
||||
import { faGlobe, faTerminal, faSearch, faMinusCircle, faServer } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
|
||||
import { faGlobe, faTerminal, faSearch, faMinusCircle, faServer, faCrosshairs, faEnvelopeOpenText, faUsers, faCaretDown, faCaretUp, faTrafficLight, faInbox } from '@fortawesome/free-solid-svg-icons';
|
||||
import ApexCharts from 'apexcharts';
|
||||
import * as tinycolor from 'tinycolor2';
|
||||
|
||||
@ -144,19 +160,23 @@ const negate = arr => arr.map(x => -x);
|
||||
export default Vue.extend({
|
||||
i18n: i18n('admin/views/federation.vue'),
|
||||
|
||||
filters: {
|
||||
date: v => v ? new Date(v).toLocaleString() : 'N/A'
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
instance: null,
|
||||
target: null,
|
||||
sort: '+lastCommunicatedAt',
|
||||
state: 'all',
|
||||
limit: 50,
|
||||
limit: 100,
|
||||
instances: [],
|
||||
chart: null,
|
||||
chartSrc: 'requests',
|
||||
chartSpan: 'hour',
|
||||
chartInstance: null,
|
||||
faGlobe, faTerminal, faSearch, faMinusCircle, faServer
|
||||
faGlobe, faTerminal, faSearch, faMinusCircle, faServer, faCrosshairs, faEnvelopeOpenText, faUsers, faCaretDown, faCaretUp, faPaperPlane, faTrafficLight, faInbox
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ui-card>
|
||||
<template #title>{{ $t('hided-tags') }}</template>
|
||||
<section>
|
||||
<textarea class="jdnqwkzlnxcfftthoybjxrebyolvoucw" v-model="hidedTags"></textarea>
|
||||
<textarea class="jdnqwkzlnxcfftthoybjxrebyolvoucw" v-model="hiddenTags"></textarea>
|
||||
<ui-button @click="save">{{ $t('save') }}</ui-button>
|
||||
</section>
|
||||
</ui-card>
|
||||
@ -18,18 +18,18 @@ export default Vue.extend({
|
||||
i18n: i18n('admin/views/hashtags.vue'),
|
||||
data() {
|
||||
return {
|
||||
hidedTags: '',
|
||||
hiddenTags: '',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
this.hidedTags = meta.hidedTags.join('\n');
|
||||
this.hiddenTags = meta.hiddenTags.join('\n');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
save() {
|
||||
this.$root.api('admin/update-meta', {
|
||||
hidedTags: this.hidedTags.split('\n')
|
||||
hiddenTags: this.hiddenTags.split('\n')
|
||||
}).then(() => {
|
||||
//this.$root.os.apis.dialog({ text: `Saved` });
|
||||
}).catch(e => {
|
||||
|
@ -6,6 +6,7 @@
|
||||
<ui-input :value="host" readonly>{{ $t('host') }}</ui-input>
|
||||
<ui-input v-model="name">{{ $t('instance-name') }}</ui-input>
|
||||
<ui-textarea v-model="description">{{ $t('instance-description') }}</ui-textarea>
|
||||
<ui-input v-model="iconUrl"><template #icon><fa icon="link"/></template>{{ $t('icon-url') }}</ui-input>
|
||||
<ui-input v-model="mascotImageUrl"><template #icon><fa icon="link"/></template>{{ $t('logo-url') }}</ui-input>
|
||||
<ui-input v-model="bannerUrl"><template #icon><fa icon="link"/></template>{{ $t('banner-url') }}</ui-input>
|
||||
<ui-input v-model="errorImageUrl"><template #icon><fa icon="link"/></template>{{ $t('error-image-url') }}</ui-input>
|
||||
@ -24,6 +25,8 @@
|
||||
<ui-switch v-model="disableLocalTimeline">{{ $t('disable-local-timeline') }}</ui-switch>
|
||||
<ui-switch v-model="disableGlobalTimeline">{{ $t('disable-global-timeline') }}</ui-switch>
|
||||
<ui-info>{{ $t('disabling-timelines-info') }}</ui-info>
|
||||
<ui-switch v-model="enableEmojiReaction">{{ $t('enable-emoji-reaction') }}</ui-switch>
|
||||
<ui-switch v-model="useStarForReactionFallback">{{ $t('use-star-for-reaction-fallback') }}</ui-switch>
|
||||
</section>
|
||||
<section class="fit-bottom">
|
||||
<header><fa icon="cloud"/> {{ $t('drive-config') }}</header>
|
||||
@ -74,12 +77,6 @@
|
||||
<header>summaly Proxy</header>
|
||||
<ui-input v-model="summalyProxy">URL</ui-input>
|
||||
</section>
|
||||
<section>
|
||||
<header><fa :icon="faUserPlus"/> {{ $t('user-recommendation-config') }}</header>
|
||||
<ui-switch v-model="enableExternalUserRecommendation">{{ $t('enable-external-user-recommendation') }}</ui-switch>
|
||||
<ui-input v-model="externalUserRecommendationEngine" :disabled="!enableExternalUserRecommendation">{{ $t('external-user-recommendation-engine') }}<template #desc>{{ $t('external-user-recommendation-engine-desc') }}</template></ui-input>
|
||||
<ui-input v-model="externalUserRecommendationTimeout" type="number" :disabled="!enableExternalUserRecommendation">{{ $t('external-user-recommendation-timeout') }}<template #suffix>ms</template><template #desc>{{ $t('external-user-recommendation-timeout-desc') }}</template></ui-input>
|
||||
</section>
|
||||
<section>
|
||||
<ui-button @click="updateMeta">{{ $t('save') }}</ui-button>
|
||||
</section>
|
||||
@ -154,9 +151,12 @@ export default Vue.extend({
|
||||
disableRegistration: false,
|
||||
disableLocalTimeline: false,
|
||||
disableGlobalTimeline: false,
|
||||
enableEmojiReaction: true,
|
||||
useStarForReactionFallback: false,
|
||||
mascotImageUrl: null,
|
||||
bannerUrl: null,
|
||||
errorImageUrl: null,
|
||||
iconUrl: null,
|
||||
name: null,
|
||||
description: null,
|
||||
languages: null,
|
||||
@ -178,9 +178,6 @@ export default Vue.extend({
|
||||
discordClientSecret: null,
|
||||
proxyAccount: null,
|
||||
inviteCode: null,
|
||||
enableExternalUserRecommendation: false,
|
||||
externalUserRecommendationEngine: null,
|
||||
externalUserRecommendationTimeout: null,
|
||||
summalyProxy: null,
|
||||
enableEmail: false,
|
||||
email: null,
|
||||
@ -199,14 +196,17 @@ export default Vue.extend({
|
||||
|
||||
created() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
this.maintainerName = meta.maintainer.name;
|
||||
this.maintainerEmail = meta.maintainer.email;
|
||||
this.maintainerName = meta.maintainerName;
|
||||
this.maintainerEmail = meta.maintainerEmail;
|
||||
this.disableRegistration = meta.disableRegistration;
|
||||
this.disableLocalTimeline = meta.disableLocalTimeline;
|
||||
this.disableGlobalTimeline = meta.disableGlobalTimeline;
|
||||
this.enableEmojiReaction = meta.enableEmojiReaction;
|
||||
this.useStarForReactionFallback = meta.useStarForReactionFallback;
|
||||
this.mascotImageUrl = meta.mascotImageUrl;
|
||||
this.bannerUrl = meta.bannerUrl;
|
||||
this.errorImageUrl = meta.errorImageUrl;
|
||||
this.iconUrl = meta.iconUrl;
|
||||
this.name = meta.name;
|
||||
this.description = meta.description;
|
||||
this.languages = meta.langs.join(' ');
|
||||
@ -227,9 +227,6 @@ export default Vue.extend({
|
||||
this.enableDiscordIntegration = meta.enableDiscordIntegration;
|
||||
this.discordClientId = meta.discordClientId;
|
||||
this.discordClientSecret = meta.discordClientSecret;
|
||||
this.enableExternalUserRecommendation = meta.enableExternalUserRecommendation;
|
||||
this.externalUserRecommendationEngine = meta.externalUserRecommendationEngine;
|
||||
this.externalUserRecommendationTimeout = meta.externalUserRecommendationTimeout;
|
||||
this.summalyProxy = meta.summalyProxy;
|
||||
this.enableEmail = meta.enableEmail;
|
||||
this.email = meta.email;
|
||||
@ -264,9 +261,12 @@ export default Vue.extend({
|
||||
disableRegistration: this.disableRegistration,
|
||||
disableLocalTimeline: this.disableLocalTimeline,
|
||||
disableGlobalTimeline: this.disableGlobalTimeline,
|
||||
enableEmojiReaction: this.enableEmojiReaction,
|
||||
useStarForReactionFallback: this.useStarForReactionFallback,
|
||||
mascotImageUrl: this.mascotImageUrl,
|
||||
bannerUrl: this.bannerUrl,
|
||||
errorImageUrl: this.errorImageUrl,
|
||||
iconUrl: this.iconUrl,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
langs: this.languages.split(' '),
|
||||
@ -287,9 +287,6 @@ export default Vue.extend({
|
||||
enableDiscordIntegration: this.enableDiscordIntegration,
|
||||
discordClientId: this.discordClientId,
|
||||
discordClientSecret: this.discordClientSecret,
|
||||
enableExternalUserRecommendation: this.enableExternalUserRecommendation,
|
||||
externalUserRecommendationEngine: this.externalUserRecommendationEngine,
|
||||
externalUserRecommendationTimeout: parseInt(this.externalUserRecommendationTimeout, 10),
|
||||
summalyProxy: this.summalyProxy,
|
||||
enableEmail: this.enableEmail,
|
||||
email: this.email,
|
||||
|
@ -4,7 +4,7 @@
|
||||
<template #title><fa :icon="faStream"/> {{ $t('logs') }}</template>
|
||||
<section class="fit-top">
|
||||
<ui-horizon-group inputs>
|
||||
<ui-input v-model="domain" debounce>
|
||||
<ui-input v-model="domain" :debounce="true">
|
||||
<span>{{ $t('domain') }}</span>
|
||||
</ui-input>
|
||||
<ui-select v-model="level">
|
||||
@ -19,7 +19,7 @@
|
||||
</ui-horizon-group>
|
||||
|
||||
<div class="nqjzuvev">
|
||||
<code v-for="log in logs" :key="log._id" :class="log.level">
|
||||
<code v-for="log in logs" :key="log.id" :class="log.level">
|
||||
<details>
|
||||
<summary><mk-time :time="log.createdAt"/> [{{ log.domain.join('.') }}] {{ log.message }}</summary>
|
||||
<vue-json-pretty v-if="log.data" :data="log.data"></vue-json-pretty>
|
||||
|
@ -1,33 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<ui-card>
|
||||
<template #title><fa :icon="faTasks"/> {{ $t('title') }}</template>
|
||||
<template #title><fa :icon="faChartBar"/> {{ $t('title') }}</template>
|
||||
<section class="wptihjuy">
|
||||
<header><fa :icon="faPaperPlane"/> Deliver</header>
|
||||
<ui-info warn v-if="latestStats && latestStats.deliver.waiting > 0">The queue is jammed.</ui-info>
|
||||
<ui-horizon-group inputs v-if="latestStats" class="fit-bottom">
|
||||
<ui-input :value="latestStats.deliver.waiting | number" type="text" readonly>
|
||||
<span>Waiting</span>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.deliver.delayed | number" type="text" readonly>
|
||||
<span>Delayed</span>
|
||||
<ui-input :value="latestStats.deliver.activeSincePrevTick | number" type="text" readonly>
|
||||
<span>Process</span>
|
||||
<template #prefix><fa :icon="fasPlayCircle"/></template>
|
||||
<template #suffix>jobs/tick</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.deliver.active | number" type="text" readonly>
|
||||
<span>Active</span>
|
||||
<template #prefix><fa :icon="farPlayCircle"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.deliver.waiting | number" type="text" readonly>
|
||||
<span>Waiting</span>
|
||||
<template #prefix><fa :icon="faStopCircle"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.deliver.delayed | number" type="text" readonly>
|
||||
<span>Delayed</span>
|
||||
<template #prefix><fa :icon="faStopwatch"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<div ref="deliverChart" class="chart"></div>
|
||||
</section>
|
||||
<section class="wptihjuy">
|
||||
<header><fa :icon="faInbox"/> Inbox</header>
|
||||
<ui-info warn v-if="latestStats && latestStats.inbox.waiting > 0">The queue is jammed.</ui-info>
|
||||
<ui-horizon-group inputs v-if="latestStats" class="fit-bottom">
|
||||
<ui-input :value="latestStats.inbox.waiting | number" type="text" readonly>
|
||||
<span>Waiting</span>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.inbox.delayed | number" type="text" readonly>
|
||||
<span>Delayed</span>
|
||||
<ui-input :value="latestStats.inbox.activeSincePrevTick | number" type="text" readonly>
|
||||
<span>Process</span>
|
||||
<template #prefix><fa :icon="fasPlayCircle"/></template>
|
||||
<template #suffix>jobs/tick</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.inbox.active | number" type="text" readonly>
|
||||
<span>Active</span>
|
||||
<template #prefix><fa :icon="farPlayCircle"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.inbox.waiting | number" type="text" readonly>
|
||||
<span>Waiting</span>
|
||||
<template #prefix><fa :icon="faStopCircle"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
<ui-input :value="latestStats.inbox.delayed | number" type="text" readonly>
|
||||
<span>Delayed</span>
|
||||
<template #prefix><fa :icon="faStopwatch"/></template>
|
||||
<template #suffix>jobs</template>
|
||||
</ui-input>
|
||||
</ui-horizon-group>
|
||||
<div ref="inboxChart" class="chart"></div>
|
||||
@ -36,6 +60,35 @@
|
||||
<ui-button @click="removeAllJobs">{{ $t('remove-all-jobs') }}</ui-button>
|
||||
</section>
|
||||
</ui-card>
|
||||
|
||||
<ui-card>
|
||||
<template #title><fa :icon="faTasks"/> {{ $t('jobs') }}</template>
|
||||
<section class="fit-top">
|
||||
<ui-horizon-group inputs>
|
||||
<ui-select v-model="domain">
|
||||
<template #label>{{ $t('queue') }}</template>
|
||||
<option value="deliver">{{ $t('domains.deliver') }}</option>
|
||||
<option value="inbox">{{ $t('domains.inbox') }}</option>
|
||||
</ui-select>
|
||||
<ui-select v-model="state">
|
||||
<template #label>{{ $t('state') }}</template>
|
||||
<option value="delayed">{{ $t('states.delayed') }}</option>
|
||||
</ui-select>
|
||||
</ui-horizon-group>
|
||||
<sequential-entrance animation="entranceFromTop" delay="25">
|
||||
<div class="xvvuvgsv" v-for="job in jobs">
|
||||
<b>{{ job.id }}</b>
|
||||
<template v-if="domain === 'deliver'">
|
||||
<span>{{ job.data.to }}</span>
|
||||
</template>
|
||||
<template v-if="domain === 'inbox'">
|
||||
<span>{{ job.activity.id }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</sequential-entrance>
|
||||
<ui-info v-if="jobs.length == jobsLimit">{{ $t('result-is-truncated', { n: jobsLimit }) }}</ui-info>
|
||||
</section>
|
||||
</ui-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -44,8 +97,10 @@ import Vue from 'vue';
|
||||
import i18n from '../../i18n';
|
||||
import ApexCharts from 'apexcharts';
|
||||
import * as tinycolor from 'tinycolor2';
|
||||
import { faTasks, faInbox } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
|
||||
import { faTasks, faInbox, faStopwatch, faPlayCircle as fasPlayCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faPaperPlane, faStopCircle, faPlayCircle as farPlayCircle, faChartBar } from '@fortawesome/free-regular-svg-icons';
|
||||
|
||||
const limit = 200;
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('admin/views/queue.vue'),
|
||||
@ -55,7 +110,11 @@ export default Vue.extend({
|
||||
stats: [],
|
||||
deliverChart: null,
|
||||
inboxChart: null,
|
||||
faTasks, faPaperPlane, faInbox
|
||||
jobs: [],
|
||||
jobsLimit: 50,
|
||||
domain: 'deliver',
|
||||
state: 'delayed',
|
||||
faTasks, faPaperPlane, faInbox, faStopwatch, faStopCircle, farPlayCircle, fasPlayCircle, faChartBar
|
||||
};
|
||||
},
|
||||
|
||||
@ -68,31 +127,59 @@ export default Vue.extend({
|
||||
watch: {
|
||||
stats(stats) {
|
||||
this.inboxChart.updateSeries([{
|
||||
name: 'Active',
|
||||
name: 'Process',
|
||||
type: 'area',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.activeSincePrevTick }))
|
||||
}, {
|
||||
name: 'Active',
|
||||
type: 'area',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.active }))
|
||||
}, {
|
||||
name: 'Waiting',
|
||||
type: 'line',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.waiting }))
|
||||
}, {
|
||||
name: 'Delayed',
|
||||
type: 'line',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.inbox.delayed }))
|
||||
}]);
|
||||
this.deliverChart.updateSeries([{
|
||||
name: 'Active',
|
||||
name: 'Process',
|
||||
type: 'area',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.activeSincePrevTick }))
|
||||
}, {
|
||||
name: 'Active',
|
||||
type: 'area',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.active }))
|
||||
}, {
|
||||
name: 'Waiting',
|
||||
type: 'line',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.waiting }))
|
||||
}, {
|
||||
name: 'Delayed',
|
||||
type: 'line',
|
||||
data: stats.map((x, i) => ({ x: i, y: x.deliver.delayed }))
|
||||
}]);
|
||||
}
|
||||
},
|
||||
|
||||
domain() {
|
||||
this.jobs = [];
|
||||
this.fetchJobs();
|
||||
},
|
||||
|
||||
state() {
|
||||
this.jobs = [];
|
||||
this.fetchJobs();
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
const chartOpts = {
|
||||
this.fetchJobs();
|
||||
|
||||
const chartOpts = id => ({
|
||||
chart: {
|
||||
id,
|
||||
group: 'queue',
|
||||
type: 'area',
|
||||
height: 200,
|
||||
animations: {
|
||||
@ -112,7 +199,12 @@ export default Vue.extend({
|
||||
},
|
||||
grid: {
|
||||
clipMarkers: false,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)'
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
xaxis: {
|
||||
lines: {
|
||||
show: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
stroke: {
|
||||
curve: 'straight',
|
||||
@ -127,7 +219,7 @@ export default Vue.extend({
|
||||
},
|
||||
},
|
||||
series: [] as any,
|
||||
colors: ['#00BCD4', '#FFEB3B', '#e53935'],
|
||||
colors: ['#00E396', '#00BCD4', '#FFB300', '#e53935'],
|
||||
xaxis: {
|
||||
type: 'numeric',
|
||||
labels: {
|
||||
@ -141,10 +233,10 @@ export default Vue.extend({
|
||||
show: false,
|
||||
min: 0,
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
this.inboxChart = new ApexCharts(this.$refs.inboxChart, chartOpts);
|
||||
this.deliverChart = new ApexCharts(this.$refs.deliverChart, chartOpts);
|
||||
this.inboxChart = new ApexCharts(this.$refs.inboxChart, chartOpts('a'));
|
||||
this.deliverChart = new ApexCharts(this.$refs.deliverChart, chartOpts('b'));
|
||||
|
||||
this.inboxChart.render();
|
||||
this.deliverChart.render();
|
||||
@ -154,7 +246,7 @@ export default Vue.extend({
|
||||
connection.on('statsLog', this.onStatsLog);
|
||||
connection.send('requestLog', {
|
||||
id: Math.random().toString().substr(2, 8),
|
||||
length: 100
|
||||
length: limit
|
||||
});
|
||||
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
@ -184,14 +276,24 @@ export default Vue.extend({
|
||||
|
||||
onStats(stats) {
|
||||
this.stats.push(stats);
|
||||
if (this.stats.length > 100) this.stats.shift();
|
||||
if (this.stats.length > limit) this.stats.shift();
|
||||
},
|
||||
|
||||
onStatsLog(statsLog) {
|
||||
for (const stats of statsLog.reverse()) {
|
||||
this.onStats(stats);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
fetchJobs() {
|
||||
this.$root.api('admin/queue/jobs', {
|
||||
domain: this.domain,
|
||||
state: this.state,
|
||||
limit: this.jobsLimit
|
||||
}).then(jobs => {
|
||||
this.jobs = jobs;
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -200,5 +302,10 @@ export default Vue.extend({
|
||||
.wptihjuy
|
||||
> .chart
|
||||
min-height 200px !important
|
||||
margin 0 -8px
|
||||
|
||||
.xvvuvgsv
|
||||
> b
|
||||
margin-right 16px
|
||||
|
||||
</style>
|
||||
|
@ -165,7 +165,7 @@ export default Vue.extend({
|
||||
|
||||
/** 処理対象ユーザーの情報を更新する */
|
||||
async refreshUser() {
|
||||
this.$root.api('admin/show-user', { userId: this.user._id }).then(info => {
|
||||
this.$root.api('admin/show-user', { userId: this.user.id }).then(info => {
|
||||
this.user = info;
|
||||
});
|
||||
},
|
||||
@ -173,7 +173,7 @@ export default Vue.extend({
|
||||
async resetPassword() {
|
||||
if (!await this.getConfirmed(this.$t('reset-password-confirm'))) return;
|
||||
|
||||
this.$root.api('admin/reset-password', { userId: this.user._id }).then(res => {
|
||||
this.$root.api('admin/reset-password', { userId: this.user.id }).then(res => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('password-updated', { password: res.password })
|
||||
@ -187,7 +187,7 @@ export default Vue.extend({
|
||||
this.verifying = true;
|
||||
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/verify-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/verify-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('verified')
|
||||
@ -212,7 +212,7 @@ export default Vue.extend({
|
||||
this.unverifying = true;
|
||||
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/unverify-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/unverify-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('unverified')
|
||||
@ -233,7 +233,7 @@ export default Vue.extend({
|
||||
|
||||
async silenceUser() {
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/silence-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/silence-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
@ -252,7 +252,7 @@ export default Vue.extend({
|
||||
|
||||
async unsilenceUser() {
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/unsilence-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/unsilence-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
@ -275,7 +275,7 @@ export default Vue.extend({
|
||||
this.suspending = true;
|
||||
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/suspend-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/suspend-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('suspended')
|
||||
@ -300,7 +300,7 @@ export default Vue.extend({
|
||||
this.unsuspending = true;
|
||||
|
||||
const process = async () => {
|
||||
await this.$root.api('admin/unsuspend-user', { userId: this.user._id });
|
||||
await this.$root.api('admin/unsuspend-user', { userId: this.user.id });
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('unsuspended')
|
||||
@ -320,7 +320,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
async updateRemoteUser() {
|
||||
this.$root.api('admin/update-remote-user', { userId: this.user._id }).then(res => {
|
||||
this.$root.api('admin/update-remote-user', { userId: this.user.id }).then(res => {
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('remote-user-updated')
|
||||
|
@ -14,15 +14,7 @@
|
||||
<h2>{{ $t('permission-ask') }}</h2>
|
||||
<ul>
|
||||
<template v-for="p in app.permission">
|
||||
<li v-if="p == 'account-read'">{{ $t('account-read') }}</li>
|
||||
<li v-if="p == 'account-write'">{{ $t('account-write') }}</li>
|
||||
<li v-if="p == 'note-write'">{{ $t('note-write') }}</li>
|
||||
<li v-if="p == 'like-write'">{{ $t('like-write') }}</li>
|
||||
<li v-if="p == 'following-write'">{{ $t('following-write') }}</li>
|
||||
<li v-if="p == 'drive-read'">{{ $t('drive-read') }}</li>
|
||||
<li v-if="p == 'drive-write'">{{ $t('drive-write') }}</li>
|
||||
<li v-if="p == 'notification-read'">{{ $t('notification-read') }}</li>
|
||||
<li v-if="p == 'notification-write'">{{ $t('notification-write') }}</li>
|
||||
<li :key="p">{{ $t(`@.permissions.${p}`) }}</li>
|
||||
</template>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -45,15 +45,9 @@ export default function <T extends object>(data: {
|
||||
this.$watch('props', () => {
|
||||
this.mergeProps();
|
||||
});
|
||||
|
||||
this.bakeProps();
|
||||
},
|
||||
|
||||
methods: {
|
||||
bakeProps() {
|
||||
this.bakedOldProps = JSON.stringify(this.props);
|
||||
},
|
||||
|
||||
mergeProps() {
|
||||
if (data.props) {
|
||||
const defaultProps = data.props();
|
||||
@ -65,17 +59,10 @@ export default function <T extends object>(data: {
|
||||
},
|
||||
|
||||
save() {
|
||||
if (this.bakedOldProps == JSON.stringify(this.props)) return;
|
||||
|
||||
this.bakeProps();
|
||||
|
||||
if (this.platform == 'deck') {
|
||||
this.$store.commit('device/updateDeckColumn', this.column);
|
||||
} else {
|
||||
this.$root.api('i/update_widget', {
|
||||
id: this.id,
|
||||
data: this.props
|
||||
});
|
||||
this.$store.commit('device/updateWidget', this.widget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,8 @@ export default (opts: Opts = {}) => ({
|
||||
},
|
||||
|
||||
reactionsCount(): number {
|
||||
return this.appearNote.reactionCounts
|
||||
? sum(Object.values(this.appearNote.reactionCounts))
|
||||
return this.appearNote.reactions
|
||||
? sum(Object.values(this.appearNote.reactions))
|
||||
: 0;
|
||||
},
|
||||
|
||||
|
@ -87,16 +87,16 @@ export default prop => ({
|
||||
case 'reacted': {
|
||||
const reaction = body.reaction;
|
||||
|
||||
if (this.$_ns_target.reactionCounts == null) {
|
||||
Vue.set(this.$_ns_target, 'reactionCounts', {});
|
||||
if (this.$_ns_target.reactions == null) {
|
||||
Vue.set(this.$_ns_target, 'reactions', {});
|
||||
}
|
||||
|
||||
if (this.$_ns_target.reactionCounts[reaction] == null) {
|
||||
Vue.set(this.$_ns_target.reactionCounts, reaction, 0);
|
||||
if (this.$_ns_target.reactions[reaction] == null) {
|
||||
Vue.set(this.$_ns_target.reactions, reaction, 0);
|
||||
}
|
||||
|
||||
// Increment the count
|
||||
this.$_ns_target.reactionCounts[reaction]++;
|
||||
this.$_ns_target.reactions[reaction]++;
|
||||
|
||||
if (body.userId == this.$store.state.i.id) {
|
||||
Vue.set(this.$_ns_target, 'myReaction', reaction);
|
||||
@ -107,16 +107,16 @@ export default prop => ({
|
||||
case 'unreacted': {
|
||||
const reaction = body.reaction;
|
||||
|
||||
if (this.$_ns_target.reactionCounts == null) {
|
||||
if (this.$_ns_target.reactions == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.$_ns_target.reactionCounts[reaction] == null) {
|
||||
if (this.$_ns_target.reactions[reaction] == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Decrement the count
|
||||
if (this.$_ns_target.reactionCounts[reaction] > 0) this.$_ns_target.reactionCounts[reaction]--;
|
||||
if (this.$_ns_target.reactions[reaction] > 0) this.$_ns_target.reactions[reaction]--;
|
||||
|
||||
if (body.userId == this.$store.state.i.id) {
|
||||
Vue.set(this.$_ns_target, 'myReaction', null);
|
||||
@ -125,9 +125,11 @@ export default prop => ({
|
||||
}
|
||||
|
||||
case 'pollVoted': {
|
||||
if (body.userId == this.$store.state.i.id) return;
|
||||
const choice = body.choice;
|
||||
this.$_ns_target.poll.choices.find(c => c.id === choice).votes++;
|
||||
this.$_ns_target.poll.choices[choice].votes++;
|
||||
if (body.userId == this.$store.state.i.id) {
|
||||
Vue.set(this.$_ns_target.poll.choices[choice], 'isVoted', true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ export default Vue.extend({
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
columnWidth: '90%'
|
||||
columnWidth: '80%'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
|
@ -30,6 +30,7 @@
|
||||
import Vue from 'vue';
|
||||
import * as emojilib from 'emojilib';
|
||||
import contains from '../../../common/scripts/contains';
|
||||
import { twemojiBase } from '../../../../../misc/twemoji-base';
|
||||
|
||||
type EmojiDef = {
|
||||
emoji: string;
|
||||
@ -54,7 +55,7 @@ const emjdb: EmojiDef[] = lib.map((x: any) => ({
|
||||
emoji: x[1].char,
|
||||
name: x[0],
|
||||
aliasOf: null,
|
||||
url: `https://twemoji.maxcdn.com/2/svg/${char2file(x[1].char)}.svg`
|
||||
url: `${twemojiBase}/2/svg/${char2file(x[1].char)}.svg`
|
||||
}));
|
||||
|
||||
for (const x of lib as any) {
|
||||
@ -64,7 +65,7 @@ for (const x of lib as any) {
|
||||
emoji: x[1].char,
|
||||
name: k,
|
||||
aliasOf: x[0],
|
||||
url: `https://twemoji.maxcdn.com/2/svg/${char2file(x[1].char)}.svg`
|
||||
url: `${twemojiBase}/2/svg/${char2file(x[1].char)}.svg`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -55,11 +55,7 @@ export default Vue.extend({
|
||||
},
|
||||
icon(): any {
|
||||
return {
|
||||
backgroundColor: this.lightmode
|
||||
? `rgb(${this.user.avatarColor.slice(0, 3).join(',')})`
|
||||
: this.user.avatarColor && this.user.avatarColor.length == 3
|
||||
? `rgb(${this.user.avatarColor.join(',')})`
|
||||
: null,
|
||||
backgroundColor: this.user.avatarColor,
|
||||
backgroundImage: this.lightmode ? null : `url(${this.url})`,
|
||||
borderRadius: this.$store.state.settings.circleIcons ? '100%' : null
|
||||
};
|
||||
@ -67,7 +63,7 @@ export default Vue.extend({
|
||||
},
|
||||
mounted() {
|
||||
if (this.user.avatarColor) {
|
||||
this.$el.style.color = `rgb(${this.user.avatarColor.slice(0, 3).join(',')})`;
|
||||
this.$el.style.color = this.user.avatarColor;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
185
src/client/app/common/views/components/drive-file-thumbnail.vue
Normal file
185
src/client/app/common/views/components/drive-file-thumbnail.vue
Normal file
@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div class="zdjebgpv" :class="{ detail }" ref="thumbnail" :style="`background-color: ${ background }`">
|
||||
<img
|
||||
:src="file.url"
|
||||
:alt="file.name"
|
||||
:title="file.name"
|
||||
@load="onThumbnailLoaded"
|
||||
v-if="detail && is === 'image'"/>
|
||||
<video
|
||||
:src="file.url"
|
||||
ref="volumectrl"
|
||||
preload="metadata"
|
||||
controls
|
||||
v-else-if="detail && is === 'video'"/>
|
||||
<img :src="file.thumbnailUrl" alt="" @load="onThumbnailLoaded" :style="`object-fit: ${ fit }`" v-else-if="isThumbnailAvailable"/>
|
||||
<fa :icon="faFileImage" class="icon" v-else-if="is === 'image'"/>
|
||||
<fa :icon="faFileVideo" class="icon" v-else-if="is === 'video'"/>
|
||||
|
||||
<audio
|
||||
:src="file.url"
|
||||
ref="volumectrl"
|
||||
preload="metadata"
|
||||
controls
|
||||
v-else-if="detail && is === 'audio'"/>
|
||||
<fa :icon="faMusic" class="icon" v-else-if="is === 'audio' || is === 'midi'"/>
|
||||
|
||||
<fa :icon="faFileCsv" class="icon" v-else-if="is === 'csv'"/>
|
||||
<fa :icon="faFilePdf" class="icon" v-else-if="is === 'pdf'"/>
|
||||
<fa :icon="faFileAlt" class="icon" v-else-if="is === 'textfile'"/>
|
||||
<fa :icon="faFileArchive" class="icon" v-else-if="is === 'archive'"/>
|
||||
<fa :icon="faFile" class="icon" v-else/>
|
||||
|
||||
<fa :icon="faFilm" class="icon-sub" v-if="!detail && isThumbnailAvailable && is === 'video'"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import anime from 'animejs';
|
||||
import {
|
||||
faFile,
|
||||
faFileAlt,
|
||||
faFileImage,
|
||||
faMusic,
|
||||
faFileVideo,
|
||||
faFileCsv,
|
||||
faFilePdf,
|
||||
faFileArchive,
|
||||
faFilm
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
file: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
fit: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
detail: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isContextmenuShowing: false,
|
||||
isDragging: false,
|
||||
|
||||
faFile,
|
||||
faFileAlt,
|
||||
faFileImage,
|
||||
faMusic,
|
||||
faFileVideo,
|
||||
faFileCsv,
|
||||
faFilePdf,
|
||||
faFileArchive,
|
||||
faFilm
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
is(): 'image' | 'video' | 'midi' | 'audio' | 'csv' | 'pdf' | 'textfile' | 'archive' | 'unknown' {
|
||||
if (this.file.type.startsWith('image/')) return 'image';
|
||||
if (this.file.type.startsWith('video/')) return 'video';
|
||||
if (this.file.type === 'audio/midi') return 'midi';
|
||||
if (this.file.type.startsWith('audio/')) return 'audio';
|
||||
if (this.file.type.endsWith('/csv')) return 'csv';
|
||||
if (this.file.type.endsWith('/pdf')) return 'pdf';
|
||||
if (this.file.type.startsWith('text/')) return 'textfile';
|
||||
if ([
|
||||
"application/zip",
|
||||
"application/x-cpio",
|
||||
"application/x-bzip",
|
||||
"application/x-bzip2",
|
||||
"application/java-archive",
|
||||
"application/x-rar-compressed",
|
||||
"application/x-tar",
|
||||
"application/gzip",
|
||||
"application/x-7z-compressed"
|
||||
].some(e => e === this.file.type)) return 'archive';
|
||||
return 'unknown';
|
||||
},
|
||||
isThumbnailAvailable(): boolean {
|
||||
return this.file.thumbnailUrl
|
||||
? this.file.thumbnailUrl.endsWith('?thumbnail')
|
||||
? (this.is === 'image' || this.is === 'video')
|
||||
: true
|
||||
: false;
|
||||
},
|
||||
background(): string {
|
||||
return this.file.properties.avgColor || 'transparent';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const audioTag = this.$refs.volumectrl as HTMLAudioElement;
|
||||
if (audioTag) audioTag.volume = this.$store.state.device.mediaVolume;
|
||||
},
|
||||
methods: {
|
||||
onThumbnailLoaded() {
|
||||
if (this.file.properties.avgColor) {
|
||||
anime({
|
||||
targets: this.$refs.thumbnail,
|
||||
backgroundColor: this.file.properties.avgColor.replace('255)', '0)'),
|
||||
duration: 100,
|
||||
easing: 'linear'
|
||||
});
|
||||
}
|
||||
},
|
||||
volumechange() {
|
||||
const audioTag = this.$refs.volumectrl as HTMLAudioElement;
|
||||
this.$store.commit('device/set', { key: 'mediaVolume', value: audioTag.volume });
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.zdjebgpv
|
||||
display flex
|
||||
|
||||
> img,
|
||||
> .icon
|
||||
pointer-events none
|
||||
|
||||
> .icon-sub
|
||||
position absolute
|
||||
width 30%
|
||||
height auto
|
||||
margin 0
|
||||
right 4%
|
||||
bottom 4%
|
||||
|
||||
> *
|
||||
margin auto
|
||||
|
||||
&:not(.detail)
|
||||
> img
|
||||
height 100%
|
||||
width 100%
|
||||
object-fit cover
|
||||
|
||||
> .icon
|
||||
height 65%
|
||||
width 65%
|
||||
|
||||
> video,
|
||||
> audio
|
||||
width 100%
|
||||
|
||||
&.detail
|
||||
> .icon
|
||||
height 100px
|
||||
width 100px
|
||||
margin 16px
|
||||
|
||||
> *:not(.icon)
|
||||
max-height 300px
|
||||
max-width 100%
|
||||
height 100%
|
||||
object-fit contain
|
||||
|
||||
</style>
|
@ -10,6 +10,7 @@ import Vue from 'vue';
|
||||
// スクリプトサイズがデカい
|
||||
//import { lib } from 'emojilib';
|
||||
import { getStaticImageUrl } from '../../../common/scripts/get-static-image-url';
|
||||
import { twemojiBase } from '../../../../../misc/twemoji-base';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
@ -29,7 +30,11 @@ export default Vue.extend({
|
||||
customEmojis: {
|
||||
required: false,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
isReaction: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -46,7 +51,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
useOsDefaultEmojis(): boolean {
|
||||
return this.$store.state.device.useOsDefaultEmojis;
|
||||
return this.$store.state.device.useOsDefaultEmojis && !this.isReaction;
|
||||
}
|
||||
},
|
||||
|
||||
@ -73,7 +78,7 @@ export default Vue.extend({
|
||||
if (!codes.includes('200d')) codes = codes.filter(x => x != 'fe0f');
|
||||
codes = codes.filter(x => x && x.length);
|
||||
|
||||
this.url = `https://twemoji.maxcdn.com/2/svg/${codes.join('-')}.svg`;
|
||||
this.url = `${twemojiBase}/2/svg/${codes.join('-')}.svg`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a class="a" :href="repo" target="_blank" title="View source on GitHub">
|
||||
<a class="a" :href="repositoryUrl" target="_blank" title="View source on GitHub">
|
||||
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="aria-hidden">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
||||
<path class="octo-arm" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor"></path>
|
||||
@ -15,12 +15,6 @@ export default Vue.extend({
|
||||
return {
|
||||
repositoryUrl: 'https://github.com/syuilo/misskey'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
if (meta.maintainer)
|
||||
this.repositoryUrl = meta.maintainer.repository_url;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
<div class="board">
|
||||
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||
<span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
||||
<div v-for="i in game.map.length">{{ i }}</div>
|
||||
</div>
|
||||
<div class="cells" :style="cellsStyle">
|
||||
<div v-for="(stone, i) in o.board"
|
||||
@ -46,11 +46,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="labels-y" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||
<div v-for="i in game.settings.map.length">{{ i }}</div>
|
||||
<div v-for="i in game.map.length">{{ i }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="labels-x" v-if="this.$store.state.settings.games.reversi.showBoardLabels">
|
||||
<span v-for="i in game.settings.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||
<span v-for="i in game.map[0].length">{{ String.fromCharCode(64 + i) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -71,9 +71,9 @@
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<p v-if="game.settings.isLlotheo">{{ $t('is-llotheo') }}</p>
|
||||
<p v-if="game.settings.loopedBoard">{{ $t('looped-map') }}</p>
|
||||
<p v-if="game.settings.canPutEverywhere">{{ $t('can-put-everywhere') }}</p>
|
||||
<p v-if="game.isLlotheo">{{ $t('is-llotheo') }}</p>
|
||||
<p v-if="game.loopedBoard">{{ $t('looped-map') }}</p>
|
||||
<p v-if="game.canPutEverywhere">{{ $t('can-put-everywhere') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -160,8 +160,8 @@ export default Vue.extend({
|
||||
|
||||
cellsStyle(): any {
|
||||
return {
|
||||
'grid-template-rows': `repeat(${this.game.settings.map.length}, 1fr)`,
|
||||
'grid-template-columns': `repeat(${this.game.settings.map[0].length}, 1fr)`
|
||||
'grid-template-rows': `repeat(${this.game.map.length}, 1fr)`,
|
||||
'grid-template-columns': `repeat(${this.game.map[0].length}, 1fr)`
|
||||
};
|
||||
}
|
||||
},
|
||||
@ -169,10 +169,10 @@ export default Vue.extend({
|
||||
watch: {
|
||||
logPos(v) {
|
||||
if (!this.game.isEnded) return;
|
||||
this.o = new Reversi(this.game.settings.map, {
|
||||
isLlotheo: this.game.settings.isLlotheo,
|
||||
canPutEverywhere: this.game.settings.canPutEverywhere,
|
||||
loopedBoard: this.game.settings.loopedBoard
|
||||
this.o = new Reversi(this.game.map, {
|
||||
isLlotheo: this.game.isLlotheo,
|
||||
canPutEverywhere: this.game.canPutEverywhere,
|
||||
loopedBoard: this.game.loopedBoard
|
||||
});
|
||||
for (const log of this.logs.slice(0, v)) {
|
||||
this.o.put(log.color, log.pos);
|
||||
@ -184,10 +184,10 @@ export default Vue.extend({
|
||||
created() {
|
||||
this.game = this.initGame;
|
||||
|
||||
this.o = new Reversi(this.game.settings.map, {
|
||||
isLlotheo: this.game.settings.isLlotheo,
|
||||
canPutEverywhere: this.game.settings.canPutEverywhere,
|
||||
loopedBoard: this.game.settings.loopedBoard
|
||||
this.o = new Reversi(this.game.map, {
|
||||
isLlotheo: this.game.isLlotheo,
|
||||
canPutEverywhere: this.game.canPutEverywhere,
|
||||
loopedBoard: this.game.loopedBoard
|
||||
});
|
||||
|
||||
for (const log of this.game.logs) {
|
||||
@ -286,10 +286,10 @@ export default Vue.extend({
|
||||
onRescue(game) {
|
||||
this.game = game;
|
||||
|
||||
this.o = new Reversi(this.game.settings.map, {
|
||||
isLlotheo: this.game.settings.isLlotheo,
|
||||
canPutEverywhere: this.game.settings.canPutEverywhere,
|
||||
loopedBoard: this.game.settings.loopedBoard
|
||||
this.o = new Reversi(this.game.map, {
|
||||
isLlotheo: this.game.isLlotheo,
|
||||
canPutEverywhere: this.game.canPutEverywhere,
|
||||
loopedBoard: this.game.loopedBoard
|
||||
});
|
||||
|
||||
for (const log of this.game.logs) {
|
||||
|
@ -17,9 +17,9 @@
|
||||
</header>
|
||||
|
||||
<div>
|
||||
<div class="random" v-if="game.settings.map == null"><fa icon="dice"/></div>
|
||||
<div class="board" v-else :style="{ 'grid-template-rows': `repeat(${ game.settings.map.length }, 1fr)`, 'grid-template-columns': `repeat(${ game.settings.map[0].length }, 1fr)` }">
|
||||
<div v-for="(x, i) in game.settings.map.join('')"
|
||||
<div class="random" v-if="game.map == null"><fa icon="dice"/></div>
|
||||
<div class="board" v-else :style="{ 'grid-template-rows': `repeat(${ game.map.length }, 1fr)`, 'grid-template-columns': `repeat(${ game.map[0].length }, 1fr)` }">
|
||||
<div v-for="(x, i) in game.map.join('')"
|
||||
:data-none="x == ' '"
|
||||
@click="onPixelClick(i, x)">
|
||||
<fa v-if="x == 'b'" :icon="fasCircle"/>
|
||||
@ -35,9 +35,9 @@
|
||||
</header>
|
||||
|
||||
<div>
|
||||
<form-radio v-model="game.settings.bw" value="random" @change="updateSettings">{{ $t('random') }}</form-radio>
|
||||
<form-radio v-model="game.settings.bw" :value="1" @change="updateSettings">{{ this.$t('black-is').split('{}')[0] }}<b><mk-user-name :user="game.user1"/></b>{{ this.$t('black-is').split('{}')[1] }}</form-radio>
|
||||
<form-radio v-model="game.settings.bw" :value="2" @change="updateSettings">{{ this.$t('black-is').split('{}')[0] }}<b><mk-user-name :user="game.user2"/></b>{{ this.$t('black-is').split('{}')[1] }}</form-radio>
|
||||
<form-radio v-model="game.bw" value="random" @change="updateSettings('bw')">{{ $t('random') }}</form-radio>
|
||||
<form-radio v-model="game.bw" :value="1" @change="updateSettings('bw')">{{ this.$t('black-is').split('{}')[0] }}<b><mk-user-name :user="game.user1"/></b>{{ this.$t('black-is').split('{}')[1] }}</form-radio>
|
||||
<form-radio v-model="game.bw" :value="2" @change="updateSettings('bw')">{{ this.$t('black-is').split('{}')[0] }}<b><mk-user-name :user="game.user2"/></b>{{ this.$t('black-is').split('{}')[1] }}</form-radio>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -47,9 +47,9 @@
|
||||
</header>
|
||||
|
||||
<div>
|
||||
<ui-switch v-model="game.settings.isLlotheo" @change="updateSettings">{{ $t('is-llotheo') }}</ui-switch>
|
||||
<ui-switch v-model="game.settings.loopedBoard" @change="updateSettings">{{ $t('looped-map') }}</ui-switch>
|
||||
<ui-switch v-model="game.settings.canPutEverywhere" @change="updateSettings">{{ $t('can-put-everywhere') }}</ui-switch>
|
||||
<ui-switch v-model="game.isLlotheo" @change="updateSettings('isLlotheo')">{{ $t('is-llotheo') }}</ui-switch>
|
||||
<ui-switch v-model="game.loopedBoard" @change="updateSettings('loopedBoard')">{{ $t('looped-map') }}</ui-switch>
|
||||
<ui-switch v-model="game.canPutEverywhere" @change="updateSettings('canPutEverywhere')">{{ $t('can-put-everywhere') }}</ui-switch>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -159,8 +159,8 @@ export default Vue.extend({
|
||||
this.connection.on('initForm', this.onInitForm);
|
||||
this.connection.on('message', this.onMessage);
|
||||
|
||||
if (this.game.user1Id != this.$store.state.i.id && this.game.settings.form1) this.form = this.game.settings.form1;
|
||||
if (this.game.user2Id != this.$store.state.i.id && this.game.settings.form2) this.form = this.game.settings.form2;
|
||||
if (this.game.user1Id != this.$store.state.i.id && this.game.form1) this.form = this.game.form1;
|
||||
if (this.game.user2Id != this.$store.state.i.id && this.game.form2) this.form = this.game.form2;
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
@ -189,18 +189,19 @@ export default Vue.extend({
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
updateSettings() {
|
||||
updateSettings(key: string) {
|
||||
this.connection.send('updateSettings', {
|
||||
settings: this.game.settings
|
||||
key: key,
|
||||
value: this.game[key]
|
||||
});
|
||||
},
|
||||
|
||||
onUpdateSettings(settings) {
|
||||
this.game.settings = settings;
|
||||
if (this.game.settings.map == null) {
|
||||
onUpdateSettings({ key, value }) {
|
||||
this.game[key] = value;
|
||||
if (this.game.map == null) {
|
||||
this.mapName = null;
|
||||
} else {
|
||||
const found = Object.values(maps).find(x => x.data.join('') == this.game.settings.map.join(''));
|
||||
const found = Object.values(maps).find(x => x.data.join('') == this.game.map.join(''));
|
||||
this.mapName = found ? found.name : '-Custom-';
|
||||
}
|
||||
},
|
||||
@ -224,27 +225,27 @@ export default Vue.extend({
|
||||
|
||||
onMapChange() {
|
||||
if (this.mapName == null) {
|
||||
this.game.settings.map = null;
|
||||
this.game.map = null;
|
||||
} else {
|
||||
this.game.settings.map = Object.values(maps).find(x => x.name == this.mapName).data;
|
||||
this.game.map = Object.values(maps).find(x => x.name == this.mapName).data;
|
||||
}
|
||||
this.$forceUpdate();
|
||||
this.updateSettings();
|
||||
},
|
||||
|
||||
onPixelClick(pos, pixel) {
|
||||
const x = pos % this.game.settings.map[0].length;
|
||||
const y = Math.floor(pos / this.game.settings.map[0].length);
|
||||
const x = pos % this.game.map[0].length;
|
||||
const y = Math.floor(pos / this.game.map[0].length);
|
||||
const newPixel =
|
||||
pixel == ' ' ? '-' :
|
||||
pixel == '-' ? 'b' :
|
||||
pixel == 'b' ? 'w' :
|
||||
' ';
|
||||
const line = this.game.settings.map[y].split('');
|
||||
const line = this.game.map[y].split('');
|
||||
line[x] = newPixel;
|
||||
this.$set(this.game.settings.map, y, line.join(''));
|
||||
this.$set(this.game.map, y, line.join(''));
|
||||
this.$forceUpdate();
|
||||
this.updateSettings();
|
||||
this.updateSettings('map');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -106,7 +106,7 @@ export default Vue.extend({
|
||||
async nav(game, actualNav = true) {
|
||||
if (this.selfNav) {
|
||||
// 受け取ったゲーム情報が省略されたものなら完全な情報を取得する
|
||||
if (game != null && (game.settings == null || game.settings.map == null)) {
|
||||
if (game != null && game.map == null) {
|
||||
game = await this.$root.api('games/reversi/games/show', {
|
||||
gameId: game.id
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="nhasjydimbopojusarffqjyktglcuxjy" v-if="meta">
|
||||
<div class="banner" :style="{ backgroundImage: meta.bannerUrl ? `url(${meta.bannerUrl})` : null }"></div>
|
||||
|
||||
<h1>{{ meta.name }}</h1>
|
||||
<h1>{{ meta.name || 'Misskey' }}</h1>
|
||||
<p v-html="meta.description || this.$t('@.about')"></p>
|
||||
<router-link to="/">{{ $t('start') }}</router-link>
|
||||
</div>
|
||||
|
@ -52,7 +52,7 @@ export default Vue.extend({
|
||||
}
|
||||
|
||||
return {
|
||||
'background-color': this.image.properties.avgColor && this.image.properties.avgColor.length == 3 ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
|
||||
'background-color': this.image.properties.avgColor || 'transparent',
|
||||
'background-image': url
|
||||
};
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
canonical(): string {
|
||||
return `@${this.username}@${toUnicode(this.host)}`;
|
||||
return this.host === localHost ? `@${this.username}` : `@${this.username}@${toUnicode(this.host)}`;
|
||||
},
|
||||
isMe(): boolean {
|
||||
return this.$store.getters.isSignedIn && this.canonical.toLowerCase() === `@${this.$store.state.i.username}@${toUnicode(localHost)}`.toLowerCase();
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div class="file" v-if="message.file">
|
||||
<a :href="message.file.url" target="_blank" :title="message.file.name">
|
||||
<img v-if="message.file.type.split('/')[0] == 'image'" :src="message.file.url" :alt="message.file.name"
|
||||
:style="{ backgroundColor: message.file.properties.avgColor && message.file.properties.avgColor.length == 3 ? `rgb(${message.file.properties.avgColor.join(',')})` : 'transparent' }"/>
|
||||
:style="{ backgroundColor: message.file.properties.avgColor || 'transparent' }"/>
|
||||
<p v-else>{{ message.file.name }}</p>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -23,12 +23,6 @@ export default Vue.extend({
|
||||
repositoryUrl: 'https://github.com/syuilo/misskey',
|
||||
feedbackUrl: 'https://github.com/syuilo/misskey/issues/new'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
if (meta.maintainer.repository_url) this.repositoryUrl = meta.maintainer.repository_url;
|
||||
if (meta.maintainer.feedback_url) this.feedbackUrl = meta.maintainer.feedback_url;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="mk-poll" :data-done="closed || isVoted">
|
||||
<ul>
|
||||
<li v-for="choice in poll.choices" :key="choice.id" @click="vote(choice.id)" :class="{ voted: choice.voted }" :title="!closed && !isVoted ? $t('vote-to').replace('{}', choice.text) : ''">
|
||||
<li v-for="(choice, i) in poll.choices" :key="i" @click="vote(i)" :class="{ voted: choice.voted }" :title="!closed && !isVoted ? $t('vote-to').replace('{}', choice.text) : ''">
|
||||
<div class="backdrop" :style="{ 'width': `${showResult ? (choice.votes / total * 100) : 0}%` }"></div>
|
||||
<span>
|
||||
<template v-if="choice.isVoted"><fa icon="check"/></template>
|
||||
@ -82,12 +82,6 @@ export default Vue.extend({
|
||||
noteId: this.note.id,
|
||||
choice: id
|
||||
}).then(() => {
|
||||
for (const c of this.poll.choices) {
|
||||
if (c.id == id) {
|
||||
c.votes++;
|
||||
Vue.set(c, 'isVoted', true);
|
||||
}
|
||||
}
|
||||
if (!this.showResult) this.showResult = !this.poll.multiple;
|
||||
});
|
||||
}
|
||||
|
@ -1,19 +1,5 @@
|
||||
<template>
|
||||
<span class="mk-reaction-icon">
|
||||
<img v-if="reaction == 'like'" src="https://twemoji.maxcdn.com/2/svg/1f44d.svg" :alt="$t('@.reactions.like')">
|
||||
<img v-if="reaction == 'love'" src="https://twemoji.maxcdn.com/2/svg/2764.svg" :alt="$t('@.reactions.love')">
|
||||
<img v-if="reaction == 'laugh'" src="https://twemoji.maxcdn.com/2/svg/1f606.svg" :alt="$t('@.reactions.laugh')">
|
||||
<img v-if="reaction == 'hmm'" src="https://twemoji.maxcdn.com/2/svg/1f914.svg" :alt="$t('@.reactions.hmm')">
|
||||
<img v-if="reaction == 'surprise'" src="https://twemoji.maxcdn.com/2/svg/1f62e.svg" :alt="$t('@.reactions.surprise')">
|
||||
<img v-if="reaction == 'congrats'" src="https://twemoji.maxcdn.com/2/svg/1f389.svg" :alt="$t('@.reactions.congrats')">
|
||||
<img v-if="reaction == 'angry'" src="https://twemoji.maxcdn.com/2/svg/1f4a2.svg" :alt="$t('@.reactions.angry')">
|
||||
<img v-if="reaction == 'confused'" src="https://twemoji.maxcdn.com/2/svg/1f625.svg" :alt="$t('@.reactions.confused')">
|
||||
<img v-if="reaction == 'rip'" src="https://twemoji.maxcdn.com/2/svg/1f607.svg" :alt="$t('@.reactions.rip')">
|
||||
<template v-if="reaction == 'pudding'">
|
||||
<img v-if="$store.getters.isSignedIn && $store.state.settings.iLikeSushi" src="https://twemoji.maxcdn.com/2/svg/1f363.svg" :alt="$t('@.reactions.pudding')">
|
||||
<img v-else src="https://twemoji.maxcdn.com/2/svg/1f36e.svg" :alt="$t('@.reactions.pudding')">
|
||||
</template>
|
||||
</span>
|
||||
<mk-emoji :emoji="str.startsWith(':') ? null : str" :name="str.startsWith(':') ? str.substr(1, str.length - 2) : null" :is-reaction="true" :custom-emojis="customEmojis" :normal="true"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -21,7 +7,35 @@ import Vue from 'vue';
|
||||
import i18n from '../../../i18n';
|
||||
export default Vue.extend({
|
||||
i18n: i18n(),
|
||||
props: ['reaction']
|
||||
props: {
|
||||
reaction: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customEmojis: (this.$root.getMetaSync() || { emojis: [] }).emojis || []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
str(): any {
|
||||
switch (this.reaction) {
|
||||
case 'like': return '👍';
|
||||
case 'love': return '❤';
|
||||
case 'laugh': return '😆';
|
||||
case 'hmm': return '🤔';
|
||||
case 'surprise': return '😮';
|
||||
case 'congrats': return '🎉';
|
||||
case 'angry': return '💢';
|
||||
case 'confused': return '😥';
|
||||
case 'rip': return '😇';
|
||||
case 'pudding': return (this.$store.getters.isSignedIn && this.$store.state.settings.iLikeSushi) ? '🍣' : '🍮';
|
||||
case 'star': return '⭐';
|
||||
default: return this.reaction;
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="backdrop" ref="backdrop" @click="close"></div>
|
||||
<div class="popover" :class="{ isMobile: $root.isMobile }" ref="popover">
|
||||
<p v-if="!$root.isMobile">{{ title }}</p>
|
||||
<div ref="buttons" :class="{ showFocus }">
|
||||
<div class="buttons" ref="buttons" :class="{ showFocus }">
|
||||
<button @click="react('like')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="1" :title="$t('@.reactions.like')" v-particle><mk-reaction-icon reaction="like"/></button>
|
||||
<button @click="react('love')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="2" :title="$t('@.reactions.love')" v-particle><mk-reaction-icon reaction="love"/></button>
|
||||
<button @click="react('laugh')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="3" :title="$t('@.reactions.laugh')" v-particle><mk-reaction-icon reaction="laugh"/></button>
|
||||
@ -15,6 +15,9 @@
|
||||
<button @click="react('rip')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="9" :title="$t('@.reactions.rip')" v-particle><mk-reaction-icon reaction="rip"/></button>
|
||||
<button @click="react('pudding')" @mouseover="onMouseover" @mouseout="onMouseout" tabindex="10" :title="$t('@.reactions.pudding')" v-particle><mk-reaction-icon reaction="pudding"/></button>
|
||||
</div>
|
||||
<div v-if="enableEmojiReaction" class="text">
|
||||
<input v-model="text" placeholder="または絵文字を入力" @keyup.enter="reactText" @input="tryReactText" v-autocomplete="{ model: 'text' }">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -23,6 +26,7 @@
|
||||
import Vue from 'vue';
|
||||
import i18n from '../../../i18n';
|
||||
import anime from 'animejs';
|
||||
import { emojiRegex } from '../../../../../misc/emoji-regex';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('common/views/components/reaction-picker.vue'),
|
||||
@ -56,6 +60,8 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
title: this.$t('choose-reaction'),
|
||||
text: null,
|
||||
enableEmojiReaction: false,
|
||||
focus: null
|
||||
};
|
||||
},
|
||||
@ -94,6 +100,10 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$root.getMeta().then(meta => {
|
||||
this.enableEmojiReaction = meta.enableEmojiReaction;
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.focus = 0;
|
||||
|
||||
@ -143,6 +153,17 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
|
||||
reactText() {
|
||||
if (!this.text) return;
|
||||
this.react(this.text);
|
||||
},
|
||||
|
||||
tryReactText() {
|
||||
if (!this.text) return;
|
||||
if (!this.text.match(emojiRegex)) return;
|
||||
this.reactText();
|
||||
},
|
||||
|
||||
onMouseover(e) {
|
||||
this.title = e.target.title;
|
||||
},
|
||||
@ -256,9 +277,9 @@ export default Vue.extend({
|
||||
color var(--popupFg)
|
||||
border-bottom solid var(--lineWidth) var(--faceDivider)
|
||||
|
||||
> div
|
||||
padding 4px
|
||||
width 240px
|
||||
> .buttons
|
||||
padding 4px 4px 8px 4px
|
||||
width 216px
|
||||
text-align center
|
||||
|
||||
&.showFocus
|
||||
@ -283,6 +304,9 @@ export default Vue.extend({
|
||||
font-size 24px
|
||||
border-radius 2px
|
||||
|
||||
> *
|
||||
height 1em
|
||||
|
||||
&:hover
|
||||
background var(--reactionPickerButtonHoverBg)
|
||||
|
||||
@ -290,4 +314,29 @@ export default Vue.extend({
|
||||
background var(--primary)
|
||||
box-shadow inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15)
|
||||
|
||||
> .text
|
||||
width 216px
|
||||
padding 0 8px 8px 8px
|
||||
|
||||
> input
|
||||
width 100%
|
||||
padding 10px
|
||||
margin 0
|
||||
text-align center
|
||||
font-size 16px
|
||||
color var(--desktopPostFormTextareaFg)
|
||||
background var(--desktopPostFormTextareaBg)
|
||||
outline none
|
||||
border solid 1px var(--primaryAlpha01)
|
||||
border-radius 4px
|
||||
transition border-color .2s ease
|
||||
|
||||
&:hover
|
||||
border-color var(--primaryAlpha02)
|
||||
transition border-color .1s ease
|
||||
|
||||
&:focus
|
||||
border-color var(--primaryAlpha05)
|
||||
transition border-color 0s ease
|
||||
|
||||
</style>
|
||||
|
@ -136,12 +136,8 @@ export default Vue.extend({
|
||||
&:hover
|
||||
background var(--reactionViewerButtonHoverBg)
|
||||
|
||||
> .mk-reaction-icon
|
||||
font-size 1.4em
|
||||
|
||||
> span
|
||||
font-size 1.1em
|
||||
line-height 32px
|
||||
vertical-align middle
|
||||
color var(--text)
|
||||
</style>
|
||||
|
@ -20,7 +20,7 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
reactions(): any {
|
||||
return this.note.reactionCounts;
|
||||
return this.note.reactions;
|
||||
},
|
||||
isMe(): boolean {
|
||||
return this.$store.getters.isSignedIn && this.$store.state.i.id === this.note.userId;
|
||||
|
@ -93,12 +93,17 @@ export default Vue.extend({
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
columnWidth: '90%'
|
||||
columnWidth: '80%'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
clipMarkers: false,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)'
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
xaxis: {
|
||||
lines: {
|
||||
show: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
shared: true,
|
||||
|
@ -2,7 +2,7 @@
|
||||
<ui-card>
|
||||
<template #title><fa :icon="['far', 'bell']"/> {{ $t('title') }}</template>
|
||||
<section>
|
||||
<ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
|
||||
<ui-switch v-model="$store.state.i.autoWatch" @change="onChangeAutoWatch">
|
||||
{{ $t('auto-watch') }}<template #desc>{{ $t('auto-watch-desc') }}</template>
|
||||
</ui-switch>
|
||||
<section>
|
||||
|
@ -158,14 +158,14 @@ export default Vue.extend({
|
||||
|
||||
computed: {
|
||||
alwaysMarkNsfw: {
|
||||
get() { return this.$store.state.i.settings.alwaysMarkNsfw; },
|
||||
get() { return this.$store.state.i.alwaysMarkNsfw; },
|
||||
set(value) { this.$root.api('i/update', { alwaysMarkNsfw: value }); }
|
||||
},
|
||||
|
||||
bannerStyle(): any {
|
||||
if (this.$store.state.i.bannerUrl == null) return {};
|
||||
return {
|
||||
backgroundColor: this.$store.state.i.bannerColor && this.$store.state.i.bannerColor.length == 3 ? `rgb(${ this.$store.state.i.bannerColor.join(',') })` : null,
|
||||
backgroundColor: this.$store.state.i.bannerColor,
|
||||
backgroundImage: `url(${ this.$store.state.i.bannerUrl })`
|
||||
};
|
||||
},
|
||||
@ -178,10 +178,10 @@ export default Vue.extend({
|
||||
this.email = this.$store.state.i.email;
|
||||
this.name = this.$store.state.i.name;
|
||||
this.username = this.$store.state.i.username;
|
||||
this.location = this.$store.state.i.profile.location;
|
||||
this.location = this.$store.state.i.location;
|
||||
this.description = this.$store.state.i.description;
|
||||
this.lang = this.$store.state.i.lang;
|
||||
this.birthday = this.$store.state.i.profile.birthday;
|
||||
this.birthday = this.$store.state.i.birthday;
|
||||
this.avatarId = this.$store.state.i.avatarId;
|
||||
this.bannerId = this.$store.state.i.bannerId;
|
||||
this.isCat = this.$store.state.i.isCat;
|
||||
@ -305,11 +305,16 @@ export default Vue.extend({
|
||||
this.exportTarget == 'user-lists' ? 'i/import-user-lists' :
|
||||
null, {
|
||||
fileId: file.id
|
||||
}).then(() => {
|
||||
this.$root.dialog({
|
||||
type: 'info',
|
||||
text: this.$t('import-requested')
|
||||
});
|
||||
}).catch((e: any) => {
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
text: e.message
|
||||
});
|
||||
|
||||
this.$root.dialog({
|
||||
type: 'info',
|
||||
text: this.$t('import-requested')
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -159,7 +159,7 @@
|
||||
</template>
|
||||
|
||||
<template v-if="page == null || page == 'notification'">
|
||||
<x-notification v-show="page == 'notification'"/>
|
||||
<x-notification/>
|
||||
</template>
|
||||
|
||||
<template v-if="page == null || page == 'drive'">
|
||||
|
@ -130,20 +130,6 @@ import * as tinycolor from 'tinycolor2';
|
||||
import * as JSON5 from 'json5';
|
||||
import { faMoon, faSun } from '@fortawesome/free-regular-svg-icons';
|
||||
|
||||
// 後方互換性のため
|
||||
function convertOldThemedefinition(t) {
|
||||
const t2 = {
|
||||
id: t.meta.id,
|
||||
name: t.meta.name,
|
||||
author: t.meta.author,
|
||||
base: t.meta.base,
|
||||
vars: t.meta.vars,
|
||||
props: t
|
||||
};
|
||||
delete t2.props.meta;
|
||||
return t2;
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('common/views/components/theme.vue'),
|
||||
components: {
|
||||
@ -231,20 +217,6 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
|
||||
beforeCreate() {
|
||||
// migrate old theme definitions
|
||||
// 後方互換性のため
|
||||
this.$store.commit('device/set', {
|
||||
key: 'themes', value: this.$store.state.device.themes.map(t => {
|
||||
if (t.id == null) {
|
||||
return convertOldThemedefinition(t);
|
||||
} else {
|
||||
return t;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
install(code) {
|
||||
let theme;
|
||||
@ -259,11 +231,6 @@ export default Vue.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
// 後方互換性のため
|
||||
if (theme.id == null && theme.meta != null) {
|
||||
theme = convertOldThemedefinition(theme);
|
||||
}
|
||||
|
||||
if (theme.id == null) {
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
|
@ -4,7 +4,7 @@
|
||||
<ui-input v-if="meta.disableRegistration" v-model="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required styl="fill">
|
||||
<span>{{ $t('invitation-code') }}</span>
|
||||
<template #prefix><fa icon="id-card-alt"/></template>
|
||||
<template #desc v-html="this.$t('invitation-info').replace('{}', 'mailto:' + meta.maintainer.email)"></template>
|
||||
<template #desc v-html="this.$t('invitation-info').replace('{}', 'mailto:' + meta.maintainerEmail)"></template>
|
||||
</ui-input>
|
||||
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @input="onChangeUsername" styl="fill">
|
||||
<span>{{ $t('username') }}</span>
|
||||
|
@ -366,9 +366,6 @@ root(fill)
|
||||
&[type='file']
|
||||
display none
|
||||
|
||||
&[type='number']
|
||||
text-align right
|
||||
|
||||
> .prefix
|
||||
> .suffix
|
||||
display block
|
||||
|
@ -3,12 +3,14 @@
|
||||
<ol v-if="uploads.length > 0">
|
||||
<li v-for="ctx in uploads" :key="ctx.id">
|
||||
<div class="img" :style="{ backgroundImage: `url(${ ctx.img })` }"></div>
|
||||
<p class="name"><fa icon="spinner" pulse/>{{ ctx.name }}</p>
|
||||
<p class="status">
|
||||
<span class="initing" v-if="ctx.progress == undefined">{{ $t('waiting') }}<mk-ellipsis/></span>
|
||||
<span class="kb" v-if="ctx.progress != undefined">{{ String(Math.floor(ctx.progress.value / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }}<i>KB</i> / {{ String(Math.floor(ctx.progress.max / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }}<i>KB</i></span>
|
||||
<span class="percentage" v-if="ctx.progress != undefined">{{ Math.floor((ctx.progress.value / ctx.progress.max) * 100) }}</span>
|
||||
</p>
|
||||
<div class="top">
|
||||
<p class="name"><fa icon="spinner" pulse/>{{ ctx.name }}</p>
|
||||
<p class="status">
|
||||
<span class="initing" v-if="ctx.progress == undefined">{{ $t('waiting') }}<mk-ellipsis/></span>
|
||||
<span class="kb" v-if="ctx.progress != undefined">{{ String(Math.floor(ctx.progress.value / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }}<i>KB</i> / {{ String(Math.floor(ctx.progress.max / 1024)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') }}<i>KB</i></span>
|
||||
<span class="percentage" v-if="ctx.progress != undefined">{{ Math.floor((ctx.progress.value / ctx.progress.max) * 100) }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<progress v-if="ctx.progress != undefined && ctx.progress.value != ctx.progress.max" :value="ctx.progress.value" :max="ctx.progress.max"></progress>
|
||||
<div class="progress initing" v-if="ctx.progress == undefined"></div>
|
||||
<div class="progress waiting" v-if="ctx.progress != undefined && ctx.progress.value == ctx.progress.max"></div>
|
||||
@ -116,12 +118,17 @@ export default Vue.extend({
|
||||
list-style none
|
||||
|
||||
> li
|
||||
display block
|
||||
display grid
|
||||
margin 8px 0 0 0
|
||||
padding 0
|
||||
height 36px
|
||||
width: 100%
|
||||
box-shadow 0 -1px 0 var(--primaryAlpha01)
|
||||
border-top solid 8px transparent
|
||||
grid-template-columns 36px calc(100% - 44px)
|
||||
grid-template-rows 1fr 8px
|
||||
column-gap 8px
|
||||
box-sizing content-box
|
||||
|
||||
&:first-child
|
||||
margin 0
|
||||
@ -130,68 +137,62 @@ export default Vue.extend({
|
||||
|
||||
> .img
|
||||
display block
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
width 36px
|
||||
height 36px
|
||||
background-size cover
|
||||
background-position center center
|
||||
grid-column 1 / 2
|
||||
grid-row 1 / 3
|
||||
|
||||
> .name
|
||||
display block
|
||||
position absolute
|
||||
top 0
|
||||
left 44px
|
||||
margin 0
|
||||
padding 0
|
||||
max-width 256px
|
||||
font-size 0.8em
|
||||
color var(--primaryAlpha07)
|
||||
white-space nowrap
|
||||
text-overflow ellipsis
|
||||
overflow hidden
|
||||
|
||||
> [data-icon]
|
||||
margin-right 4px
|
||||
|
||||
> .status
|
||||
display block
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
margin 0
|
||||
padding 0
|
||||
font-size 0.8em
|
||||
|
||||
> .initing
|
||||
color var(--primaryAlpha05)
|
||||
|
||||
> .kb
|
||||
color var(--primaryAlpha05)
|
||||
|
||||
> .percentage
|
||||
display inline-block
|
||||
width 48px
|
||||
text-align right
|
||||
> .top
|
||||
display flex
|
||||
grid-column 2 / 3
|
||||
grid-row 1 / 2
|
||||
|
||||
> .name
|
||||
display block
|
||||
padding 0 8px 0 0
|
||||
margin 0
|
||||
font-size 0.8em
|
||||
color var(--primaryAlpha07)
|
||||
white-space nowrap
|
||||
text-overflow ellipsis
|
||||
overflow hidden
|
||||
flex-shrink 1
|
||||
|
||||
&:after
|
||||
content '%'
|
||||
> [data-icon]
|
||||
margin-right 4px
|
||||
|
||||
> .status
|
||||
display block
|
||||
margin 0 0 0 auto
|
||||
padding 0
|
||||
font-size 0.8em
|
||||
flex-shrink 0
|
||||
|
||||
> .initing
|
||||
color var(--primaryAlpha05)
|
||||
|
||||
> .kb
|
||||
color var(--primaryAlpha05)
|
||||
|
||||
> .percentage
|
||||
display inline-block
|
||||
width 48px
|
||||
text-align right
|
||||
|
||||
color var(--primaryAlpha07)
|
||||
|
||||
&:after
|
||||
content '%'
|
||||
|
||||
> progress
|
||||
display block
|
||||
position absolute
|
||||
bottom 0
|
||||
right 0
|
||||
margin 0
|
||||
width calc(100% - 44px)
|
||||
height 8px
|
||||
background transparent
|
||||
border none
|
||||
border-radius 4px
|
||||
overflow hidden
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
z-index 2
|
||||
|
||||
&::-webkit-progress-value
|
||||
background var(--primary)
|
||||
@ -201,12 +202,6 @@ export default Vue.extend({
|
||||
|
||||
> .progress
|
||||
display block
|
||||
position absolute
|
||||
bottom 0
|
||||
right 0
|
||||
margin 0
|
||||
width calc(100% - 44px)
|
||||
height 8px
|
||||
border none
|
||||
border-radius 4px
|
||||
background linear-gradient(
|
||||
@ -221,6 +216,9 @@ export default Vue.extend({
|
||||
)
|
||||
background-size 32px 32px
|
||||
animation bg 1.5s linear infinite
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
z-index 1
|
||||
|
||||
&.initing
|
||||
opacity 0.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="cudqjmnl">
|
||||
<ui-card>
|
||||
<template #title><fa :icon="faList"/> {{ list.title }}</template>
|
||||
<template #title><fa :icon="faList"/> {{ list.name }}</template>
|
||||
|
||||
<section>
|
||||
<ui-button @click="rename"><fa :icon="faICursor"/> {{ $t('rename') }}</ui-button>
|
||||
@ -75,7 +75,7 @@ export default Vue.extend({
|
||||
this.$root.dialog({
|
||||
title: this.$t('rename'),
|
||||
input: {
|
||||
default: this.list.title
|
||||
default: this.list.name
|
||||
}
|
||||
}).then(({ canceled, result: title }) => {
|
||||
if (canceled) return;
|
||||
@ -89,7 +89,7 @@ export default Vue.extend({
|
||||
del() {
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('delete-are-you-sure').replace('$1', this.list.title),
|
||||
text: this.$t('delete-are-you-sure').replace('$1', this.list.name),
|
||||
showCancelButton: true
|
||||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
|
@ -8,7 +8,7 @@
|
||||
<div class="no-users" v-if="inited && us.length == 0">
|
||||
<p>{{ $t('no-users') }}</p>
|
||||
</div>
|
||||
<div class="user" v-for="user in us">
|
||||
<div class="user" v-for="user in us" :key="user.id">
|
||||
<mk-avatar class="avatar" :user="user"/>
|
||||
<div class="body" v-if="!iconOnly">
|
||||
<div class="name">
|
||||
@ -16,8 +16,9 @@
|
||||
<p class="username">@{{ user | acct }}</p>
|
||||
</div>
|
||||
<div class="description" v-if="user.description" :title="user.description">
|
||||
<mfm :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis" :should-break="false"/>
|
||||
<mfm :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis" :should-break="false" :plain-text="true"/>
|
||||
</div>
|
||||
<mk-follow-button class="follow-button" v-if="$store.getters.isSignedIn && user.id != $store.state.i.id" :user="user" mini/>
|
||||
</div>
|
||||
</div>
|
||||
<button class="more" :class="{ fetching: fetchingMoreUsers }" v-if="cursor != null" @click="fetchMoreUsers()" :disabled="fetchingMoreUsers">
|
||||
@ -50,7 +51,7 @@ export default Vue.extend({
|
||||
fetchingMoreUsers: false,
|
||||
us: [],
|
||||
inited: false,
|
||||
cursor: null
|
||||
more: false
|
||||
};
|
||||
},
|
||||
|
||||
@ -160,6 +161,12 @@ export default Vue.extend({
|
||||
text-overflow ellipsis
|
||||
opacity 0.7
|
||||
font-size 14px
|
||||
padding-right 40px
|
||||
|
||||
> .follow-button
|
||||
position absolute
|
||||
top 8px
|
||||
right 0px
|
||||
|
||||
> .more
|
||||
display block
|
||||
|
@ -73,7 +73,7 @@ export default Vue.extend({
|
||||
title: t,
|
||||
select: {
|
||||
items: lists.map(list => ({
|
||||
value: list.id, text: list.title
|
||||
value: list.id, text: list.name
|
||||
}))
|
||||
},
|
||||
showCancelButton: true
|
||||
|
@ -28,12 +28,12 @@ export default Vue.extend({
|
||||
notes.pop();
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: notes[notes.length - 1].id
|
||||
more: true
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: null
|
||||
more: false
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -37,12 +37,12 @@ export default Vue.extend({
|
||||
notes.pop();
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: notes[notes.length - 1].id
|
||||
more: true
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: null
|
||||
more: false
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -28,7 +28,7 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
connection: null,
|
||||
makePromise: cursor => this.$root.api('notes/search_by_tag', {
|
||||
makePromise: cursor => this.$root.api('notes/search-by-tag', {
|
||||
limit: fetchLimit + 1,
|
||||
untilId: cursor ? cursor : undefined,
|
||||
withFiles: this.mediaOnly,
|
||||
@ -41,12 +41,12 @@ export default Vue.extend({
|
||||
notes.pop();
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: notes[notes.length - 1].id
|
||||
more: true
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: null
|
||||
more: false
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -41,12 +41,12 @@ export default Vue.extend({
|
||||
notes.pop();
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: notes[notes.length - 1].id
|
||||
more: true
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
notes: notes,
|
||||
cursor: null
|
||||
more: false
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user