Compare commits
103 Commits
Author | SHA1 | Date | |
---|---|---|---|
1d6b2bd969 | |||
5df90fdc4a | |||
607a5326d9 | |||
2cbd35acc4 | |||
9a0224ee21 | |||
2beedc5978 | |||
6d53e64798 | |||
3478cdea08 | |||
b360f2ed45 | |||
7b0c4c29b4 | |||
03f5d7575c | |||
e922d8904c | |||
45b55a8c98 | |||
8973b76bda | |||
41cf856e26 | |||
b7aeb10304 | |||
b8d9c1aa45 | |||
d7dbe503b6 | |||
c625dd074a | |||
f8a977f1c0 | |||
c35e760fd3 | |||
bc34ac82cf | |||
98f25c9159 | |||
ae9c13df66 | |||
9f8d21b2bc | |||
cd09fa5a28 | |||
9ca9757418 | |||
1fae2ffc37 | |||
71657ddb98 | |||
63845e0ba7 | |||
6781b68d33 | |||
d058eff59a | |||
42addfed85 | |||
0dd6494ab9 | |||
9f4c6a3aef | |||
ad0d06c0d8 | |||
fbf43c1450 | |||
35a1fa5bf0 | |||
8d3f71d490 | |||
9776d8e06b | |||
10f845ae76 | |||
2c8f962889 | |||
1721a82352 | |||
59bec546e4 | |||
86503f2d69 | |||
e4b8c688bb | |||
4535ab4c43 | |||
dcdb57df9d | |||
cfc2808c56 | |||
4a3d74c608 | |||
e18655d18f | |||
12b4b78763 | |||
550a528fc1 | |||
4e3429a5c7 | |||
ef98383075 | |||
d66d1f142f | |||
c896055cb1 | |||
2e8b2e0cf9 | |||
59012b5693 | |||
dfb51e8d26 | |||
5107824352 | |||
bf7ec18316 | |||
77d82d2d17 | |||
2777460150 | |||
9476a240d9 | |||
bddb878931 | |||
b0768d8a4a | |||
46bb7f9efb | |||
a507b7c0b0 | |||
939c0dc5f9 | |||
a89c206572 | |||
8b55263e72 | |||
f2ad1e4639 | |||
0fbcec1c16 | |||
ec2b73d076 | |||
6630bb0b39 | |||
bef0d4c8bd | |||
a57cb3bd31 | |||
1e4577a988 | |||
fe792b5bbb | |||
d4005133d0 | |||
abe8e80268 | |||
e38e4940b4 | |||
48dc1678c3 | |||
431383ab54 | |||
7a8d252f63 | |||
04525e2997 | |||
a2f96f3f20 | |||
a81ecb0b28 | |||
1122368ee0 | |||
6c54328391 | |||
1a26816f7a | |||
8538334d08 | |||
9387ebc569 | |||
c99dce68ed | |||
6dea84c6d2 | |||
39060374c2 | |||
d3ebb5d13f | |||
4e7c10d3d9 | |||
e93ea66d2d | |||
152dd70ea5 | |||
7b94cf9f84 | |||
d70e27a865 |
12
README.md
12
README.md
@ -7,10 +7,12 @@
|
||||
[![][dependencies-badge]][dependencies-link]
|
||||
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
||||
|
||||
**Microblogging. Redefined.**
|
||||
Sophisticated microblogging platform, evolving forever.
|
||||
|
||||
**[Misskey](https://misskey.xyz)** is a completely open source,
|
||||
ultimately sophisticated professional microblogging software.
|
||||
[Misskey](https://misskey.xyz) is a decentralized microblogging platform born on Earth.
|
||||
Since it exists within the Fediverse (a universe where various social media platforms are organized),
|
||||
it is mutually linked with other social media platforms.
|
||||
Why don't you take a short break from the hustle and bustle of the city, and dive into a new Internet?
|
||||
|
||||
<a href="https://www.patreon.com/syuilo"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160" /></a>
|
||||
|
||||
@ -28,7 +30,7 @@ ultimately sophisticated professional microblogging software.
|
||||
|
||||
and more! You can see it with your own eyes at [misskey.xyz](https://misskey.xyz).
|
||||
|
||||
:package: Create your instance
|
||||
:package: Create your own instance
|
||||
----------------------------------------------------------------
|
||||
If you want to run your own instance of Misskey,
|
||||
please see [Setup and installation guide](./docs/setup.en.md).
|
||||
@ -43,6 +45,7 @@ If you want to...
|
||||
|
||||
:heart: Backers & Sponsors
|
||||
----------------------------------------------------------------
|
||||
<!-- PATREON_START -->
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/619786/32cf01444db24e578cd1982c197f6fc6/1?token-time=2145916800&token-hash=tB1e_r8RlZ5sFL0KV_e8dugapxatNBRK1Z3h67TO1g8%3D"></td>
|
||||
@ -71,6 +74,7 @@ If you want to...
|
||||
<td><a href="https://www.patreon.com/gutfuckllc">gutfuckllc</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- PATREON_END -->
|
||||
|
||||
:four_leaf_clover: Copyright
|
||||
----------------------------------------------------------------
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "Dein Token wurde generiert. Du wirst jetzt abgemeldet."
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "Anmelden"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "Benutzername"
|
||||
checking: "Überprüfung..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "Kreisförmige Icons"
|
||||
gradient-window-header: "Übergang in Fensterköpfen"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "Zeige Antworten"
|
||||
show-my-renotes: "Zeige meine Reposts auf der Zeitleiste"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -72,9 +72,9 @@ common:
|
||||
a: "What are you doing?"
|
||||
b: "What's happening?"
|
||||
c: "What’s on your mind?"
|
||||
d: "What do you wish to say?"
|
||||
d: "Would you post any words?"
|
||||
e: "Write here"
|
||||
f: "Waiting for your writing..."
|
||||
f: "Waiting for your writing."
|
||||
search: "Search"
|
||||
delete: "Delete"
|
||||
loading: "Loading"
|
||||
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "Your token has been regenerated, so you will be signed out."
|
||||
i-like-sushi: "I prefer sushi rather than pudding"
|
||||
show-reversi-board-labels: "Show row and column labels in Reversi"
|
||||
verified-user: "Authorized User"
|
||||
verified-user: "Verified account"
|
||||
disable-animated-mfm: "Disable animated texts in a post"
|
||||
reversi:
|
||||
drawn: "Draw"
|
||||
@ -278,7 +278,7 @@ common/views/components/poll-editor.vue:
|
||||
add: "+ Add a choice"
|
||||
destroy: "Discard the poll"
|
||||
common/views/components/reaction-picker.vue:
|
||||
choose-reaction: "Express a reaction"
|
||||
choose-reaction: "Send a reaction"
|
||||
common/views/components/signin.vue:
|
||||
username: "Username"
|
||||
password: "Password"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "Sign in"
|
||||
or: "Or"
|
||||
signin-with-twitter: "Log in with Twitter"
|
||||
login-failed: "Log in failed. Make sure you have entered your correct username and password."
|
||||
common/views/components/signup.vue:
|
||||
username: "Username"
|
||||
checking: "Confirming..."
|
||||
@ -347,7 +348,7 @@ common/views/widgets/calendar.vue:
|
||||
this-year: "This year: "
|
||||
common/views/widgets/donation.vue:
|
||||
title: "Request for donations"
|
||||
text: "To keep Misskey up and running, we have to spend money on our domain name, the server costs and so on. Since we don't receive money from advertisements, we count on donations from all of you. If you're interested in helping, contact {}. Thank you for your contribution!"
|
||||
text: "To keep Misskey up and running, there have to happen some expense for the domain name, the server and so on. Since our policy is not to display any advertisements, we count on your donations. If you're interested in helping, contact {}. Thank you for your contribution!"
|
||||
common/views/widgets/photo-stream.vue:
|
||||
title: "Photo stream"
|
||||
no-photos: "No photos"
|
||||
@ -625,12 +626,13 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "Use circle icons"
|
||||
gradient-window-header: "Use gradients on window headers"
|
||||
post-form-on-timeline: "Display post form at the top of the timeline"
|
||||
suggest-recent-hashtags: "Show recent popular hashtags on the post form"
|
||||
show-reply-target: "Display reply target"
|
||||
show-my-renotes: "Show my renotes in the timeline"
|
||||
show-renoted-my-notes: "Show renoted my posts in timelines"
|
||||
show-local-renotes: "Show renoted local posts in timelines"
|
||||
show-maps: "Display a map to show the location"
|
||||
show-maps-desc: "Automatically show the location on the map attached to this post."
|
||||
show-maps-desc: "If there comes a post contains location information, show a map to display the location."
|
||||
sound: "Sound"
|
||||
enable-sounds: "Enable sound"
|
||||
enable-sounds-desc: "Play a sound when you receive a post/message. This setting is stored in the browser."
|
||||
@ -769,7 +771,7 @@ desktop/views/components/received-follow-requests-window.vue:
|
||||
reject: "Reject"
|
||||
desktop/views/components/user-lists-window.vue:
|
||||
title: "User lists"
|
||||
create-list: "Create new list"
|
||||
create-list: "Create list"
|
||||
list-name: "List name"
|
||||
desktop/views/components/user-preview.vue:
|
||||
notes: "Posts"
|
||||
@ -1013,7 +1015,7 @@ mobile/views/components/ui.nav.vue:
|
||||
user-lists: "Lists"
|
||||
widgets: "Widgets"
|
||||
game: "Games"
|
||||
darkmode: "Dark mode"
|
||||
darkmode: "Dark theme"
|
||||
settings: "Settings"
|
||||
about: "About Misskey"
|
||||
mobile/views/components/user-timeline.vue:
|
||||
@ -1141,8 +1143,8 @@ mobile/views/pages/user.vue:
|
||||
timeline: "Timeline"
|
||||
media: "Media"
|
||||
is-suspended: "This account has been suspended."
|
||||
is-remote: "This user is a remote user, so the information you see here is not complete."
|
||||
view-remote: "See their complete profile"
|
||||
is-remote: "The user is a remote user. The profile that you see here may not complete."
|
||||
view-remote: "See his/her complete profile"
|
||||
mobile/views/pages/user/home.vue:
|
||||
recent-notes: "Recent notes"
|
||||
images: "Images"
|
||||
@ -1166,7 +1168,7 @@ mobile/views/pages/user/home.photos.vue:
|
||||
no-photos: "No photos"
|
||||
docs:
|
||||
edit-this-page-on-github: "Found a mistake or want to contribute for the documentation?"
|
||||
edit-this-page-on-github-link: "Edit this page on Github!"
|
||||
edit-this-page-on-github-link: "Edit this page at GitHub!"
|
||||
api:
|
||||
entities:
|
||||
properties: "Properties"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "Tu token se ha regenerado vas a ser desconectado."
|
||||
i-like-sushi: "Prefiero sushi a pudín"
|
||||
show-reversi-board-labels: "Mostrar etiquetas de filas y columnas en Reversi"
|
||||
verified-user: "Usuario verificado"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "Desactivar texto animado en una publicación"
|
||||
reversi:
|
||||
drawn: "Empatado"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "Entra"
|
||||
or: "O"
|
||||
signin-with-twitter: "Ingresar con Twitter"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "Usuario"
|
||||
checking: "Comprobando..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "Usar iconos circulares"
|
||||
gradient-window-header: "Usar degradados en las cabeceras de las páginas"
|
||||
post-form-on-timeline: "Mostrar el formulario de las entradas encima de la línea de tiempo"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "Votre token vient d'être généré, vous allez maintenant être déconnecté."
|
||||
i-like-sushi: "Je préfère les sushis (au pudding)"
|
||||
show-reversi-board-labels: "Afficher les étiquettes des lignes et colonnes dans Reversi"
|
||||
verified-user: "Utilisateur·trice vérifié·e"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "Désactiver les textes animés dans les publications"
|
||||
reversi:
|
||||
drawn: "Partie nulle"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "Se connecter"
|
||||
or: "Ou"
|
||||
signin-with-twitter: "Se connecter via Twitter"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "Nom d'utilisateur"
|
||||
checking: "Vérification"
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "Utiliser des icônes circulaires"
|
||||
gradient-window-header: "Utiliser les dégradés sur la barre de titre de la fenêtre"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "Afficher les réponses"
|
||||
show-my-renotes: "Afficher mes republications dans le fil"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -90,7 +90,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
|
||||
reversi:
|
||||
@ -314,8 +314,11 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
|
||||
common/views/components/signup.vue:
|
||||
invitation-code: "招待コード"
|
||||
invitation-info: "招待コードをお持ちでない方は、<a href=\"{}\">管理者</a>までご連絡ください。"
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
available: "利用できます"
|
||||
@ -707,6 +710,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
@ -910,6 +914,7 @@ desktop/views/pages/admin/admin.dashboard.vue:
|
||||
original-users: "このインスタンスのユーザー"
|
||||
all-notes: "全てのノート"
|
||||
original-notes: "このインスタンスのノート"
|
||||
invite: "招待"
|
||||
|
||||
desktop/views/pages/admin/admin.suspend-user.vue:
|
||||
suspend-user: "ユーザーの凍結"
|
||||
@ -921,6 +926,21 @@ desktop/views/pages/admin/admin.unsuspend-user.vue:
|
||||
unsuspend: "凍結の解除"
|
||||
unsuspended: "凍結を解除しました"
|
||||
|
||||
desktop/views/pages/admin/admin.verify-user.vue:
|
||||
verify-user: "ユーザーの公式アカウント設定"
|
||||
verify: "公式アカウントにする"
|
||||
verified: "公式アカウントにしました"
|
||||
|
||||
desktop/views/pages/admin/admin.notes-chart.vue:
|
||||
title: "投稿"
|
||||
local: "ローカル"
|
||||
remote: "リモート"
|
||||
|
||||
desktop/views/pages/admin/admin.users-chart.vue:
|
||||
title: "ユーザー"
|
||||
local: "ローカル"
|
||||
remote: "リモート"
|
||||
|
||||
desktop/views/pages/deck/deck.tl-column.vue:
|
||||
is-media-only: "メディア投稿のみ"
|
||||
is-media-view: "メディアビュー"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "당신의 토큰이 업데이트되어 있기 때문에 로그 아웃합니다."
|
||||
i-like-sushi: "나는(푸딩보다 오히려)스시가 좋아"
|
||||
show-reversi-board-labels: "리버시 보드의 행과 열 레이블을 표시"
|
||||
verified-user: "인증 된 사용자"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "게시물의 문자 애니메이션을 비활성화 할"
|
||||
reversi:
|
||||
drawn: "무승부"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "Twój token został wygenerowany. Zostaniesz wylogowany."
|
||||
i-like-sushi: "Wolę sushi od puddingu"
|
||||
show-reversi-board-labels: "Pokazuj podpisy wierszy i kolumn w Reversi"
|
||||
verified-user: "Zweryfikowany użytkownik"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "Wyłącz animowany tekst we wpisach"
|
||||
reversi:
|
||||
drawn: "Remis"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "Zaloguj"
|
||||
or: "または"
|
||||
signin-with-twitter: "Zaloguj się za pomocą Twittera"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "Nazwa użytkownika"
|
||||
checking: "Sprawdzanie…"
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "Używaj okrągłych ikon"
|
||||
gradient-window-header: "Używaj gradientów na pasku tytułu okna"
|
||||
post-form-on-timeline: "Wyświetlaj formularz tworzenia wpisu w górnej części osi czasu"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "Pokazuj cel odpowiedzi"
|
||||
show-my-renotes: "Pokazuj moje udostępnienia na osi czasu"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -84,7 +84,7 @@ common:
|
||||
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
|
||||
i-like-sushi: "私は(プリンよりむしろ)寿司が好き"
|
||||
show-reversi-board-labels: "リバーシのボードの行と列のラベルを表示"
|
||||
verified-user: "認証済みのユーザー"
|
||||
verified-user: "公式アカウント"
|
||||
disable-animated-mfm: "投稿内の動きのあるテキストを無効にする"
|
||||
reversi:
|
||||
drawn: "引き分け"
|
||||
@ -287,6 +287,7 @@ common/views/components/signin.vue:
|
||||
signin: "サインイン"
|
||||
or: "または"
|
||||
signin-with-twitter: "Twitterでログイン"
|
||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
||||
common/views/components/signup.vue:
|
||||
username: "ユーザー名"
|
||||
checking: "確認しています..."
|
||||
@ -625,6 +626,7 @@ desktop/views/components/settings.vue:
|
||||
circle-icons: "円形のアイコンを使用"
|
||||
gradient-window-header: "ウィンドウのタイトルバーにグラデーションを使用"
|
||||
post-form-on-timeline: "タイムライン上部に投稿フォームを表示する"
|
||||
suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する"
|
||||
show-reply-target: "リプライ先を表示する"
|
||||
show-my-renotes: "自分の行ったRenoteをタイムラインに表示する"
|
||||
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "6.2.0",
|
||||
"clientVersion": "1.0.8417",
|
||||
"version": "6.4.0",
|
||||
"clientVersion": "1.0.8520",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
@ -201,7 +201,7 @@
|
||||
"typescript": "2.9.2",
|
||||
"typescript-eslint-parser": "18.0.0",
|
||||
"uglify-es": "3.3.9",
|
||||
"url-loader": "1.1.0",
|
||||
"url-loader": "1.1.1",
|
||||
"uuid": "3.3.2",
|
||||
"v-animate-css": "0.0.2",
|
||||
"vue": "2.5.17",
|
||||
|
10
src/client/app/common/scripts/get-face.ts
Normal file
10
src/client/app/common/scripts/get-face.ts
Normal file
@ -0,0 +1,10 @@
|
||||
const faces = [
|
||||
'(=^・・^=)',
|
||||
'v(\'ω\')v',
|
||||
'🐡( \'-\' 🐡 )フグパンチ!!!!',
|
||||
'🖕(´・_・`)🖕',
|
||||
'(。>﹏<。)',
|
||||
'(Δ・x・Δ)'
|
||||
];
|
||||
|
||||
export default () => faces[Math.floor(Math.random() * faces.length)];
|
@ -1,9 +0,0 @@
|
||||
const kaos = [
|
||||
'(=^・・^=)',
|
||||
'v(\'ω\')v',
|
||||
'🐡( \'-\' 🐡 )フグパンチ!!!!',
|
||||
'🖕(´・_・`)🖕',
|
||||
'(。>﹏<。)'
|
||||
];
|
||||
|
||||
export default () => kaos[Math.floor(Math.random() * kaos.length)];
|
@ -12,7 +12,7 @@
|
||||
</ui-input>
|
||||
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
|
||||
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
|
||||
<p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
|
||||
<p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or% <a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
@ -60,7 +60,7 @@ export default Vue.extend({
|
||||
}).then(() => {
|
||||
location.reload();
|
||||
}).catch(() => {
|
||||
alert('something happened');
|
||||
alert('%i18n:@login-failed%');
|
||||
this.signing = false;
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()">
|
||||
<ui-input v-if="meta.disableRegistration" v-model="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required>
|
||||
<span>%i18n:@invitation-code%</span>
|
||||
<span slot="prefix">%fa:id-card-alt%</span>
|
||||
<p slot="text" v-html="'%i18n:@invitation-info%'.replace('{}', meta.maintainer.url)"></p>
|
||||
</ui-input>
|
||||
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @input="onChangeUsername">
|
||||
<span>%i18n:@username%</span>
|
||||
<span slot="prefix">@</span>
|
||||
@ -46,11 +51,13 @@ export default Vue.extend({
|
||||
username: '',
|
||||
password: '',
|
||||
retypedPassword: '',
|
||||
invitationCode: '',
|
||||
url,
|
||||
recaptchaSitekey,
|
||||
usernameState: null,
|
||||
passwordStrength: '',
|
||||
passwordRetypeState: null
|
||||
passwordRetypeState: null,
|
||||
meta: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -61,6 +68,11 @@ export default Vue.extend({
|
||||
this.usernameState != 'max-range');
|
||||
}
|
||||
},
|
||||
created() {
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
this.meta = meta;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onChangeUsername() {
|
||||
if (this.username == '') {
|
||||
@ -110,6 +122,7 @@ export default Vue.extend({
|
||||
(this as any).api('signup', {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
invitationCode: this.invitationCode,
|
||||
'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
|
||||
}).then(() => {
|
||||
(this as any).api('signin', {
|
||||
|
@ -44,7 +44,12 @@ import Vue from 'vue';
|
||||
import * as anime from 'animejs';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['source', 'compact', 'v'],
|
||||
props: ['source', 'compact'],
|
||||
data() {
|
||||
return {
|
||||
v: this.$store.state.device.visibility || 'public'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
const popover = this.$refs.popover as any;
|
||||
@ -92,6 +97,7 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
choose(visibility) {
|
||||
this.$store.commit('device/setVisibility', visibility);
|
||||
this.$emit('chosen', visibility);
|
||||
this.$destroy();
|
||||
},
|
||||
|
@ -55,15 +55,15 @@
|
||||
</div>
|
||||
<footer>
|
||||
<mk-reactions-viewer :note="p"/>
|
||||
<button @click="reply" title="">
|
||||
<button class="replyButton" @click="reply" title="">
|
||||
<template v-if="p.reply">%fa:reply-all%</template>
|
||||
<template v-else>%fa:reply%</template>
|
||||
<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
||||
</button>
|
||||
<button @click="renote" title="%i18n:@renote%">
|
||||
<button class="renoteButton" @click="renote" title="%i18n:@renote%">
|
||||
%fa:retweet%<p class="count" v-if="p.renoteCount > 0">{{ p.renoteCount }}</p>
|
||||
</button>
|
||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:@add-reaction%">
|
||||
<button class="reactionButton" :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:@add-reaction%">
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||
</button>
|
||||
<button @click="menu" ref="menuButton">
|
||||
@ -372,15 +372,24 @@ root(isDark)
|
||||
cursor pointer
|
||||
|
||||
&:hover
|
||||
color isDark ? #9198af : #666
|
||||
color isDark ? #a1a8bf : #444
|
||||
|
||||
&.replyButton:hover
|
||||
color #0af
|
||||
|
||||
&.renoteButton:hover
|
||||
color #8d0
|
||||
|
||||
&.reactionButton:hover
|
||||
color #fa0
|
||||
|
||||
> .count
|
||||
display inline
|
||||
margin 0 0 0 8px
|
||||
color #999
|
||||
|
||||
&.reacted
|
||||
color $theme-color
|
||||
&.reacted, &.reacted:hover
|
||||
color #fa0
|
||||
|
||||
> .replies
|
||||
> *
|
||||
|
@ -42,15 +42,15 @@
|
||||
</div>
|
||||
<footer>
|
||||
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
|
||||
<button @click="reply" title="%i18n:@reply%">
|
||||
<button class="replyButton" @click="reply" title="%i18n:@reply%">
|
||||
<template v-if="p.reply">%fa:reply-all%</template>
|
||||
<template v-else>%fa:reply%</template>
|
||||
<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
||||
</button>
|
||||
<button @click="renote" title="%i18n:@renote%">
|
||||
<button class="renoteButton" @click="renote" title="%i18n:@renote%">
|
||||
%fa:retweet%<p class="count" v-if="p.renoteCount > 0">{{ p.renoteCount }}</p>
|
||||
</button>
|
||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:@add-reaction%">
|
||||
<button class="reactionButton" :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:@add-reaction%">
|
||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
||||
</button>
|
||||
<button @click="menu" ref="menuButton">
|
||||
@ -487,20 +487,24 @@ root(isDark)
|
||||
cursor pointer
|
||||
|
||||
&:hover
|
||||
color isDark ? #9198af : #666
|
||||
color isDark ? #a1a8bf : #444
|
||||
|
||||
&.replyButton:hover
|
||||
color #0af
|
||||
|
||||
&.renoteButton:hover
|
||||
color #8d0
|
||||
|
||||
&.reactionButton:hover
|
||||
color #fa0
|
||||
|
||||
> .count
|
||||
display inline
|
||||
margin 0 0 0 8px
|
||||
color #999
|
||||
|
||||
&.reacted
|
||||
color $theme-color
|
||||
|
||||
&:last-child
|
||||
position absolute
|
||||
right 0
|
||||
margin 0
|
||||
&.reacted, &.reacted:hover
|
||||
color #fa0
|
||||
|
||||
> .detail
|
||||
padding-top 4px
|
||||
|
@ -10,7 +10,7 @@
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">%i18n:@add-visible-user%</a>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0 && $store.state.settings.suggestRecentHashtags">
|
||||
<b>%i18n:@recent-tags%:</b>
|
||||
<a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)" title="%@click-to-tagging%">#{{ tag }}</a>
|
||||
</div>
|
||||
@ -58,7 +58,7 @@
|
||||
import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
import getFace from '../../../common/scripts/get-face';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
import parse from '../../../../../mfm/parse';
|
||||
import { host } from '../../../config';
|
||||
@ -99,7 +99,7 @@ export default Vue.extend({
|
||||
useCw: false,
|
||||
cw: null,
|
||||
geo: null,
|
||||
visibility: 'public',
|
||||
visibility: this.$store.state.device.visibility || 'public',
|
||||
visibleUsers: [],
|
||||
autocomplete: null,
|
||||
draghover: false,
|
||||
@ -326,8 +326,7 @@ export default Vue.extend({
|
||||
|
||||
setVisibility() {
|
||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||
source: this.$refs.visibilityButton,
|
||||
v: this.visibility
|
||||
source: this.$refs.visibilityButton
|
||||
});
|
||||
w.$once('chosen', v => {
|
||||
this.visibility = v;
|
||||
@ -422,7 +421,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
kao() {
|
||||
this.text += getKao();
|
||||
this.text += getFace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -48,6 +48,7 @@
|
||||
<mk-switch v-model="$store.state.settings.iLikeSushi" @change="onChangeILikeSushi" text="%i18n:common.i-like-sushi%"/>
|
||||
</div>
|
||||
<mk-switch v-model="$store.state.settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="%i18n:@post-form-on-timeline%"/>
|
||||
<mk-switch v-model="$store.state.settings.suggestRecentHashtags" @change="onChangeSuggestRecentHashtags" text="%i18n:@suggest-recent-hashtags%"/>
|
||||
<mk-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget" text="%i18n:@show-reply-target%"/>
|
||||
<mk-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes" text="%i18n:@show-my-renotes%"/>
|
||||
<mk-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="%i18n:@show-renoted-my-notes%"/>
|
||||
@ -336,6 +337,12 @@ export default Vue.extend({
|
||||
value: v
|
||||
});
|
||||
},
|
||||
onChangeSuggestRecentHashtags(v) {
|
||||
this.$store.dispatch('settings/set', {
|
||||
key: 'suggestRecentHashtags',
|
||||
value: v
|
||||
});
|
||||
},
|
||||
onChangeShowReplyTarget(v) {
|
||||
this.$store.dispatch('settings/set', {
|
||||
key: 'showReplyTarget',
|
||||
|
145
src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue
Normal file
145
src/client/app/desktop/views/pages/admin/admin.cpu-memory.vue
Normal file
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="zyknedwtlthezamcjlolyusmipqmjgxz">
|
||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||
<defs>
|
||||
<linearGradient :id="cpuGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
||||
<stop offset="100%" stop-color="hsl(0, 80%, 70%)"></stop>
|
||||
</linearGradient>
|
||||
<mask :id="cpuMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
||||
<polygon
|
||||
:points="cpuPolygonPoints"
|
||||
fill="#fff"
|
||||
fill-opacity="0.5"/>
|
||||
<polyline
|
||||
:points="cpuPolylinePoints"
|
||||
fill="none"
|
||||
stroke="#fff"
|
||||
stroke-width="0.3"/>
|
||||
</mask>
|
||||
</defs>
|
||||
<rect
|
||||
x="0" y="0"
|
||||
:width="viewBoxX" :height="viewBoxY"
|
||||
:style="`stroke: none; fill: url(#${ cpuGradientId }); mask: url(#${ cpuMaskId })`"/>
|
||||
<text x="1" y="5">CPU <tspan>{{ cpuP }}%</tspan></text>
|
||||
</svg>
|
||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||
<defs>
|
||||
<linearGradient :id="memGradientId" x1="0" x2="0" y1="1" y2="0">
|
||||
<stop offset="0%" stop-color="hsl(180, 80%, 70%)"></stop>
|
||||
<stop offset="100%" stop-color="hsl(0, 80%, 70%)"></stop>
|
||||
</linearGradient>
|
||||
<mask :id="memMaskId" x="0" y="0" :width="viewBoxX" :height="viewBoxY">
|
||||
<polygon
|
||||
:points="memPolygonPoints"
|
||||
fill="#fff"
|
||||
fill-opacity="0.5"/>
|
||||
<polyline
|
||||
:points="memPolylinePoints"
|
||||
fill="none"
|
||||
stroke="#fff"
|
||||
stroke-width="0.3"/>
|
||||
</mask>
|
||||
</defs>
|
||||
<rect
|
||||
x="0" y="0"
|
||||
:width="viewBoxX" :height="viewBoxY"
|
||||
:style="`stroke: none; fill: url(#${ memGradientId }); mask: url(#${ memMaskId })`"/>
|
||||
<text x="1" y="5">MEM <tspan>{{ memP }}%</tspan></text>
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import * as uuid from 'uuid';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['connection'],
|
||||
data() {
|
||||
return {
|
||||
viewBoxX: 50,
|
||||
viewBoxY: 20,
|
||||
stats: [],
|
||||
cpuGradientId: uuid(),
|
||||
cpuMaskId: uuid(),
|
||||
memGradientId: uuid(),
|
||||
memMaskId: uuid(),
|
||||
cpuPolylinePoints: '',
|
||||
memPolylinePoints: '',
|
||||
cpuPolygonPoints: '',
|
||||
memPolygonPoints: '',
|
||||
cpuP: '',
|
||||
memP: ''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.connection.on('stats', this.onStats);
|
||||
this.connection.on('statsLog', this.onStatsLog);
|
||||
this.connection.send({
|
||||
type: 'requestLog',
|
||||
id: Math.random().toString()
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.connection.off('stats', this.onStats);
|
||||
this.connection.off('statsLog', this.onStatsLog);
|
||||
},
|
||||
methods: {
|
||||
onStats(stats) {
|
||||
this.stats.push(stats);
|
||||
if (this.stats.length > 50) this.stats.shift();
|
||||
|
||||
const cpuPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - s.cpu_usage) * this.viewBoxY]);
|
||||
const memPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - (s.mem.used / s.mem.total)) * this.viewBoxY]);
|
||||
this.cpuPolylinePoints = cpuPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||
this.memPolylinePoints = memPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' ');
|
||||
|
||||
this.cpuPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${this.viewBoxY} ${this.cpuPolylinePoints} ${this.viewBoxX},${this.viewBoxY}`;
|
||||
this.memPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${this.viewBoxY} ${this.memPolylinePoints} ${this.viewBoxX},${this.viewBoxY}`;
|
||||
|
||||
this.cpuP = (stats.cpu_usage * 100).toFixed(0);
|
||||
this.memP = (stats.mem.used / stats.mem.total * 100).toFixed(0);
|
||||
},
|
||||
onStatsLog(statsLog) {
|
||||
statsLog.forEach(stats => this.onStats(stats));
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
root(isDark)
|
||||
margin-bottom 16px
|
||||
|
||||
> svg
|
||||
display block
|
||||
width 50%
|
||||
float left
|
||||
|
||||
&:first-child
|
||||
padding-right 5px
|
||||
|
||||
&:last-child
|
||||
padding-left 5px
|
||||
|
||||
> text
|
||||
font-size 2px
|
||||
fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
|
||||
|
||||
> tspan
|
||||
opacity 0.5
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
clear both
|
||||
|
||||
.zyknedwtlthezamcjlolyusmipqmjgxz[data-darkmode]
|
||||
root(true)
|
||||
|
||||
.zyknedwtlthezamcjlolyusmipqmjgxz:not([data-darkmode])
|
||||
root(false)
|
||||
|
||||
</style>
|
@ -1,37 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>%i18n:@dashboard%</h1>
|
||||
<div v-if="stats">
|
||||
<p><b>%i18n:@all-users%</b>: <span>{{ stats.usersCount | number }}</span></p>
|
||||
<p><b>%i18n:@original-users%</b>: <span>{{ stats.originalUsersCount | number }}</span></p>
|
||||
<p><b>%i18n:@all-notes%</b>: <span>{{ stats.notesCount | number }}</span></p>
|
||||
<p><b>%i18n:@original-notes%</b>: <span>{{ stats.originalNotesCount | number }}</span></p>
|
||||
<div class="obdskegsannmntldydackcpzezagxqfy card">
|
||||
<header>%i18n:@dashboard%</header>
|
||||
<div v-if="stats" class="stats">
|
||||
<div><b>%fa:user% {{ stats.originalUsersCount | number }}</b><span>%i18n:@original-users%</span></div>
|
||||
<div><span>%fa:user% {{ stats.usersCount | number }}</span><span>%i18n:@all-users%</span></div>
|
||||
<div><b>%fa:pen% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
|
||||
<div><span>%fa:pen% {{ stats.notesCount | number }}</span><span>%i18n:@all-notes%</span></div>
|
||||
</div>
|
||||
<div class="cpu-memory">
|
||||
<x-cpu-memory :connection="connection"/>
|
||||
</div>
|
||||
<div>
|
||||
<button class="ui" @click="invite">%i18n:@invite%</button>
|
||||
<p v-if="inviteCode">Code: <code>{{ inviteCode }}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
import XCpuMemory from "./admin.cpu-memory.vue";
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XCpuMemory
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stats: null
|
||||
stats: null,
|
||||
inviteCode: null,
|
||||
connection: null,
|
||||
connectionId: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.connection = (this as any).os.streams.serverStatsStream.getConnection();
|
||||
this.connectionId = (this as any).os.streams.serverStatsStream.use();
|
||||
|
||||
(this as any).api('stats').then(stats => {
|
||||
this.stats = stats;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
(this as any).os.streams.serverStatsStream.dispose(this.connectionId);
|
||||
},
|
||||
methods: {
|
||||
invite() {
|
||||
(this as any).api('admin/invite').then(x => {
|
||||
this.inviteCode = x.code;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
h1
|
||||
margin 0 0 1em 0
|
||||
padding 0 0 8px 0
|
||||
font-size 1em
|
||||
color #555
|
||||
border-bottom solid 1px #eee
|
||||
@import '~const.styl'
|
||||
|
||||
.obdskegsannmntldydackcpzezagxqfy
|
||||
> .stats
|
||||
display flex
|
||||
justify-content center
|
||||
margin-bottom 16px
|
||||
padding 16px
|
||||
border solid 1px #eee
|
||||
border-radius 8px
|
||||
|
||||
> div
|
||||
flex 1
|
||||
text-align center
|
||||
|
||||
> *:first-child
|
||||
display block
|
||||
color $theme-color
|
||||
|
||||
> *:last-child
|
||||
font-size 70%
|
||||
|
||||
</style>
|
||||
|
@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||
<polyline
|
||||
:points="pointsNote"
|
||||
fill="none"
|
||||
stroke-width="1"
|
||||
stroke="#41ddde"/>
|
||||
<polyline
|
||||
:points="pointsReply"
|
||||
fill="none"
|
||||
stroke-width="1"
|
||||
stroke="#f7796c"/>
|
||||
<polyline
|
||||
:points="pointsRenote"
|
||||
fill="none"
|
||||
stroke-width="1"
|
||||
stroke="#a1de41"/>
|
||||
<polyline
|
||||
:points="pointsTotal"
|
||||
fill="none"
|
||||
stroke-width="1"
|
||||
stroke="#555"
|
||||
stroke-dasharray="2 2"/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
data: {
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: this.data,
|
||||
viewBoxX: 365,
|
||||
viewBoxY: 70,
|
||||
pointsNote: null,
|
||||
pointsReply: null,
|
||||
pointsRenote: null,
|
||||
pointsTotal: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.chart.forEach(d => {
|
||||
d.notes = this.type == 'local' ? d.localNotes : d.remoteNotes;
|
||||
d.replies = this.type == 'local' ? d.localReplies : d.remoteReplies;
|
||||
d.renotes = this.type == 'local' ? d.localRenotes : d.remoteRenotes;
|
||||
});
|
||||
|
||||
this.chart.forEach(d => {
|
||||
d.total = d.notes + d.replies + d.renotes;
|
||||
});
|
||||
|
||||
const peak = Math.max.apply(null, this.chart.map(d => d.total));
|
||||
|
||||
if (peak != 0) {
|
||||
const data = this.chart.slice().reverse();
|
||||
this.pointsNote = data.map((d, i) => `${i},${(1 - (d.notes / peak)) * this.viewBoxY}`).join(' ');
|
||||
this.pointsReply = data.map((d, i) => `${i},${(1 - (d.replies / peak)) * this.viewBoxY}`).join(' ');
|
||||
this.pointsRenote = data.map((d, i) => `${i},${(1 - (d.renotes / peak)) * this.viewBoxY}`).join(' ');
|
||||
this.pointsTotal = data.map((d, i) => `${i},${(1 - (d.total / peak)) * this.viewBoxY}`).join(' ');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
svg
|
||||
display block
|
||||
padding 10px
|
||||
width 100%
|
||||
|
||||
</style>
|
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<header>%i18n:@title%</header>
|
||||
<div class="card">
|
||||
<header>%i18n:@local%</header>
|
||||
<x-chart v-if="data" :data="data" type="local"/>
|
||||
</div>
|
||||
<div class="card">
|
||||
<header>%i18n:@remote%</header>
|
||||
<x-chart v-if="data" :data="data" type="remote"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
import XChart from "./admin.notes-chart.chart.vue";
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
(this as any).api('aggregation/notes').then(res => {
|
||||
this.data = res;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card">
|
||||
<header>%i18n:@suspend-user%</header>
|
||||
<input v-model="username" type="text" class="ui"/>
|
||||
<button class="ui" @click="suspendUser" :disabled="suspending">%i18n:@suspend%</button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="card">
|
||||
<header>%i18n:@unsuspend-user%</header>
|
||||
<input v-model="username" type="text" class="ui"/>
|
||||
<button class="ui" @click="unsuspendUser" :disabled="unsuspending">%i18n:@unsuspend%</button>
|
||||
|
@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`">
|
||||
<polyline
|
||||
:points="points"
|
||||
fill="none"
|
||||
stroke-width="1"
|
||||
stroke="#555"/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
props: {
|
||||
data: {
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: this.data,
|
||||
viewBoxX: 365,
|
||||
viewBoxY: 70,
|
||||
points: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.chart.forEach(d => {
|
||||
d.count = this.type == 'local' ? d.local : d.remote;
|
||||
});
|
||||
|
||||
const peak = Math.max.apply(null, this.chart.map(d => d.count));
|
||||
|
||||
if (peak != 0) {
|
||||
const data = this.chart.slice().reverse();
|
||||
this.points = data.map((d, i) => `${i},${(1 - (d.count / peak)) * this.viewBoxY}`).join(' ');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
svg
|
||||
display block
|
||||
padding 10px
|
||||
width 100%
|
||||
|
||||
</style>
|
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<header>%i18n:@title%</header>
|
||||
<div class="card">
|
||||
<header>%i18n:@local%</header>
|
||||
<x-chart v-if="data" :data="data" type="local"/>
|
||||
</div>
|
||||
<div class="card">
|
||||
<header>%i18n:@remote%</header>
|
||||
<x-chart v-if="data" :data="data" type="remote"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
import XChart from "./admin.users-chart.chart.vue";
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
(this as any).api('aggregation/users').then(res => {
|
||||
this.data = res;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
</style>
|
@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<header>%i18n:@verify-user%</header>
|
||||
<input v-model="username" type="text" class="ui"/>
|
||||
<button class="ui" @click="verifyUser" :disabled="verifying">%i18n:@verify%</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
import parseAcct from "../../../../../../misc/acct/parse";
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
username: null,
|
||||
verifying: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async verifyUser() {
|
||||
this.verifying = true;
|
||||
|
||||
const user = await (this as any).os.api(
|
||||
"users/show",
|
||||
parseAcct(this.username)
|
||||
);
|
||||
|
||||
await (this as any).os.api("admin/verify-user", {
|
||||
userId: user.id
|
||||
});
|
||||
|
||||
this.verifying = false;
|
||||
|
||||
(this as any).os.apis.dialog({ text: "%i18n:@verified%" });
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
header
|
||||
margin 10px 0
|
||||
|
||||
|
||||
button
|
||||
margin 16px 0
|
||||
|
||||
</style>
|
@ -9,12 +9,15 @@
|
||||
</ul>
|
||||
</nav>
|
||||
<main>
|
||||
<div v-if="page == 'dashboard'">
|
||||
<div v-show="page == 'dashboard'">
|
||||
<x-dashboard/>
|
||||
<x-users-chart/>
|
||||
<x-notes-chart/>
|
||||
</div>
|
||||
<div v-if="page == 'users'">
|
||||
<x-suspend-user/>
|
||||
<x-unsuspend-user/>
|
||||
<x-verify-user/>
|
||||
</div>
|
||||
<div v-if="page == 'drive'"></div>
|
||||
<div v-if="page == 'update'"></div>
|
||||
@ -27,12 +30,18 @@ import Vue from "vue";
|
||||
import XDashboard from "./admin.dashboard.vue";
|
||||
import XSuspendUser from "./admin.suspend-user.vue";
|
||||
import XUnsuspendUser from "./admin.unsuspend-user.vue";
|
||||
import XVerifyUser from "./admin.verify-user.vue";
|
||||
import XUsersChart from "./admin.users-chart.vue";
|
||||
import XNotesChart from "./admin.notes-chart.vue";
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XDashboard,
|
||||
XSuspendUser,
|
||||
XUnsuspendUser
|
||||
XUnsuspendUser,
|
||||
XVerifyUser,
|
||||
XUsersChart,
|
||||
XNotesChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -47,7 +56,7 @@ export default Vue.extend({
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
<style lang="stylus">
|
||||
@import '~const.styl'
|
||||
|
||||
.mk-admin
|
||||
@ -90,13 +99,23 @@ export default Vue.extend({
|
||||
width 100%
|
||||
padding 16px 32px
|
||||
|
||||
header
|
||||
margin 10px 0
|
||||
> div
|
||||
> div
|
||||
max-width 800px
|
||||
|
||||
.card
|
||||
padding 32px
|
||||
background #fff
|
||||
box-shadow 0 2px 8px rgba(#000, 0.1)
|
||||
|
||||
button
|
||||
margin 16px 0
|
||||
position absolute
|
||||
right 0
|
||||
&:not(:last-child)
|
||||
margin-bottom 16px
|
||||
|
||||
> header
|
||||
margin 0 0 1em 0
|
||||
padding 0 0 8px 0
|
||||
font-size 1em
|
||||
color #555
|
||||
border-bottom solid 1px #eee
|
||||
|
||||
</style>
|
||||
|
@ -95,7 +95,7 @@ export default Vue.extend({
|
||||
callbackUrl: this.cb,
|
||||
permission: this.permission
|
||||
}).then(() => {
|
||||
location.href = '/apps';
|
||||
location.href = '/dev/apps';
|
||||
}).catch(() => {
|
||||
alert('アプリの作成に失敗しました。再度お試しください。');
|
||||
});
|
||||
|
@ -45,7 +45,7 @@
|
||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0 && $store.state.settings.suggestRecentHashtags">
|
||||
<a v-for="tag in recentHashtags.slice(0, 5)" @click="addTag(tag)">#{{ tag }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,7 +56,7 @@ import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
import getFace from '../../../common/scripts/get-face';
|
||||
import parse from '../../../../../mfm/parse';
|
||||
import { host } from '../../../config';
|
||||
|
||||
@ -94,7 +94,7 @@ export default Vue.extend({
|
||||
files: [],
|
||||
poll: false,
|
||||
geo: null,
|
||||
visibility: 'public',
|
||||
visibility: this.$store.state.device.visibility || 'public',
|
||||
visibleUsers: [],
|
||||
useCw: false,
|
||||
cw: null,
|
||||
@ -240,8 +240,7 @@ export default Vue.extend({
|
||||
setVisibility() {
|
||||
const w = (this as any).os.new(MkVisibilityChooser, {
|
||||
source: this.$refs.visibilityButton,
|
||||
compact: true,
|
||||
v: this.visibility
|
||||
compact: true
|
||||
});
|
||||
w.$once('chosen', v => {
|
||||
this.visibility = v;
|
||||
@ -314,7 +313,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
kao() {
|
||||
this.text += getKao();
|
||||
this.text += getFace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -11,6 +11,7 @@ const defaultSettings = {
|
||||
fetchOnScroll: true,
|
||||
showMaps: true,
|
||||
showPostFormOnTopOfTl: false,
|
||||
suggestRecentHashtags: true,
|
||||
circleIcons: true,
|
||||
gradientWindowHeader: false,
|
||||
showReplyTarget: true,
|
||||
@ -109,6 +110,10 @@ export default (os: MiOS) => new Vuex.Store({
|
||||
src: x.src,
|
||||
arg: x.arg
|
||||
};
|
||||
},
|
||||
|
||||
setVisibility(state, visibility) {
|
||||
state.visibility = visibility;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -28,7 +28,7 @@ import { Config } from './config/types';
|
||||
const clusterLog = debug('misskey:cluster');
|
||||
const ev = new Xev();
|
||||
|
||||
if (process.env.NODE_ENV != 'production') {
|
||||
if (process.env.NODE_ENV != 'production' && process.env.DEBUG == null) {
|
||||
debug.enable('misskey');
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ async function workerMain() {
|
||||
async function init(): Promise<Config> {
|
||||
Logger.info('Welcome to Misskey!');
|
||||
|
||||
(new Logger('Deps')).info(`Node.js ${process.version}`);
|
||||
new Logger('Deps').info(`Node.js ${process.version}`);
|
||||
MachineInfo.show();
|
||||
EnvironmentInfo.show();
|
||||
new DependencyInfo().showAll();
|
||||
|
@ -11,4 +11,5 @@ export type IMeta = {
|
||||
usersCount: number;
|
||||
originalUsersCount: number;
|
||||
};
|
||||
disableRegistration: boolean;
|
||||
};
|
||||
|
12
src/models/registration-tickets.ts
Normal file
12
src/models/registration-tickets.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import * as mongo from 'mongodb';
|
||||
import db from '../db/mongodb';
|
||||
|
||||
const RegistrationTicket = db.get<IRegistrationTicket>('registrationTickets');
|
||||
RegistrationTicket.createIndex('code', { unique: true });
|
||||
export default RegistrationTicket;
|
||||
|
||||
export interface IRegistrationTicket {
|
||||
_id: mongo.ObjectID;
|
||||
createdAt: Date;
|
||||
code: string;
|
||||
}
|
@ -40,11 +40,13 @@ export default async function(resolver: Resolver, actor: IRemoteUser, activity:
|
||||
if (!note.to.includes('https://www.w3.org/ns/activitystreams#Public')) {
|
||||
if (note.cc.includes('https://www.w3.org/ns/activitystreams#Public')) {
|
||||
visibility = 'home';
|
||||
} else if (note.to.includes(`${actor.uri}/followers`)) { // TODO: person.followerと照合するべき?
|
||||
visibility = 'followers';
|
||||
} else {
|
||||
visibility = 'specified';
|
||||
visibleUsers = await Promise.all(note.to.map(uri => resolvePerson(uri)));
|
||||
}
|
||||
} if (activity.cc.length == 0) visibility = 'followers';
|
||||
}
|
||||
//#endergion
|
||||
|
||||
await post(actor, {
|
||||
|
@ -1,4 +1,15 @@
|
||||
export default (object: any) => ({
|
||||
type: 'Announce',
|
||||
object
|
||||
});
|
||||
import config from '../../../config';
|
||||
import { INote } from '../../../models/note';
|
||||
|
||||
export default (object: any, note: INote) => {
|
||||
const attributedTo = `${config.url}/users/${note.userId}`;
|
||||
|
||||
return {
|
||||
id: `${config.url}/notes/${note._id}`,
|
||||
type: 'Announce',
|
||||
published: note.createdAt.toISOString(),
|
||||
to: ['https://www.w3.org/ns/activitystreams#Public'],
|
||||
cc: [attributedTo, `${attributedTo}/followers`],
|
||||
object
|
||||
};
|
||||
};
|
||||
|
26
src/server/api/endpoints/admin/invite.ts
Normal file
26
src/server/api/endpoints/admin/invite.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import rndstr from 'rndstr';
|
||||
import RegistrationTicket from '../../../../models/registration-tickets';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
ja: '招待コードを発行します。'
|
||||
},
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
params: {}
|
||||
};
|
||||
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
const code = rndstr({ length: 5, chars: '0-9' });
|
||||
|
||||
await RegistrationTicket.insert({
|
||||
createdAt: new Date(),
|
||||
code: code
|
||||
});
|
||||
|
||||
res({
|
||||
code: code
|
||||
});
|
||||
});
|
@ -4,43 +4,43 @@ import getParams from '../../get-params';
|
||||
import User from '../../../../models/user';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
ja: '指定したユーザーを凍結します。',
|
||||
en: 'Suspend a user.'
|
||||
},
|
||||
desc: {
|
||||
ja: '指定したユーザーを凍結します。',
|
||||
en: 'Suspend a user.'
|
||||
},
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
params: {
|
||||
userId: $.type(ID).note({
|
||||
desc: {
|
||||
ja: '対象のユーザーID',
|
||||
en: 'The user ID which you want to suspend'
|
||||
}
|
||||
}),
|
||||
}
|
||||
params: {
|
||||
userId: $.type(ID).note({
|
||||
desc: {
|
||||
ja: '対象のユーザーID',
|
||||
en: 'The user ID which you want to suspend'
|
||||
}
|
||||
}),
|
||||
}
|
||||
};
|
||||
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) return rej(psErr);
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) return rej(psErr);
|
||||
|
||||
const user = await User.findOne({
|
||||
_id: ps.userId
|
||||
});
|
||||
const user = await User.findOne({
|
||||
_id: ps.userId
|
||||
});
|
||||
|
||||
if (user == null) {
|
||||
return rej('user not found');
|
||||
}
|
||||
if (user == null) {
|
||||
return rej('user not found');
|
||||
}
|
||||
|
||||
await User.findOneAndUpdate({
|
||||
_id: user._id
|
||||
}, {
|
||||
$set: {
|
||||
isSuspended: true
|
||||
}
|
||||
});
|
||||
await User.findOneAndUpdate({
|
||||
_id: user._id
|
||||
}, {
|
||||
$set: {
|
||||
isSuspended: true
|
||||
}
|
||||
});
|
||||
|
||||
res();
|
||||
res();
|
||||
});
|
||||
|
46
src/server/api/endpoints/admin/verify-user.ts
Normal file
46
src/server/api/endpoints/admin/verify-user.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import $ from 'cafy';
|
||||
import ID from '../../../../misc/cafy-id';
|
||||
import getParams from '../../get-params';
|
||||
import User from '../../../../models/user';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
ja: '指定したユーザーを公式アカウントにします。',
|
||||
en: 'Mark a user as verified.'
|
||||
},
|
||||
|
||||
requireCredential: true,
|
||||
requireAdmin: true,
|
||||
|
||||
params: {
|
||||
userId: $.type(ID).note({
|
||||
desc: {
|
||||
ja: '対象のユーザーID',
|
||||
en: 'The user ID which you want to verify'
|
||||
}
|
||||
}),
|
||||
}
|
||||
};
|
||||
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) return rej(psErr);
|
||||
|
||||
const user = await User.findOne({
|
||||
_id: ps.userId
|
||||
});
|
||||
|
||||
if (user == null) {
|
||||
return rej('user not found');
|
||||
}
|
||||
|
||||
await User.findOneAndUpdate({
|
||||
_id: user._id
|
||||
}, {
|
||||
$set: {
|
||||
isVerified: true
|
||||
}
|
||||
});
|
||||
|
||||
res();
|
||||
});
|
110
src/server/api/endpoints/aggregation/notes.ts
Normal file
110
src/server/api/endpoints/aggregation/notes.ts
Normal file
@ -0,0 +1,110 @@
|
||||
import $ from 'cafy';
|
||||
import Note from '../../../../models/note';
|
||||
|
||||
/**
|
||||
* Aggregate notes
|
||||
*/
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
// Get 'limit' parameter
|
||||
const [limit = 365, limitErr] = $.num.optional.range(1, 365).get(params.limit);
|
||||
if (limitErr) return rej('invalid limit param');
|
||||
|
||||
const query = [{
|
||||
$project: {
|
||||
renoteId: '$renoteId',
|
||||
replyId: '$replyId',
|
||||
user: '$_user',
|
||||
createdAt: { $add: ['$createdAt', 9 * 60 * 60 * 1000] } // Convert into JST
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
date: {
|
||||
year: { $year: '$createdAt' },
|
||||
month: { $month: '$createdAt' },
|
||||
day: { $dayOfMonth: '$createdAt' }
|
||||
},
|
||||
type: {
|
||||
$cond: {
|
||||
if: { $ne: ['$renoteId', null] },
|
||||
then: 'renote',
|
||||
else: {
|
||||
$cond: {
|
||||
if: { $ne: ['$replyId', null] },
|
||||
then: 'reply',
|
||||
else: 'note'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
origin: {
|
||||
$cond: {
|
||||
if: { $eq: ['$user.host', null] },
|
||||
then: 'local',
|
||||
else: 'remote'
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: {
|
||||
date: '$date',
|
||||
type: '$type',
|
||||
origin: '$origin'
|
||||
},
|
||||
count: { $sum: 1 }
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: '$_id.date',
|
||||
data: {
|
||||
$addToSet: {
|
||||
type: '$_id.type',
|
||||
origin: '$_id.origin',
|
||||
count: '$count'
|
||||
}
|
||||
}
|
||||
}
|
||||
}] as any;
|
||||
|
||||
const datas = await Note.aggregate(query);
|
||||
|
||||
datas.forEach((data: any) => {
|
||||
data.date = data._id;
|
||||
delete data._id;
|
||||
|
||||
data.localNotes = (data.data.filter((x: any) => x.type == 'note' && x.origin == 'local')[0] || { count: 0 }).count;
|
||||
data.localRenotes = (data.data.filter((x: any) => x.type == 'renote' && x.origin == 'local')[0] || { count: 0 }).count;
|
||||
data.localReplies = (data.data.filter((x: any) => x.type == 'reply' && x.origin == 'local')[0] || { count: 0 }).count;
|
||||
data.remoteNotes = (data.data.filter((x: any) => x.type == 'note' && x.origin == 'remote')[0] || { count: 0 }).count;
|
||||
data.remoteRenotes = (data.data.filter((x: any) => x.type == 'renote' && x.origin == 'remote')[0] || { count: 0 }).count;
|
||||
data.remoteReplies = (data.data.filter((x: any) => x.type == 'reply' && x.origin == 'remote')[0] || { count: 0 }).count;
|
||||
|
||||
delete data.data;
|
||||
});
|
||||
|
||||
const graph = [];
|
||||
|
||||
for (let i = 0; i < limit; i++) {
|
||||
const day = new Date(new Date().setDate(new Date().getDate() - i));
|
||||
|
||||
const data = datas.filter((d: any) =>
|
||||
d.date.year == day.getFullYear() && d.date.month == day.getMonth() + 1 && d.date.day == day.getDate()
|
||||
)[0];
|
||||
|
||||
if (data) {
|
||||
graph.push(data);
|
||||
} else {
|
||||
graph.push({
|
||||
date: { year: day.getFullYear(), month: day.getMonth() + 1, day: day.getDate() },
|
||||
localNotes: 0,
|
||||
localRenotes: 0,
|
||||
localReplies: 0,
|
||||
remoteNotes: 0,
|
||||
remoteRenotes: 0,
|
||||
remoteReplies: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
res(graph);
|
||||
});
|
@ -1,84 +0,0 @@
|
||||
import $ from 'cafy';
|
||||
import Note from '../../../../models/note';
|
||||
|
||||
/**
|
||||
* Aggregate notes
|
||||
*/
|
||||
export default (params: any) => new Promise(async (res, rej) => {
|
||||
// Get 'limit' parameter
|
||||
const [limit = 365, limitErr] = $.num.optional.range(1, 365).get(params.limit);
|
||||
if (limitErr) return rej('invalid limit param');
|
||||
|
||||
const datas = await Note
|
||||
.aggregate([
|
||||
{ $project: {
|
||||
renoteId: '$renoteId',
|
||||
replyId: '$replyId',
|
||||
createdAt: { $add: ['$createdAt', 9 * 60 * 60 * 1000] } // Convert into JST
|
||||
}},
|
||||
{ $project: {
|
||||
date: {
|
||||
year: { $year: '$createdAt' },
|
||||
month: { $month: '$createdAt' },
|
||||
day: { $dayOfMonth: '$createdAt' }
|
||||
},
|
||||
type: {
|
||||
$cond: {
|
||||
if: { $ne: ['$renoteId', null] },
|
||||
then: 'renote',
|
||||
else: {
|
||||
$cond: {
|
||||
if: { $ne: ['$replyId', null] },
|
||||
then: 'reply',
|
||||
else: 'note'
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
},
|
||||
{ $group: { _id: {
|
||||
date: '$date',
|
||||
type: '$type'
|
||||
}, count: { $sum: 1 } } },
|
||||
{ $group: {
|
||||
_id: '$_id.date',
|
||||
data: { $addToSet: {
|
||||
type: '$_id.type',
|
||||
count: '$count'
|
||||
}}
|
||||
} }
|
||||
]);
|
||||
|
||||
datas.forEach((data: any) => {
|
||||
data.date = data._id;
|
||||
delete data._id;
|
||||
|
||||
data.notes = (data.data.filter((x: any) => x.type == 'note')[0] || { count: 0 }).count;
|
||||
data.renotes = (data.data.filter((x: any) => x.type == 'renote')[0] || { count: 0 }).count;
|
||||
data.replies = (data.data.filter((x: any) => x.type == 'reply')[0] || { count: 0 }).count;
|
||||
|
||||
delete data.data;
|
||||
});
|
||||
|
||||
const graph = [];
|
||||
|
||||
for (let i = 0; i < limit; i++) {
|
||||
const day = new Date(new Date().setDate(new Date().getDate() - i));
|
||||
|
||||
const data = datas.filter((d: any) =>
|
||||
d.date.year == day.getFullYear() && d.date.month == day.getMonth() + 1 && d.date.day == day.getDate()
|
||||
)[0];
|
||||
|
||||
if (data) {
|
||||
graph.push(data);
|
||||
} else {
|
||||
graph.push({
|
||||
notes: 0,
|
||||
renotes: 0,
|
||||
replies: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
res(graph);
|
||||
});
|
@ -9,46 +9,77 @@ export default (params: any) => new Promise(async (res, rej) => {
|
||||
const [limit = 365, limitErr] = $.num.optional.range(1, 365).get(params.limit);
|
||||
if (limitErr) return rej('invalid limit param');
|
||||
|
||||
const users = await User
|
||||
.find({}, {
|
||||
sort: {
|
||||
_id: -1
|
||||
const query = [{
|
||||
$project: {
|
||||
host: '$host',
|
||||
createdAt: { $add: ['$createdAt', 9 * 60 * 60 * 1000] } // Convert into JST
|
||||
}
|
||||
}, {
|
||||
$project: {
|
||||
date: {
|
||||
year: { $year: '$createdAt' },
|
||||
month: { $month: '$createdAt' },
|
||||
day: { $dayOfMonth: '$createdAt' }
|
||||
},
|
||||
fields: {
|
||||
_id: false,
|
||||
createdAt: true,
|
||||
deletedAt: true
|
||||
origin: {
|
||||
$cond: {
|
||||
if: { $eq: ['$host', null] },
|
||||
then: 'local',
|
||||
else: 'remote'
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: {
|
||||
date: '$date',
|
||||
origin: '$origin'
|
||||
},
|
||||
count: { $sum: 1 }
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: '$_id.date',
|
||||
data: {
|
||||
$addToSet: {
|
||||
type: '$_id.type',
|
||||
origin: '$_id.origin',
|
||||
count: '$count'
|
||||
}
|
||||
}
|
||||
}
|
||||
}] as any;
|
||||
|
||||
const datas = await User.aggregate(query);
|
||||
|
||||
datas.forEach((data: any) => {
|
||||
data.date = data._id;
|
||||
delete data._id;
|
||||
|
||||
data.local = (data.data.filter((x: any) => x.origin == 'local')[0] || { count: 0 }).count;
|
||||
data.remote = (data.data.filter((x: any) => x.origin == 'remote')[0] || { count: 0 }).count;
|
||||
|
||||
delete data.data;
|
||||
});
|
||||
|
||||
const graph = [];
|
||||
|
||||
for (let i = 0; i < limit; i++) {
|
||||
let dayStart = new Date(new Date().setDate(new Date().getDate() - i));
|
||||
dayStart = new Date(dayStart.setMilliseconds(0));
|
||||
dayStart = new Date(dayStart.setSeconds(0));
|
||||
dayStart = new Date(dayStart.setMinutes(0));
|
||||
dayStart = new Date(dayStart.setHours(0));
|
||||
const day = new Date(new Date().setDate(new Date().getDate() - i));
|
||||
|
||||
let dayEnd = new Date(new Date().setDate(new Date().getDate() - i));
|
||||
dayEnd = new Date(dayEnd.setMilliseconds(999));
|
||||
dayEnd = new Date(dayEnd.setSeconds(59));
|
||||
dayEnd = new Date(dayEnd.setMinutes(59));
|
||||
dayEnd = new Date(dayEnd.setHours(23));
|
||||
// day = day.getTime();
|
||||
const data = datas.filter((d: any) =>
|
||||
d.date.year == day.getFullYear() && d.date.month == day.getMonth() + 1 && d.date.day == day.getDate()
|
||||
)[0];
|
||||
|
||||
const total = users.filter(u =>
|
||||
u.createdAt < dayEnd && (u.deletedAt == null || u.deletedAt > dayEnd)
|
||||
).length;
|
||||
|
||||
const created = users.filter(u =>
|
||||
u.createdAt < dayEnd && u.createdAt > dayStart
|
||||
).length;
|
||||
|
||||
graph.push({
|
||||
total: total,
|
||||
created: created
|
||||
});
|
||||
if (data) {
|
||||
graph.push(data);
|
||||
} else {
|
||||
graph.push({
|
||||
date: { year: day.getFullYear(), month: day.getMonth() + 1, day: day.getDate() },
|
||||
local: 0,
|
||||
remote: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
res(graph);
|
||||
|
@ -28,6 +28,7 @@ export default () => new Promise(async (res, rej) => {
|
||||
model: os.cpus()[0].model,
|
||||
cores: os.cpus().length
|
||||
},
|
||||
broadcasts: meta.broadcasts
|
||||
broadcasts: meta.broadcasts,
|
||||
disableRegistration: meta.disableRegistration
|
||||
});
|
||||
});
|
||||
|
@ -16,8 +16,7 @@ export const meta = {
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 300,
|
||||
minInterval: ms('1second')
|
||||
max: 300
|
||||
},
|
||||
|
||||
kind: 'note-write',
|
||||
|
@ -6,6 +6,7 @@ import User, { IUser, validateUsername, validatePassword, pack } from '../../../
|
||||
import generateUserToken from '../common/generate-native-user-token';
|
||||
import config from '../../../config';
|
||||
import Meta from '../../../models/meta';
|
||||
import RegistrationTicket from '../../../models/registration-tickets';
|
||||
|
||||
if (config.recaptcha) {
|
||||
recaptcha.init({
|
||||
@ -29,6 +30,29 @@ export default async (ctx: Koa.Context) => {
|
||||
|
||||
const username = body['username'];
|
||||
const password = body['password'];
|
||||
const invitationCode = body['invitationCode'];
|
||||
|
||||
const meta = await Meta.findOne({});
|
||||
|
||||
if (meta && meta.disableRegistration) {
|
||||
if (invitationCode == null || typeof invitationCode != 'string') {
|
||||
ctx.status = 400;
|
||||
return;
|
||||
}
|
||||
|
||||
const ticket = await RegistrationTicket.findOne({
|
||||
code: invitationCode
|
||||
});
|
||||
|
||||
if (ticket == null) {
|
||||
ctx.status = 400;
|
||||
return;
|
||||
}
|
||||
|
||||
RegistrationTicket.remove({
|
||||
_id: ticket._id
|
||||
});
|
||||
}
|
||||
|
||||
// Validate username
|
||||
if (!validateUsername(username)) {
|
||||
|
@ -235,7 +235,7 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
|
||||
|
||||
async function renderActivity(data: Option, note: INote) {
|
||||
const content = data.renote && data.text == null
|
||||
? renderAnnounce(data.renote.uri ? data.renote.uri : await renderNote(data.renote))
|
||||
? renderAnnounce(data.renote.uri ? data.renote.uri : await renderNote(data.renote), note)
|
||||
: renderCreate(await renderNote(note));
|
||||
|
||||
return packAp(content);
|
||||
|
Reference in New Issue
Block a user