Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
06539db1a0 | ||
![]() |
de10890bd8 | ||
![]() |
8dc5375d55 | ||
![]() |
1d23076191 | ||
![]() |
cbdc061891 | ||
![]() |
9536d76b61 | ||
![]() |
7a030901c8 | ||
![]() |
bcc02047ca | ||
![]() |
c61616388e | ||
![]() |
499486f559 | ||
![]() |
179d231fd8 | ||
![]() |
2e4a391eda | ||
![]() |
3d214fee4b | ||
![]() |
509a4c7955 | ||
![]() |
c754046eaf | ||
![]() |
92571d9133 | ||
![]() |
add425abdb | ||
![]() |
1890d9e2ee | ||
![]() |
83f2926f0c | ||
![]() |
738ced81ec | ||
![]() |
b22c1ae520 | ||
![]() |
e2e7489b1f | ||
![]() |
6ae7b8303d | ||
![]() |
55f40af51c | ||
![]() |
7a784cea3b | ||
![]() |
f86cccec0c | ||
![]() |
9d90a28d76 | ||
![]() |
1724cf7c17 | ||
![]() |
d64d92ccf5 | ||
![]() |
f64ced8677 | ||
![]() |
db1c0468aa | ||
![]() |
77c5d3276a | ||
![]() |
ec2b1ec3f0 |
@@ -7,7 +7,7 @@
|
||||
[![][dependencies-badge]][dependencies-link]
|
||||
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
||||
|
||||
> Lead Maintainer: [syuilo][syuilo-link]
|
||||
**Microblogging. Redefined.**
|
||||
|
||||
**[Misskey](https://misskey.xyz)** is a completely open source,
|
||||
ultimately sophisticated professional microblogging software.
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Umbenennen"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URL kopieren"
|
||||
download: "Download"
|
||||
else-files: "Anderes…"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Ein Verzeichnis erstellen"
|
||||
upload: "Eine Datei hochladen"
|
||||
url-upload: "Von einer URL hochladen"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Folge ich"
|
||||
follow: "Folgen"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Rename"
|
||||
mark-as-sensitive: "Mark as 'sensitive'"
|
||||
unmark-as-sensitive: "Unmark as 'sensitive'"
|
||||
copy-url: "Copy URL"
|
||||
download: "Download"
|
||||
else-files: "Others"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Create a folder"
|
||||
upload: "Upload a file"
|
||||
url-upload: "Upload from a URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Following"
|
||||
follow: "Follow"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Move"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Following"
|
||||
follow: "Follow"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Renombrar"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Copia la URL"
|
||||
download: "Descargar"
|
||||
else-files: "Otros"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Crear una carpeta"
|
||||
upload: "Subir fichero"
|
||||
url-upload: "Subir desde una URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Siguiendo"
|
||||
follow: "Sigue"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Bannière"
|
||||
contextmenu:
|
||||
rename: "Renommer"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Copier l'URL"
|
||||
download: "Télécharger"
|
||||
else-files: "Autres..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Créer un dossier"
|
||||
upload: "Uploader un fichier"
|
||||
url-upload: "Uploader d'un URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Abonnements"
|
||||
follow: "Suivre"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Déplacer"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Abonnements"
|
||||
follow: "Suivre"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -330,6 +330,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -377,6 +379,14 @@ desktop/views/components/drive.vue:
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -853,6 +863,14 @@ mobile/views/components/drive.file-detail.vue:
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Baner"
|
||||
contextmenu:
|
||||
rename: "Zmień nazwę"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Skopiuj adres"
|
||||
download: "Pobierz"
|
||||
else-files: "Inne"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Utwórz katalog"
|
||||
upload: "Wyślij plik"
|
||||
url-upload: "Wyślij z adresu URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Śledzisz"
|
||||
follow: "Śledź"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Przenieś"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Śledzisz"
|
||||
follow: "Śledź"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
|
18198
package-lock.json
generated
18198
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "4.24.1",
|
||||
"clientVersion": "1.0.7402",
|
||||
"version": "4.26.0",
|
||||
"clientVersion": "1.0.7435",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
@@ -126,6 +126,7 @@
|
||||
"highlight.js": "9.12.0",
|
||||
"html-minifier": "3.5.19",
|
||||
"http-signature": "1.2.0",
|
||||
"insert-text-at-cursor": "0.1.1",
|
||||
"is-root": "2.0.0",
|
||||
"is-url": "1.2.4",
|
||||
"jquery": "3.3.1",
|
||||
@@ -205,6 +206,7 @@
|
||||
"vue-json-tree-view": "2.1.4",
|
||||
"vue-loader": "15.2.6",
|
||||
"vue-router": "3.0.1",
|
||||
"vue-style-loader": "4.1.1",
|
||||
"vue-template-compiler": "2.5.16",
|
||||
"vuedraggable": "2.16.0",
|
||||
"vuex": "3.0.1",
|
||||
|
@@ -46,33 +46,45 @@ export default Vue.extend({
|
||||
display grid
|
||||
grid-gap 4px
|
||||
|
||||
> *
|
||||
overflow hidden
|
||||
border-radius 4px
|
||||
|
||||
&[data-count="1"]
|
||||
grid-template-rows 1fr
|
||||
|
||||
&[data-count="2"]
|
||||
grid-template-columns 1fr 1fr
|
||||
grid-template-rows 1fr
|
||||
|
||||
&[data-count="3"]
|
||||
grid-template-columns 1fr 0.5fr
|
||||
grid-template-rows 1fr 1fr
|
||||
:nth-child(1)
|
||||
|
||||
> *:nth-child(1)
|
||||
grid-row 1 / 3
|
||||
:nth-child(3)
|
||||
|
||||
> *:nth-child(3)
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
|
||||
&[data-count="4"]
|
||||
grid-template-columns 1fr 1fr
|
||||
grid-template-rows 1fr 1fr
|
||||
|
||||
:nth-child(1)
|
||||
> *:nth-child(1)
|
||||
grid-column 1 / 2
|
||||
grid-row 1 / 2
|
||||
:nth-child(2)
|
||||
|
||||
> *:nth-child(2)
|
||||
grid-column 2 / 3
|
||||
grid-row 1 / 2
|
||||
:nth-child(3)
|
||||
|
||||
> *:nth-child(3)
|
||||
grid-column 1 / 2
|
||||
grid-row 2 / 3
|
||||
:nth-child(4)
|
||||
|
||||
> *:nth-child(4)
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
|
||||
|
@@ -68,6 +68,11 @@ export default Vue.extend({
|
||||
icon: '%fa:i-cursor%',
|
||||
action: this.rename
|
||||
}, {
|
||||
type: 'item',
|
||||
text: this.file.isSensitive ? '%i18n:@contextmenu.unmark-as-sensitive%' : '%i18n:@contextmenu.mark-as-sensitive%',
|
||||
icon: this.file.isSensitive ? '%fa:R eye%' : '%fa:R eye-slash%',
|
||||
action: this.toggleSensitive
|
||||
}, null, {
|
||||
type: 'item',
|
||||
text: '%i18n:@contextmenu.copy-url%',
|
||||
icon: '%fa:link%',
|
||||
@@ -149,6 +154,13 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
|
||||
toggleSensitive() {
|
||||
(this as any).api('drive/files/update', {
|
||||
fileId: this.file.id,
|
||||
isSensitive: !this.file.isSensitive
|
||||
});
|
||||
},
|
||||
|
||||
copyUrl() {
|
||||
copyToClipboard(this.file.url);
|
||||
(this as any).apis.dialog({
|
||||
|
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<a class="mk-media-image"
|
||||
<div class="ldwbgwstjsdgcjruamauqdrffetqudry" v-if="image.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="lcjomzwbohoelkxsnuqjiaccdbdfiazy" v-else
|
||||
:href="image.url"
|
||||
@mousemove="onMousemove"
|
||||
@mouseleave="onMouseleave"
|
||||
@@ -21,6 +27,10 @@ export default Vue.extend({
|
||||
},
|
||||
raw: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -56,16 +66,30 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-image
|
||||
.lcjomzwbohoelkxsnuqjiaccdbdfiazy
|
||||
display block
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
width 100%
|
||||
height 100%
|
||||
background-position center
|
||||
border-radius 4px
|
||||
|
||||
&:not(:hover)
|
||||
background-size cover
|
||||
|
||||
.ldwbgwstjsdgcjruamauqdrffetqudry
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
@@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<video class="mk-media-video"
|
||||
<div class="uofhebxjdgksfmltszlxurtjnjjsvioh" v-if="video.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vwxdhznewyashiknzolsoihtlpicqepe" v-else>
|
||||
<video class="video"
|
||||
:src="video.url"
|
||||
:title="video.name"
|
||||
controls
|
||||
@dblclick.prevent="onClick"
|
||||
ref="video"
|
||||
v-if="inlinePlayable" />
|
||||
<a class="mk-media-video-thumbnail"
|
||||
<a class="thumbnail"
|
||||
:href="video.url"
|
||||
:style="imageStyle"
|
||||
@click.prevent="onClick"
|
||||
@@ -14,6 +21,7 @@
|
||||
v-else>
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -21,7 +29,19 @@ import Vue from 'vue';
|
||||
import MkMediaVideoDialog from './media-video-dialog.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['video', 'inlinePlayable'],
|
||||
props: {
|
||||
video: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
inlinePlayable: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageStyle(): any {
|
||||
return {
|
||||
@@ -47,22 +67,39 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-video
|
||||
display block
|
||||
width 100%
|
||||
height 100%
|
||||
border-radius 4px
|
||||
.vwxdhznewyashiknzolsoihtlpicqepe
|
||||
.video
|
||||
display block
|
||||
width 100%
|
||||
height 100%
|
||||
border-radius 4px
|
||||
|
||||
.mk-media-video-thumbnail
|
||||
.thumbnail
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
font-size 3.5em
|
||||
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
background-position center
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
.uofhebxjdgksfmltszlxurtjnjjsvioh
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
font-size 3.5em
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
background-position center
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
</style>
|
||||
|
@@ -10,6 +10,9 @@
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+ユーザーを追加</a>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
||||
<textarea :class="{ with: (files.length != 0 || poll) }"
|
||||
ref="text" v-model="text" :disabled="posting"
|
||||
@@ -46,6 +49,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
@@ -91,7 +95,8 @@ export default Vue.extend({
|
||||
visibility: 'public',
|
||||
visibleUsers: [],
|
||||
autocomplete: null,
|
||||
draghover: false
|
||||
draghover: false,
|
||||
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||
};
|
||||
},
|
||||
|
||||
@@ -183,6 +188,10 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
methods: {
|
||||
addTag(tag: string) {
|
||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||
},
|
||||
|
||||
watch() {
|
||||
this.$watch('text', () => this.saveDraft());
|
||||
this.$watch('poll', () => this.saveDraft());
|
||||
@@ -370,6 +379,13 @@ export default Vue.extend({
|
||||
}).then(() => {
|
||||
this.posting = false;
|
||||
});
|
||||
|
||||
if (this.text && this.text != '') {
|
||||
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
|
||||
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
|
||||
history = history.filter(x => !hashtags.includes(x));
|
||||
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
|
||||
}
|
||||
},
|
||||
|
||||
saveDraft() {
|
||||
@@ -478,6 +494,10 @@ root(isDark)
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> .hashtags
|
||||
> *
|
||||
margin-right 8px
|
||||
|
||||
> .medias
|
||||
margin 0
|
||||
padding 0
|
||||
|
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<a class="mk-media-image" :href="image.url" target="_blank" :style="style" :title="image.name"></a>
|
||||
<div class="qjewsnkgzzxlxtzncydssfbgjibiehcy" v-if="image.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gqnyydlzavusgskkfvwvjiattxdzsqlf" v-else :href="image.url" target="_blank" :style="style" :title="image.name"></a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -13,6 +19,10 @@ export default Vue.extend({
|
||||
},
|
||||
raw: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -35,13 +45,27 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-image
|
||||
.gqnyydlzavusgskkfvwvjiattxdzsqlf
|
||||
display block
|
||||
overflow hidden
|
||||
width 100%
|
||||
height 100%
|
||||
background-position center
|
||||
background-size cover
|
||||
border-radius 4px
|
||||
|
||||
.qjewsnkgzzxlxtzncydssfbgjibiehcy
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
@@ -1,17 +1,32 @@
|
||||
<template>
|
||||
<a class="mk-media-video"
|
||||
:href="video.url"
|
||||
target="_blank"
|
||||
:style="imageStyle"
|
||||
:title="video.name">
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="video.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else
|
||||
:href="video.url"
|
||||
target="_blank"
|
||||
:style="imageStyle"
|
||||
:title="video.name">
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
export default Vue.extend({
|
||||
props: ['video'],
|
||||
props: {
|
||||
video: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageStyle(): any {
|
||||
return {
|
||||
@@ -22,7 +37,7 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-video
|
||||
.kkjnbbplepmiyuadieoenjgutgcmtsvu
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
@@ -33,4 +48,20 @@ export default Vue.extend({
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
.icozogqfvdetwohsdglrbswgrejoxbdj
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
@@ -1,47 +1,53 @@
|
||||
<template>
|
||||
<div class="mk-post-form">
|
||||
<header>
|
||||
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||
<div>
|
||||
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
|
||||
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
|
||||
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="form">
|
||||
<mk-note-preview v-if="reply" :note="reply"/>
|
||||
<mk-note-preview v-if="renote" :note="renote"/>
|
||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
||||
<header>
|
||||
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||
<div>
|
||||
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
|
||||
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
|
||||
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="form">
|
||||
<mk-note-preview v-if="reply" :note="reply"/>
|
||||
<mk-note-preview v-if="renote" :note="renote"/>
|
||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="%i18n:@cw-placeholder%">
|
||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="placeholder" v-autocomplete="'text'"></textarea>
|
||||
<div class="attaches" v-show="files.length != 0">
|
||||
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
||||
<div class="file" v-for="file in files" :key="file.id">
|
||||
<div class="img" :style="`background-image: url(${file.url}?thumbnail&size=128)`" @click="detachMedia(file)"></div>
|
||||
</div>
|
||||
</x-draggable>
|
||||
</div>
|
||||
<mk-poll-editor v-if="poll" ref="poll" @destroyed="poll = false"/>
|
||||
<mk-uploader ref="uploader" @uploaded="attachMedia" @change="onChangeUploadings"/>
|
||||
<footer>
|
||||
<button class="upload" @click="chooseFile">%fa:upload%</button>
|
||||
<button class="drive" @click="chooseFileFromDrive">%fa:cloud%</button>
|
||||
<button class="kao" @click="kao">%fa:R smile%</button>
|
||||
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
||||
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||
<button class="visibility" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||
</footer>
|
||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="%i18n:@cw-placeholder%">
|
||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="placeholder" v-autocomplete="'text'"></textarea>
|
||||
<div class="attaches" v-show="files.length != 0">
|
||||
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
||||
<div class="file" v-for="file in files" :key="file.id">
|
||||
<div class="img" :style="`background-image: url(${file.url}?thumbnail&size=128)`" @click="detachMedia(file)"></div>
|
||||
</div>
|
||||
</x-draggable>
|
||||
</div>
|
||||
<mk-poll-editor v-if="poll" ref="poll" @destroyed="poll = false"/>
|
||||
<mk-uploader ref="uploader" @uploaded="attachMedia" @change="onChangeUploadings"/>
|
||||
<footer>
|
||||
<button class="upload" @click="chooseFile">%fa:upload%</button>
|
||||
<button class="drive" @click="chooseFileFromDrive">%fa:cloud%</button>
|
||||
<button class="kao" @click="kao">%fa:R smile%</button>
|
||||
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
||||
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||
<button class="visibility" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||
</footer>
|
||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
@@ -85,7 +91,8 @@ export default Vue.extend({
|
||||
visibility: 'public',
|
||||
visibleUsers: [],
|
||||
useCw: false,
|
||||
cw: null
|
||||
cw: null,
|
||||
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||
};
|
||||
},
|
||||
|
||||
@@ -161,6 +168,10 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
methods: {
|
||||
addTag(tag: string) {
|
||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||
},
|
||||
|
||||
focus() {
|
||||
(this.$refs.text as any).focus();
|
||||
},
|
||||
@@ -281,6 +292,13 @@ export default Vue.extend({
|
||||
}).catch(err => {
|
||||
this.posting = false;
|
||||
});
|
||||
|
||||
if (this.text && this.text != '') {
|
||||
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
|
||||
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
|
||||
history = history.filter(x => !hashtags.includes(x));
|
||||
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
@@ -302,146 +320,156 @@ root(isDark)
|
||||
max-width 500px
|
||||
width calc(100% - 16px)
|
||||
margin 8px auto
|
||||
background isDark ? #282C37 : #fff
|
||||
border-radius 8px
|
||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||
|
||||
@media (min-width 500px)
|
||||
margin 16px auto
|
||||
width calc(100% - 32px)
|
||||
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||
|
||||
> .form
|
||||
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||
|
||||
@media (min-width 600px)
|
||||
margin 32px auto
|
||||
|
||||
> header
|
||||
z-index 1000
|
||||
height 50px
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
> .cancel
|
||||
padding 0
|
||||
width 50px
|
||||
line-height 50px
|
||||
font-size 24px
|
||||
color isDark ? #9baec8 : #555
|
||||
|
||||
> div
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
color #657786
|
||||
|
||||
> .text-count
|
||||
line-height 50px
|
||||
|
||||
> .geo
|
||||
margin 0 8px
|
||||
line-height 50px
|
||||
|
||||
> .submit
|
||||
margin 8px
|
||||
padding 0 16px
|
||||
line-height 34px
|
||||
vertical-align bottom
|
||||
color $theme-color-foreground
|
||||
background $theme-color
|
||||
border-radius 4px
|
||||
|
||||
&:disabled
|
||||
opacity 0.7
|
||||
|
||||
> .form
|
||||
max-width 500px
|
||||
margin 0 auto
|
||||
background isDark ? #282C37 : #fff
|
||||
border-radius 8px
|
||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||
|
||||
> .mk-note-preview
|
||||
padding 16px
|
||||
|
||||
> .visibleUsers
|
||||
margin-bottom 8px
|
||||
font-size 14px
|
||||
|
||||
> span
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> input
|
||||
z-index 1
|
||||
|
||||
> input
|
||||
> textarea
|
||||
display block
|
||||
padding 12px
|
||||
margin 0
|
||||
width 100%
|
||||
font-size 16px
|
||||
color isDark ? #fff : #333
|
||||
background isDark ? #191d23 : #fff
|
||||
border none
|
||||
border-radius 0
|
||||
> header
|
||||
z-index 1000
|
||||
height 50px
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
&:disabled
|
||||
opacity 0.5
|
||||
|
||||
> textarea
|
||||
max-width 100%
|
||||
min-width 100%
|
||||
min-height 80px
|
||||
|
||||
> .attaches
|
||||
|
||||
> .files
|
||||
display block
|
||||
margin 0
|
||||
padding 4px
|
||||
list-style none
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
clear both
|
||||
|
||||
> .file
|
||||
display block
|
||||
float left
|
||||
margin 0
|
||||
padding 0
|
||||
border solid 4px transparent
|
||||
|
||||
> .img
|
||||
width 64px
|
||||
height 64px
|
||||
background-size cover
|
||||
background-position center center
|
||||
|
||||
> .mk-uploader
|
||||
margin 8px 0 0 0
|
||||
padding 8px
|
||||
|
||||
> .file
|
||||
display none
|
||||
|
||||
> footer
|
||||
white-space nowrap
|
||||
overflow auto
|
||||
-webkit-overflow-scrolling touch
|
||||
overflow-scrolling touch
|
||||
|
||||
> *
|
||||
display inline-block
|
||||
> .cancel
|
||||
padding 0
|
||||
margin 0
|
||||
width 48px
|
||||
height 48px
|
||||
font-size 20px
|
||||
width 50px
|
||||
line-height 50px
|
||||
font-size 24px
|
||||
color isDark ? #9baec8 : #555
|
||||
|
||||
> div
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
color #657786
|
||||
background transparent
|
||||
outline none
|
||||
|
||||
> .text-count
|
||||
line-height 50px
|
||||
|
||||
> .geo
|
||||
margin 0 8px
|
||||
line-height 50px
|
||||
|
||||
> .submit
|
||||
margin 8px
|
||||
padding 0 16px
|
||||
line-height 34px
|
||||
vertical-align bottom
|
||||
color $theme-color-foreground
|
||||
background $theme-color
|
||||
border-radius 4px
|
||||
|
||||
&:disabled
|
||||
opacity 0.7
|
||||
|
||||
> .form
|
||||
max-width 500px
|
||||
margin 0 auto
|
||||
|
||||
> .mk-note-preview
|
||||
padding 16px
|
||||
|
||||
> .visibleUsers
|
||||
margin-bottom 8px
|
||||
font-size 14px
|
||||
|
||||
> span
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> input
|
||||
z-index 1
|
||||
|
||||
> input
|
||||
> textarea
|
||||
display block
|
||||
padding 12px
|
||||
margin 0
|
||||
width 100%
|
||||
font-size 16px
|
||||
color isDark ? #fff : #333
|
||||
background isDark ? #191d23 : #fff
|
||||
border none
|
||||
border-radius 0
|
||||
box-shadow none
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
&:disabled
|
||||
opacity 0.5
|
||||
|
||||
> textarea
|
||||
max-width 100%
|
||||
min-width 100%
|
||||
min-height 80px
|
||||
|
||||
> .attaches
|
||||
|
||||
> .files
|
||||
display block
|
||||
margin 0
|
||||
padding 4px
|
||||
list-style none
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
clear both
|
||||
|
||||
> .file
|
||||
display block
|
||||
float left
|
||||
margin 0
|
||||
padding 0
|
||||
border solid 4px transparent
|
||||
|
||||
> .img
|
||||
width 64px
|
||||
height 64px
|
||||
background-size cover
|
||||
background-position center center
|
||||
|
||||
> .mk-uploader
|
||||
margin 8px 0 0 0
|
||||
padding 8px
|
||||
|
||||
> .file
|
||||
display none
|
||||
|
||||
> footer
|
||||
white-space nowrap
|
||||
overflow auto
|
||||
-webkit-overflow-scrolling touch
|
||||
overflow-scrolling touch
|
||||
|
||||
> *
|
||||
display inline-block
|
||||
padding 0
|
||||
margin 0
|
||||
width 48px
|
||||
height 48px
|
||||
font-size 20px
|
||||
color #657786
|
||||
background transparent
|
||||
outline none
|
||||
border none
|
||||
border-radius 0
|
||||
box-shadow none
|
||||
|
||||
> .hashtags
|
||||
margin 8px
|
||||
|
||||
> *
|
||||
margin-right 8px
|
||||
|
||||
.mk-post-form[data-darkmode]
|
||||
root(true)
|
||||
|
@@ -81,3 +81,10 @@ props:
|
||||
desc:
|
||||
ja: "フォルダ"
|
||||
en: "The folder of this file"
|
||||
|
||||
sensitive:
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "このメディアが「閲覧注意」(NSFW)かどうか"
|
||||
en: "Whether this media is NSFW"
|
||||
|
@@ -33,6 +33,7 @@ export type IMetadata = {
|
||||
url?: string;
|
||||
deletedAt?: Date;
|
||||
isMetaOnly?: boolean;
|
||||
isSensitive?: boolean;
|
||||
};
|
||||
|
||||
export type IDriveFile = {
|
||||
|
@@ -16,7 +16,7 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
||||
return null;
|
||||
}
|
||||
|
||||
const image = await new Resolver().resolve(value);
|
||||
const image = await new Resolver().resolve(value) as any;
|
||||
|
||||
if (image.url == null) {
|
||||
throw new Error('invalid image: url not privided');
|
||||
@@ -24,7 +24,7 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
||||
|
||||
log(`Creating the Image: ${image.url}`);
|
||||
|
||||
return await uploadFromUrl(image.url, actor, null, image.url);
|
||||
return await uploadFromUrl(image.url, actor, null, image.url, image.sensitive);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import config from '../../../config';
|
||||
import { IDriveFile } from '../../../models/drive-file';
|
||||
|
||||
export default (fileId: IDriveFile['_id']) => ({
|
||||
export default (file: IDriveFile) => ({
|
||||
type: 'Image',
|
||||
url: `${config.drive_url}/${fileId}`
|
||||
url: `${config.drive_url}/${file._id}`,
|
||||
sensitive: file.metadata.isSensitive
|
||||
});
|
||||
|
@@ -4,10 +4,16 @@ import config from '../../../config';
|
||||
import { ILocalUser } from '../../../models/user';
|
||||
import toHtml from '../../../mfm/html';
|
||||
import parse from '../../../mfm/parse';
|
||||
import DriveFile from '../../../models/drive-file';
|
||||
|
||||
export default (user: ILocalUser) => {
|
||||
export default async (user: ILocalUser) => {
|
||||
const id = `${config.url}/users/${user._id}`;
|
||||
|
||||
const [avatar, banner] = await Promise.all([
|
||||
DriveFile.findOne({ _id: user.avatarId }),
|
||||
DriveFile.findOne({ _id: user.bannerId })
|
||||
]);
|
||||
|
||||
return {
|
||||
type: user.isBot ? 'Service' : 'Person',
|
||||
id,
|
||||
@@ -18,8 +24,8 @@ export default (user: ILocalUser) => {
|
||||
preferredUsername: user.username,
|
||||
name: user.name,
|
||||
summary: toHtml(parse(user.description)),
|
||||
icon: user.avatarId && renderImage(user.avatarId),
|
||||
image: user.bannerId && renderImage(user.bannerId),
|
||||
icon: user.avatarId && renderImage(avatar),
|
||||
image: user.bannerId && renderImage(banner),
|
||||
manuallyApprovesFollowers: user.isLocked,
|
||||
publicKey: renderKey(user)
|
||||
};
|
||||
|
@@ -111,13 +111,13 @@ router.get('/users/:user/publickey', async ctx => {
|
||||
});
|
||||
|
||||
// user
|
||||
function userInfo(ctx: Router.IRouterContext, user: IUser) {
|
||||
async function userInfo(ctx: Router.IRouterContext, user: IUser) {
|
||||
if (user === null) {
|
||||
ctx.status = 404;
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.body = pack(renderPerson(user as ILocalUser));
|
||||
ctx.body = pack(await renderPerson(user as ILocalUser));
|
||||
}
|
||||
|
||||
router.get('/users/:user', async ctx => {
|
||||
@@ -128,7 +128,7 @@ router.get('/users/:user', async ctx => {
|
||||
host: null
|
||||
});
|
||||
|
||||
userInfo(ctx, user);
|
||||
await userInfo(ctx, user);
|
||||
});
|
||||
|
||||
router.get('/@:user', async (ctx, next) => {
|
||||
@@ -139,7 +139,7 @@ router.get('/@:user', async (ctx, next) => {
|
||||
host: null
|
||||
});
|
||||
|
||||
userInfo(ctx, user);
|
||||
await userInfo(ctx, user);
|
||||
});
|
||||
//#endregion
|
||||
|
||||
|
@@ -29,6 +29,14 @@ export const meta = {
|
||||
desc: {
|
||||
ja: 'フォルダID'
|
||||
}
|
||||
}),
|
||||
|
||||
isSensitive: $.bool.optional.note({
|
||||
default: false,
|
||||
desc: {
|
||||
ja: 'このメディアが「閲覧注意」(NSFW)かどうか',
|
||||
en: 'Whether this media is NSFW'
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
@@ -68,7 +76,7 @@ export default async (file: any, params: any, user: ILocalUser): Promise<any> =>
|
||||
|
||||
try {
|
||||
// Create file
|
||||
const driveFile = await create(user, file.path, name, null, ps.folderId);
|
||||
const driveFile = await create(user, file.path, name, null, ps.folderId, false, false, null, null, ps.isSensitive);
|
||||
|
||||
cleanup();
|
||||
|
||||
|
@@ -3,6 +3,7 @@ import DriveFolder from '../../../../../models/drive-folder';
|
||||
import DriveFile, { validateFileName, pack } from '../../../../../models/drive-file';
|
||||
import { publishDriveStream } from '../../../../../stream';
|
||||
import { ILocalUser } from '../../../../../models/user';
|
||||
import getParams from '../../../get-params';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
@@ -12,18 +13,48 @@ export const meta = {
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-write'
|
||||
kind: 'drive-write',
|
||||
|
||||
params: {
|
||||
fileId: $.type(ID).note({
|
||||
desc: {
|
||||
ja: '対象のファイルID'
|
||||
}
|
||||
}),
|
||||
|
||||
folderId: $.type(ID).optional.nullable.note({
|
||||
default: undefined,
|
||||
desc: {
|
||||
ja: 'フォルダID'
|
||||
}
|
||||
}),
|
||||
|
||||
name: $.str.optional.pipe(validateFileName).note({
|
||||
default: undefined,
|
||||
desc: {
|
||||
ja: 'ファイル名',
|
||||
en: 'Name of the file'
|
||||
}
|
||||
}),
|
||||
|
||||
isSensitive: $.bool.optional.note({
|
||||
default: undefined,
|
||||
desc: {
|
||||
ja: 'このメディアが「閲覧注意」(NSFW)かどうか',
|
||||
en: 'Whether this media is NSFW'
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
// Get 'fileId' parameter
|
||||
const [fileId, fileIdErr] = $.type(ID).get(params.fileId);
|
||||
if (fileIdErr) return rej('invalid fileId param');
|
||||
const [ps, psErr] = getParams(meta, params);
|
||||
if (psErr) return rej(psErr);
|
||||
|
||||
// Fetch file
|
||||
const file = await DriveFile
|
||||
.findOne({
|
||||
_id: fileId,
|
||||
_id: ps.fileId,
|
||||
'metadata.userId': user._id
|
||||
});
|
||||
|
||||
@@ -31,23 +62,18 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
||||
return rej('file-not-found');
|
||||
}
|
||||
|
||||
// Get 'name' parameter
|
||||
const [name, nameErr] = $.str.optional.pipe(validateFileName).get(params.name);
|
||||
if (nameErr) return rej('invalid name param');
|
||||
if (name) file.filename = name;
|
||||
if (ps.name) file.filename = ps.name;
|
||||
|
||||
// Get 'folderId' parameter
|
||||
const [folderId, folderIdErr] = $.type(ID).optional.nullable.get(params.folderId);
|
||||
if (folderIdErr) return rej('invalid folderId param');
|
||||
if (ps.isSensitive) file.metadata.isSensitive = ps.isSensitive;
|
||||
|
||||
if (folderId !== undefined) {
|
||||
if (folderId === null) {
|
||||
if (ps.folderId !== undefined) {
|
||||
if (ps.folderId === null) {
|
||||
file.metadata.folderId = null;
|
||||
} else {
|
||||
// Fetch folder
|
||||
const folder = await DriveFolder
|
||||
.findOne({
|
||||
_id: folderId,
|
||||
_id: ps.folderId,
|
||||
userId: user._id
|
||||
});
|
||||
|
||||
@@ -62,7 +88,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
||||
await DriveFile.update(file._id, {
|
||||
$set: {
|
||||
filename: file.filename,
|
||||
'metadata.folderId': file.metadata.folderId
|
||||
'metadata.folderId': file.metadata.folderId,
|
||||
'metadata.isSensitive': file.metadata.isSensitive
|
||||
}
|
||||
});
|
||||
|
||||
|
@@ -21,12 +21,36 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
||||
let users = await User
|
||||
.find({
|
||||
host: null,
|
||||
usernameLower: new RegExp(escapeRegexp(query.toLowerCase()))
|
||||
usernameLower: new RegExp('^' + escapeRegexp(query.toLowerCase()))
|
||||
}, {
|
||||
limit: limit,
|
||||
skip: offset
|
||||
});
|
||||
|
||||
if (users.length < limit) {
|
||||
const remoteUsers = await User
|
||||
.find({
|
||||
host: { $ne: null },
|
||||
usernameLower: new RegExp('^' + escapeRegexp(query.toLowerCase()))
|
||||
}, {
|
||||
limit: limit - users.length
|
||||
});
|
||||
|
||||
users = users.concat(remoteUsers);
|
||||
}
|
||||
|
||||
if (users.length < limit) {
|
||||
const remoteUsers = await User
|
||||
.find({
|
||||
host: null,
|
||||
usernameLower: new RegExp(escapeRegexp(query.toLowerCase()))
|
||||
}, {
|
||||
limit: limit - users.length
|
||||
});
|
||||
|
||||
users = users.concat(remoteUsers);
|
||||
}
|
||||
|
||||
if (users.length < limit) {
|
||||
const remoteUsers = await User
|
||||
.find({
|
||||
|
@@ -83,7 +83,8 @@ export default async function(
|
||||
force: boolean = false,
|
||||
metaOnly: boolean = false,
|
||||
url: string = null,
|
||||
uri: string = null
|
||||
uri: string = null,
|
||||
sensitive = false
|
||||
): Promise<IDriveFile> {
|
||||
// Calc md5 hash
|
||||
const calcHash = new Promise<string>((res, rej) => {
|
||||
@@ -258,7 +259,8 @@ export default async function(
|
||||
folderId: folder !== null ? folder._id : null,
|
||||
comment: comment,
|
||||
properties: properties,
|
||||
isMetaOnly: metaOnly
|
||||
isMetaOnly: metaOnly,
|
||||
isSensitive: sensitive
|
||||
} as IMetadata;
|
||||
|
||||
if (url !== null) {
|
||||
|
@@ -13,7 +13,7 @@ import * as mongodb from 'mongodb';
|
||||
|
||||
const log = debug('misskey:drive:upload-from-url');
|
||||
|
||||
export default async (url: string, user: IUser, folderId: mongodb.ObjectID = null, uri: string = null): Promise<IDriveFile> => {
|
||||
export default async (url: string, user: IUser, folderId: mongodb.ObjectID = null, uri: string = null, sensitive = false): Promise<IDriveFile> => {
|
||||
log(`REQUESTED: ${url}`);
|
||||
|
||||
let name = URL.parse(url).pathname.split('/').pop();
|
||||
@@ -48,7 +48,7 @@ export default async (url: string, user: IUser, folderId: mongodb.ObjectID = nul
|
||||
let error;
|
||||
|
||||
try {
|
||||
driveFile = await create(user, path, name, null, folderId, false, config.preventCacheRemoteFiles, url, uri);
|
||||
driveFile = await create(user, path, name, null, folderId, false, config.preventCacheRemoteFiles, url, uri, sensitive);
|
||||
log(`got: ${driveFile._id}`);
|
||||
} catch (e) {
|
||||
error = e;
|
||||
|
Reference in New Issue
Block a user