1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-05 13:44:52 +02:00

Compare commits

...

62 Commits

Author SHA1 Message Date
syuilo
06539db1a0 4.26.0 2018-07-20 05:30:59 +09:00
syuilo
de10890bd8 Merge pull request #1930 from syuilo/l10n_master
New Crowdin translations
2018-07-20 05:30:41 +09:00
syuilo
8dc5375d55 最近使ったハッシュタグを表示するようにするなど 2018-07-20 05:29:56 +09:00
syuilo
1d23076191 New translations ja.yml (English) 2018-07-20 05:02:48 +09:00
syuilo
cbdc061891 Merge branch 'master' of https://github.com/syuilo/misskey 2018-07-20 04:59:12 +09:00
syuilo
9536d76b61 Improve 賢さ 2018-07-20 04:59:04 +09:00
syuilo
7a030901c8 Update README.md 2018-07-20 03:51:50 +09:00
syuilo
bcc02047ca New translations ja.yml (Catalan) 2018-07-20 03:01:45 +09:00
syuilo
c61616388e New translations ja.yml (Portuguese) 2018-07-20 03:01:43 +09:00
syuilo
499486f559 New translations ja.yml (Korean) 2018-07-20 03:01:40 +09:00
syuilo
179d231fd8 New translations ja.yml (Polish) 2018-07-20 03:01:38 +09:00
syuilo
2e4a391eda New translations ja.yml (Chinese Simplified) 2018-07-20 03:01:36 +09:00
syuilo
3d214fee4b New translations ja.yml (Italian) 2018-07-20 03:01:34 +09:00
syuilo
509a4c7955 New translations ja.yml (Russian) 2018-07-20 03:01:32 +09:00
syuilo
c754046eaf New translations ja.yml (English) 2018-07-20 03:01:30 +09:00
syuilo
92571d9133 New translations ja.yml (Spanish) 2018-07-20 03:01:28 +09:00
syuilo
add425abdb New translations ja.yml (German) 2018-07-20 03:01:26 +09:00
syuilo
1890d9e2ee New translations ja.yml (French) 2018-07-20 03:01:23 +09:00
syuilo
83f2926f0c 4.25.0 2018-07-20 02:55:27 +09:00
syuilo
738ced81ec 動画もNSFW 2018-07-20 02:53:32 +09:00
syuilo
b22c1ae520 New translations ja.yml (English) 2018-07-20 02:53:19 +09:00
syuilo
e2e7489b1f New translations ja.yml (Catalan) 2018-07-20 02:42:02 +09:00
syuilo
6ae7b8303d New translations ja.yml (Portuguese) 2018-07-20 02:42:00 +09:00
syuilo
55f40af51c New translations ja.yml (Korean) 2018-07-20 02:41:58 +09:00
syuilo
7a784cea3b New translations ja.yml (Polish) 2018-07-20 02:41:56 +09:00
syuilo
f86cccec0c New translations ja.yml (Chinese Simplified) 2018-07-20 02:41:54 +09:00
syuilo
9d90a28d76 New translations ja.yml (Italian) 2018-07-20 02:41:52 +09:00
syuilo
1724cf7c17 New translations ja.yml (Russian) 2018-07-20 02:41:50 +09:00
syuilo
d64d92ccf5 New translations ja.yml (English) 2018-07-20 02:41:48 +09:00
syuilo
f64ced8677 New translations ja.yml (Spanish) 2018-07-20 02:41:46 +09:00
syuilo
db1c0468aa New translations ja.yml (German) 2018-07-20 02:41:44 +09:00
syuilo
77c5d3276a New translations ja.yml (French) 2018-07-20 02:41:41 +09:00
syuilo
ec2b1ec3f0 #1334 2018-07-20 02:40:37 +09:00
syuilo
85bf76dd98 4.24.1 2018-07-19 22:49:12 +09:00
syuilo
bfa326af2c WIP: Support sharedInbox 2018-07-19 22:40:44 +09:00
syuilo
534c47935a chore: Update backers 2018-07-19 22:15:54 +09:00
syuilo
31a6f2b421 Clean up 2018-07-19 22:02:30 +09:00
Aya Morisawa
66c106722c Hide settings button
It is unimplemented
2018-07-19 16:40:40 +09:00
Aya Morisawa
9d0204f2fa Hide detail button
It is unimplemented
2018-07-19 16:21:22 +09:00
syuilo
fceb0e2158 4.24.0 2018-07-19 11:55:11 +09:00
syuilo
14e7caaa5d Merge pull request #1926 from syuilo/greenkeeper/emojilib-2.3.0
Update emojilib to the latest version 🚀
2018-07-19 11:49:29 +09:00
syuilo
744e009690 #1927 2018-07-19 11:47:18 +09:00
syuilo
713dcd9083 #1921 2018-07-19 11:45:55 +09:00
Aya Morisawa
e03ec67b5c Show error message if searching is not available 2018-07-19 08:24:03 +09:00
Aya Morisawa
7e27e2757f Hide delete button
It is unimplemented
2018-07-19 07:48:42 +09:00
Aya Morisawa
f05c5ff617 Update gulpfile.ts 2018-07-19 06:53:46 +09:00
greenkeeper[bot]
1afb26f04a fix(package): update emojilib to version 2.3.0 2018-07-18 21:07:40 +00:00
syuilo
7873905cde 🎨 2018-07-19 04:50:46 +09:00
syuilo
41a9100477 Merge pull request #1925 from syuilo/greenkeeper/swagger-jsdoc-1.10.2
fix(package): update swagger-jsdoc to version 1.10.2
2018-07-19 04:19:34 +09:00
syuilo
b8cc1eb993 Merge pull request #1922 from syuilo/greenkeeper/webpack-cli-3.1.0
Update webpack-cli to the latest version 🚀
2018-07-19 04:19:14 +09:00
greenkeeper[bot]
adbbfd9dc2 fix(package): update swagger-jsdoc to version 1.10.2
Closes #1924
2018-07-18 18:38:00 +00:00
syuilo
84da99d56c 🎨 2018-07-19 03:25:37 +09:00
syuilo
aaf8f09cfd Merge pull request #1923 from acid-chicken/master
Animate calender meters
2018-07-19 00:16:33 +09:00
Acid Chicken (硫酸鶏)
6da464fd1b Update calendar.vue 2018-07-19 00:13:58 +09:00
syuilo
efaa41ba49 reCAPTCHAをオプションに 2018-07-19 00:04:09 +09:00
greenkeeper[bot]
67e8e1d819 fix(package): update webpack-cli to version 3.1.0 2018-07-18 15:01:30 +00:00
Aya Morisawa
532f8f8e4c Fix indent 2018-07-18 19:36:36 +09:00
Aya Morisawa
0109e8e57c Add white spaces 2018-07-18 19:24:31 +09:00
Aya Morisawa
6e720b2798 Hide drive search form
It is unimplemented
2018-07-18 19:13:41 +09:00
Aya Morisawa
d3f2a97dd4 English for ISSUE_TEMPLATE
Close #1796
2018-07-18 17:41:28 +09:00
syuilo
9f7b04b0ec Merge pull request #1920 from syuilo/greenkeeper/vue-loader-15.2.6
Update vue-loader to the latest version 🚀
2018-07-18 14:28:54 +09:00
greenkeeper[bot]
c4118c78b7 fix(package): update vue-loader to version 15.2.6 2018-07-18 03:41:17 +00:00
57 changed files with 794 additions and 18533 deletions

