Compare commits
107 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3faf64061 | |||
ed83993e15 | |||
0f8847bb74 | |||
a72cfa7535 | |||
514b74a19d | |||
a2c124306f | |||
273f67e268 | |||
2870a7e463 | |||
65e5cfa68e | |||
10e59957d1 | |||
4f74373df3 | |||
2d414bbf86 | |||
a199969b81 | |||
3aef5e6748 | |||
2b536a7443 | |||
20fe68de05 | |||
c7684b59de | |||
a7237d157a | |||
35f91fa280 | |||
299ac32225 | |||
a038738d72 | |||
2b0a919fb5 | |||
946c706913 | |||
89b5d976ee | |||
6f679bb6b4 | |||
db4e7b0e16 | |||
9ca942490d | |||
ebcf249c8b | |||
939c487503 | |||
981a8b267e | |||
9531da80a0 | |||
e1109b168c | |||
b7c70039aa | |||
17b6f6cf2a | |||
dd88483ba4 | |||
0ff27f65b3 | |||
b1655740df | |||
6d562aece1 | |||
2182c3372b | |||
d3331bfe82 | |||
cfc4a2e8b4 | |||
36c41c8eb3 | |||
d255157e6e | |||
c12e07277d | |||
06b4fb5095 | |||
8fafdcb428 | |||
537a606bb6 | |||
3dc7a4463c | |||
fd6ff05b60 | |||
1a159e41b8 | |||
23533cdd16 | |||
2f598b8fa1 | |||
bca349fec1 | |||
719fac6480 | |||
1012b2b2c7 | |||
5149be4b1b | |||
d12deeb0d8 | |||
9df81d1939 | |||
3be0079868 | |||
9b253ccb3a | |||
dded76099c | |||
41a7ec7d3d | |||
168c773ba0 | |||
9abed92196 | |||
4a75e3602a | |||
1a689f6641 | |||
08d7ae11d6 | |||
9535759787 | |||
f8fc31f14a | |||
b74bf97761 | |||
a090b908bd | |||
3046821026 | |||
e94c73efe2 | |||
e85f9f4aa5 | |||
ad67886f96 | |||
5df0e102fd | |||
a04f0e3545 | |||
dff9c7ac48 | |||
3a80b59986 | |||
07560a4fdd | |||
7edca21c05 | |||
34105abd9d | |||
1bbca48a0b | |||
21f6a86772 | |||
6559197c55 | |||
05f9ad11bb | |||
f06d586680 | |||
4f45e8125c | |||
cc2843503d | |||
324a974dec | |||
4d4ffd70ac | |||
bf98a11b65 | |||
1117ce4b54 | |||
57e93b9b4e | |||
9e4b061ed0 | |||
1067bef7d6 | |||
8bff529acd | |||
4b08677839 | |||
70997cb551 | |||
bf0ef17e23 | |||
7dae5107f8 | |||
2dea88a147 | |||
b9290a021b | |||
129ce93868 | |||
5f41e5d6d0 | |||
c706d030ea | |||
34716a34f8 |
@ -60,11 +60,6 @@ mongodb:
|
|||||||
user: example-misskey-user
|
user: example-misskey-user
|
||||||
pass: example-misskey-pass
|
pass: example-misskey-pass
|
||||||
|
|
||||||
redis:
|
|
||||||
host: localhost
|
|
||||||
port: 6379
|
|
||||||
pass: example-pass
|
|
||||||
|
|
||||||
# Drive capacity of a local user (MB)
|
# Drive capacity of a local user (MB)
|
||||||
localDriveCapacityMb: 256
|
localDriveCapacityMb: 256
|
||||||
|
|
||||||
@ -122,47 +117,50 @@ drive:
|
|||||||
# Below settings are optional
|
# Below settings are optional
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Redis
|
||||||
|
#redis:
|
||||||
|
# host: localhost
|
||||||
|
# port: 6379
|
||||||
|
# pass: example-pass
|
||||||
|
|
||||||
# Elasticsearch
|
# Elasticsearch
|
||||||
# elasticsearch:
|
#elasticsearch:
|
||||||
# host: localhost
|
# host: localhost
|
||||||
# port: 9200
|
# port: 9200
|
||||||
# pass: null
|
# pass: null
|
||||||
|
|
||||||
# reCAPTCHA
|
# reCAPTCHA
|
||||||
# recaptcha:
|
#recaptcha:
|
||||||
# site_key: example-site-key
|
# site_key: example-site-key
|
||||||
# secret_key: example-secret-key
|
# secret_key: example-secret-key
|
||||||
|
|
||||||
# ServiceWorker
|
# ServiceWorker
|
||||||
# sw:
|
#sw:
|
||||||
# # Public key of VAPID
|
# # Public key of VAPID
|
||||||
# public_key: example-sw-public-key
|
# public_key: example-sw-public-key
|
||||||
|
#
|
||||||
# # Private key of VAPID
|
# # Private key of VAPID
|
||||||
# private_key: example-sw-private-key
|
# private_key: example-sw-private-key
|
||||||
|
|
||||||
# google_maps_api_key: example-google-maps-api-key
|
|
||||||
|
|
||||||
# Twitter integration
|
# Twitter integration
|
||||||
# You need to set the oauth callback url as : https://<your-misskey-instance>/api/tw/cb
|
# You need to set the oauth callback url as : https://<your-misskey-instance>/api/tw/cb
|
||||||
# twitter:
|
#twitter:
|
||||||
# consumer_key: example-twitter-consumer-key
|
# consumer_key: example-twitter-consumer-key
|
||||||
# consumer_secret: example-twitter-consumer-secret-key
|
# consumer_secret: example-twitter-consumer-secret-key
|
||||||
|
|
||||||
# Ghost
|
# Ghost
|
||||||
# Ghost account is an account used for the purpose of delegating
|
# Ghost account is an account used for the purpose of delegating
|
||||||
# followers when putting users in the list.
|
# followers when putting users in the list.
|
||||||
# ghost: user-id-of-your-ghost-account
|
#ghost: user-id-of-your-ghost-account
|
||||||
|
|
||||||
# Clustering
|
# Clustering
|
||||||
# clusterLimit: 1
|
#clusterLimit: 1
|
||||||
|
|
||||||
# Summaly proxy
|
# Summaly proxy
|
||||||
# summalyProxy: "http://example.com"
|
#summalyProxy: "http://example.com"
|
||||||
|
|
||||||
# User recommendation
|
# User recommendation
|
||||||
user_recommendation:
|
#user_recommendation:
|
||||||
external: true
|
# external: true
|
||||||
engine: http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}
|
# engine: http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}
|
||||||
timeout: 300000
|
# timeout: 300000
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@ Please install and setup these softwares:
|
|||||||
#### Dependencies :package:
|
#### Dependencies :package:
|
||||||
* **[Node.js](https://nodejs.org/en/)**
|
* **[Node.js](https://nodejs.org/en/)**
|
||||||
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
||||||
* **[Redis](https://redis.io/)**
|
|
||||||
|
|
||||||
##### Optional
|
##### Optional
|
||||||
|
* [Redis](https://redis.io/)
|
||||||
|
* Redis is optional, but we strongly recommended to install it
|
||||||
* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB
|
* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB
|
||||||
|
|
||||||
|
|
||||||
*3.* Setup MongoDB
|
*3.* Setup MongoDB
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
In root :
|
In root :
|
||||||
|
@ -24,10 +24,17 @@ adduser --disabled-password --disabled-login misskey
|
|||||||
#### 依存関係 :package:
|
#### 依存関係 :package:
|
||||||
* **[Node.js](https://nodejs.org/en/)**
|
* **[Node.js](https://nodejs.org/en/)**
|
||||||
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
|
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
|
||||||
* **[Redis](https://redis.io/)**
|
|
||||||
|
|
||||||
##### オプション
|
##### オプション
|
||||||
* [Elasticsearch](https://www.elastic.co/) - 検索機能を向上させるために用います。
|
* [Redis](https://redis.io/)
|
||||||
|
* Redisはオプションですが、インストールすることを強く推奨します。
|
||||||
|
* インストールしなくていいのは、あなたのインスタンスが自分専用のときだけとお考えください。
|
||||||
|
* 具体的には、Redisをインストールしないと、次の事が出来なくなります:
|
||||||
|
* Misskeyプロセスを複数起動しての負荷分散
|
||||||
|
* レートリミット
|
||||||
|
* Twitter連携
|
||||||
|
* [Elasticsearch](https://www.elastic.co/)
|
||||||
|
* 検索機能を有効にするためにはインストールが必要です。
|
||||||
|
|
||||||
*3.* MongoDBの設定
|
*3.* MongoDBの設定
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "Diese Anmerkung favorisieren"
|
favorite: "Diese Anmerkung favorisieren"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "An die Profilseite pinnen"
|
pin: "An die Profilseite pinnen"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "Löschen"
|
delete: "Löschen"
|
||||||
|
@ -265,40 +265,40 @@ common/views/components/media-banner.vue:
|
|||||||
sensitive: "NSFW"
|
sensitive: "NSFW"
|
||||||
click-to-show: "Click to show"
|
click-to-show: "Click to show"
|
||||||
common/views/components/theme.vue:
|
common/views/components/theme.vue:
|
||||||
light-theme: "非ダークモード時に使用するテーマ"
|
light-theme: "Theme during non-dark mode"
|
||||||
dark-theme: "ダークモード時に使用するテーマ"
|
dark-theme: "Theme during dark mode"
|
||||||
light-themes: "明るいテーマ"
|
light-themes: "Light theme"
|
||||||
dark-themes: "暗いテーマ"
|
dark-themes: "Dark theme"
|
||||||
install-a-theme: "テーマのインストール"
|
install-a-theme: "Install a theme"
|
||||||
theme-code: "テーマコード"
|
theme-code: "Theme code"
|
||||||
install: "インストール"
|
install: "Install"
|
||||||
installed: "「{}」をインストールしました"
|
installed: "\"{}\" has been installed"
|
||||||
create-a-theme: "テーマの作成"
|
create-a-theme: "Create a theme"
|
||||||
save-created-theme: "テーマを保存"
|
save-created-theme: "Save a theme"
|
||||||
primary-color: "プライマリ カラー"
|
primary-color: "Primary color"
|
||||||
secondary-color: "セカンダリ カラー"
|
secondary-color: "Secondary color"
|
||||||
text-color: "文字色"
|
text-color: "Text color"
|
||||||
base-theme: "ベーステーマ"
|
base-theme: "Base theme"
|
||||||
base-theme-light: "Light"
|
base-theme-light: "Light"
|
||||||
base-theme-dark: "Dark"
|
base-theme-dark: "Dark"
|
||||||
theme-name: "テーマ名"
|
theme-name: "Theme name"
|
||||||
preview-created-theme: "プレビュー"
|
preview-created-theme: "Preview"
|
||||||
invalid-theme: "テーマが正しくありません。"
|
invalid-theme: "Not valid theme"
|
||||||
already-installed: "既にそのテーマはインストールされています。"
|
already-installed: "This theme is already installed."
|
||||||
saved: "保存しました"
|
saved: "Saved"
|
||||||
manage-themes: "テーマの管理"
|
manage-themes: "Themes manager"
|
||||||
builtin-themes: "標準テーマ"
|
builtin-themes: "Standard themes"
|
||||||
my-themes: "マイテーマ"
|
my-themes: "My themes"
|
||||||
installed-themes: "インストールされたテーマ"
|
installed-themes: "Installed themes"
|
||||||
select-theme: "テーマを選択してください"
|
select-theme: "Select your theme"
|
||||||
uninstall: "アンインストール"
|
uninstall: "Uninstall"
|
||||||
uninstalled: "「{}」をアンインストールしました"
|
uninstalled: "\"{}\" has been uninstalled"
|
||||||
author: "作者"
|
author: "Author"
|
||||||
desc: "説明"
|
desc: "Description"
|
||||||
export: "エクスポート"
|
export: "Export"
|
||||||
import: "インポート"
|
import: "Import"
|
||||||
import-by-code: "またはコードをペースト"
|
import-by-code: "or paste code"
|
||||||
theme-name-required: "テーマ名は必須です。"
|
theme-name-required: "Theme name is required"
|
||||||
common/views/components/cw-button.vue:
|
common/views/components/cw-button.vue:
|
||||||
hide: "Hide"
|
hide: "Hide"
|
||||||
show: "See more"
|
show: "See more"
|
||||||
@ -335,8 +335,9 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "Details"
|
detail: "Details"
|
||||||
copy-link: "Copy link"
|
copy-link: "Copy link"
|
||||||
favorite: "Favorite this note"
|
favorite: "Favorite this note"
|
||||||
|
unfavorite: "Unfavorite"
|
||||||
pin: "Pin to your profile"
|
pin: "Pin to your profile"
|
||||||
unpin: "ピン留め解除"
|
unpin: "Unpin"
|
||||||
delete: "Delete"
|
delete: "Delete"
|
||||||
delete-confirm: "Delete this post?"
|
delete-confirm: "Delete this post?"
|
||||||
remote: "Show original note"
|
remote: "Show original note"
|
||||||
@ -514,13 +515,13 @@ desktop/views/components/charts.vue:
|
|||||||
notes: "The number of posts: increase/decrease (Combined)"
|
notes: "The number of posts: increase/decrease (Combined)"
|
||||||
local-notes: "The number of posts: increase/decrease (Local)"
|
local-notes: "The number of posts: increase/decrease (Local)"
|
||||||
remote-notes: "The number of posts: increase/decrease (Remote)"
|
remote-notes: "The number of posts: increase/decrease (Remote)"
|
||||||
notes-total: "投稿の積算"
|
notes-total: "Total posts"
|
||||||
users: "The number of users: increase/decrease"
|
users: "The number of users: increase/decrease"
|
||||||
users-total: "ユーザーの積算"
|
users-total: "Total users"
|
||||||
drive: "Capacity used as the storage: increase/decrease"
|
drive: "Capacity used as the storage: increase/decrease"
|
||||||
drive-total: "ドライブ使用量の積算"
|
drive-total: "Total usage of Drive"
|
||||||
drive-files: "The number of files on the storage: increase/decrease"
|
drive-files: "The number of files on the storage: increase/decrease"
|
||||||
drive-files-total: "ドライブのファイル数の積算"
|
drive-files-total: "Total number of files on Drive"
|
||||||
network-requests: "Requests"
|
network-requests: "Requests"
|
||||||
network-time: "Response time"
|
network-time: "Response time"
|
||||||
network-usage: "Traffic"
|
network-usage: "Traffic"
|
||||||
@ -730,8 +731,8 @@ desktop/views/components/settings.vue:
|
|||||||
choose-wallpaper: "Choose a background"
|
choose-wallpaper: "Choose a background"
|
||||||
delete-wallpaper: "Remove background"
|
delete-wallpaper: "Remove background"
|
||||||
dark-mode: "Dark Mode"
|
dark-mode: "Dark Mode"
|
||||||
use-shadow: "UIに影を使用"
|
use-shadow: "Use shadows in the UI"
|
||||||
rounded-corners: "UIの角を丸める"
|
rounded-corners: "Round corners of UI"
|
||||||
circle-icons: "Use circle icons"
|
circle-icons: "Use circle icons"
|
||||||
contrasted-acct: "Add contrast to username"
|
contrasted-acct: "Add contrast to username"
|
||||||
post-form-on-timeline: "Display post form at the top of the timeline"
|
post-form-on-timeline: "Display post form at the top of the timeline"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "Detalles"
|
detail: "Detalles"
|
||||||
copy-link: "Copiar enlace"
|
copy-link: "Copiar enlace"
|
||||||
favorite: "Me gusta esta nota"
|
favorite: "Me gusta esta nota"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "Fijar en el perfil"
|
pin: "Fijar en el perfil"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "Borrar"
|
delete: "Borrar"
|
||||||
|
@ -34,7 +34,7 @@ common:
|
|||||||
paragraph4: "Pour terminer la personnalisation, cliquez sur \"Terminer\" dans le coin supérieur droit."
|
paragraph4: "Pour terminer la personnalisation, cliquez sur \"Terminer\" dans le coin supérieur droit."
|
||||||
gotit: "Compris !"
|
gotit: "Compris !"
|
||||||
notification:
|
notification:
|
||||||
file-uploaded: "Le fichier a été téléversé !"
|
file-uploaded: "Le fichier a été transféré !"
|
||||||
message-from: "Message de {} :"
|
message-from: "Message de {} :"
|
||||||
reversi-invited: "Invité à jouer"
|
reversi-invited: "Invité à jouer"
|
||||||
reversi-invited-by: "Invité par {} :"
|
reversi-invited-by: "Invité par {} :"
|
||||||
@ -136,7 +136,7 @@ common:
|
|||||||
memo: "Pense-bête"
|
memo: "Pense-bête"
|
||||||
trends: "Tendances"
|
trends: "Tendances"
|
||||||
photo-stream: "Flux de photos"
|
photo-stream: "Flux de photos"
|
||||||
posts-monitor: "Graphe des publications"
|
posts-monitor: "Graph des publications"
|
||||||
slideshow: "Diaporama"
|
slideshow: "Diaporama"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
broadcast: "Diffusion"
|
broadcast: "Diffusion"
|
||||||
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "Détails"
|
detail: "Détails"
|
||||||
copy-link: "Copier le lien"
|
copy-link: "Copier le lien"
|
||||||
favorite: "Mettre cette note en favoris"
|
favorite: "Mettre cette note en favoris"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "Épingler sur votre profil"
|
pin: "Épingler sur votre profil"
|
||||||
unpin: "Désépingler"
|
unpin: "Désépingler"
|
||||||
delete: "Supprimer"
|
delete: "Supprimer"
|
||||||
@ -434,7 +435,7 @@ common/views/widgets/photo-stream.vue:
|
|||||||
title: "Flux de photos"
|
title: "Flux de photos"
|
||||||
no-photos: "Pas de photo"
|
no-photos: "Pas de photo"
|
||||||
common/views/widgets/posts-monitor.vue:
|
common/views/widgets/posts-monitor.vue:
|
||||||
title: "Graphe des publications"
|
title: "Graph des publications"
|
||||||
toggle: "Basculer entre les vues"
|
toggle: "Basculer entre les vues"
|
||||||
common/views/widgets/hashtags.vue:
|
common/views/widgets/hashtags.vue:
|
||||||
title: "Hashtags"
|
title: "Hashtags"
|
||||||
@ -582,7 +583,7 @@ desktop/views/components/drive.vue:
|
|||||||
unable-to-process: "L'opération n'a pas pu être complétée"
|
unable-to-process: "L'opération n'a pas pu être complétée"
|
||||||
circular-reference-detected: "Le dossier de destination est un sous-dossier du dossier que vous souhaitez déplacer."
|
circular-reference-detected: "Le dossier de destination est un sous-dossier du dossier que vous souhaitez déplacer."
|
||||||
unhandled-error: "Erreur inconnue"
|
unhandled-error: "Erreur inconnue"
|
||||||
url-upload: "Uploader d'un URL"
|
url-upload: "Téléverser via une URL"
|
||||||
url-of-file: "URL de l'image que vous souhaitez uploader."
|
url-of-file: "URL de l'image que vous souhaitez uploader."
|
||||||
url-upload-requested: "Upload requested"
|
url-upload-requested: "Upload requested"
|
||||||
may-take-time: "L'upload de votre fichier peut prendre un certain temps."
|
may-take-time: "L'upload de votre fichier peut prendre un certain temps."
|
||||||
@ -590,8 +591,8 @@ desktop/views/components/drive.vue:
|
|||||||
folder-name: "Nom du dossier"
|
folder-name: "Nom du dossier"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
create-folder: "Créer un dossier"
|
create-folder: "Créer un dossier"
|
||||||
upload: "Uploader un fichier"
|
upload: "Transférer un fichier"
|
||||||
url-upload: "Uploader d'un URL"
|
url-upload: "Transférer à partir d’une URL"
|
||||||
desktop/views/components/media-image.vue:
|
desktop/views/components/media-image.vue:
|
||||||
sensitive: "Le contenu est NSFW"
|
sensitive: "Le contenu est NSFW"
|
||||||
click-to-show: "Cliquer pour afficher"
|
click-to-show: "Cliquer pour afficher"
|
||||||
@ -658,21 +659,21 @@ desktop/views/components/post-form.vue:
|
|||||||
add-visible-user: "+Ajouter un utilisateur"
|
add-visible-user: "+Ajouter un utilisateur"
|
||||||
attach-location-information: "Attacher des informations de localisation"
|
attach-location-information: "Attacher des informations de localisation"
|
||||||
hide-contents: "Masquer les contenus"
|
hide-contents: "Masquer les contenus"
|
||||||
reply-placeholder: "Répondre à cette note"
|
reply-placeholder: "Répondre à cette note …"
|
||||||
quote-placeholder: "Citer cette note"
|
quote-placeholder: "Citer cette note …"
|
||||||
submit: "Poster"
|
submit: "Publier"
|
||||||
reply: "Répondre"
|
reply: "Répondre"
|
||||||
renote: "Republier"
|
renote: "Republier"
|
||||||
posted: "Posté!"
|
posted: "Publié !"
|
||||||
replied: "Répondu!"
|
replied: "Répondu !"
|
||||||
reposted: "Reposté!"
|
reposted: "Reposté !"
|
||||||
note-failed: "La note à échoué"
|
note-failed: "La note à échoué"
|
||||||
reply-failed: "La réponse à échoué"
|
reply-failed: "La réponse à échoué"
|
||||||
renote-failed: "La renote à échoué"
|
renote-failed: "Échec lors de la republication"
|
||||||
posting: "Publication..."
|
posting: "Publication …"
|
||||||
attach-media-from-local: "Joindre un media depuis votre PC"
|
attach-media-from-local: "Joindre un média depuis votre appareil"
|
||||||
attach-media-from-drive: "Joindre un media depuis votre Drive"
|
attach-media-from-drive: "Joindre un média depuis votre Drive"
|
||||||
attach-cancel: "Annuler la jointure de fichier"
|
attach-cancel: "Annuler le fichier attaché"
|
||||||
insert-a-kao: "v('ω')v"
|
insert-a-kao: "v('ω')v"
|
||||||
create-poll: "Créer un sondage"
|
create-poll: "Créer un sondage"
|
||||||
text-remain: "{} charactères restants"
|
text-remain: "{} charactères restants"
|
||||||
@ -687,15 +688,15 @@ desktop/views/components/post-form-window.vue:
|
|||||||
note: "Nouvelle note"
|
note: "Nouvelle note"
|
||||||
reply: "Répondre"
|
reply: "Répondre"
|
||||||
attaches: "{} media joint(s)"
|
attaches: "{} media joint(s)"
|
||||||
uploading-media: "Upload du media {}"
|
uploading-media: "Transfert du média {}"
|
||||||
desktop/views/components/progress-dialog.vue:
|
desktop/views/components/progress-dialog.vue:
|
||||||
waiting: "En attente"
|
waiting: "En attente"
|
||||||
desktop/views/components/renote-form.vue:
|
desktop/views/components/renote-form.vue:
|
||||||
quote: "Citer..."
|
quote: "Citer..."
|
||||||
cancel: "Annuler"
|
cancel: "Annuler"
|
||||||
renote: "Republier"
|
renote: "Republier"
|
||||||
reposting: "Repost en cours..."
|
reposting: "Republication en cours …"
|
||||||
success: "Reposté!"
|
success: "Republié !"
|
||||||
failure: "La renote a échoué"
|
failure: "La renote a échoué"
|
||||||
desktop/views/components/renote-form-window.vue:
|
desktop/views/components/renote-form-window.vue:
|
||||||
title: "Êtes vous sûr de vouloir renote cette note?"
|
title: "Êtes vous sûr de vouloir renote cette note?"
|
||||||
@ -878,7 +879,7 @@ desktop/views/components/ui.header.nav.vue:
|
|||||||
desktop/views/components/ui.header.notifications.vue:
|
desktop/views/components/ui.header.notifications.vue:
|
||||||
title: "Notifications"
|
title: "Notifications"
|
||||||
desktop/views/components/ui.header.post.vue:
|
desktop/views/components/ui.header.post.vue:
|
||||||
post: "Composer un nouveau post"
|
post: "Rédiger une nouvelle publication"
|
||||||
desktop/views/components/ui.header.search.vue:
|
desktop/views/components/ui.header.search.vue:
|
||||||
placeholder: "Chercher"
|
placeholder: "Chercher"
|
||||||
desktop/views/components/received-follow-requests-window.vue:
|
desktop/views/components/received-follow-requests-window.vue:
|
||||||
@ -969,7 +970,7 @@ desktop/views/pages/selectdrive.vue:
|
|||||||
title: "Choisir fichier(s)"
|
title: "Choisir fichier(s)"
|
||||||
ok: "OK"
|
ok: "OK"
|
||||||
cancel: "Annuler"
|
cancel: "Annuler"
|
||||||
upload: "Uploader un ou plusieurs fichier(s) depuis votre PC"
|
upload: "Téléverser des fichiers à partir de votre ordinateur"
|
||||||
desktop/views/pages/search.vue:
|
desktop/views/pages/search.vue:
|
||||||
not-available: "La fonction de recherche est désactivée dans les paramètres de l’instance."
|
not-available: "La fonction de recherche est désactivée dans les paramètres de l’instance."
|
||||||
not-found: "Aucun message trouvé pour '{}'"
|
not-found: "Aucun message trouvé pour '{}'"
|
||||||
@ -1029,8 +1030,8 @@ desktop/views/widgets/polls.vue:
|
|||||||
refresh: "Afficher d'autres"
|
refresh: "Afficher d'autres"
|
||||||
nothing: "Rien"
|
nothing: "Rien"
|
||||||
desktop/views/widgets/post-form.vue:
|
desktop/views/widgets/post-form.vue:
|
||||||
title: "Post"
|
title: "Publication"
|
||||||
note: "Post"
|
note: "Publication"
|
||||||
desktop/views/widgets/profile.vue:
|
desktop/views/widgets/profile.vue:
|
||||||
update-banner: "Cliquer pour éditer votre bannière"
|
update-banner: "Cliquer pour éditer votre bannière"
|
||||||
update-avatar: "Cliquer pour éditer votre avatar"
|
update-avatar: "Cliquer pour éditer votre avatar"
|
||||||
@ -1092,7 +1093,7 @@ mobile/views/components/friends-maker.vue:
|
|||||||
refresh: "Voir plus"
|
refresh: "Voir plus"
|
||||||
close: "Fermer"
|
close: "Fermer"
|
||||||
mobile/views/components/note.vue:
|
mobile/views/components/note.vue:
|
||||||
reposted-by: "Renoté par {}"
|
reposted-by: "Republié par {}"
|
||||||
private: "cette publication est privée"
|
private: "cette publication est privée"
|
||||||
deleted: "cette publication a été supprimée"
|
deleted: "cette publication a été supprimée"
|
||||||
location: "Géolocalisation"
|
location: "Géolocalisation"
|
||||||
@ -1119,7 +1120,7 @@ mobile/views/components/notifications.vue:
|
|||||||
empty: "Pas de notifications"
|
empty: "Pas de notifications"
|
||||||
mobile/views/components/post-form.vue:
|
mobile/views/components/post-form.vue:
|
||||||
add-visible-user: "Ajouter un utilisateur"
|
add-visible-user: "Ajouter un utilisateur"
|
||||||
submit: "Poster"
|
submit: "Publier"
|
||||||
reply: "Répondre"
|
reply: "Répondre"
|
||||||
renote: "Republier"
|
renote: "Republier"
|
||||||
quote-placeholder: "Citer ce billet ... (Facultatif)"
|
quote-placeholder: "Citer ce billet ... (Facultatif)"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -363,6 +363,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
@ -937,6 +938,7 @@ desktop/views/components/settings.profile.vue:
|
|||||||
save: "保存"
|
save: "保存"
|
||||||
locked-account: "アカウントの保護"
|
locked-account: "アカウントの保護"
|
||||||
is-locked: "フォローを承認制にする"
|
is-locked: "フォローを承認制にする"
|
||||||
|
careful-bot: "Botからのフォローだけ承認制にする"
|
||||||
other: "その他"
|
other: "その他"
|
||||||
is-bot: "このアカウントはBotです"
|
is-bot: "このアカウントはBotです"
|
||||||
is-cat: "このアカウントはCatです"
|
is-cat: "このアカウントはCatです"
|
||||||
@ -1419,6 +1421,7 @@ mobile/views/pages/settings/settings.profile.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
is-cat: "このアカウントはCatです"
|
is-cat: "このアカウントはCatです"
|
||||||
is-locked: "フォローを承認制にする"
|
is-locked: "フォローを承認制にする"
|
||||||
|
careful-bot: "Botからのフォローだけ承認制にする"
|
||||||
advanced: "その他"
|
advanced: "その他"
|
||||||
privacy: "プライバシー"
|
privacy: "プライバシー"
|
||||||
save: "保存"
|
save: "保存"
|
||||||
|
@ -265,40 +265,40 @@ common/views/components/media-banner.vue:
|
|||||||
sensitive: "見せたらあかん"
|
sensitive: "見せたらあかん"
|
||||||
click-to-show: "押してみ、見せたるわ"
|
click-to-show: "押してみ、見せたるわ"
|
||||||
common/views/components/theme.vue:
|
common/views/components/theme.vue:
|
||||||
light-theme: "非ダークモード時に使用するテーマ"
|
light-theme: "ナイトゲームちゃう時のテーマどないする?"
|
||||||
dark-theme: "ダークモード時に使用するテーマ"
|
dark-theme: "ナイトゲームの時のテーマどないする?"
|
||||||
light-themes: "明るいテーマ"
|
light-themes: "デイゲーム"
|
||||||
dark-themes: "暗いテーマ"
|
dark-themes: "ナイトゲーム"
|
||||||
install-a-theme: "テーマのインストール"
|
install-a-theme: "テーマ入れるで"
|
||||||
theme-code: "テーマコード"
|
theme-code: "テーマコード"
|
||||||
install: "インストール"
|
install: "インストール"
|
||||||
installed: "「{}」をインストールしました"
|
installed: "「{}」を入れたで!"
|
||||||
create-a-theme: "テーマの作成"
|
create-a-theme: "テーマ作る"
|
||||||
save-created-theme: "テーマを保存"
|
save-created-theme: "テーマ保存"
|
||||||
primary-color: "プライマリ カラー"
|
primary-color: "この色一番重要や"
|
||||||
secondary-color: "セカンダリ カラー"
|
secondary-color: "次はこの色出したって"
|
||||||
text-color: "文字色"
|
text-color: "文字はこの色や!"
|
||||||
base-theme: "ベーステーマ"
|
base-theme: "この色が背景や!"
|
||||||
base-theme-light: "Light"
|
base-theme-light: "Light"
|
||||||
base-theme-dark: "Dark"
|
base-theme-dark: "Dark"
|
||||||
theme-name: "テーマ名"
|
theme-name: "テーマ名"
|
||||||
preview-created-theme: "プレビュー"
|
preview-created-theme: "試してみる"
|
||||||
invalid-theme: "テーマが正しくありません。"
|
invalid-theme: "このテーマあかんわ、なんか間違うとる"
|
||||||
already-installed: "既にそのテーマはインストールされています。"
|
already-installed: "このテーマもうあるで"
|
||||||
saved: "保存しました"
|
saved: "保存したで!"
|
||||||
manage-themes: "テーマの管理"
|
manage-themes: "テーマの管理"
|
||||||
builtin-themes: "標準テーマ"
|
builtin-themes: "いつものテーマ"
|
||||||
my-themes: "マイテーマ"
|
my-themes: "ワイのテーマ"
|
||||||
installed-themes: "インストールされたテーマ"
|
installed-themes: "入れたテーマ"
|
||||||
select-theme: "テーマを選択してください"
|
select-theme: "テーマ選んでや!"
|
||||||
uninstall: "アンインストール"
|
uninstall: "ほかす"
|
||||||
uninstalled: "「{}」をアンインストールしました"
|
uninstalled: "「{}」をほかしてもうたわ"
|
||||||
author: "作者"
|
author: "作った人"
|
||||||
desc: "説明"
|
desc: "説明"
|
||||||
export: "エクスポート"
|
export: "エクスポート"
|
||||||
import: "インポート"
|
import: "インポート"
|
||||||
import-by-code: "またはコードをペースト"
|
import-by-code: "それかコードを貼っつける"
|
||||||
theme-name-required: "テーマ名は必須です。"
|
theme-name-required: "テーマ名は絶対要るで"
|
||||||
common/views/components/cw-button.vue:
|
common/views/components/cw-button.vue:
|
||||||
hide: "もうええわ"
|
hide: "もうええわ"
|
||||||
show: "見たいやろ?"
|
show: "見たいやろ?"
|
||||||
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "もっと"
|
detail: "もっと"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入りやめる"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留めやめる"
|
unpin: "ピン留めやめる"
|
||||||
delete: "ほかす"
|
delete: "ほかす"
|
||||||
@ -475,7 +476,7 @@ common/views/pages/follow.vue:
|
|||||||
following: "フォローしとる"
|
following: "フォローしとる"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
request-pending: "フォローの許し待っとる"
|
request-pending: "フォローの許し待っとる"
|
||||||
follow-processing: "フォロー処理中"
|
follow-processing: "今フォロー処理やっとる‥"
|
||||||
follow-request: "フォロー許してくれや!言うてみる"
|
follow-request: "フォロー許してくれや!言うてみる"
|
||||||
desktop:
|
desktop:
|
||||||
banner-crop-title: "どこバナーとして出す?"
|
banner-crop-title: "どこバナーとして出す?"
|
||||||
@ -602,7 +603,7 @@ desktop/views/components/follow-button.vue:
|
|||||||
following: "フォローしとる"
|
following: "フォローしとる"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
request-pending: "フォローの許し待っとる"
|
request-pending: "フォローの許し待っとる"
|
||||||
follow-processing: "フォロー処理中"
|
follow-processing: "今フォロー処理やっとる‥"
|
||||||
follow-request: "フォロー許してくれや!言うてみる"
|
follow-request: "フォロー許してくれや!言うてみる"
|
||||||
desktop/views/components/followers-window.vue:
|
desktop/views/components/followers-window.vue:
|
||||||
followers: "{} のフォロワー"
|
followers: "{} のフォロワー"
|
||||||
@ -1083,7 +1084,7 @@ mobile/views/components/follow-button.vue:
|
|||||||
following: "フォローしとる"
|
following: "フォローしとる"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
request-pending: "フォローの許し待っとる"
|
request-pending: "フォローの許し待っとる"
|
||||||
follow-processing: "フォロー処理中"
|
follow-processing: "今フォロー処理やっとる‥"
|
||||||
follow-request: "フォロー許してくれや!言うてみる"
|
follow-request: "フォロー許してくれや!言うてみる"
|
||||||
mobile/views/components/friends-maker.vue:
|
mobile/views/components/friends-maker.vue:
|
||||||
title: "おもろそうやな"
|
title: "おもろそうやな"
|
||||||
@ -1223,9 +1224,9 @@ mobile/views/pages/settings/settings.profile.vue:
|
|||||||
avatar: "アイコン"
|
avatar: "アイコン"
|
||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
is-cat: "このアカウントはCatや"
|
is-cat: "このアカウントはCatや"
|
||||||
is-locked: "他人のフォローは許してからや!"
|
is-locked: "他人のフォローは許可してからや!"
|
||||||
advanced: "その他"
|
advanced: "その他"
|
||||||
privacy: "プライバシー⇔オカンの年齢"
|
privacy: "プライバシーってなんや?オカンの年齢か?"
|
||||||
save: "保存"
|
save: "保存"
|
||||||
saved: "プロフィールを保存したで"
|
saved: "プロフィールを保存したで"
|
||||||
uploading: "アップロードしとるで…"
|
uploading: "アップロードしとるで…"
|
||||||
@ -1245,7 +1246,7 @@ mobile/views/pages/settings.vue:
|
|||||||
specify-language: "言語選びや"
|
specify-language: "言語選びや"
|
||||||
design: "見た感じ"
|
design: "見た感じ"
|
||||||
dark-mode: "ナイトゲームや!"
|
dark-mode: "ナイトゲームや!"
|
||||||
i-am-under-limited-internet: "電波がバァーっといけへんねん"
|
i-am-under-limited-internet: "電波と阪神がザコいんや"
|
||||||
circle-icons: "アイコンもタコ焼きも丸いやんな?"
|
circle-icons: "アイコンもタコ焼きも丸いやんな?"
|
||||||
contrasted-acct: "ユーザー名ようわからんし見やすしといて"
|
contrasted-acct: "ユーザー名ようわからんし見やすしといて"
|
||||||
timeline: "タイムライン"
|
timeline: "タイムライン"
|
||||||
@ -1257,8 +1258,8 @@ mobile/views/pages/settings.vue:
|
|||||||
post-style-standard: "標準"
|
post-style-standard: "標準"
|
||||||
post-style-smart: "べっぴんさん"
|
post-style-smart: "べっぴんさん"
|
||||||
notification-position: "通知どこ見せる?"
|
notification-position: "通知どこ見せる?"
|
||||||
notification-position-bottom: "ミナミ"
|
notification-position-bottom: "ミナミの方"
|
||||||
notification-position-top: "キタ"
|
notification-position-top: "キタの方"
|
||||||
theme: "テーマ"
|
theme: "テーマ"
|
||||||
behavior: "動き"
|
behavior: "動き"
|
||||||
fetch-on-scroll: "スクロールしたらもっと見せてや"
|
fetch-on-scroll: "スクロールしたらもっと見せてや"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "링크 복사"
|
copy-link: "링크 복사"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "Deze notitie toevoegen aan favorieten"
|
favorite: "Deze notitie toevoegen aan favorieten"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "Vastmaken aan profielpagina"
|
pin: "Vastmaken aan profielpagina"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "Detaljer"
|
detail: "Detaljer"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "Merket som favoritt"
|
favorite: "Merket som favoritt"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "Fest til profilen din"
|
pin: "Fest til profilen din"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "Slett"
|
delete: "Slett"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "Dodaj do ulubionych"
|
favorite: "Dodaj do ulubionych"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "Przypnij do profilu"
|
pin: "Przypnij do profilu"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "Usuń"
|
delete: "Usuń"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
@ -335,6 +335,7 @@ common/views/components/note-menu.vue:
|
|||||||
detail: "詳細"
|
detail: "詳細"
|
||||||
copy-link: "リンクをコピー"
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
|
unfavorite: "お気に入り解除"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
unpin: "ピン留め解除"
|
unpin: "ピン留め解除"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
14
package.json
14
package.json
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "10.6.0",
|
"version": "10.14.0",
|
||||||
"clientVersion": "1.0.10417",
|
"clientVersion": "1.0.10524",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -32,7 +32,7 @@
|
|||||||
"@types/debug": "0.0.31",
|
"@types/debug": "0.0.31",
|
||||||
"@types/deep-equal": "1.0.1",
|
"@types/deep-equal": "1.0.1",
|
||||||
"@types/double-ended-queue": "2.1.0",
|
"@types/double-ended-queue": "2.1.0",
|
||||||
"@types/elasticsearch": "5.0.26",
|
"@types/elasticsearch": "5.0.27",
|
||||||
"@types/file-type": "5.2.1",
|
"@types/file-type": "5.2.1",
|
||||||
"@types/gulp": "3.8.36",
|
"@types/gulp": "3.8.36",
|
||||||
"@types/gulp-htmlmin": "1.3.32",
|
"@types/gulp-htmlmin": "1.3.32",
|
||||||
@ -60,7 +60,7 @@
|
|||||||
"@types/mocha": "5.2.3",
|
"@types/mocha": "5.2.3",
|
||||||
"@types/mongodb": "3.1.12",
|
"@types/mongodb": "3.1.12",
|
||||||
"@types/ms": "0.7.30",
|
"@types/ms": "0.7.30",
|
||||||
"@types/node": "10.11.6",
|
"@types/node": "10.11.7",
|
||||||
"@types/portscanner": "2.1.0",
|
"@types/portscanner": "2.1.0",
|
||||||
"@types/pug": "2.0.4",
|
"@types/pug": "2.0.4",
|
||||||
"@types/qrcode": "1.3.0",
|
"@types/qrcode": "1.3.0",
|
||||||
@ -169,13 +169,14 @@
|
|||||||
"parse5": "5.1.0",
|
"parse5": "5.1.0",
|
||||||
"portscanner": "2.2.0",
|
"portscanner": "2.2.0",
|
||||||
"progress-bar-webpack-plugin": "1.11.0",
|
"progress-bar-webpack-plugin": "1.11.0",
|
||||||
|
"promise-limit": "2.7.0",
|
||||||
"promise-sequential": "1.1.1",
|
"promise-sequential": "1.1.1",
|
||||||
"pug": "2.0.3",
|
"pug": "2.0.3",
|
||||||
"punycode": "2.1.1",
|
"punycode": "2.1.1",
|
||||||
"qrcode": "1.3.0",
|
"qrcode": "1.3.0",
|
||||||
"ratelimiter": "3.2.0",
|
"ratelimiter": "3.2.0",
|
||||||
"recaptcha-promise": "0.1.3",
|
"recaptcha-promise": "0.1.3",
|
||||||
"reconnecting-websocket": "4.1.5",
|
"reconnecting-websocket": "4.1.8",
|
||||||
"redis": "2.8.0",
|
"redis": "2.8.0",
|
||||||
"request": "2.88.0",
|
"request": "2.88.0",
|
||||||
"request-promise-native": "1.0.5",
|
"request-promise-native": "1.0.5",
|
||||||
@ -211,7 +212,8 @@
|
|||||||
"v-animate-css": "0.0.2",
|
"v-animate-css": "0.0.2",
|
||||||
"vue": "2.5.17",
|
"vue": "2.5.17",
|
||||||
"vue-chartjs": "3.4.0",
|
"vue-chartjs": "3.4.0",
|
||||||
"vue-color": "2.6.0",
|
"vue-color": "2.7.0",
|
||||||
|
"vue-content-loading": "1.5.3",
|
||||||
"vue-cropperjs": "2.2.2",
|
"vue-cropperjs": "2.2.2",
|
||||||
"vue-js-modal": "1.3.26",
|
"vue-js-modal": "1.3.26",
|
||||||
"vue-json-tree-view": "2.1.4",
|
"vue-json-tree-view": "2.1.4",
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
localStorage.setItem('shouldFlush', 'false');
|
localStorage.setItem('shouldFlush', 'false');
|
||||||
|
|
||||||
// Random
|
// Random
|
||||||
localStorage.setItem('salt', Math.random().toString());
|
localStorage.setItem('salt', Math.random().toString().substr(2, 8));
|
||||||
|
|
||||||
// Clear cache (service worker)
|
// Clear cache (service worker)
|
||||||
try {
|
try {
|
||||||
|
178
src/client/app/common/scripts/note-mixin.ts
Normal file
178
src/client/app/common/scripts/note-mixin.ts
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
import parse from '../../../../mfm/parse';
|
||||||
|
import { sum } from '../../../../prelude/array';
|
||||||
|
import MkNoteMenu from '../views/components/note-menu.vue';
|
||||||
|
import MkReactionPicker from '../views/components/reaction-picker.vue';
|
||||||
|
import Ok from '../views/components/ok.vue';
|
||||||
|
|
||||||
|
function focus(el, fn) {
|
||||||
|
const target = fn(el);
|
||||||
|
if (target) {
|
||||||
|
if (target.hasAttribute('tabindex')) {
|
||||||
|
target.focus();
|
||||||
|
} else {
|
||||||
|
focus(target, fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type Opts = {
|
||||||
|
mobile?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default (opts: Opts = {}) => ({
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showContent: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
keymap(): any {
|
||||||
|
return {
|
||||||
|
'r|left': () => this.reply(true),
|
||||||
|
'e|a|plus': () => this.react(true),
|
||||||
|
'q|right': () => this.renote(true),
|
||||||
|
'f|b': this.favorite,
|
||||||
|
'delete|ctrl+d': this.del,
|
||||||
|
'ctrl+q|ctrl+right': this.renoteDirectly,
|
||||||
|
'up|k|shift+tab': this.focusBefore,
|
||||||
|
'down|j|tab': this.focusAfter,
|
||||||
|
'esc': this.blur,
|
||||||
|
'm|o': () => this.menu(true),
|
||||||
|
's': this.toggleShowContent,
|
||||||
|
'1': () => this.reactDirectly('like'),
|
||||||
|
'2': () => this.reactDirectly('love'),
|
||||||
|
'3': () => this.reactDirectly('laugh'),
|
||||||
|
'4': () => this.reactDirectly('hmm'),
|
||||||
|
'5': () => this.reactDirectly('surprise'),
|
||||||
|
'6': () => this.reactDirectly('congrats'),
|
||||||
|
'7': () => this.reactDirectly('angry'),
|
||||||
|
'8': () => this.reactDirectly('confused'),
|
||||||
|
'9': () => this.reactDirectly('rip'),
|
||||||
|
'0': () => this.reactDirectly('pudding'),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
isRenote(): boolean {
|
||||||
|
return (this.note.renote &&
|
||||||
|
this.note.text == null &&
|
||||||
|
this.note.fileIds.length == 0 &&
|
||||||
|
this.note.poll == null);
|
||||||
|
},
|
||||||
|
|
||||||
|
appearNote(): any {
|
||||||
|
return this.isRenote ? this.note.renote : this.note;
|
||||||
|
},
|
||||||
|
|
||||||
|
reactionsCount(): number {
|
||||||
|
return this.appearNote.reactionCounts
|
||||||
|
? sum(Object.values(this.appearNote.reactionCounts))
|
||||||
|
: 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
title(): string {
|
||||||
|
return new Date(this.appearNote.createdAt).toLocaleString();
|
||||||
|
},
|
||||||
|
|
||||||
|
urls(): string[] {
|
||||||
|
if (this.appearNote.text) {
|
||||||
|
const ast = parse(this.appearNote.text);
|
||||||
|
return ast
|
||||||
|
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
|
||||||
|
.map(t => t.url);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
reply(viaKeyboard = false) {
|
||||||
|
(this as any).apis.post({
|
||||||
|
reply: this.appearNote,
|
||||||
|
animation: !viaKeyboard,
|
||||||
|
cb: () => {
|
||||||
|
this.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
renote(viaKeyboard = false) {
|
||||||
|
(this as any).apis.post({
|
||||||
|
renote: this.appearNote,
|
||||||
|
animation: !viaKeyboard,
|
||||||
|
cb: () => {
|
||||||
|
this.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
renoteDirectly() {
|
||||||
|
(this as any).api('notes/create', {
|
||||||
|
renoteId: this.appearNote.id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
react(viaKeyboard = false) {
|
||||||
|
this.blur();
|
||||||
|
(this as any).os.new(MkReactionPicker, {
|
||||||
|
source: this.$refs.reactButton,
|
||||||
|
note: this.appearNote,
|
||||||
|
showFocus: viaKeyboard,
|
||||||
|
animation: !viaKeyboard,
|
||||||
|
compact: opts.mobile,
|
||||||
|
big: opts.mobile
|
||||||
|
}).$once('closed', this.focus);
|
||||||
|
},
|
||||||
|
|
||||||
|
reactDirectly(reaction) {
|
||||||
|
(this as any).api('notes/reactions/create', {
|
||||||
|
noteId: this.appearNote.id,
|
||||||
|
reaction: reaction
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
favorite() {
|
||||||
|
(this as any).api('notes/favorites/create', {
|
||||||
|
noteId: this.appearNote.id
|
||||||
|
}).then(() => {
|
||||||
|
(this as any).os.new(Ok);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
del() {
|
||||||
|
(this as any).api('notes/delete', {
|
||||||
|
noteId: this.appearNote.id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
menu(viaKeyboard = false) {
|
||||||
|
(this as any).os.new(MkNoteMenu, {
|
||||||
|
source: this.$refs.menuButton,
|
||||||
|
note: this.appearNote,
|
||||||
|
animation: !viaKeyboard,
|
||||||
|
compact: opts.mobile,
|
||||||
|
}).$once('closed', this.focus);
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleShowContent() {
|
||||||
|
this.showContent = !this.showContent;
|
||||||
|
},
|
||||||
|
|
||||||
|
focus() {
|
||||||
|
this.$el.focus();
|
||||||
|
},
|
||||||
|
|
||||||
|
blur() {
|
||||||
|
this.$el.blur();
|
||||||
|
},
|
||||||
|
|
||||||
|
focusBefore() {
|
||||||
|
focus(this.$el, e => e.previousElementSibling);
|
||||||
|
},
|
||||||
|
|
||||||
|
focusAfter() {
|
||||||
|
focus(this.$el, e => e.nextElementSibling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -9,8 +9,7 @@ import MiOS from '../../mios';
|
|||||||
*/
|
*/
|
||||||
export default class Stream extends EventEmitter {
|
export default class Stream extends EventEmitter {
|
||||||
private stream: ReconnectingWebsocket;
|
private stream: ReconnectingWebsocket;
|
||||||
private state: string;
|
public state: string;
|
||||||
private buffer: any[];
|
|
||||||
private sharedConnectionPools: Pool[] = [];
|
private sharedConnectionPools: Pool[] = [];
|
||||||
private sharedConnections: SharedConnection[] = [];
|
private sharedConnections: SharedConnection[] = [];
|
||||||
private nonSharedConnections: NonSharedConnection[] = [];
|
private nonSharedConnections: NonSharedConnection[] = [];
|
||||||
@ -19,7 +18,6 @@ export default class Stream extends EventEmitter {
|
|||||||
super();
|
super();
|
||||||
|
|
||||||
this.state = 'initializing';
|
this.state = 'initializing';
|
||||||
this.buffer = [];
|
|
||||||
|
|
||||||
const user = os.store.state.i;
|
const user = os.store.state.i;
|
||||||
|
|
||||||
@ -29,7 +27,8 @@ export default class Stream extends EventEmitter {
|
|||||||
this.stream.addEventListener('message', this.onMessage);
|
this.stream.addEventListener('message', this.onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public useSharedConnection = (channel: string): SharedConnection => {
|
@autobind
|
||||||
|
public useSharedConnection(channel: string): SharedConnection {
|
||||||
let pool = this.sharedConnectionPools.find(p => p.channel === channel);
|
let pool = this.sharedConnectionPools.find(p => p.channel === channel);
|
||||||
|
|
||||||
if (pool == null) {
|
if (pool == null) {
|
||||||
@ -47,7 +46,13 @@ export default class Stream extends EventEmitter {
|
|||||||
this.sharedConnections = this.sharedConnections.filter(c => c !== connection);
|
this.sharedConnections = this.sharedConnections.filter(c => c !== connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public connectToChannel = (channel: string, params?: any): NonSharedConnection => {
|
@autobind
|
||||||
|
public removeSharedConnectionPool(pool: Pool) {
|
||||||
|
this.sharedConnectionPools = this.sharedConnectionPools.filter(p => p !== pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
@autobind
|
||||||
|
public connectToChannel(channel: string, params?: any): NonSharedConnection {
|
||||||
const connection = new NonSharedConnection(this, channel, params);
|
const connection = new NonSharedConnection(this, channel, params);
|
||||||
this.nonSharedConnections.push(connection);
|
this.nonSharedConnections.push(connection);
|
||||||
return connection;
|
return connection;
|
||||||
@ -68,13 +73,6 @@ export default class Stream extends EventEmitter {
|
|||||||
this.state = 'connected';
|
this.state = 'connected';
|
||||||
this.emit('_connected_');
|
this.emit('_connected_');
|
||||||
|
|
||||||
// バッファーを処理
|
|
||||||
const _buffer = [].concat(this.buffer); // Shallow copy
|
|
||||||
this.buffer = []; // Clear buffer
|
|
||||||
_buffer.forEach(data => {
|
|
||||||
this.send(data); // Resend each buffered messages
|
|
||||||
});
|
|
||||||
|
|
||||||
// チャンネル再接続
|
// チャンネル再接続
|
||||||
if (isReconnect) {
|
if (isReconnect) {
|
||||||
this.sharedConnectionPools.forEach(p => {
|
this.sharedConnectionPools.forEach(p => {
|
||||||
@ -91,8 +89,10 @@ export default class Stream extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
@autobind
|
@autobind
|
||||||
private onClose() {
|
private onClose() {
|
||||||
this.state = 'reconnecting';
|
if (this.state == 'connected') {
|
||||||
this.emit('_disconnected_');
|
this.state = 'reconnecting';
|
||||||
|
this.emit('_disconnected_');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,12 +131,6 @@ export default class Stream extends EventEmitter {
|
|||||||
body: payload
|
body: payload
|
||||||
};
|
};
|
||||||
|
|
||||||
// まだ接続が確立されていなかったらバッファリングして次に接続した時に送信する
|
|
||||||
if (this.state != 'connected') {
|
|
||||||
this.buffer.push(data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.stream.send(JSON.stringify(data));
|
this.stream.send(JSON.stringify(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +148,7 @@ class Pool {
|
|||||||
public channel: string;
|
public channel: string;
|
||||||
public id: string;
|
public id: string;
|
||||||
protected stream: Stream;
|
protected stream: Stream;
|
||||||
private users = 0;
|
public users = 0;
|
||||||
private disposeTimerId: any;
|
private disposeTimerId: any;
|
||||||
private isConnected = false;
|
private isConnected = false;
|
||||||
|
|
||||||
@ -162,7 +156,14 @@ class Pool {
|
|||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
|
|
||||||
this.id = Math.random().toString();
|
this.id = Math.random().toString().substr(2, 8);
|
||||||
|
|
||||||
|
this.stream.on('_disconnected_', this.onStreamDisconnected);
|
||||||
|
}
|
||||||
|
|
||||||
|
@autobind
|
||||||
|
private onStreamDisconnected() {
|
||||||
|
this.isConnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
@ -196,6 +197,7 @@ class Pool {
|
|||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public connect() {
|
public connect() {
|
||||||
|
if (this.isConnected) return;
|
||||||
this.isConnected = true;
|
this.isConnected = true;
|
||||||
this.stream.send('connect', {
|
this.stream.send('connect', {
|
||||||
channel: this.channel,
|
channel: this.channel,
|
||||||
@ -205,9 +207,9 @@ class Pool {
|
|||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
private disconnect() {
|
private disconnect() {
|
||||||
this.isConnected = false;
|
this.stream.off('_disconnected_', this.onStreamDisconnected);
|
||||||
this.disposeTimerId = null;
|
|
||||||
this.stream.send('disconnect', { id: this.id });
|
this.stream.send('disconnect', { id: this.id });
|
||||||
|
this.stream.removeSharedConnectionPool(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +275,7 @@ class NonSharedConnection extends Connection {
|
|||||||
super(stream, channel);
|
super(stream, channel);
|
||||||
|
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.id = Math.random().toString();
|
this.id = Math.random().toString().substr(2, 8);
|
||||||
|
|
||||||
this.connect();
|
this.connect();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
import noteSkeleton from './note-skeleton.vue';
|
||||||
import theme from './theme.vue';
|
import theme from './theme.vue';
|
||||||
import instance from './instance.vue';
|
import instance from './instance.vue';
|
||||||
import cwButton from './cw-button.vue';
|
import cwButton from './cw-button.vue';
|
||||||
@ -44,6 +45,7 @@ import uiSelect from './ui/select.vue';
|
|||||||
import formButton from './ui/form/button.vue';
|
import formButton from './ui/form/button.vue';
|
||||||
import formRadio from './ui/form/radio.vue';
|
import formRadio from './ui/form/radio.vue';
|
||||||
|
|
||||||
|
Vue.component('mk-note-skeleton', noteSkeleton);
|
||||||
Vue.component('mk-theme', theme);
|
Vue.component('mk-theme', theme);
|
||||||
Vue.component('mk-instance', instance);
|
Vue.component('mk-instance', instance);
|
||||||
Vue.component('mk-cw-button', cwButton);
|
Vue.component('mk-cw-button', cwButton);
|
||||||
|
@ -354,7 +354,7 @@ export default Vue.extend({
|
|||||||
max-width 600px
|
max-width 600px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
padding 0
|
padding 0
|
||||||
//background rgba(var(--face), 0.95)
|
background var(--messagingRoomBg)
|
||||||
background-clip content-box
|
background-clip content-box
|
||||||
|
|
||||||
> .new-message
|
> .new-message
|
||||||
|
@ -22,12 +22,34 @@ export default Vue.extend({
|
|||||||
icon: '%fa:link%',
|
icon: '%fa:link%',
|
||||||
text: '%i18n:@copy-link%',
|
text: '%i18n:@copy-link%',
|
||||||
action: this.copyLink
|
action: this.copyLink
|
||||||
}, null, {
|
|
||||||
icon: '%fa:star%',
|
|
||||||
text: '%i18n:@favorite%',
|
|
||||||
action: this.favorite
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
if (this.note.uri) {
|
||||||
|
items.push({
|
||||||
|
icon: '%fa:external-link-square-alt%',
|
||||||
|
text: '%i18n:@remote%',
|
||||||
|
action: () => {
|
||||||
|
window.open(this.note.uri, '_blank');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
items.push(null);
|
||||||
|
|
||||||
|
if (this.note.isFavorited) {
|
||||||
|
items.push({
|
||||||
|
icon: '%fa:star%',
|
||||||
|
text: '%i18n:@unfavorite%',
|
||||||
|
action: this.unfavorite
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
items.push({
|
||||||
|
icon: '%fa:star%',
|
||||||
|
text: '%i18n:@favorite%',
|
||||||
|
action: this.favorite
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (this.note.userId == this.$store.state.i.id) {
|
if (this.note.userId == this.$store.state.i.id) {
|
||||||
if ((this.$store.state.i.pinnedNoteIds || []).includes(this.note.id)) {
|
if ((this.$store.state.i.pinnedNoteIds || []).includes(this.note.id)) {
|
||||||
items.push({
|
items.push({
|
||||||
@ -45,6 +67,7 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.note.userId == this.$store.state.i.id || this.$store.state.i.isAdmin) {
|
if (this.note.userId == this.$store.state.i.id || this.$store.state.i.isAdmin) {
|
||||||
|
items.push(null);
|
||||||
items.push({
|
items.push({
|
||||||
icon: '%fa:trash-alt R%',
|
icon: '%fa:trash-alt R%',
|
||||||
text: '%i18n:@delete%',
|
text: '%i18n:@delete%',
|
||||||
@ -52,16 +75,6 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.note.uri) {
|
|
||||||
items.push({
|
|
||||||
icon: '%fa:external-link-square-alt%',
|
|
||||||
text: '%i18n:@remote%',
|
|
||||||
action: () => {
|
|
||||||
window.open(this.note.uri, '_blank');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -110,6 +123,15 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
unfavorite() {
|
||||||
|
(this as any).api('notes/favorites/delete', {
|
||||||
|
noteId: this.note.id
|
||||||
|
}).then(() => {
|
||||||
|
(this as any).os.new(Ok);
|
||||||
|
this.destroyDom();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
closed() {
|
closed() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.destroyDom();
|
this.destroyDom();
|
||||||
|
52
src/client/app/common/views/components/note-skeleton.vue
Normal file
52
src/client/app/common/views/components/note-skeleton.vue
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<vue-content-loading v-if="width" :width="width" :height="100" :primary="primary" :secondary="secondary">
|
||||||
|
<circle cx="30" cy="30" r="30" />
|
||||||
|
<rect x="75" y="13" rx="4" ry="4" :width="150 + r1" height="15" />
|
||||||
|
<rect x="75" y="39" rx="4" ry="4" :width="260 + r2" height="10" />
|
||||||
|
<rect x="75" y="59" rx="4" ry="4" :width="230 + r3" height="10" />
|
||||||
|
</vue-content-loading>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
import VueContentLoading from 'vue-content-loading';
|
||||||
|
import * as tinycolor from 'tinycolor2';
|
||||||
|
|
||||||
|
export default Vue.extend({
|
||||||
|
components: {
|
||||||
|
VueContentLoading,
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
width: 0,
|
||||||
|
r1: (Math.random() * 100) - 50,
|
||||||
|
r2: (Math.random() * 100) - 50,
|
||||||
|
r3: (Math.random() * 100) - 50
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
text(): tinycolor.Instance {
|
||||||
|
const text = tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--text'));
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
|
||||||
|
primary(): string {
|
||||||
|
return '#' + this.text.clone().toHex();
|
||||||
|
},
|
||||||
|
|
||||||
|
secondary(): string {
|
||||||
|
return '#' + this.text.clone().darken(20).toHex();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
let width = this.$el.clientWidth;
|
||||||
|
if (width < 400) width = 400;
|
||||||
|
this.width = width;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -114,7 +114,7 @@ export default define({
|
|||||||
this.connection.on('stats', this.onStats);
|
this.connection.on('stats', this.onStats);
|
||||||
this.connection.on('statsLog', this.onStatsLog);
|
this.connection.on('statsLog', this.onStatsLog);
|
||||||
this.connection.send('requestLog',{
|
this.connection.send('requestLog',{
|
||||||
id: Math.random().toString()
|
id: Math.random().toString().substr(2, 8)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -92,7 +92,7 @@ export default Vue.extend({
|
|||||||
this.connection.on('stats', this.onStats);
|
this.connection.on('stats', this.onStats);
|
||||||
this.connection.on('statsLog', this.onStatsLog);
|
this.connection.on('statsLog', this.onStatsLog);
|
||||||
this.connection.send('requestLog', {
|
this.connection.send('requestLog', {
|
||||||
id: Math.random().toString()
|
id: Math.random().toString().substr(2, 8)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -6,13 +6,17 @@ export default (os: OS) => opts => {
|
|||||||
const o = opts || {};
|
const o = opts || {};
|
||||||
if (o.renote) {
|
if (o.renote) {
|
||||||
const vm = os.new(RenoteFormWindow, {
|
const vm = os.new(RenoteFormWindow, {
|
||||||
note: o.renote
|
note: o.renote,
|
||||||
|
animation: o.animation == null ? true : o.animation
|
||||||
});
|
});
|
||||||
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
} else {
|
} else {
|
||||||
const vm = os.new(PostFormWindow, {
|
const vm = os.new(PostFormWindow, {
|
||||||
reply: o.reply
|
reply: o.reply,
|
||||||
|
animation: o.animation == null ? true : o.animation
|
||||||
});
|
});
|
||||||
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="mk-ellipsis-icon">
|
|
||||||
<div></div><div></div><div></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
|
||||||
.mk-ellipsis-icon
|
|
||||||
width 70px
|
|
||||||
margin 0 auto
|
|
||||||
text-align center
|
|
||||||
|
|
||||||
> div
|
|
||||||
display inline-block
|
|
||||||
width 18px
|
|
||||||
height 18px
|
|
||||||
background-color rgba(#000, 0.3)
|
|
||||||
border-radius 100%
|
|
||||||
animation bounce 1.4s infinite ease-in-out both
|
|
||||||
|
|
||||||
&:nth-child(1)
|
|
||||||
animation-delay 0s
|
|
||||||
|
|
||||||
&:nth-child(2)
|
|
||||||
margin 0 6px
|
|
||||||
animation-delay 0.16s
|
|
||||||
|
|
||||||
&:nth-child(3)
|
|
||||||
animation-delay 0.32s
|
|
||||||
|
|
||||||
@keyframes bounce
|
|
||||||
0%, 80%, 100%
|
|
||||||
transform scale(0)
|
|
||||||
40%
|
|
||||||
transform scale(1)
|
|
||||||
|
|
||||||
</style>
|
|
@ -9,7 +9,6 @@ import subNoteContent from './sub-note-content.vue';
|
|||||||
import window from './window.vue';
|
import window from './window.vue';
|
||||||
import noteFormWindow from './post-form-window.vue';
|
import noteFormWindow from './post-form-window.vue';
|
||||||
import renoteFormWindow from './renote-form-window.vue';
|
import renoteFormWindow from './renote-form-window.vue';
|
||||||
import ellipsisIcon from './ellipsis-icon.vue';
|
|
||||||
import mediaImage from './media-image.vue';
|
import mediaImage from './media-image.vue';
|
||||||
import mediaImageDialog from './media-image-dialog.vue';
|
import mediaImageDialog from './media-image-dialog.vue';
|
||||||
import mediaVideo from './media-video.vue';
|
import mediaVideo from './media-video.vue';
|
||||||
@ -39,7 +38,6 @@ Vue.component('mk-sub-note-content', subNoteContent);
|
|||||||
Vue.component('mk-window', window);
|
Vue.component('mk-window', window);
|
||||||
Vue.component('mk-post-form-window', noteFormWindow);
|
Vue.component('mk-post-form-window', noteFormWindow);
|
||||||
Vue.component('mk-renote-form-window', renoteFormWindow);
|
Vue.component('mk-renote-form-window', renoteFormWindow);
|
||||||
Vue.component('mk-ellipsis-icon', ellipsisIcon);
|
|
||||||
Vue.component('mk-media-image', mediaImage);
|
Vue.component('mk-media-image', mediaImage);
|
||||||
Vue.component('mk-media-image-dialog', mediaImageDialog);
|
Vue.component('mk-media-image-dialog', mediaImageDialog);
|
||||||
Vue.component('mk-media-video', mediaVideo);
|
Vue.component('mk-media-video', mediaVideo);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" tabindex="-1" v-hotkey="keymap" :title="title">
|
<div class="note" v-show="appearNote.deletedAt == null" :tabindex="appearNote.deletedAt == null ? '-1' : null" v-hotkey="keymap" :title="title">
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
<div class="reply-to" v-if="appearNote.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
<x-sub :note="p.reply"/>
|
<x-sub :note="appearNote.reply"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<mk-avatar class="avatar" :user="note.user"/>
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
@ -12,228 +12,76 @@
|
|||||||
<mk-time :time="note.createdAt"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<mk-avatar class="avatar" :user="p.user"/>
|
<mk-avatar class="avatar" :user="appearNote.user"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="p"/>
|
<mk-note-header class="header" :note="appearNote"/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<p v-if="p.cw != null" class="cw">
|
<p v-if="appearNote.cw != null" class="cw">
|
||||||
<span class="text" v-if="p.cw != ''">{{ p.cw }}</span>
|
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
|
||||||
<mk-cw-button v-model="showContent"/>
|
<mk-cw-button v-model="showContent"/>
|
||||||
</p>
|
</p>
|
||||||
<div class="content" v-show="p.cw == null || showContent">
|
<div class="content" v-show="appearNote.cw == null || showContent">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span v-if="p.isHidden" style="opacity: 0.5">%i18n:@private%</span>
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">%i18n:@private%</span>
|
||||||
<span v-if="p.deletedAt" style="opacity: 0.5">%i18n:@deleted%</span>
|
<a class="reply" v-if="appearNote.reply">%fa:reply%</a>
|
||||||
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
<misskey-flavored-markdown v-if="appearNote.text" :text="appearNote.text" :i="$store.state.i" :class="$style.text"/>
|
||||||
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i" :class="$style.text"/>
|
<a class="rp" v-if="appearNote.renote">RP:</a>
|
||||||
<a class="rp" v-if="p.renote">RP:</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="files" v-if="p.files.length > 0">
|
<div class="files" v-if="appearNote.files.length > 0">
|
||||||
<mk-media-list :media-list="p.files"/>
|
<mk-media-list :media-list="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
|
<mk-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
|
<a class="location" v-if="appearNote.geo" :href="`https://maps.google.com/maps?q=${appearNote.geo.coordinates[1]},${appearNote.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="renote" v-if="appearNote.renote"><mk-note-preview :note="appearNote.renote"/></div>
|
||||||
<div class="renote" v-if="p.renote"><mk-note-preview :note="p.renote"/></div>
|
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer v-if="p.deletedAt == null">
|
<footer>
|
||||||
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
|
<mk-reactions-viewer :note="appearNote" ref="reactionsViewer"/>
|
||||||
<button class="replyButton" @click="reply()" title="%i18n:@reply%">
|
<button class="replyButton" @click="reply()" title="%i18n:@reply%">
|
||||||
<template v-if="p.reply">%fa:reply-all%</template>
|
<template v-if="appearNote.reply">%fa:reply-all%</template>
|
||||||
<template v-else>%fa:reply%</template>
|
<template v-else>%fa:reply%</template>
|
||||||
<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="renoteButton" @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>
|
%fa:retweet%<p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="reactionButton" :class="{ reacted: p.myReaction != null }" @click="react()" ref="reactButton" title="%i18n:@add-reaction%">
|
<button class="reactionButton" :class="{ reacted: appearNote.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>
|
%fa:plus%<p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button @click="menu()" ref="menuButton">
|
<button @click="menu()" ref="menuButton">
|
||||||
%fa:ellipsis-h%
|
%fa:ellipsis-h%
|
||||||
</button>
|
</button>
|
||||||
<!-- <button title="%i18n:@detail">
|
|
||||||
<template v-if="!isDetailOpened">%fa:caret-down%</template>
|
|
||||||
<template v-if="isDetailOpened">%fa:caret-up%</template>
|
|
||||||
</button> -->
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<div class="detail" v-if="isDetailOpened">
|
|
||||||
<mk-note-status-graph width="462" height="130" :note="p"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import parse from '../../../../../mfm/parse';
|
|
||||||
|
|
||||||
import MkPostFormWindow from './post-form-window.vue';
|
import MkPostFormWindow from './post-form-window.vue';
|
||||||
import MkRenoteFormWindow from './renote-form-window.vue';
|
import MkRenoteFormWindow from './renote-form-window.vue';
|
||||||
import MkNoteMenu from '../../../common/views/components/note-menu.vue';
|
|
||||||
import MkReactionPicker from '../../../common/views/components/reaction-picker.vue';
|
|
||||||
import XSub from './notes.note.sub.vue';
|
import XSub from './notes.note.sub.vue';
|
||||||
import { sum } from '../../../../../prelude/array';
|
import noteMixin from '../../../common/scripts/note-mixin';
|
||||||
import noteSubscriber from '../../../common/scripts/note-subscriber';
|
import noteSubscriber from '../../../common/scripts/note-subscriber';
|
||||||
|
|
||||||
function focus(el, fn) {
|
|
||||||
const target = fn(el);
|
|
||||||
if (target) {
|
|
||||||
if (target.hasAttribute('tabindex')) {
|
|
||||||
target.focus();
|
|
||||||
} else {
|
|
||||||
focus(target, fn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
XSub
|
XSub
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [noteSubscriber('note')],
|
mixins: [
|
||||||
|
noteMixin(),
|
||||||
|
noteSubscriber('note')
|
||||||
|
],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
note: {
|
note: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
showContent: false,
|
|
||||||
isDetailOpened: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
keymap(): any {
|
|
||||||
return {
|
|
||||||
'r|left': () => this.reply(true),
|
|
||||||
'e|a|plus': () => this.react(true),
|
|
||||||
'q|right': () => this.renote(true),
|
|
||||||
'ctrl+q|ctrl+right': this.renoteDirectly,
|
|
||||||
'up|k|shift+tab': this.focusBefore,
|
|
||||||
'down|j|tab': this.focusAfter,
|
|
||||||
'esc': this.blur,
|
|
||||||
'm|o': () => this.menu(true),
|
|
||||||
's': this.toggleShowContent,
|
|
||||||
'1': () => this.reactDirectly('like'),
|
|
||||||
'2': () => this.reactDirectly('love'),
|
|
||||||
'3': () => this.reactDirectly('laugh'),
|
|
||||||
'4': () => this.reactDirectly('hmm'),
|
|
||||||
'5': () => this.reactDirectly('surprise'),
|
|
||||||
'6': () => this.reactDirectly('congrats'),
|
|
||||||
'7': () => this.reactDirectly('angry'),
|
|
||||||
'8': () => this.reactDirectly('confused'),
|
|
||||||
'9': () => this.reactDirectly('rip'),
|
|
||||||
'0': () => this.reactDirectly('pudding'),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
isRenote(): boolean {
|
|
||||||
return (this.note.renote &&
|
|
||||||
this.note.text == null &&
|
|
||||||
this.note.fileIds.length == 0 &&
|
|
||||||
this.note.poll == null);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(): any {
|
|
||||||
return this.isRenote ? this.note.renote : this.note;
|
|
||||||
},
|
|
||||||
|
|
||||||
reactionsCount(): number {
|
|
||||||
return this.p.reactionCounts
|
|
||||||
? sum(Object.values(this.p.reactionCounts))
|
|
||||||
: 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
title(): string {
|
|
||||||
return new Date(this.p.createdAt).toLocaleString();
|
|
||||||
},
|
|
||||||
|
|
||||||
urls(): string[] {
|
|
||||||
if (this.p.text) {
|
|
||||||
const ast = parse(this.p.text);
|
|
||||||
return ast
|
|
||||||
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
|
|
||||||
.map(t => t.url);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
reply(viaKeyboard = false) {
|
|
||||||
(this as any).os.new(MkPostFormWindow, {
|
|
||||||
reply: this.p,
|
|
||||||
animation: !viaKeyboard
|
|
||||||
}).$once('closed', this.focus);
|
|
||||||
},
|
|
||||||
|
|
||||||
renote(viaKeyboard = false) {
|
|
||||||
(this as any).os.new(MkRenoteFormWindow, {
|
|
||||||
note: this.p,
|
|
||||||
animation: !viaKeyboard
|
|
||||||
}).$once('closed', this.focus);
|
|
||||||
},
|
|
||||||
|
|
||||||
renoteDirectly() {
|
|
||||||
(this as any).api('notes/create', {
|
|
||||||
renoteId: this.p.id
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
react(viaKeyboard = false) {
|
|
||||||
this.blur();
|
|
||||||
(this as any).os.new(MkReactionPicker, {
|
|
||||||
source: this.$refs.reactButton,
|
|
||||||
note: this.p,
|
|
||||||
showFocus: viaKeyboard,
|
|
||||||
animation: !viaKeyboard
|
|
||||||
}).$once('closed', this.focus);
|
|
||||||
},
|
|
||||||
|
|
||||||
reactDirectly(reaction) {
|
|
||||||
(this as any).api('notes/reactions/create', {
|
|
||||||
noteId: this.p.id,
|
|
||||||
reaction: reaction
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
menu(viaKeyboard = false) {
|
|
||||||
(this as any).os.new(MkNoteMenu, {
|
|
||||||
source: this.$refs.menuButton,
|
|
||||||
note: this.p,
|
|
||||||
animation: !viaKeyboard
|
|
||||||
}).$once('closed', this.focus);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleShowContent() {
|
|
||||||
this.showContent = !this.showContent;
|
|
||||||
},
|
|
||||||
|
|
||||||
focus() {
|
|
||||||
this.$el.focus();
|
|
||||||
},
|
|
||||||
|
|
||||||
blur() {
|
|
||||||
this.$el.blur();
|
|
||||||
},
|
|
||||||
|
|
||||||
focusBefore() {
|
|
||||||
focus(this.$el, e => e.previousElementSibling);
|
|
||||||
},
|
|
||||||
|
|
||||||
focusAfter() {
|
|
||||||
focus(this.$el, e => e.nextElementSibling);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -445,10 +293,6 @@ export default Vue.extend({
|
|||||||
&.reacted, &.reacted:hover
|
&.reacted, &.reacted:hover
|
||||||
color var(--noteActionsReactionHover)
|
color var(--noteActionsReactionHover)
|
||||||
|
|
||||||
> .detail
|
|
||||||
padding-top 4px
|
|
||||||
background rgba(#000, 0.0125)
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
<style lang="stylus" module>
|
||||||
|
@ -9,6 +9,12 @@
|
|||||||
<button @click="resolveInitPromise">%i18n:@retry%</button>
|
<button @click="resolveInitPromise">%i18n:@retry%</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="skeleton" v-if="fetching">
|
||||||
|
<template v-for="i in 10">
|
||||||
|
<mk-note-skeleton :key="i"/>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
||||||
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notes" class="notes transition" tag="div" ref="notes">
|
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notes" class="notes transition" tag="div" ref="notes">
|
||||||
<template v-for="(note, i) in _notes">
|
<template v-for="(note, i) in _notes">
|
||||||
@ -226,6 +232,10 @@ export default Vue.extend({
|
|||||||
> *
|
> *
|
||||||
transition transform .3s ease, opacity .3s ease
|
transition transform .3s ease, opacity .3s ease
|
||||||
|
|
||||||
|
> .skeleton
|
||||||
|
padding 32px
|
||||||
|
opacity 0.3
|
||||||
|
|
||||||
> .notes
|
> .notes
|
||||||
> .date
|
> .date
|
||||||
display block
|
display block
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-notifications">
|
<div class="mk-notifications">
|
||||||
|
<div class="skeleton" v-if="fetching">
|
||||||
|
<template v-for="i in 10">
|
||||||
|
<mk-note-skeleton :key="i"/>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="notifications" v-if="notifications.length != 0">
|
<div class="notifications" v-if="notifications.length != 0">
|
||||||
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
||||||
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notifications" class="transition" tag="div">
|
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notifications" class="transition" tag="div">
|
||||||
@ -102,7 +108,6 @@
|
|||||||
<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{{ fetchingMoreNotifications ? '%i18n:common.loading%' : '%i18n:@more%' }}
|
<template v-if="fetchingMoreNotifications">%fa:spinner .pulse .fw%</template>{{ fetchingMoreNotifications ? '%i18n:common.loading%' : '%i18n:@more%' }}
|
||||||
</button>
|
</button>
|
||||||
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:@empty%</p>
|
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:@empty%</p>
|
||||||
<p class="loading" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -202,6 +207,10 @@ export default Vue.extend({
|
|||||||
> *
|
> *
|
||||||
transition transform .3s ease, opacity .3s ease
|
transition transform .3s ease, opacity .3s ease
|
||||||
|
|
||||||
|
> .skeleton
|
||||||
|
padding 16px
|
||||||
|
opacity 0.3
|
||||||
|
|
||||||
> .notifications
|
> .notifications
|
||||||
> div
|
> div
|
||||||
> .notification
|
> .notification
|
||||||
@ -319,13 +328,4 @@ export default Vue.extend({
|
|||||||
text-align center
|
text-align center
|
||||||
color #aaa
|
color #aaa
|
||||||
|
|
||||||
> .loading
|
|
||||||
margin 0
|
|
||||||
padding 16px
|
|
||||||
text-align center
|
|
||||||
color #aaa
|
|
||||||
|
|
||||||
> [data-fa]
|
|
||||||
margin-right 4px
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -21,12 +21,13 @@
|
|||||||
<ui-button primary @click="save">%i18n:@save%</ui-button>
|
<ui-button primary @click="save">%i18n:@save%</ui-button>
|
||||||
<section>
|
<section>
|
||||||
<h2>%i18n:@locked-account%</h2>
|
<h2>%i18n:@locked-account%</h2>
|
||||||
<ui-switch v-model="$store.state.i.isLocked" @change="onChangeIsLocked">%i18n:@is-locked%</ui-switch>
|
<ui-switch v-model="isLocked" @change="save(false)">%i18n:@is-locked%</ui-switch>
|
||||||
|
<ui-switch v-model="carefulBot" @change="save(false)">%i18n:@careful-bot%</ui-switch>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h2>%i18n:@other%</h2>
|
<h2>%i18n:@other%</h2>
|
||||||
<ui-switch v-model="$store.state.i.isBot" @change="onChangeIsBot">%i18n:@is-bot%</ui-switch>
|
<ui-switch v-model="isBot" @change="save(false)">%i18n:@is-bot%</ui-switch>
|
||||||
<ui-switch v-model="$store.state.i.isCat" @change="onChangeIsCat">%i18n:@is-cat%</ui-switch>
|
<ui-switch v-model="isCat" @change="save(false)">%i18n:@is-cat%</ui-switch>
|
||||||
<ui-switch v-model="alwaysMarkNsfw">%i18n:common.always-mark-nsfw%</ui-switch>
|
<ui-switch v-model="alwaysMarkNsfw">%i18n:common.always-mark-nsfw%</ui-switch>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@ -42,6 +43,10 @@ export default Vue.extend({
|
|||||||
location: null,
|
location: null,
|
||||||
description: null,
|
description: null,
|
||||||
birthday: null,
|
birthday: null,
|
||||||
|
isBot: false,
|
||||||
|
isCat: false,
|
||||||
|
isLocked: false,
|
||||||
|
carefulBot: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -55,34 +60,29 @@ export default Vue.extend({
|
|||||||
this.location = this.$store.state.i.profile.location;
|
this.location = this.$store.state.i.profile.location;
|
||||||
this.description = this.$store.state.i.description;
|
this.description = this.$store.state.i.description;
|
||||||
this.birthday = this.$store.state.i.profile.birthday;
|
this.birthday = this.$store.state.i.profile.birthday;
|
||||||
|
this.isCat = this.$store.state.i.isCat;
|
||||||
|
this.isBot = this.$store.state.i.isBot;
|
||||||
|
this.isLocked = this.$store.state.i.isLocked;
|
||||||
|
this.carefulBot = this.$store.state.i.carefulBot;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateAvatar() {
|
updateAvatar() {
|
||||||
(this as any).apis.updateAvatar();
|
(this as any).apis.updateAvatar();
|
||||||
},
|
},
|
||||||
save() {
|
save(notify) {
|
||||||
(this as any).api('i/update', {
|
(this as any).api('i/update', {
|
||||||
name: this.name || null,
|
name: this.name || null,
|
||||||
location: this.location || null,
|
location: this.location || null,
|
||||||
description: this.description || null,
|
description: this.description || null,
|
||||||
birthday: this.birthday || null
|
birthday: this.birthday || null,
|
||||||
|
isCat: this.isCat,
|
||||||
|
isBot: this.isBot,
|
||||||
|
isLocked: this.isLocked,
|
||||||
|
carefulBot: this.carefulBot
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
(this as any).apis.notify('%i18n:@profile-updated%');
|
if (notify) {
|
||||||
});
|
(this as any).apis.notify('%i18n:@profile-updated%');
|
||||||
},
|
}
|
||||||
onChangeIsLocked() {
|
|
||||||
(this as any).api('i/update', {
|
|
||||||
isLocked: this.$store.state.i.isLocked
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onChangeIsBot() {
|
|
||||||
(this as any).api('i/update', {
|
|
||||||
isBot: this.$store.state.i.isBot
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onChangeIsCat() {
|
|
||||||
(this as any).api('i/update', {
|
|
||||||
isCat: this.$store.state.i.isCat
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-timeline-core">
|
<div class="mk-timeline-core">
|
||||||
<mk-friends-maker v-if="src == 'home' && alone"/>
|
<mk-friends-maker v-if="src == 'home' && alone"/>
|
||||||
<div class="fetching" v-if="fetching">
|
|
||||||
<mk-ellipsis-icon/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<mk-notes ref="timeline" :more="existMore ? more : null">
|
<mk-notes ref="timeline" :more="existMore ? more : null">
|
||||||
<p :class="$style.empty" slot="empty">
|
<p :class="$style.empty" slot="empty">
|
||||||
@ -170,15 +167,10 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|
||||||
|
|
||||||
.mk-timeline-core
|
.mk-timeline-core
|
||||||
> .mk-friends-maker
|
> .mk-friends-maker
|
||||||
border-bottom solid 1px #eee
|
border-bottom solid 1px #eee
|
||||||
|
|
||||||
> .fetching
|
|
||||||
padding 64px 0
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
<style lang="stylus" module>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<li @click="list">
|
<li @click="list">
|
||||||
<p>%fa:list%<span>%i18n:@lists%</span>%fa:angle-right%</p>
|
<p>%fa:list%<span>%i18n:@lists%</span>%fa:angle-right%</p>
|
||||||
</li>
|
</li>
|
||||||
<li @click="followRequests" v-if="$store.state.i.isLocked">
|
<li @click="followRequests" v-if="($store.state.i.isLocked || $store.state.i.carefulBot)">
|
||||||
<p>%fa:envelope R%<span>%i18n:@follow-requests%<i v-if="$store.state.i.pendingReceivedFollowRequestsCount">{{ $store.state.i.pendingReceivedFollowRequestsCount }}</i></span>%fa:angle-right%</p>
|
<p>%fa:envelope R%<span>%i18n:@follow-requests%<i v-if="$store.state.i.pendingReceivedFollowRequestsCount">{{ $store.state.i.pendingReceivedFollowRequestsCount }}</i></span>%fa:angle-right%</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,8 +17,6 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|
||||||
|
|
||||||
.note
|
.note
|
||||||
display inline-block
|
display inline-block
|
||||||
padding 8px
|
padding 8px
|
||||||
|
@ -78,7 +78,7 @@ export default Vue.extend({
|
|||||||
this.connection.on('stats', this.onStats);
|
this.connection.on('stats', this.onStats);
|
||||||
this.connection.on('statsLog', this.onStatsLog);
|
this.connection.on('statsLog', this.onStatsLog);
|
||||||
this.connection.send('requestLog', {
|
this.connection.send('requestLog', {
|
||||||
id: Math.random().toString(),
|
id: Math.random().toString().substr(2, 8),
|
||||||
length: 200
|
length: 200
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -310,7 +310,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
> header
|
> header
|
||||||
display flex
|
display flex
|
||||||
z-index 1
|
z-index 2
|
||||||
line-height $header-height
|
line-height $header-height
|
||||||
padding 0 16px
|
padding 0 16px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!mediaView" class="zyjjkidcqjnlegkqebitfviomuqmseqk" :class="{ renote: isRenote }">
|
<div
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
v-if="!mediaView"
|
||||||
<x-sub :note="p.reply"/>
|
v-show="appearNote.deletedAt == null"
|
||||||
|
:tabindex="appearNote.deletedAt == null ? '-1' : null"
|
||||||
|
class="zyjjkidcqjnlegkqebitfviomuqmseqk"
|
||||||
|
:class="{ renote: isRenote }"
|
||||||
|
v-hotkey="keymap"
|
||||||
|
:title="title"
|
||||||
|
>
|
||||||
|
<div class="reply-to" v-if="appearNote.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
|
<x-sub :note="appearNote.reply"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<mk-avatar class="avatar" :user="note.user"/>
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
@ -12,43 +20,42 @@
|
|||||||
<mk-time :time="note.createdAt"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<mk-avatar class="avatar" :user="p.user"/>
|
<mk-avatar class="avatar" :user="appearNote.user"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="p" :mini="true"/>
|
<mk-note-header class="header" :note="appearNote" :mini="true"/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<p v-if="p.cw != null" class="cw">
|
<p v-if="appearNote.cw != null" class="cw">
|
||||||
<span class="text" v-if="p.cw != ''">{{ p.cw }}</span>
|
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
|
||||||
<mk-cw-button v-model="showContent"/>
|
<mk-cw-button v-model="showContent"/>
|
||||||
</p>
|
</p>
|
||||||
<div class="content" v-show="p.cw == null || showContent">
|
<div class="content" v-show="appearNote.cw == null || showContent">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span v-if="p.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
||||||
<span v-if="p.deletedAt" style="opacity: 0.5">(%i18n:@deleted%)</span>
|
<a class="reply" v-if="appearNote.reply">%fa:reply%</a>
|
||||||
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
<misskey-flavored-markdown v-if="appearNote.text" :text="appearNote.text" :i="$store.state.i"/>
|
||||||
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
|
<a class="rp" v-if="appearNote.renote != null">RP:</a>
|
||||||
<a class="rp" v-if="p.renote != null">RP:</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="files" v-if="p.files.length > 0">
|
<div class="files" v-if="appearNote.files.length > 0">
|
||||||
<mk-media-list :media-list="p.files"/>
|
<mk-media-list :media-list="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
|
<mk-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<a class="location" v-if="appearNote.geo" :href="`https://maps.google.com/maps?q=${appearNote.geo.coordinates[1]},${appearNote.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
<div class="renote" v-if="p.renote">
|
<div class="renote" v-if="appearNote.renote">
|
||||||
<mk-note-preview :note="p.renote" :mini="true"/>
|
<mk-note-preview :note="appearNote.renote" :mini="true"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="false" :mini="true"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="false" :mini="true"/>
|
||||||
</div>
|
</div>
|
||||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
<span class="app" v-if="appearNote.app">via <b>{{ appearNote.app.name }}</b></span>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
|
<mk-reactions-viewer :note="appearNote" ref="reactionsViewer"/>
|
||||||
<button @click="reply">
|
<button @click="reply()">
|
||||||
<template v-if="p.reply">%fa:reply-all%</template>
|
<template v-if="appearNote.reply">%fa:reply-all%</template>
|
||||||
<template v-else>%fa:reply%</template>
|
<template v-else>%fa:reply%</template>
|
||||||
</button>
|
</button>
|
||||||
<button @click="renote" title="Renote">%fa:retweet%</button>
|
<button @click="renote()" title="Renote">%fa:retweet%</button>
|
||||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton">%fa:plus%</button>
|
<button :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton">%fa:plus%</button>
|
||||||
<button class="menu" @click="menu" ref="menuButton">%fa:ellipsis-h%</button>
|
<button class="menu" @click="menu()" ref="menuButton">%fa:ellipsis-h%</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
@ -65,11 +72,10 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import parse from '../../../../../../mfm/parse';
|
import MkPostFormWindow from '../../components/post-form-window.vue';
|
||||||
|
import MkRenoteFormWindow from '../../components/renote-form-window.vue';
|
||||||
import MkNoteMenu from '../../../../common/views/components/note-menu.vue';
|
|
||||||
import MkReactionPicker from '../../../../common/views/components/reaction-picker.vue';
|
|
||||||
import XSub from './deck.note.sub.vue';
|
import XSub from './deck.note.sub.vue';
|
||||||
|
import noteMixin from '../../../../common/scripts/note-mixin';
|
||||||
import noteSubscriber from '../../../../common/scripts/note-subscriber';
|
import noteSubscriber from '../../../../common/scripts/note-subscriber';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
@ -77,7 +83,10 @@ export default Vue.extend({
|
|||||||
XSub
|
XSub
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [noteSubscriber('note')],
|
mixins: [
|
||||||
|
noteMixin(),
|
||||||
|
noteSubscriber('note')
|
||||||
|
],
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
note: {
|
note: {
|
||||||
@ -89,66 +98,6 @@ export default Vue.extend({
|
|||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
showContent: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
isRenote(): boolean {
|
|
||||||
return (this.note.renote &&
|
|
||||||
this.note.text == null &&
|
|
||||||
this.note.fileIds.length == 0 &&
|
|
||||||
this.note.poll == null);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(): any {
|
|
||||||
return this.isRenote ? this.note.renote : this.note;
|
|
||||||
},
|
|
||||||
|
|
||||||
urls(): string[] {
|
|
||||||
if (this.p.text) {
|
|
||||||
const ast = parse(this.p.text);
|
|
||||||
return ast
|
|
||||||
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
|
|
||||||
.map(t => t.url);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
reply() {
|
|
||||||
(this as any).apis.post({
|
|
||||||
reply: this.p
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
renote() {
|
|
||||||
(this as any).apis.post({
|
|
||||||
renote: this.p
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
react() {
|
|
||||||
(this as any).os.new(MkReactionPicker, {
|
|
||||||
source: this.$refs.reactButton,
|
|
||||||
note: this.p,
|
|
||||||
compact: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
menu() {
|
|
||||||
(this as any).os.new(MkNoteMenu, {
|
|
||||||
source: this.$refs.menuButton,
|
|
||||||
note: this.p,
|
|
||||||
compact: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -168,6 +117,20 @@ export default Vue.extend({
|
|||||||
font-size 13px
|
font-size 13px
|
||||||
border-bottom solid 1px var(--faceDivider)
|
border-bottom solid 1px var(--faceDivider)
|
||||||
|
|
||||||
|
&:focus
|
||||||
|
z-index 1
|
||||||
|
|
||||||
|
&:after
|
||||||
|
content ""
|
||||||
|
pointer-events none
|
||||||
|
position absolute
|
||||||
|
top 2px
|
||||||
|
right 2px
|
||||||
|
bottom 2px
|
||||||
|
left 2px
|
||||||
|
border 2px solid var(--primaryAlpha03)
|
||||||
|
border-radius 4px
|
||||||
|
|
||||||
&:last-of-type
|
&:last-of-type
|
||||||
border-bottom none
|
border-bottom none
|
||||||
|
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
<header :class="$style.header">
|
<header :class="$style.header">
|
||||||
<h1>{{ q }}</h1>
|
<h1>{{ q }}</h1>
|
||||||
</header>
|
</header>
|
||||||
<div :class="$style.loading" v-if="fetching">
|
|
||||||
<mk-ellipsis-icon/>
|
|
||||||
</div>
|
|
||||||
<p :class="$style.notAvailable" v-if="!fetching && notAvailable">%i18n:@not-available%</p>
|
<p :class="$style.notAvailable" v-if="!fetching && notAvailable">%i18n:@not-available%</p>
|
||||||
<p :class="$style.empty" v-if="!fetching && empty">%fa:search% {{ '%i18n:not-found%'.split('{}')[0] }}{{ q }}{{ '%i18n:not-found%'.split('{}')[1] }}</p>
|
<p :class="$style.empty" v-if="!fetching && empty">%fa:search% {{ '%i18n:not-found%'.split('{}')[0] }}{{ q }}{{ '%i18n:not-found%'.split('{}')[1] }}</p>
|
||||||
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
||||||
@ -119,9 +116,6 @@ export default Vue.extend({
|
|||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
.loading
|
|
||||||
padding 64px 0
|
|
||||||
|
|
||||||
.empty
|
.empty
|
||||||
display block
|
display block
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
<header :class="$style.header">
|
<header :class="$style.header">
|
||||||
<h1>#{{ $route.params.tag }}</h1>
|
<h1>#{{ $route.params.tag }}</h1>
|
||||||
</header>
|
</header>
|
||||||
<div :class="$style.loading" v-if="fetching">
|
|
||||||
<mk-ellipsis-icon/>
|
|
||||||
</div>
|
|
||||||
<p :class="$style.empty" v-if="!fetching && empty">%fa:search% {{ '%i18n:no-posts-found%'.split('{}')[0] }}{{ q }}{{ '%i18n:no-posts-found%'.split('{}')[1] }}</p>
|
<p :class="$style.empty" v-if="!fetching && empty">%fa:search% {{ '%i18n:no-posts-found%'.split('{}')[0] }}{{ q }}{{ '%i18n:no-posts-found%'.split('{}')[1] }}</p>
|
||||||
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
@ -108,9 +105,6 @@ export default Vue.extend({
|
|||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
.loading
|
|
||||||
padding 64px 0
|
|
||||||
|
|
||||||
.empty
|
.empty
|
||||||
display block
|
display block
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<span class="username"><mk-acct :user="user" :detail="true" /></span>
|
<span class="username"><mk-acct :user="user" :detail="true" /></span>
|
||||||
<span v-if="user.isBot" title="%i18n:@is-bot%">%fa:robot%</span>
|
<span v-if="user.isBot" title="%i18n:@is-bot%">%fa:robot%</span>
|
||||||
<span class="location" v-if="user.host === null && user.profile.location">%fa:map-marker% {{ user.profile.location }}</span>
|
|
||||||
<span class="birthday" v-if="user.host === null && user.profile.birthday">%fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -18,6 +16,10 @@
|
|||||||
<div class="description">
|
<div class="description">
|
||||||
<misskey-flavored-markdown v-if="user.description" :text="user.description" :i="$store.state.i"/>
|
<misskey-flavored-markdown v-if="user.description" :text="user.description" :i="$store.state.i"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<span class="location" v-if="user.host === null && user.profile.location">%fa:map-marker% {{ user.profile.location }}</span>
|
||||||
|
<span class="birthday" v-if="user.host === null && user.profile.birthday">%fa:birthday-cake% {{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</span>
|
||||||
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<span class="notes-count"><b>{{ user.notesCount | number }}</b>%i18n:@posts%</span>
|
<span class="notes-count"><b>{{ user.notesCount | number }}</b>%i18n:@posts%</span>
|
||||||
<span class="following clickable" @click="showFollowing"><b>{{ user.followingCount | number }}</b>%i18n:@following%</span>
|
<span class="following clickable" @click="showFollowing"><b>{{ user.followingCount | number }}</b>%i18n:@following%</span>
|
||||||
@ -182,6 +184,14 @@ export default Vue.extend({
|
|||||||
padding 16px 16px 16px 154px
|
padding 16px 16px 16px 154px
|
||||||
color var(--text)
|
color var(--text)
|
||||||
|
|
||||||
|
> .info
|
||||||
|
margin-top 16px
|
||||||
|
padding-top 16px
|
||||||
|
border-top solid 1px var(--faceDivider)
|
||||||
|
|
||||||
|
> *
|
||||||
|
margin-right 16px
|
||||||
|
|
||||||
> .status
|
> .status
|
||||||
margin-top 16px
|
margin-top 16px
|
||||||
padding-top 16px
|
padding-top 16px
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
<span :data-active="mode == 'with-replies'" @click="mode = 'with-replies'">%fa:comments% %i18n:@with-replies%</span>
|
<span :data-active="mode == 'with-replies'" @click="mode = 'with-replies'">%fa:comments% %i18n:@with-replies%</span>
|
||||||
<span :data-active="mode == 'with-media'" @click="mode = 'with-media'">%fa:images% %i18n:@with-media%</span>
|
<span :data-active="mode == 'with-media'" @click="mode = 'with-media'">%fa:images% %i18n:@with-media%</span>
|
||||||
</header>
|
</header>
|
||||||
<div class="loading" v-if="fetching">
|
|
||||||
<mk-ellipsis-icon/>
|
|
||||||
</div>
|
|
||||||
<mk-notes ref="timeline" :more="existMore ? more : null">
|
<mk-notes ref="timeline" :more="existMore ? more : null">
|
||||||
<p class="empty" slot="empty">%fa:R comments%%i18n:@empty%</p>
|
<p class="empty" slot="empty">%fa:R comments%%i18n:@empty%</p>
|
||||||
</mk-notes>
|
</mk-notes>
|
||||||
@ -152,9 +149,6 @@ export default Vue.extend({
|
|||||||
&:hover
|
&:hover
|
||||||
color var(--desktopTimelineSrcHover)
|
color var(--desktopTimelineSrcHover)
|
||||||
|
|
||||||
> .loading
|
|
||||||
padding 64px 0
|
|
||||||
|
|
||||||
> .empty
|
> .empty
|
||||||
display block
|
display block
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
@ -443,10 +443,10 @@ export default class MiOS extends EventEmitter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const promise = new Promise((resolve, reject) => {
|
const promise = new Promise((resolve, reject) => {
|
||||||
const viaStream = this.stream && this.store.state.device.apiViaStream && !forceFetch;
|
const viaStream = this.stream && this.stream.state == 'connected' && this.store.state.device.apiViaStream && !forceFetch;
|
||||||
|
|
||||||
if (viaStream) {
|
if (viaStream) {
|
||||||
const id = Math.random().toString();
|
const id = Math.random().toString().substr(2, 8);
|
||||||
|
|
||||||
this.stream.once(`api:${id}`, res => {
|
this.stream.once(`api:${id}`, res => {
|
||||||
if (res == null || Object.keys(res).length == 0) {
|
if (res == null || Object.keys(res).length == 0) {
|
||||||
|
@ -18,6 +18,7 @@ export default (os) => (opts) => {
|
|||||||
}).$mount();
|
}).$mount();
|
||||||
vm.$once('cancel', recover);
|
vm.$once('cancel', recover);
|
||||||
vm.$once('posted', recover);
|
vm.$once('posted', recover);
|
||||||
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
(vm as any).focus();
|
(vm as any).focus();
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="note" :class="{ renote: isRenote, smart: $store.state.device.postStyle == 'smart' }">
|
<div
|
||||||
<div class="reply-to" v-if="p.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
class="note"
|
||||||
<x-sub :note="p.reply"/>
|
v-show="appearNote.deletedAt == null"
|
||||||
|
:tabindex="appearNote.deletedAt == null ? '-1' : null"
|
||||||
|
:class="{ renote: isRenote, smart: $store.state.device.postStyle == 'smart' }"
|
||||||
|
v-hotkey="keymap"
|
||||||
|
>
|
||||||
|
<div class="reply-to" v-if="appearNote.reply && (!$store.getters.isSignedIn || $store.state.settings.showReplyTarget)">
|
||||||
|
<x-sub :note="appearNote.reply"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<mk-avatar class="avatar" :user="note.user"/>
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
@ -12,47 +18,45 @@
|
|||||||
<mk-time :time="note.createdAt"/>
|
<mk-time :time="note.createdAt"/>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<mk-avatar class="avatar" :user="p.user" v-if="$store.state.device.postStyle != 'smart'"/>
|
<mk-avatar class="avatar" :user="appearNote.user" v-if="$store.state.device.postStyle != 'smart'"/>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-note-header class="header" :note="p" :mini="true"/>
|
<mk-note-header class="header" :note="appearNote" :mini="true"/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<p v-if="p.cw != null" class="cw">
|
<p v-if="appearNote.cw != null" class="cw">
|
||||||
<span class="text" v-if="p.cw != ''">{{ p.cw }}</span>
|
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
|
||||||
<mk-cw-button v-model="showContent"/>
|
<mk-cw-button v-model="showContent"/>
|
||||||
</p>
|
</p>
|
||||||
<div class="content" v-show="p.cw == null || showContent">
|
<div class="content" v-show="appearNote.cw == null || showContent">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span v-if="p.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">(%i18n:@private%)</span>
|
||||||
<span v-if="p.deletedAt" style="opacity: 0.5">(%i18n:@deleted%)</span>
|
<a class="reply" v-if="appearNote.reply">%fa:reply%</a>
|
||||||
<a class="reply" v-if="p.reply">%fa:reply%</a>
|
<misskey-flavored-markdown v-if="appearNote.text" :text="appearNote.text" :i="$store.state.i" :class="$style.text"/>
|
||||||
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i" :class="$style.text"/>
|
<a class="rp" v-if="appearNote.renote != null">RP:</a>
|
||||||
<a class="rp" v-if="p.renote != null">RP:</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="files" v-if="p.files.length > 0">
|
<div class="files" v-if="appearNote.files.length > 0">
|
||||||
<mk-media-list :media-list="p.files"/>
|
<mk-media-list :media-list="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
|
<mk-poll v-if="appearNote.poll" :note="appearNote" ref="pollViewer"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||||
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<a class="location" v-if="appearNote.geo" :href="`https://maps.google.com/maps?q=${appearNote.geo.coordinates[1]},${appearNote.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="renote" v-if="appearNote.renote"><mk-note-preview :note="appearNote.renote"/></div>
|
||||||
<div class="renote" v-if="p.renote"><mk-note-preview :note="p.renote"/></div>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
<span class="app" v-if="appearNote.app">via <b>{{ appearNote.app.name }}</b></span>
|
||||||
</div>
|
</div>
|
||||||
<footer v-if="p.deletedAt == null">
|
<footer>
|
||||||
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
|
<mk-reactions-viewer :note="appearNote" ref="reactionsViewer"/>
|
||||||
<button @click="reply">
|
<button @click="reply()">
|
||||||
<template v-if="p.reply">%fa:reply-all%</template>
|
<template v-if="appearNote.reply">%fa:reply-all%</template>
|
||||||
<template v-else>%fa:reply%</template>
|
<template v-else>%fa:reply%</template>
|
||||||
<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button @click="renote" title="Renote">
|
<button @click="renote()" title="Renote">
|
||||||
%fa:retweet%<p class="count" v-if="p.renoteCount > 0">{{ p.renoteCount }}</p>
|
%fa:retweet%<p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton">
|
<button :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton">
|
||||||
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
|
%fa:plus%<p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button class="menu" @click="menu" ref="menuButton">
|
<button class="menu" @click="menu()" ref="menuButton">
|
||||||
%fa:ellipsis-h%
|
%fa:ellipsis-h%
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
@ -63,12 +67,9 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import parse from '../../../../../mfm/parse';
|
|
||||||
|
|
||||||
import MkNoteMenu from '../../../common/views/components/note-menu.vue';
|
|
||||||
import MkReactionPicker from '../../../common/views/components/reaction-picker.vue';
|
|
||||||
import XSub from './note.sub.vue';
|
import XSub from './note.sub.vue';
|
||||||
import { sum } from '../../../../../prelude/array';
|
import noteMixin from '../../../common/scripts/note-mixin';
|
||||||
import noteSubscriber from '../../../common/scripts/note-subscriber';
|
import noteSubscriber from '../../../common/scripts/note-subscriber';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
@ -76,74 +77,17 @@ export default Vue.extend({
|
|||||||
XSub
|
XSub
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [noteSubscriber('note')],
|
mixins: [
|
||||||
|
noteMixin({
|
||||||
|
mobile: true
|
||||||
|
}),
|
||||||
|
noteSubscriber('note')
|
||||||
|
],
|
||||||
|
|
||||||
props: ['note'],
|
props: {
|
||||||
|
note: {
|
||||||
data() {
|
type: Object,
|
||||||
return {
|
required: true
|
||||||
showContent: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
isRenote(): boolean {
|
|
||||||
return (this.note.renote &&
|
|
||||||
this.note.text == null &&
|
|
||||||
this.note.fileIds.length == 0 &&
|
|
||||||
this.note.poll == null);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(): any {
|
|
||||||
return this.isRenote ? this.note.renote : this.note;
|
|
||||||
},
|
|
||||||
|
|
||||||
reactionsCount(): number {
|
|
||||||
return this.p.reactionCounts
|
|
||||||
? sum(Object.values(this.p.reactionCounts))
|
|
||||||
: 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
urls(): string[] {
|
|
||||||
if (this.p.text) {
|
|
||||||
const ast = parse(this.p.text);
|
|
||||||
return ast
|
|
||||||
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
|
|
||||||
.map(t => t.url);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
reply() {
|
|
||||||
(this as any).apis.post({
|
|
||||||
reply: this.p
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
renote() {
|
|
||||||
(this as any).apis.post({
|
|
||||||
renote: this.p
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
react() {
|
|
||||||
(this as any).os.new(MkReactionPicker, {
|
|
||||||
source: this.$refs.reactButton,
|
|
||||||
note: this.p,
|
|
||||||
compact: true,
|
|
||||||
big: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
menu() {
|
|
||||||
(this as any).os.new(MkNoteMenu, {
|
|
||||||
source: this.$refs.menuButton,
|
|
||||||
note: this.p,
|
|
||||||
compact: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -154,6 +98,20 @@ export default Vue.extend({
|
|||||||
font-size 12px
|
font-size 12px
|
||||||
border-bottom solid 1px var(--faceDivider)
|
border-bottom solid 1px var(--faceDivider)
|
||||||
|
|
||||||
|
&:focus
|
||||||
|
z-index 1
|
||||||
|
|
||||||
|
&:after
|
||||||
|
content ""
|
||||||
|
pointer-events none
|
||||||
|
position absolute
|
||||||
|
top 2px
|
||||||
|
right 2px
|
||||||
|
bottom 2px
|
||||||
|
left 2px
|
||||||
|
border 2px solid var(--primaryAlpha03)
|
||||||
|
border-radius 4px
|
||||||
|
|
||||||
&:last-of-type
|
&:last-of-type
|
||||||
border-bottom none
|
border-bottom none
|
||||||
|
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
<slot name="empty" v-if="notes.length == 0 && !fetching && requestInitPromise == null"></slot>
|
<slot name="empty" v-if="notes.length == 0 && !fetching && requestInitPromise == null"></slot>
|
||||||
|
|
||||||
<div class="init" v-if="fetching">
|
<div class="skeleton" v-if="fetching">
|
||||||
%fa:spinner .pulse%%i18n:common.loading%
|
<template v-for="i in 10">
|
||||||
|
<mk-note-skeleton :key="i"/>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!fetching && requestInitPromise != null">
|
<div v-if="!fetching && requestInitPromise != null">
|
||||||
@ -251,13 +253,12 @@ export default Vue.extend({
|
|||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
|
|
||||||
> .init
|
> .skeleton
|
||||||
padding 64px 0
|
padding 16px
|
||||||
text-align center
|
opacity 0.3
|
||||||
color #999
|
|
||||||
|
|
||||||
> [data-fa]
|
@media (min-width 500px)
|
||||||
margin-right 4px
|
padding 32px
|
||||||
|
|
||||||
> .empty
|
> .empty
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-notifications">
|
<div class="mk-notifications">
|
||||||
|
<div class="skeleton" v-if="fetching">
|
||||||
|
<template v-for="i in 10">
|
||||||
|
<mk-note-skeleton :key="i"/>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
<!-- トランジションを有効にするとなぜかメモリリークする -->
|
||||||
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notifications" class="transition notifications">
|
<component :is="!$store.state.device.reduceMotion ? 'transition-group' : 'div'" name="mk-notifications" class="transition notifications">
|
||||||
<template v-for="(notification, i) in _notifications">
|
<template v-for="(notification, i) in _notifications">
|
||||||
@ -17,7 +23,6 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:@empty%</p>
|
<p class="empty" v-if="notifications.length == 0 && !fetching">%i18n:@empty%</p>
|
||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -179,13 +184,11 @@ export default Vue.extend({
|
|||||||
text-align center
|
text-align center
|
||||||
color #aaa
|
color #aaa
|
||||||
|
|
||||||
> .fetching
|
> .skeleton
|
||||||
margin 0
|
|
||||||
padding 16px
|
padding 16px
|
||||||
text-align center
|
opacity 0.3
|
||||||
color #aaa
|
|
||||||
|
|
||||||
> [data-fa]
|
@media (min-width 500px)
|
||||||
margin-right 4px
|
padding 32px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<li><router-link to="/" :data-active="$route.name == 'index'">%fa:home%%i18n:@timeline%%fa:angle-right%</router-link></li>
|
<li><router-link to="/" :data-active="$route.name == 'index'">%fa:home%%i18n:@timeline%%fa:angle-right%</router-link></li>
|
||||||
<li><router-link to="/i/notifications" :data-active="$route.name == 'notifications'">%fa:R bell%%i18n:@notifications%<template v-if="hasUnreadNotification">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
<li><router-link to="/i/notifications" :data-active="$route.name == 'notifications'">%fa:R bell%%i18n:@notifications%<template v-if="hasUnreadNotification">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||||
<li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'">%fa:R comments%%i18n:@messaging%<template v-if="hasUnreadMessagingMessage">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
<li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'">%fa:R comments%%i18n:@messaging%<template v-if="hasUnreadMessagingMessage">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||||
<li v-if="$store.getters.isSignedIn && $store.state.i.isLocked"><router-link to="/i/received-follow-requests" :data-active="$route.name == 'received-follow-requests'">%fa:R envelope%%i18n:@follow-requests%<template v-if="$store.getters.isSignedIn && $store.state.i.pendingReceivedFollowRequestsCount">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
<li v-if="$store.getters.isSignedIn && ($store.state.i.isLocked || $store.state.i.carefulBot)"><router-link to="/i/received-follow-requests" :data-active="$route.name == 'received-follow-requests'">%fa:R envelope%%i18n:@follow-requests%<template v-if="$store.getters.isSignedIn && $store.state.i.pendingReceivedFollowRequestsCount">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||||
<li><router-link to="/reversi" :data-active="$route.name == 'reversi'">%fa:gamepad%%i18n:@game%<template v-if="hasGameInvitation">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
<li><router-link to="/reversi" :data-active="$route.name == 'reversi'">%fa:gamepad%%i18n:@game%<template v-if="hasGameInvitation">%fa:circle%</template>%fa:angle-right%</router-link></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -8,7 +8,14 @@
|
|||||||
<x-profile/>
|
<x-profile/>
|
||||||
|
|
||||||
<ui-card>
|
<ui-card>
|
||||||
<div slot="title">%fa:palette% %i18n:@design%</div>
|
<div slot="title">%fa:palette% %i18n:@theme%</div>
|
||||||
|
<section>
|
||||||
|
<mk-theme/>
|
||||||
|
</section>
|
||||||
|
</ui-card>
|
||||||
|
|
||||||
|
<ui-card>
|
||||||
|
<div slot="title">%fa:poll-h% %i18n:@design%</div>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
|
<ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
|
||||||
@ -23,13 +30,6 @@
|
|||||||
<ui-switch v-model="games_reversi_useContrastStones">%i18n:common.use-contrast-reversi-stones%</ui-switch>
|
<ui-switch v-model="games_reversi_useContrastStones">%i18n:common.use-contrast-reversi-stones%</ui-switch>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
|
||||||
<header>%i18n:@theme%</header>
|
|
||||||
<div>
|
|
||||||
<mk-theme/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<header>%i18n:@timeline%</header>
|
<header>%i18n:@timeline%</header>
|
||||||
<div>
|
<div>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
</ui-card>
|
</ui-card>
|
||||||
|
|
||||||
<ui-card>
|
<ui-card>
|
||||||
<div slot="title">%fa:cog% %i18n:@behavior%</div>
|
<div slot="title">%fa:sliders-h% %i18n:@behavior%</div>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<ui-switch v-model="fetchOnScroll">%i18n:@fetch-on-scroll%</ui-switch>
|
<ui-switch v-model="fetchOnScroll">%i18n:@fetch-on-scroll%</ui-switch>
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ui-switch v-model="isLocked" @change="save(false)">%i18n:@is-locked%</ui-switch>
|
<ui-switch v-model="isLocked" @change="save(false)">%i18n:@is-locked%</ui-switch>
|
||||||
|
<ui-switch v-model="carefulBot" @change="save(false)">%i18n:@careful-bot%</ui-switch>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</ui-card>
|
</ui-card>
|
||||||
@ -80,6 +81,7 @@ export default Vue.extend({
|
|||||||
bannerId: null,
|
bannerId: null,
|
||||||
isCat: false,
|
isCat: false,
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
|
carefulBot: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
avatarUploading: false,
|
avatarUploading: false,
|
||||||
bannerUploading: false
|
bannerUploading: false
|
||||||
@ -103,6 +105,7 @@ export default Vue.extend({
|
|||||||
this.bannerId = this.$store.state.i.bannerId;
|
this.bannerId = this.$store.state.i.bannerId;
|
||||||
this.isCat = this.$store.state.i.isCat;
|
this.isCat = this.$store.state.i.isCat;
|
||||||
this.isLocked = this.$store.state.i.isLocked;
|
this.isLocked = this.$store.state.i.isLocked;
|
||||||
|
this.carefulBot = this.$store.state.i.carefulBot;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -161,7 +164,8 @@ export default Vue.extend({
|
|||||||
avatarId: this.avatarId,
|
avatarId: this.avatarId,
|
||||||
bannerId: this.bannerId,
|
bannerId: this.bannerId,
|
||||||
isCat: this.isCat,
|
isCat: this.isCat,
|
||||||
isLocked: this.isLocked
|
isLocked: this.isLocked,
|
||||||
|
carefulBot: this.carefulBot
|
||||||
}).then(i => {
|
}).then(i => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.$store.state.i.avatarId = i.avatarId;
|
this.$store.state.i.avatarId = i.avatarId;
|
||||||
|
@ -62,6 +62,8 @@ export type Source = {
|
|||||||
*/
|
*/
|
||||||
ghost?: string;
|
ghost?: string;
|
||||||
|
|
||||||
|
proxy?: string;
|
||||||
|
|
||||||
summalyProxy?: string;
|
summalyProxy?: string;
|
||||||
|
|
||||||
accesslog?: string;
|
accesslog?: string;
|
||||||
@ -93,11 +95,9 @@ export type Source = {
|
|||||||
private_key: string;
|
private_key: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
google_maps_api_key: string;
|
|
||||||
|
|
||||||
clusterLimit?: number;
|
clusterLimit?: number;
|
||||||
|
|
||||||
user_recommendation: {
|
user_recommendation?: {
|
||||||
external: boolean;
|
external: boolean;
|
||||||
engine: string;
|
engine: string;
|
||||||
timeout: number;
|
timeout: number;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import * as redis from 'redis';
|
import * as redis from 'redis';
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
|
|
||||||
export default redis.createClient(
|
export default config.redis ? redis.createClient(
|
||||||
config.redis.port,
|
config.redis.port,
|
||||||
config.redis.host,
|
config.redis.host,
|
||||||
{
|
{
|
||||||
auth_pass: config.redis.pass
|
auth_pass: config.redis.pass
|
||||||
}
|
}
|
||||||
);
|
) : null;
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
<tr><td><kbd class="group"><kbd class="key">Ctrl</kbd> + <kbd class="key">→</kbd></kbd>, <kbd class="group"><kbd class="key">Ctrl</kbd> + <kbd class="key">Q</kbd></kbd></td><td>即刻Renoteする(フォームを開かずに)</td><td>-</td></tr>
|
<tr><td><kbd class="group"><kbd class="key">Ctrl</kbd> + <kbd class="key">→</kbd></kbd>, <kbd class="group"><kbd class="key">Ctrl</kbd> + <kbd class="key">Q</kbd></kbd></td><td>即刻Renoteする(フォームを開かずに)</td><td>-</td></tr>
|
||||||
<tr><td><kbd class="key">E</kbd>, <kbd class="key">A</kbd>, <kbd class="key">+</kbd></td><td>リアクションフォームを開く</td><td><b>E</b>mote, re<b>A</b>ction</td></tr>
|
<tr><td><kbd class="key">E</kbd>, <kbd class="key">A</kbd>, <kbd class="key">+</kbd></td><td>リアクションフォームを開く</td><td><b>E</b>mote, re<b>A</b>ction</td></tr>
|
||||||
<tr><td><kbd class="key">0</kbd>~<kbd class="key">9</kbd></td><td>数字に対応したリアクションをする(対応については後述)</td><td>-</td></tr>
|
<tr><td><kbd class="key">0</kbd>~<kbd class="key">9</kbd></td><td>数字に対応したリアクションをする(対応については後述)</td><td>-</td></tr>
|
||||||
|
<tr><td><kbd class="key">F</kbd>, <kbd class="key">B</kbd></td><td>お気に入りに登録</td><td><b>F</b>avorite, <b>B</b>ookmark</td></tr>
|
||||||
|
<tr><td><kbd class="key">Del</kbd>, <kbd class="group"><kbd class="key">Ctrl</kbd> + <kbd class="key">D</kbd></kbd></td><td>投稿を削除</td><td><b>D</b>elete</tr>
|
||||||
<tr><td><kbd class="key">M</kbd>, <kbd class="key">O</kbd></td><td>投稿に対するメニューを開く</td><td><b>M</b>ore, <b>O</b>ther</td></tr>
|
<tr><td><kbd class="key">M</kbd>, <kbd class="key">O</kbd></td><td>投稿に対するメニューを開く</td><td><b>M</b>ore, <b>O</b>ther</td></tr>
|
||||||
<tr><td><kbd class="key">S</kbd></td><td>CWで隠された部分を表示 or 隠す</td><td><b>S</b>how, <b>S</b>ee</td></tr>
|
<tr><td><kbd class="key">S</kbd></td><td>CWで隠された部分を表示 or 隠す</td><td><b>S</b>how, <b>S</b>ee</td></tr>
|
||||||
<tr><td><kbd class="key">Esc</kbd></td><td>フォーカスを外す</td><td>-</td></tr>
|
<tr><td><kbd class="key">Esc</kbd></td><td>フォーカスを外す</td><td>-</td></tr>
|
||||||
|
@ -11,6 +11,8 @@ import DriveFileThumbnail, { deleteDriveFileThumbnail } from './drive-file-thumb
|
|||||||
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
|
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
|
||||||
DriveFile.createIndex('md5');
|
DriveFile.createIndex('md5');
|
||||||
DriveFile.createIndex('metadata.uri');
|
DriveFile.createIndex('metadata.uri');
|
||||||
|
DriveFile.createIndex('metadata.userId');
|
||||||
|
DriveFile.createIndex('metadata.folderId');
|
||||||
export default DriveFile;
|
export default DriveFile;
|
||||||
|
|
||||||
export const DriveFileChunk = monkDb.get('driveFiles.chunks');
|
export const DriveFileChunk = monkDb.get('driveFiles.chunks');
|
||||||
@ -166,7 +168,7 @@ export const pack = (
|
|||||||
|
|
||||||
// (データベースの欠損などで)ファイルがデータベース上に見つからなかったとき
|
// (データベースの欠損などで)ファイルがデータベース上に見つからなかったとき
|
||||||
if (_file == null) {
|
if (_file == null) {
|
||||||
console.warn(`in packaging driveFile: driveFile not found on database: ${_file}`);
|
console.warn(`[DAMAGED DB] (missing) pkg: driveFile :: ${file}`);
|
||||||
return resolve(null);
|
return resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import db from '../db/mongodb';
|
|||||||
import DriveFile from './drive-file';
|
import DriveFile from './drive-file';
|
||||||
|
|
||||||
const DriveFolder = db.get<IDriveFolder>('driveFolders');
|
const DriveFolder = db.get<IDriveFolder>('driveFolders');
|
||||||
|
DriveFolder.createIndex('userId');
|
||||||
export default DriveFolder;
|
export default DriveFolder;
|
||||||
|
|
||||||
export type IDriveFolder = {
|
export type IDriveFolder = {
|
||||||
|
@ -75,11 +75,13 @@ export const pack = (
|
|||||||
delete _favorite._id;
|
delete _favorite._id;
|
||||||
|
|
||||||
// Populate note
|
// Populate note
|
||||||
_favorite.note = await packNote(_favorite.noteId, me);
|
_favorite.note = await packNote(_favorite.noteId, me, {
|
||||||
|
detail: true
|
||||||
|
});
|
||||||
|
|
||||||
// (データベースの不具合などで)投稿が見つからなかったら
|
// (データベースの不具合などで)投稿が見つからなかったら
|
||||||
if (_favorite.note == null) {
|
if (_favorite.note == null) {
|
||||||
console.warn(`in packaging favorite: note not found on database: ${_favorite.noteId}`);
|
console.warn(`[DAMAGED DB] (missing) pkg: favorite -> note :: ${_favorite.id} (note ${_favorite.noteId})`);
|
||||||
return resolve(null);
|
return resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,9 +281,9 @@ export const pack = async (
|
|||||||
_note = deepcopy(note);
|
_note = deepcopy(note);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 投稿がデータベース上に見つからなかったとき
|
// (データベースの欠損などで)投稿がデータベース上に見つからなかったとき
|
||||||
if (_note == null) {
|
if (_note == null) {
|
||||||
console.warn(`note not found on database: ${note}`);
|
console.warn(`[DAMAGED DB] (missing) pkg: note :: ${note}`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,8 +358,8 @@ export const pack = async (
|
|||||||
})(_note.poll);
|
})(_note.poll);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch my reaction
|
|
||||||
if (meId) {
|
if (meId) {
|
||||||
|
// Fetch my reaction
|
||||||
_note.myReaction = (async () => {
|
_note.myReaction = (async () => {
|
||||||
const reaction = await Reaction
|
const reaction = await Reaction
|
||||||
.findOne({
|
.findOne({
|
||||||
@ -374,18 +374,44 @@ export const pack = async (
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// isFavorited
|
||||||
|
_note.isFavorited = (async () => {
|
||||||
|
const favorite = await Favorite
|
||||||
|
.count({
|
||||||
|
userId: meId,
|
||||||
|
noteId: id
|
||||||
|
}, {
|
||||||
|
limit: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
return favorite === 1;
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// resolve promises in _note object
|
// resolve promises in _note object
|
||||||
_note = await rap(_note);
|
_note = await rap(_note);
|
||||||
|
|
||||||
// (データベースの欠損などで)ユーザーがデータベース上に見つからなかったとき
|
//#region (データベースの欠損などで)参照しているデータがデータベース上に見つからなかったとき
|
||||||
if (_note.user == null) {
|
if (_note.user == null) {
|
||||||
console.warn(`in packaging note: note user not found on database: note(${_note.id})`);
|
console.warn(`[DAMAGED DB] (missing) pkg: note -> user :: ${_note.id} (user ${_note.userId})`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts.detail) {
|
||||||
|
if (_note.replyId != null && _note.reply == null) {
|
||||||
|
console.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_note.renoteId != null && _note.renote == null) {
|
||||||
|
console.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
if (_note.user.isCat && _note.text) {
|
if (_note.user.isCat && _note.text) {
|
||||||
_note.text = _note.text.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ');
|
_note.text = _note.text.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ');
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ export const pack = (notification: any) => new Promise<any>(async (resolve, reje
|
|||||||
|
|
||||||
// (データベースの不具合などで)投稿が見つからなかったら
|
// (データベースの不具合などで)投稿が見つからなかったら
|
||||||
if (_notification.note == null) {
|
if (_notification.note == null) {
|
||||||
console.warn(`in packaging notification: note not found on database: ${_notification.noteId}`);
|
console.warn(`[DAMAGED DB] (missing) pkg: notification -> note :: ${_notification.id} (note ${_notification.noteId})`);
|
||||||
return resolve(null);
|
return resolve(null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -65,6 +65,16 @@ type IUserBase = {
|
|||||||
*/
|
*/
|
||||||
isLocked: boolean;
|
isLocked: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Botか否か
|
||||||
|
*/
|
||||||
|
isBot: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Botからのフォローを承認制にするか
|
||||||
|
*/
|
||||||
|
carefulBot: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* このアカウントに届いているフォローリクエストの数
|
* このアカウントに届いているフォローリクエストの数
|
||||||
*/
|
*/
|
||||||
@ -94,7 +104,6 @@ export interface ILocalUser extends IUserBase {
|
|||||||
tags: string[];
|
tags: string[];
|
||||||
};
|
};
|
||||||
lastUsedAt: Date;
|
lastUsedAt: Date;
|
||||||
isBot: boolean;
|
|
||||||
isCat: boolean;
|
isCat: boolean;
|
||||||
isAdmin?: boolean;
|
isAdmin?: boolean;
|
||||||
isVerified?: boolean;
|
isVerified?: boolean;
|
||||||
|
@ -2,7 +2,7 @@ import * as debug from 'debug';
|
|||||||
|
|
||||||
import uploadFromUrl from '../../../services/drive/upload-from-url';
|
import uploadFromUrl from '../../../services/drive/upload-from-url';
|
||||||
import { IRemoteUser } from '../../../models/user';
|
import { IRemoteUser } from '../../../models/user';
|
||||||
import { IDriveFile } from '../../../models/drive-file';
|
import DriveFile, { IDriveFile } from '../../../models/drive-file';
|
||||||
import Resolver from '../resolver';
|
import Resolver from '../resolver';
|
||||||
|
|
||||||
const log = debug('misskey:activitypub');
|
const log = debug('misskey:activitypub');
|
||||||
@ -24,7 +24,22 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
|||||||
|
|
||||||
log(`Creating the Image: ${image.url}`);
|
log(`Creating the Image: ${image.url}`);
|
||||||
|
|
||||||
return await uploadFromUrl(image.url, actor, null, image.url, image.sensitive);
|
let file = await uploadFromUrl(image.url, actor, null, image.url, image.sensitive);
|
||||||
|
|
||||||
|
// URLが異なっている場合、同じ画像が以前に異なるURLで登録されていたということなので、
|
||||||
|
// URLを更新する
|
||||||
|
if (file.metadata.url !== image.url) {
|
||||||
|
file = await DriveFile.findOneAndUpdate({ _id: file._id }, {
|
||||||
|
$set: {
|
||||||
|
'metadata.url': image.url,
|
||||||
|
'metadata.uri': image.url
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
returnNewDocument: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +51,7 @@ export default class Resolver {
|
|||||||
|
|
||||||
const object = await request({
|
const object = await request({
|
||||||
url: value,
|
url: value,
|
||||||
|
proxy: config.proxy,
|
||||||
timeout: this.timeout,
|
timeout: this.timeout,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': config.user_agent,
|
'User-Agent': config.user_agent,
|
||||||
|
@ -27,7 +27,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
|
|
||||||
const file = await DriveFile.findOne({
|
const file = await DriveFile.findOne({
|
||||||
md5: md5,
|
md5: md5,
|
||||||
'metadata.userId': user._id
|
'metadata.userId': user._id,
|
||||||
|
'metadata.deletedAt': { $exists: false }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (file === null) {
|
if (file === null) {
|
||||||
|
@ -22,7 +22,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
const file = await DriveFile
|
const file = await DriveFile
|
||||||
.findOne({
|
.findOne({
|
||||||
_id: fileId,
|
_id: fileId,
|
||||||
'metadata.userId': user._id
|
'metadata.userId': user._id,
|
||||||
|
'metadata.deletedAt': { $exists: false }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (file === null) {
|
if (file === null) {
|
||||||
|
@ -67,6 +67,12 @@ export const meta = {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
carefulBot: $.bool.optional.note({
|
||||||
|
desc: {
|
||||||
|
'ja-JP': 'Botからのフォローを承認制にするか'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
isBot: $.bool.optional.note({
|
isBot: $.bool.optional.note({
|
||||||
desc: {
|
desc: {
|
||||||
'ja-JP': 'Botか否か'
|
'ja-JP': 'Botか否か'
|
||||||
@ -110,6 +116,7 @@ export default async (params: any, user: ILocalUser, app: IApp) => new Promise(a
|
|||||||
if (ps.wallpaperId !== undefined) updates.wallpaperId = ps.wallpaperId;
|
if (ps.wallpaperId !== undefined) updates.wallpaperId = ps.wallpaperId;
|
||||||
if (typeof ps.isLocked == 'boolean') updates.isLocked = ps.isLocked;
|
if (typeof ps.isLocked == 'boolean') updates.isLocked = ps.isLocked;
|
||||||
if (typeof ps.isBot == 'boolean') updates.isBot = ps.isBot;
|
if (typeof ps.isBot == 'boolean') updates.isBot = ps.isBot;
|
||||||
|
if (typeof ps.carefulBot == 'boolean') updates.carefulBot = ps.carefulBot;
|
||||||
if (typeof ps.isCat == 'boolean') updates.isCat = ps.isCat;
|
if (typeof ps.isCat == 'boolean') updates.isCat = ps.isCat;
|
||||||
if (typeof ps.autoWatch == 'boolean') updates['settings.autoWatch'] = ps.autoWatch;
|
if (typeof ps.autoWatch == 'boolean') updates['settings.autoWatch'] = ps.autoWatch;
|
||||||
if (typeof ps.alwaysMarkNsfw == 'boolean') updates['settings.alwaysMarkNsfw'] = ps.alwaysMarkNsfw;
|
if (typeof ps.alwaysMarkNsfw == 'boolean') updates['settings.alwaysMarkNsfw'] = ps.alwaysMarkNsfw;
|
||||||
|
@ -58,6 +58,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// public only
|
// public only
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
|
|
||||||
|
@ -129,6 +129,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
$or: [{
|
$or: [{
|
||||||
// フォローしている人の投稿
|
// フォローしている人の投稿
|
||||||
$or: followQuery
|
$or: followQuery
|
||||||
|
@ -71,6 +71,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// public only
|
// public only
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
|
|
||||||
// Construct query
|
// Construct query
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
$or: [{
|
$or: [{
|
||||||
mentions: user._id
|
mentions: user._id
|
||||||
}, {
|
}, {
|
||||||
|
@ -132,6 +132,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// フォローしている人の投稿
|
// フォローしている人の投稿
|
||||||
$or: followQuery,
|
$or: followQuery,
|
||||||
|
|
||||||
|
@ -137,6 +137,8 @@ export default async (params: any, user: ILocalUser) => {
|
|||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
$and: [{
|
$and: [{
|
||||||
|
deletedAt: null,
|
||||||
|
|
||||||
// リストに入っている人のタイムラインへの投稿
|
// リストに入っている人のタイムラインへの投稿
|
||||||
$or: listQuery,
|
$or: listQuery,
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
};
|
};
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
|
deletedAt: null,
|
||||||
userId: user._id
|
userId: user._id
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
|
@ -30,22 +30,20 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
.replace('{{limit}}', limit)
|
.replace('{{limit}}', limit)
|
||||||
.replace('{{offset}}', offset);
|
.replace('{{offset}}', offset);
|
||||||
|
|
||||||
request(
|
request({
|
||||||
{
|
url: url,
|
||||||
url: url,
|
proxy: config.proxy,
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
json: true,
|
json: true,
|
||||||
followRedirect: true,
|
followRedirect: true,
|
||||||
followAllRedirects: true
|
followAllRedirects: true
|
||||||
},
|
}, (error: any, response: any, body: any) => {
|
||||||
(error: any, response: any, body: any) => {
|
if (!error && response.statusCode == 200) {
|
||||||
if (!error && response.statusCode == 200) {
|
res(body);
|
||||||
res(body);
|
} else {
|
||||||
} else {
|
res([]);
|
||||||
res([]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
} else {
|
} else {
|
||||||
// Get 'limit' parameter
|
// Get 'limit' parameter
|
||||||
const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit);
|
const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit);
|
||||||
@ -69,13 +67,10 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
$nin: followingIds.concat(mutedUserIds)
|
$nin: followingIds.concat(mutedUserIds)
|
||||||
},
|
},
|
||||||
isLocked: { $ne: true },
|
isLocked: { $ne: true },
|
||||||
$or: [{
|
lastUsedAt: {
|
||||||
lastUsedAt: {
|
$gte: new Date(Date.now() - ms('7days'))
|
||||||
$gte: new Date(Date.now() - ms('7days'))
|
},
|
||||||
}
|
host: null
|
||||||
}, {
|
|
||||||
host: null
|
|
||||||
}]
|
|
||||||
}, {
|
}, {
|
||||||
limit: limit,
|
limit: limit,
|
||||||
skip: offset,
|
skip: offset,
|
||||||
|
@ -8,6 +8,12 @@ import { IUser } from '../../models/user';
|
|||||||
const log = debug('misskey:limitter');
|
const log = debug('misskey:limitter');
|
||||||
|
|
||||||
export default (endpoint: IEndpoint, user: IUser) => new Promise((ok, reject) => {
|
export default (endpoint: IEndpoint, user: IUser) => new Promise((ok, reject) => {
|
||||||
|
// Redisがインストールされてない場合は常に許可
|
||||||
|
if (limiterDB == null) {
|
||||||
|
ok();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const limitation = endpoint.meta.limit;
|
const limitation = endpoint.meta.limit;
|
||||||
|
|
||||||
const key = limitation.hasOwnProperty('key')
|
const key = limitation.hasOwnProperty('key')
|
||||||
|
@ -63,6 +63,7 @@ handler.on('status', event => {
|
|||||||
// Fetch parent status
|
// Fetch parent status
|
||||||
request({
|
request({
|
||||||
url: `${parent.url}/statuses`,
|
url: `${parent.url}/statuses`,
|
||||||
|
proxy: config.proxy,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': 'misskey'
|
'User-Agent': 'misskey'
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ router.get('/disconnect/twitter', async ctx => {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config.twitter == null) {
|
if (config.twitter == null || redis == null) {
|
||||||
router.get('/connect/twitter', ctx => {
|
router.get('/connect/twitter', ctx => {
|
||||||
ctx.body = '現在Twitterへ接続できません (このインスタンスではTwitterはサポートされていません)';
|
ctx.body = '現在Twitterへ接続できません (このインスタンスではTwitterはサポートされていません)';
|
||||||
});
|
});
|
||||||
|
@ -7,6 +7,8 @@ import Connection from '.';
|
|||||||
export default abstract class Channel {
|
export default abstract class Channel {
|
||||||
protected connection: Connection;
|
protected connection: Connection;
|
||||||
public id: string;
|
public id: string;
|
||||||
|
public abstract readonly chName: string;
|
||||||
|
public static readonly shouldShare: boolean;
|
||||||
|
|
||||||
protected get user() {
|
protected get user() {
|
||||||
return this.connection.user;
|
return this.connection.user;
|
||||||
|
@ -2,6 +2,9 @@ import autobind from 'autobind-decorator';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'drive';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
// Subscribe drive stream
|
// Subscribe drive stream
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import * as CRC32 from 'crc-32';
|
import * as CRC32 from 'crc-32';
|
||||||
|
import * as mongo from 'mongodb';
|
||||||
import ReversiGame, { pack } from '../../../../../models/games/reversi/game';
|
import ReversiGame, { pack } from '../../../../../models/games/reversi/game';
|
||||||
import { publishReversiGameStream } from '../../../../../stream';
|
import { publishReversiGameStream } from '../../../../../stream';
|
||||||
import Reversi from '../../../../../games/reversi/core';
|
import Reversi from '../../../../../games/reversi/core';
|
||||||
@ -7,11 +8,14 @@ import * as maps from '../../../../../games/reversi/maps';
|
|||||||
import Channel from '../../channel';
|
import Channel from '../../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
private gameId: string;
|
public readonly chName = 'gamesReversiGame';
|
||||||
|
public static shouldShare = false;
|
||||||
|
|
||||||
|
private gameId: mongo.ObjectID;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
this.gameId = params.gameId as string;
|
this.gameId = new mongo.ObjectID(params.gameId as string);
|
||||||
|
|
||||||
// Subscribe game stream
|
// Subscribe game stream
|
||||||
this.subscriber.on(`reversiGameStream:${this.gameId}`, data => {
|
this.subscriber.on(`reversiGameStream:${this.gameId}`, data => {
|
||||||
|
@ -5,6 +5,9 @@ import { publishMainStream } from '../../../../../stream';
|
|||||||
import Channel from '../../channel';
|
import Channel from '../../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'gamesReversi';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
// Subscribe reversi stream
|
// Subscribe reversi stream
|
||||||
|
@ -5,6 +5,9 @@ import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'globalTimeline';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
private mutedUserIds: string[] = [];
|
private mutedUserIds: string[] = [];
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
@ -5,6 +5,9 @@ import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'hashtag';
|
||||||
|
public static shouldShare = false;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
const mute = this.user ? await Mute.find({ muterId: this.user._id }) : null;
|
const mute = this.user ? await Mute.find({ muterId: this.user._id }) : null;
|
||||||
|
@ -5,6 +5,9 @@ import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'homeTimeline';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
private mutedUserIds: string[] = [];
|
private mutedUserIds: string[] = [];
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
@ -5,6 +5,9 @@ import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'hybridTimeline';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
private mutedUserIds: string[] = [];
|
private mutedUserIds: string[] = [];
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
@ -5,6 +5,9 @@ import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'localTimeline';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
private mutedUserIds: string[] = [];
|
private mutedUserIds: string[] = [];
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
@ -3,6 +3,9 @@ import Mute from '../../../../models/mute';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'main';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
const mute = await Mute.find({ muterId: this.user._id });
|
const mute = await Mute.find({ muterId: this.user._id });
|
||||||
|
@ -2,6 +2,9 @@ import autobind from 'autobind-decorator';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'messagingIndex';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
// Subscribe messaging index stream
|
// Subscribe messaging index stream
|
||||||
|
@ -3,6 +3,9 @@ import read from '../../common/read-messaging-message';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'messaging';
|
||||||
|
public static shouldShare = false;
|
||||||
|
|
||||||
private otherpartyId: string;
|
private otherpartyId: string;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
@ -5,6 +5,9 @@ import Channel from '../channel';
|
|||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'notesStats';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
ev.addListener('notesStats', this.onStats);
|
ev.addListener('notesStats', this.onStats);
|
||||||
|
@ -5,6 +5,9 @@ import Channel from '../channel';
|
|||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'serverStats';
|
||||||
|
public static shouldShare = true;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
ev.addListener('serverStats', this.onStats);
|
ev.addListener('serverStats', this.onStats);
|
||||||
|
@ -2,6 +2,9 @@ import autobind from 'autobind-decorator';
|
|||||||
import Channel from '../channel';
|
import Channel from '../channel';
|
||||||
|
|
||||||
export default class extends Channel {
|
export default class extends Channel {
|
||||||
|
public readonly chName = 'userList';
|
||||||
|
public static shouldShare = false;
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
const listId = params.listId as string;
|
const listId = params.listId as string;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import * as websocket from 'websocket';
|
import * as websocket from 'websocket';
|
||||||
import Xev from 'xev';
|
|
||||||
import * as debug from 'debug';
|
import * as debug from 'debug';
|
||||||
|
|
||||||
import User, { IUser } from '../../../models/user';
|
import User, { IUser } from '../../../models/user';
|
||||||
@ -11,6 +10,7 @@ import readNote from '../../../services/note/read';
|
|||||||
|
|
||||||
import Channel from './channel';
|
import Channel from './channel';
|
||||||
import channels from './channels';
|
import channels from './channels';
|
||||||
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
const log = debug('misskey');
|
const log = debug('misskey');
|
||||||
|
|
||||||
@ -21,14 +21,14 @@ export default class Connection {
|
|||||||
public user?: IUser;
|
public user?: IUser;
|
||||||
public app: IApp;
|
public app: IApp;
|
||||||
private wsConnection: websocket.connection;
|
private wsConnection: websocket.connection;
|
||||||
public subscriber: Xev;
|
public subscriber: EventEmitter;
|
||||||
private channels: Channel[] = [];
|
private channels: Channel[] = [];
|
||||||
private subscribingNotes: any = {};
|
private subscribingNotes: any = {};
|
||||||
public sendMessageToWsOverride: any = null; // 後方互換性のため
|
public sendMessageToWsOverride: any = null; // 後方互換性のため
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
wsConnection: websocket.connection,
|
wsConnection: websocket.connection,
|
||||||
subscriber: Xev,
|
subscriber: EventEmitter,
|
||||||
user: IUser,
|
user: IUser,
|
||||||
app: IApp
|
app: IApp
|
||||||
) {
|
) {
|
||||||
@ -146,9 +146,9 @@ export default class Connection {
|
|||||||
*/
|
*/
|
||||||
@autobind
|
@autobind
|
||||||
private onChannelConnectRequested(payload: any) {
|
private onChannelConnectRequested(payload: any) {
|
||||||
const { channel, id, params } = payload;
|
const { channel, id, params, pong } = payload;
|
||||||
log(`CH CONNECT: ${id} ${channel} by @${this.user.username}`);
|
log(`CH CONNECT: ${id} ${channel} by @${this.user.username}`);
|
||||||
this.connectChannel(id, params, (channels as any)[channel]);
|
this.connectChannel(id, params, channel, pong);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,13 +177,21 @@ export default class Connection {
|
|||||||
* チャンネルに接続
|
* チャンネルに接続
|
||||||
*/
|
*/
|
||||||
@autobind
|
@autobind
|
||||||
public connectChannel(id: string, params: any, channelClass: { new(id: string, connection: Connection): Channel }) {
|
public connectChannel(id: string, params: any, channel: string, pong = false) {
|
||||||
const channel = new channelClass(id, this);
|
// 共有可能チャンネルに接続しようとしていて、かつそのチャンネルに既に接続していたら無意味なので無視
|
||||||
this.channels.push(channel);
|
if ((channels as any)[channel].shouldShare && this.channels.some(c => c.chName === channel)) {
|
||||||
channel.init(params);
|
return;
|
||||||
this.sendMessageToWs('connected', {
|
}
|
||||||
id: id
|
|
||||||
});
|
const ch: Channel = new (channels as any)[channel](id, this);
|
||||||
|
this.channels.push(ch);
|
||||||
|
ch.init(params);
|
||||||
|
|
||||||
|
if (pong) {
|
||||||
|
this.sendMessageToWs('connected', {
|
||||||
|
id: id
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import * as websocket from 'websocket';
|
import * as websocket from 'websocket';
|
||||||
|
import * as redis from 'redis';
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
|
|
||||||
import MainStreamConnection from './stream';
|
import MainStreamConnection from './stream';
|
||||||
import { ParsedUrlQuery } from 'querystring';
|
import { ParsedUrlQuery } from 'querystring';
|
||||||
import authenticate from './authenticate';
|
import authenticate from './authenticate';
|
||||||
import channels from './stream/channels';
|
import { EventEmitter } from 'events';
|
||||||
|
import config from '../../config';
|
||||||
|
|
||||||
module.exports = (server: http.Server) => {
|
module.exports = (server: http.Server) => {
|
||||||
// Init websocket server
|
// Init websocket server
|
||||||
@ -16,11 +18,34 @@ module.exports = (server: http.Server) => {
|
|||||||
ws.on('request', async (request) => {
|
ws.on('request', async (request) => {
|
||||||
const connection = request.accept();
|
const connection = request.accept();
|
||||||
|
|
||||||
const ev = new Xev();
|
|
||||||
|
|
||||||
const q = request.resourceURL.query as ParsedUrlQuery;
|
const q = request.resourceURL.query as ParsedUrlQuery;
|
||||||
const [user, app] = await authenticate(q.i as string);
|
const [user, app] = await authenticate(q.i as string);
|
||||||
|
|
||||||
|
let ev: EventEmitter;
|
||||||
|
|
||||||
|
if (config.redis) {
|
||||||
|
// Connect to Redis
|
||||||
|
const subscriber = redis.createClient(
|
||||||
|
config.redis.port, config.redis.host);
|
||||||
|
|
||||||
|
subscriber.subscribe('misskey');
|
||||||
|
|
||||||
|
ev = new EventEmitter();
|
||||||
|
|
||||||
|
subscriber.on('message', async (_, data) => {
|
||||||
|
const obj = JSON.parse(data);
|
||||||
|
|
||||||
|
ev.emit(obj.channel, obj.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
connection.once('close', () => {
|
||||||
|
subscriber.unsubscribe();
|
||||||
|
subscriber.quit();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ev = new Xev();
|
||||||
|
}
|
||||||
|
|
||||||
const main = new MainStreamConnection(connection, ev, user, app);
|
const main = new MainStreamConnection(connection, ev, user, app);
|
||||||
|
|
||||||
// 後方互換性のため
|
// 後方互換性のため
|
||||||
@ -39,14 +64,14 @@ module.exports = (server: http.Server) => {
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
main.connectChannel(Math.random().toString(), null,
|
main.connectChannel(Math.random().toString().substr(2, 8), null,
|
||||||
request.resourceURL.pathname === '/' ? channels.homeTimeline :
|
request.resourceURL.pathname === '/' ? 'homeTimeline' :
|
||||||
request.resourceURL.pathname === '/local-timeline' ? channels.localTimeline :
|
request.resourceURL.pathname === '/local-timeline' ? 'localTimeline' :
|
||||||
request.resourceURL.pathname === '/hybrid-timeline' ? channels.hybridTimeline :
|
request.resourceURL.pathname === '/hybrid-timeline' ? 'hybridTimeline' :
|
||||||
request.resourceURL.pathname === '/global-timeline' ? channels.globalTimeline : null);
|
request.resourceURL.pathname === '/global-timeline' ? 'globalTimeline' : null);
|
||||||
|
|
||||||
if (request.resourceURL.pathname === '/') {
|
if (request.resourceURL.pathname === '/') {
|
||||||
main.connectChannel(Math.random().toString(), null, channels.main);
|
main.connectChannel(Math.random().toString().substr(2, 8), null, 'main');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ module.exports = async (ctx: Koa.Context) => {
|
|||||||
try {
|
try {
|
||||||
const summary = config.summalyProxy ? await request.get({
|
const summary = config.summalyProxy ? await request.get({
|
||||||
url: config.summalyProxy,
|
url: config.summalyProxy,
|
||||||
|
proxy: config.proxy,
|
||||||
qs: {
|
qs: {
|
||||||
url: ctx.query.url
|
url: ctx.query.url
|
||||||
},
|
},
|
||||||
|
@ -37,6 +37,7 @@ export default async (url: string, user: IUser, folderId: mongodb.ObjectID = nul
|
|||||||
const requestUrl = URL.parse(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url;
|
const requestUrl = URL.parse(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url;
|
||||||
request({
|
request({
|
||||||
url: requestUrl,
|
url: requestUrl,
|
||||||
|
proxy: config.proxy,
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': config.user_agent
|
'User-Agent': config.user_agent
|
||||||
}
|
}
|
||||||
|
@ -11,70 +11,75 @@ import { deliver } from '../../queue';
|
|||||||
import createFollowRequest from './requests/create';
|
import createFollowRequest from './requests/create';
|
||||||
|
|
||||||
export default async function(follower: IUser, followee: IUser) {
|
export default async function(follower: IUser, followee: IUser) {
|
||||||
if (followee.isLocked || isLocalUser(follower) && isRemoteUser(followee)) {
|
// フォロー対象が鍵アカウントである or
|
||||||
|
// フォロワーがBotであり、フォロー対象がBotからのフォローに慎重である or
|
||||||
|
// フォロワーがローカルユーザーであり、フォロー対象がリモートユーザーである
|
||||||
|
// 上記のいずれかに当てはまる場合はすぐフォローせずにフォローリクエストを発行しておく
|
||||||
|
if (followee.isLocked || (followee.carefulBot && follower.isBot) || (isLocalUser(follower) && isRemoteUser(followee))) {
|
||||||
await createFollowRequest(follower, followee);
|
await createFollowRequest(follower, followee);
|
||||||
} else {
|
return;
|
||||||
const following = await Following.insert({
|
}
|
||||||
createdAt: new Date(),
|
|
||||||
followerId: follower._id,
|
|
||||||
followeeId: followee._id,
|
|
||||||
|
|
||||||
// 非正規化
|
const following = await Following.insert({
|
||||||
_follower: {
|
createdAt: new Date(),
|
||||||
host: follower.host,
|
followerId: follower._id,
|
||||||
inbox: isRemoteUser(follower) ? follower.inbox : undefined,
|
followeeId: followee._id,
|
||||||
sharedInbox: isRemoteUser(follower) ? follower.sharedInbox : undefined
|
|
||||||
},
|
|
||||||
_followee: {
|
|
||||||
host: followee.host,
|
|
||||||
inbox: isRemoteUser(followee) ? followee.inbox : undefined,
|
|
||||||
sharedInbox: isRemoteUser(followee) ? followee.sharedInbox : undefined
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//#region Increment following count
|
// 非正規化
|
||||||
User.update({ _id: follower._id }, {
|
_follower: {
|
||||||
$inc: {
|
host: follower.host,
|
||||||
followingCount: 1
|
inbox: isRemoteUser(follower) ? follower.inbox : undefined,
|
||||||
}
|
sharedInbox: isRemoteUser(follower) ? follower.sharedInbox : undefined
|
||||||
});
|
},
|
||||||
|
_followee: {
|
||||||
FollowingLog.insert({
|
host: followee.host,
|
||||||
createdAt: following.createdAt,
|
inbox: isRemoteUser(followee) ? followee.inbox : undefined,
|
||||||
userId: follower._id,
|
sharedInbox: isRemoteUser(followee) ? followee.sharedInbox : undefined
|
||||||
count: follower.followingCount + 1
|
|
||||||
});
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region Increment followers count
|
|
||||||
User.update({ _id: followee._id }, {
|
|
||||||
$inc: {
|
|
||||||
followersCount: 1
|
|
||||||
}
|
|
||||||
});
|
|
||||||
FollowedLog.insert({
|
|
||||||
createdAt: following.createdAt,
|
|
||||||
userId: followee._id,
|
|
||||||
count: followee.followersCount + 1
|
|
||||||
});
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
// Publish follow event
|
|
||||||
if (isLocalUser(follower)) {
|
|
||||||
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Publish followed event
|
//#region Increment following count
|
||||||
if (isLocalUser(followee)) {
|
User.update({ _id: follower._id }, {
|
||||||
packUser(follower, followee).then(packed => publishMainStream(followee._id, 'followed', packed)),
|
$inc: {
|
||||||
|
followingCount: 1
|
||||||
// 通知を作成
|
|
||||||
notify(followee._id, follower._id, 'follow');
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (isRemoteUser(follower) && isLocalUser(followee)) {
|
FollowingLog.insert({
|
||||||
const content = pack(renderAccept(renderFollow(follower, followee)));
|
createdAt: following.createdAt,
|
||||||
deliver(followee, content, follower.inbox);
|
userId: follower._id,
|
||||||
|
count: follower.followingCount + 1
|
||||||
|
});
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//#region Increment followers count
|
||||||
|
User.update({ _id: followee._id }, {
|
||||||
|
$inc: {
|
||||||
|
followersCount: 1
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
FollowedLog.insert({
|
||||||
|
createdAt: following.createdAt,
|
||||||
|
userId: followee._id,
|
||||||
|
count: followee.followersCount + 1
|
||||||
|
});
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
// Publish follow event
|
||||||
|
if (isLocalUser(follower)) {
|
||||||
|
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish followed event
|
||||||
|
if (isLocalUser(followee)) {
|
||||||
|
packUser(follower, followee).then(packed => publishMainStream(followee._id, 'followed', packed)),
|
||||||
|
|
||||||
|
// 通知を作成
|
||||||
|
notify(followee._id, follower._id, 'follow');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isRemoteUser(follower) && isLocalUser(followee)) {
|
||||||
|
const content = pack(renderAccept(renderFollow(follower, followee)));
|
||||||
|
deliver(followee, content, follower.inbox);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
import * as mongo from 'mongodb';
|
import * as mongo from 'mongodb';
|
||||||
import User, { isLocalUser, isRemoteUser, ILocalUser, IUser } from '../../models/user';
|
import User, { isLocalUser, isRemoteUser, ILocalUser, IUser } from '../../models/user';
|
||||||
import Note from '../../models/note';
|
import Note, { packMany } from '../../models/note';
|
||||||
import Following from '../../models/following';
|
import Following from '../../models/following';
|
||||||
import renderAdd from '../../remote/activitypub/renderer/add';
|
import renderAdd from '../../remote/activitypub/renderer/add';
|
||||||
import renderRemove from '../../remote/activitypub/renderer/remove';
|
import renderRemove from '../../remote/activitypub/renderer/remove';
|
||||||
@ -27,11 +27,11 @@ export async function addPinned(user: IUser, noteId: mongo.ObjectID) {
|
|||||||
let pinnedNoteIds = user.pinnedNoteIds || [];
|
let pinnedNoteIds = user.pinnedNoteIds || [];
|
||||||
|
|
||||||
//#region 現在ピン留め投稿している投稿が実際にデータベースに存在しているのかチェック
|
//#region 現在ピン留め投稿している投稿が実際にデータベースに存在しているのかチェック
|
||||||
// データベースの欠損などで存在していない場合があるので。
|
// データベースの欠損などで存在していない(または破損している)場合があるので。
|
||||||
// 存在していなかったらピン留め投稿から外す
|
// 存在していなかったらピン留め投稿から外す
|
||||||
const pinnedNotes = (await Promise.all(pinnedNoteIds.map(id => Note.findOne({ _id: id })))).filter(x => x != null);
|
const pinnedNotes = await packMany(pinnedNoteIds, null, { detail: true });
|
||||||
|
|
||||||
pinnedNoteIds = pinnedNoteIds.filter(id => pinnedNotes.some(n => n._id.equals(id)));
|
pinnedNoteIds = pinnedNoteIds.filter(id => pinnedNotes.some(n => n.id.toString() === id.toHexString()));
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
if (pinnedNoteIds.length >= 5) {
|
if (pinnedNoteIds.length >= 5) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as mongo from 'mongodb';
|
import * as mongo from 'mongodb';
|
||||||
|
import redis from './db/redis';
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
import Meta, { IMeta } from './models/meta';
|
import Meta, { IMeta } from './models/meta';
|
||||||
|
|
||||||
@ -9,7 +10,10 @@ class Publisher {
|
|||||||
private meta: IMeta;
|
private meta: IMeta;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.ev = new Xev();
|
// Redisがインストールされてないときはプロセス間通信を使う
|
||||||
|
if (redis == null) {
|
||||||
|
this.ev = new Xev();
|
||||||
|
}
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
this.meta = await Meta.findOne({});
|
this.meta = await Meta.findOne({});
|
||||||
@ -28,7 +32,14 @@ class Publisher {
|
|||||||
{ type: type, body: null } :
|
{ type: type, body: null } :
|
||||||
{ type: type, body: value };
|
{ type: type, body: value };
|
||||||
|
|
||||||
this.ev.emit(channel, message);
|
if (this.ev) {
|
||||||
|
this.ev.emit(channel, message);
|
||||||
|
} else {
|
||||||
|
redis.publish('misskey', JSON.stringify({
|
||||||
|
channel: channel,
|
||||||
|
message: message
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public publishMainStream = (userId: ID, type: string, value?: any): void => {
|
public publishMainStream = (userId: ID, type: string, value?: any): void => {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user