View File

@@ -41,10 +41,6 @@ redis:
port: 6379
pass: example-pass
recaptcha:
site_key: example-site-key
secret_key: example-secret-key
# If enabled:
# Server will not cache remote files (Using direct link instead).
# You can save your storage.
@@ -67,6 +63,11 @@ preventCache: false
# port: 9200
# pass: null
# reCAPTCHA
# recaptcha:
# site_key: example-site-key
# secret_key: example-secret-key
# ServiceWorker
# sw:
# # Public key of VAPID

View File

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

1
.npmrc
View File

@@ -1 +1,2 @@
save-exact=true
package-lock = false

View File

@@ -7,7 +7,7 @@
[![][dependencies-badge]][dependencies-link]
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Greenkeeper badge](https://badges.greenkeeper.io/syuilo/misskey.svg)](https://greenkeeper.io/)
> Lead Maintainer: [syuilo][syuilo-link]
**Microblogging. Redefined.**
**[Misskey](https://misskey.xyz)** is a completely open source,
ultimately sophisticated professional microblogging software.
@@ -44,9 +44,9 @@ If you want to...
:heart: Backers & Sponsors
----------------------------------------------------------------
| ![][nagarus-icon] | ![][dansup-icon] |
|:-:|:-:|
| [nagarus][nagarus-link] | [dansup][dansup-link] |
| <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/619786/32cf01444db24e578cd1982c197f6fc6/1?token-time=2145916800&token-hash=tB1e_r8RlZ5sFL0KV_e8dugapxatNBRK1Z3h67TO1g8%3D"> | <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/12378075/0156f769e20f412594fa6b87d85fe228/1?token-time=2145916800&token-hash=IsIJRUXszzoD6-7pDnRY8I05T9nSznc4GTaxj7C9SwU%3D"> | <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/4503830/ccf2cc867ea64de0b524bb2e24b9a1cb/1?token-time=2145916800&token-hash=S1zP0QyLU52Dqq6dtc9qNYyWfW86XrYHiR4NMbeOrnA%3D"> |
|:-:|:-:|:-:|
| [Gargron](https://www.patreon.com/mastodon) | [39ff](https://www.patreon.com/user/creators?u=12378075) | [dansup](https://www.patreon.com/dansup) |
:four_leaf_clover: Copyright
----------------------------------------------------------------
@@ -73,9 +73,3 @@ Misskey is an open-source software licensed under the [GNU AGPLv3](LICENSE).
[syuilo-link]: https://syuilo.com
[syuilo-icon]: https://avatars2.githubusercontent.com/u/4439005?v=3&s=70
[nagarus-link]: https://www.patreon.com/user/creators?u=11601413
[nagarus-icon]: https://c10.patreonusercontent.com/3/eyJ2IjoiMSIsInciOjIwMH0%3D/patreon-media/user/11601413/20cb15f209924302b399b99d3c98b850?token-time=2145916800&token-hash=IO31nK6VZCMWBWU2VAk2c824BX2QZ4DNPKyHHZXS0iw%3D
[dansup-link]: https://www.patreon.com/dansup
[dansup-icon]: https://c10.patreonusercontent.com/3/eyJ2IjoiMSIsInciOjIwMH0%3D/patreon-media/user/4503830/ccf2cc867ea64de0b524bb2e24b9a1cb?token-time=2145916800&token-hash=opXAM_pnhUTuN1jCA6p_Nn_YsaqohY465YFjWFqMEEE%3D

View File

@@ -48,9 +48,9 @@ In root :
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` Checkout to the [latest release](https://github.com/syuilo/misskey/releases/latest)
5. `npm install` Install misskey dependencies.
*5.* reCAPTCHA tokens
*(optional)* reCAPTCHA tokens
----------------------------------------------------------------
Misskey requires reCAPTCHA tokens.
If you want to enable reCAPTCHA, you need to generate reCAPTCHA tokens:
Please visit https://www.google.com/recaptcha/intro/ and generate keys.
*(optional)* Generating VAPID keys
@@ -63,13 +63,12 @@ npm install web-push -g
web-push generate-vapid-keys
```
*6.* Make configuration file
*5.* Make configuration file
----------------------------------------------------------------
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
2. Edit `default.yml`
*7.* Build Misskey
*6.* Build Misskey
----------------------------------------------------------------
Build misskey with the following:
@@ -85,7 +84,7 @@ If you're still encountering errors about some modules, use node-gyp:
3. `node-gyp build`
4. `npm run build`
*8.* That is it.
*7.* That is it.
----------------------------------------------------------------
Well done! Now, you have an environment that run to Misskey.

View File

@@ -47,10 +47,10 @@ adduser --disabled-password --disabled-login misskey
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
5. `npm install` Misskeyの依存パッケージをインストール
*5.* reCAPTCHAトークン
*(オプション)* reCAPTCHAトークン
----------------------------------------------------------------
MisskeyはreCAPTCHAトークンを必要とします。
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを生成してください。
reCAPTCHAを有効にする場合、reCAPTCHAトークンを取得する必要があります。
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを取得してください。
*(オプション)* VAPIDキーペアの生成
----------------------------------------------------------------
@@ -61,12 +61,12 @@ npm install web-push -g
web-push generate-vapid-keys
```
*6.* Make configuration file
*5.* 設定ファイルを作成する
----------------------------------------------------------------
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする。
2. `default.yml` を編集する。
*7.* Misskeyのビルド
*6.* Misskeyのビルド
----------------------------------------------------------------
次のコマンドでMisskeyをビルドしてください:
@@ -81,8 +81,7 @@ Debianをお使いであれば、`build-essential`パッケージをインスト
3. `node-gyp build`
4. `npm run build`
*6.* 以上です!
*7.* 以上です!
----------------------------------------------------------------
お疲れ様でした。これでMisskeyを動かす準備は整いました。

View File

@@ -23,7 +23,6 @@ const uglifyes = require('uglify-es');
const locales = require('./locales');
import { fa } from './src/misc/fa';
const client = require('./built/client/meta.json');
import config from './src/config';
const uglify = uglifyComposer(uglifyes, console);
@@ -46,8 +45,6 @@ gulp.task('build', [
'doc'
]);
gulp.task('rebuild', ['clean', 'build']);
gulp.task('build:ts', () => {
const tsProject = ts.createProject('./tsconfig.json');
@@ -84,12 +81,12 @@ gulp.task('lint', () =>
);
gulp.task('format', () =>
gulp.src('./src/**/*.ts')
.pipe(tslint({
formatter: 'verbose',
fix: true
}))
.pipe(tslint.report())
gulp.src('./src/**/*.ts')
.pipe(tslint({
formatter: 'verbose',
fix: true
}))
.pipe(tslint.report())
);
gulp.task('mocha', () =>
@@ -117,8 +114,9 @@ gulp.task('build:client', [
'copy:client'
]);
gulp.task('build:client:script', () =>
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
gulp.task('build:client:script', () => {
const client = require('./built/client/meta.json');
return gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
.pipe(replace('VERSION', JSON.stringify(client.version)))
.pipe(replace('API', JSON.stringify(config.api_url)))
.pipe(replace('ENV', JSON.stringify(env)))
@@ -126,8 +124,8 @@ gulp.task('build:client:script', () =>
.pipe(isProduction ? uglify({
toplevel: true
} as any) : gutil.noop())
.pipe(gulp.dest('./built/client/assets/')) as any
);
.pipe(gulp.dest('./built/client/assets/'));
});
gulp.task('build:client:styles', () =>
gulp.src('./src/client/app/init.css')

View File

@@ -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: "フォロー"

View File

@@ -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: "フォロー"

View File

@@ -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"

View File

@@ -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: "フォロー"

View File

@@ -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"

View File

@@ -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: "フォロー"

View File

@@ -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: "フォロー"

View File

@@ -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: "フォロー"

View File

@@ -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ź"

View File

@@ -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: "フォロー"

View File

@@ -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: "フォロー"

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +1,18 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "4.23.1",
"clientVersion": "1.0.7371",
"version": "4.26.0",
"clientVersion": "1.0.7435",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
"scripts": {
"start": "node ./built",
"debug": "DEBUG=misskey:* node ./built",
"swagger": "node ./swagger.js",
"build": "webpack && gulp build",
"webpack": "webpack",
"watch": "webpack --watch",
"gulp": "gulp build",
"rebuild": "gulp rebuild",
"clean": "gulp clean",
"cleanall": "gulp cleanall",
"lint": "gulp lint",
@@ -100,7 +98,7 @@
"dompurify": "1.0.5",
"elasticsearch": "15.1.1",
"element-ui": "2.4.4",
"emojilib": "2.2.12",
"emojilib": "2.3.0",
"escape-regexp": "0.0.1",
"eslint": "5.0.1",
"eslint-plugin-vue": "4.7.0",
@@ -128,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",
@@ -188,7 +187,7 @@
"stylus": "0.54.5",
"stylus-loader": "3.0.2",
"summaly": "2.0.6",
"swagger-jsdoc": "1.9.7",
"swagger-jsdoc": "1.10.2",
"syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0",
"tmp": "0.0.33",
@@ -205,8 +204,9 @@
"vue-cropperjs": "2.2.1",
"vue-js-modal": "1.3.16",
"vue-json-tree-view": "2.1.4",
"vue-loader": "15.2.5",
"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",
@@ -214,7 +214,7 @@
"web-push": "3.3.2",
"webfinger.js": "2.6.6",
"webpack": "4.16.1",
"webpack-cli": "3.0.8",
"webpack-cli": "3.1.0",
"websocket": "1.0.26",
"ws": "5.2.2",
"xev": "2.0.1"

View File

@@ -259,6 +259,7 @@ export default Vue.extend({
root(isDark)
position fixed
z-index 65535
max-width 100%
margin-top calc(1em + 8px)
overflow hidden
background isDark ? #313543 : #fff
@@ -276,7 +277,8 @@ root(isDark)
list-style none
> li
display block
display flex
align-items center
padding 4px 12px
white-space nowrap
overflow hidden
@@ -287,6 +289,10 @@ root(isDark)
&, *
user-select none
*
overflow hidden
text-overflow ellipsis
&:hover
background isDark ? rgba(#fff, 0.1) : rgba(#000, 0.1)
@@ -305,7 +311,6 @@ root(isDark)
> .users > li
.avatar
vertical-align middle
min-width 28px
min-height 28px
max-width 28px
@@ -314,19 +319,15 @@ root(isDark)
border-radius 100%
.name
vertical-align middle
margin 0 8px 0 0
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
.username
vertical-align middle
color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
> .hashtags > li
.name
vertical-align middle
margin 0 8px 0 0
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)

View File

@@ -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

View File

@@ -4,9 +4,9 @@
<div class="content">
<div class="balloon" :data-no-text="message.text == null">
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
<button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
<!-- <button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
</button>
</button> -->
<div class="content" v-if="!message.isDeleted">
<misskey-flavored-markdown class="text" v-if="message.text" ref="text" :text="message.text" :i="$store.state.i"/>
<div class="file" v-if="message.file">

View File

@@ -29,11 +29,7 @@
<p slot="text" v-if="passwordRetypeState == 'not-match'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@password-not-matched%</p>
</div>
</ui-input>
<div class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
<label class="agree-tou" style="display: block; margin: 16px 0;">
<input name="agree-tou" type="checkbox" required/>
<p><a :href="touUrl" target="_blank">利用規約</a>に同意する</p>
</label>
<div v-if="recaptchaSitekey != null" class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
<ui-button type="submit">%i18n:@create%</ui-button>
</form>
</template>
@@ -41,7 +37,7 @@
<script lang="ts">
import Vue from 'vue';
const getPasswordStrength = require('syuilo-password-strength');
import { host, url, docsUrl, lang, recaptchaSitekey } from '../../../config';
import { host, url, recaptchaSitekey } from '../../../config';
export default Vue.extend({
data() {
@@ -51,7 +47,6 @@ export default Vue.extend({
password: '',
retypedPassword: '',
url,
touUrl: `${docsUrl}/${lang}/tou`,
recaptchaSitekey,
usernameState: null,
passwordStrength: '',
@@ -115,7 +110,7 @@ export default Vue.extend({
(this as any).api('signup', {
username: this.username,
password: this.password,
'g-recaptcha-response': (window as any).grecaptcha.getResponse()
'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
}).then(() => {
(this as any).api('signin', {
username: this.username,
@@ -126,15 +121,19 @@ export default Vue.extend({
}).catch(() => {
alert('%i18n:@some-error%');
(window as any).grecaptcha.reset();
if (recaptchaSitekey != null) {
(window as any).grecaptcha.reset();
}
});
}
},
mounted() {
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
head.appendChild(script);
if (recaptchaSitekey != null) {
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
head.appendChild(script);
}
}
});
</script>
@@ -144,22 +143,4 @@ export default Vue.extend({
.mk-signup
min-width 302px
.agree-tou
padding 4px
border-radius 4px
&:hover
background #f4f4f4
&:active
background #eee
&, *
cursor pointer
p
display inline
color #555
</style>

View File

@@ -175,6 +175,7 @@ root(isDark)
> .val
height 4px
background $theme-color
transition width .3s cubic-bezier(0.23, 1, 0.32, 1)
&:nth-child(1)
> .meter > .val

View File

@@ -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({

View File

@@ -10,7 +10,10 @@
<span class="separator" v-if="folder != null">%fa:angle-right%</span>
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
</div>
<input class="search" type="search" placeholder="&#xf002; %i18n:@search%"/>
<!--
TODO: #343
<input class="search" type="search" placeholder="&#xf002; %i18n:@search%"/>
-->
</nav>
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
ref="main"

View File

@@ -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>

View File

@@ -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>

View File

@@ -56,10 +56,10 @@
<button @click="menu" ref="menuButton">
%fa:ellipsis-h%
</button>
<button title="%i18n:@detail">
<!-- <button title="%i18n:@detail">
<template v-if="!isDetailOpened">%fa:caret-down%</template>
<template v-if="isDetailOpened">%fa:caret-up%</template>
</button>
</button> -->
</footer>
</div>
</article>

View File

@@ -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

View File

@@ -6,6 +6,7 @@
<div :class="$style.loading" v-if="fetching">
<mk-ellipsis-icon/>
</div>
<p :class="$style.notAvailable" v-if="!fetching && notAvailable">検索機能を利用することができません</p>
<p :class="$style.empty" v-if="!fetching && empty">%fa:search%{{ q }}に関する投稿は見つかりませんでした</p>
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
</mk-ui>
@@ -24,7 +25,8 @@ export default Vue.extend({
moreFetching: false,
existMore: false,
offset: 0,
empty: false
empty: false,
notAvailable: false
};
},
watch: {
@@ -71,7 +73,11 @@ export default Vue.extend({
res(notes);
this.fetching = false;
Progress.done();
}, rej);
}, (e: string) => {
this.fetching = false;
Progress.done();
if (e === 'searching not available') this.notAvailable = true;
});
}));
},
more() {
@@ -130,4 +136,18 @@ export default Vue.extend({
font-size 3em
color #ccc
.notAvailable
display block
margin 0 auto
padding 32px
max-width 400px
text-align center
color #999
> [data-fa]
display block
margin-bottom 16px
font-size 3em
color #ccc
</style>

View File

@@ -2,7 +2,7 @@
<div class="mkw-notifications">
<mk-widget-container :show-header="!props.compact">
<template slot="header">%fa:R bell%%i18n:@title%</template>
<button slot="func" title="%i18n:@settings%" @click="settings">%fa:cog%</button>
<!-- <button slot="func" title="%i18n:@settings%" @click="settings">%fa:cog%</button> -->
<mk-notifications :class="$style.notifications"/>
</mk-widget-container>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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)

View File

@@ -40,7 +40,7 @@ export type Source = {
port: number;
pass: string;
};
recaptcha: {
recaptcha?: {
site_key: string;
secret_key: string;
};

View File

@@ -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"

View File

@@ -33,6 +33,7 @@ export type IMetadata = {
url?: string;
deletedAt?: Date;
isMetaOnly?: boolean;
isSensitive?: boolean;
};
export type IDriveFile = {

View File

@@ -108,6 +108,7 @@ export interface ILocalUser extends IUserBase {
export interface IRemoteUser extends IUserBase {
inbox: string;
sharedInbox?: string;
endpoints: string[];
uri: string;
url?: string;

View File

@@ -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);
}
/**

View File

@@ -117,6 +117,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
publicKeyPem: person.publicKey.publicKeyPem
},
inbox: person.inbox,
sharedInbox: person.sharedInbox,
endpoints: person.endpoints,
uri: person.id,
url: person.url,
@@ -239,6 +240,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver)
await User.update({ _id: exist._id }, {
$set: {
updatedAt: new Date(),
inbox: person.inbox,
sharedInbox: person.sharedInbox,
avatarId: avatar ? avatar._id : null,
bannerId: banner ? banner._id : null,
avatarUrl: avatar && avatar.metadata.isMetaOnly ? avatar.metadata.url : null,

View File

@@ -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
});

View File

@@ -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)
};

View File

@@ -47,6 +47,7 @@ export interface IPerson extends IObject {
preferredUsername: string;
manuallyApprovesFollowers: boolean;
inbox: string;
sharedInbox?: string;
publicKey: any;
followers: any;
following: any;

View File

@@ -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

View File

@@ -1,3 +1,4 @@
import { performance } from 'perf_hooks';
import limitter from './limitter';
import { IUser } from '../../models/user';
import { IApp } from '../../models/app';
@@ -45,7 +46,13 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
// API invoking
try {
const a = performance.now();
res = await exec(data, user, app);
const b = performance.now();
if (b - a > 500) {
console.warn(`SLOW API CALL DETECTED: ${ep.name}`);
}
} catch (e) {
rej(e);
return;

View File

@@ -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();

View File

@@ -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
}
});

View File

@@ -18,6 +18,8 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
const [limit = 10, limitErr] = $.num.optional.range(1, 30).get(params.limit);
if (limitErr) return rej('invalid limit param');
if (es == null) return rej('searching not available');
es.search({
index: 'misskey',
type: 'note',
@@ -53,10 +55,10 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
$in: hits
}
}, {
sort: {
_id: -1
}
});
sort: {
_id: -1
}
});
res(await Promise.all(notes.map(note => pack(note, me))));
});

View File

@@ -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({

View File

@@ -7,14 +7,16 @@ import generateUserToken from '../common/generate-native-user-token';
import config from '../../../config';
import Meta from '../../../models/meta';
recaptcha.init({
secret_key: config.recaptcha.secret_key
});
if (config.recaptcha) {
recaptcha.init({
secret_key: config.recaptcha.secret_key
});
}
export default async (ctx: Koa.Context) => {
// Verify recaptcha
// ただしテスト時はこの機構は障害となるため無効にする
if (process.env.NODE_ENV !== 'test') {
if (process.env.NODE_ENV !== 'test' && config.recaptcha != null) {
const success = await recaptcha(ctx.request.body['g-recaptcha-response']);
if (!success) {

View File

@@ -113,7 +113,7 @@ const parsePropDefinition = (key: string, prop: any) => {
return prop;
};
const sortParams = (params: Array<{name: string}>) => {
const sortParams = (params: Array<{ name: string }>) => {
return params;
};
@@ -184,7 +184,7 @@ router.get('/*/api/endpoints/*', async ctx => {
paramDefs: ep.meta.params ? extractParamDefRef(Object.entries(ep.meta.params).map(([k, v]) => v)) : null,
res: ep.meta.res,
resProps: ep.meta.res && ep.meta.res.props ? sortParams(Object.entries(ep.meta.res.props).map(([k, v]) => parsePropDefinition(k, v))) : null,
resDefs: null,//extractPropDefRef(Object.entries(ep.res.props).map(([k, v]) => parsePropDefinition(k, v)))
resDefs: null, //extractPropDefRef(Object.entries(ep.res.props).map(([k, v]) => parsePropDefinition(k, v)))
src: `https://github.com/syuilo/misskey/tree/master/src/server/api/endpoints/${name}.ts`
};

View File

@@ -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) {

View File

@@ -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;

View File

@@ -72,7 +72,7 @@ const output = {
//#region Define consts
const consts = {
_RECAPTCHA_SITEKEY_: config.recaptcha.site_key,
_RECAPTCHA_SITEKEY_: config.recaptcha ? config.recaptcha.site_key : null,
_SW_PUBLICKEY_: config.sw ? config.sw.public_key : null,
_THEME_COLOR_: constants.themeColor,
_COPYRIGHT_: constants.copyright,