mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-08-01 12:56:03 +00:00
Compare commits
74 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 | |||
| 85bf76dd98 | |||
| bfa326af2c | |||
| 534c47935a | |||
| 31a6f2b421 | |||
| 66c106722c | |||
| 9d0204f2fa | |||
| fceb0e2158 | |||
| 14e7caaa5d | |||
| 744e009690 | |||
| 713dcd9083 | |||
| e03ec67b5c | |||
| 7e27e2757f | |||
| f05c5ff617 | |||
| 1afb26f04a | |||
| 7873905cde | |||
| 41a9100477 | |||
| b8cc1eb993 | |||
| adbbfd9dc2 | |||
| 84da99d56c | |||
| aaf8f09cfd | |||
| 6da464fd1b | |||
| efaa41ba49 | |||
| 67e8e1d819 | |||
| 532f8f8e4c | |||
| 0109e8e57c | |||
| 6e720b2798 | |||
| d3f2a97dd4 | |||
| 9f7b04b0ec | |||
| c4118c78b7 | |||
| 84147c558f | |||
| 4cb51a2d32 | |||
| 4727780a3d | |||
| df20f5063d | |||
| d2a5f4c5c1 | |||
| 64ba85aa9b | |||
| 51c33989fe | |||
| 4713822122 | |||
| e10de62a7a | |||
| 14b235e3a4 | |||
| eb4aac3902 | |||
| 180bf33a28 |
+5
-4
@@ -41,10 +41,6 @@ redis:
|
|||||||
port: 6379
|
port: 6379
|
||||||
pass: example-pass
|
pass: example-pass
|
||||||
|
|
||||||
recaptcha:
|
|
||||||
site_key: example-site-key
|
|
||||||
secret_key: example-secret-key
|
|
||||||
|
|
||||||
# If enabled:
|
# If enabled:
|
||||||
# Server will not cache remote files (Using direct link instead).
|
# Server will not cache remote files (Using direct link instead).
|
||||||
# You can save your storage.
|
# You can save your storage.
|
||||||
@@ -67,6 +63,11 @@ preventCache: false
|
|||||||
# port: 9200
|
# port: 9200
|
||||||
# pass: null
|
# pass: null
|
||||||
|
|
||||||
|
# reCAPTCHA
|
||||||
|
# recaptcha:
|
||||||
|
# site_key: example-site-key
|
||||||
|
# secret_key: example-secret-key
|
||||||
|
|
||||||
# ServiceWorker
|
# ServiceWorker
|
||||||
# sw:
|
# sw:
|
||||||
# # Public key of VAPID
|
# # Public key of VAPID
|
||||||
|
|||||||
@@ -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かモバイル版Misskeyか
|
* デスクトップ版Misskeyかモバイル版Misskeyか
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
[![][dependencies-badge]][dependencies-link]
|
[![][dependencies-badge]][dependencies-link]
|
||||||
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
||||||
|
|
||||||
> Lead Maintainer: [syuilo][syuilo-link]
|
**Microblogging. Redefined.**
|
||||||
|
|
||||||
**[Misskey](https://misskey.xyz)** is a completely open source,
|
**[Misskey](https://misskey.xyz)** is a completely open source,
|
||||||
ultimately sophisticated professional microblogging software.
|
ultimately sophisticated professional microblogging software.
|
||||||
@@ -44,9 +44,9 @@ If you want to...
|
|||||||
|
|
||||||
:heart: Backers & Sponsors
|
:heart: Backers & Sponsors
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
| ![][nagarus-icon] | ![][dansup-icon] |
|
| <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"> |
|
||||||
|:-:|:-:|
|
|:-:|:-:|:-:|
|
||||||
| [nagarus][nagarus-link] | [dansup][dansup-link] |
|
| [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
|
: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-link]: https://syuilo.com
|
||||||
[syuilo-icon]: https://avatars2.githubusercontent.com/u/4439005?v=3&s=70
|
[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
|
|
||||||
|
|
||||||
|
|||||||
+5
-6
@@ -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)
|
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. `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.
|
Please visit https://www.google.com/recaptcha/intro/ and generate keys.
|
||||||
|
|
||||||
*(optional)* Generating VAPID keys
|
*(optional)* Generating VAPID keys
|
||||||
@@ -63,13 +63,12 @@ npm install web-push -g
|
|||||||
web-push generate-vapid-keys
|
web-push generate-vapid-keys
|
||||||
```
|
```
|
||||||
|
|
||||||
|
*5.* Make configuration file
|
||||||
*6.* Make configuration file
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
|
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
|
||||||
2. Edit `default.yml`
|
2. Edit `default.yml`
|
||||||
|
|
||||||
*7.* Build Misskey
|
*6.* Build Misskey
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
Build misskey with the following:
|
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`
|
3. `node-gyp build`
|
||||||
4. `npm run build`
|
4. `npm run build`
|
||||||
|
|
||||||
*8.* That is it.
|
*7.* That is it.
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
Well done! Now, you have an environment that run to Misskey.
|
Well done! Now, you have an environment that run to Misskey.
|
||||||
|
|
||||||
|
|||||||
+6
-7
@@ -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)を確認
|
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. `npm install` Misskeyの依存パッケージをインストール
|
||||||
|
|
||||||
*5.* reCAPTCHAトークン
|
*(オプション)* reCAPTCHAトークン
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
MisskeyはreCAPTCHAトークンを必要とします。
|
reCAPTCHAを有効にする場合、reCAPTCHAトークンを取得する必要があります。
|
||||||
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを生成してください。
|
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを取得してください。
|
||||||
|
|
||||||
*(オプション)* VAPIDキーペアの生成
|
*(オプション)* VAPIDキーペアの生成
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@@ -61,12 +61,12 @@ npm install web-push -g
|
|||||||
web-push generate-vapid-keys
|
web-push generate-vapid-keys
|
||||||
```
|
```
|
||||||
|
|
||||||
*6.* Make configuration file
|
*5.* 設定ファイルを作成する
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする。
|
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする。
|
||||||
2. `default.yml` を編集する。
|
2. `default.yml` を編集する。
|
||||||
|
|
||||||
*7.* Misskeyのビルド
|
*6.* Misskeyのビルド
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
次のコマンドでMisskeyをビルドしてください:
|
次のコマンドでMisskeyをビルドしてください:
|
||||||
@@ -81,8 +81,7 @@ Debianをお使いであれば、`build-essential`パッケージをインスト
|
|||||||
3. `node-gyp build`
|
3. `node-gyp build`
|
||||||
4. `npm run build`
|
4. `npm run build`
|
||||||
|
|
||||||
|
*7.* 以上です!
|
||||||
*6.* 以上です!
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
||||||
|
|
||||||
|
|||||||
+11
-13
@@ -23,7 +23,6 @@ const uglifyes = require('uglify-es');
|
|||||||
|
|
||||||
const locales = require('./locales');
|
const locales = require('./locales');
|
||||||
import { fa } from './src/misc/fa';
|
import { fa } from './src/misc/fa';
|
||||||
const client = require('./built/client/meta.json');
|
|
||||||
import config from './src/config';
|
import config from './src/config';
|
||||||
|
|
||||||
const uglify = uglifyComposer(uglifyes, console);
|
const uglify = uglifyComposer(uglifyes, console);
|
||||||
@@ -46,8 +45,6 @@ gulp.task('build', [
|
|||||||
'doc'
|
'doc'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
gulp.task('rebuild', ['clean', 'build']);
|
|
||||||
|
|
||||||
gulp.task('build:ts', () => {
|
gulp.task('build:ts', () => {
|
||||||
const tsProject = ts.createProject('./tsconfig.json');
|
const tsProject = ts.createProject('./tsconfig.json');
|
||||||
|
|
||||||
@@ -84,12 +81,12 @@ gulp.task('lint', () =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task('format', () =>
|
gulp.task('format', () =>
|
||||||
gulp.src('./src/**/*.ts')
|
gulp.src('./src/**/*.ts')
|
||||||
.pipe(tslint({
|
.pipe(tslint({
|
||||||
formatter: 'verbose',
|
formatter: 'verbose',
|
||||||
fix: true
|
fix: true
|
||||||
}))
|
}))
|
||||||
.pipe(tslint.report())
|
.pipe(tslint.report())
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task('mocha', () =>
|
gulp.task('mocha', () =>
|
||||||
@@ -117,8 +114,9 @@ gulp.task('build:client', [
|
|||||||
'copy:client'
|
'copy:client'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
gulp.task('build:client:script', () =>
|
gulp.task('build:client:script', () => {
|
||||||
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
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('VERSION', JSON.stringify(client.version)))
|
||||||
.pipe(replace('API', JSON.stringify(config.api_url)))
|
.pipe(replace('API', JSON.stringify(config.api_url)))
|
||||||
.pipe(replace('ENV', JSON.stringify(env)))
|
.pipe(replace('ENV', JSON.stringify(env)))
|
||||||
@@ -126,8 +124,8 @@ gulp.task('build:client:script', () =>
|
|||||||
.pipe(isProduction ? uglify({
|
.pipe(isProduction ? uglify({
|
||||||
toplevel: true
|
toplevel: true
|
||||||
} as any) : gutil.noop())
|
} as any) : gutil.noop())
|
||||||
.pipe(gulp.dest('./built/client/assets/')) as any
|
.pipe(gulp.dest('./built/client/assets/'));
|
||||||
);
|
});
|
||||||
|
|
||||||
gulp.task('build:client:styles', () =>
|
gulp.task('build:client:styles', () =>
|
||||||
gulp.src('./src/client/app/init.css')
|
gulp.src('./src/client/app/init.css')
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Banner"
|
banner: "Banner"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Umbenennen"
|
rename: "Umbenennen"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URL kopieren"
|
copy-url: "URL kopieren"
|
||||||
download: "Download"
|
download: "Download"
|
||||||
else-files: "Anderes…"
|
else-files: "Anderes…"
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "Ein Verzeichnis erstellen"
|
create-folder: "Ein Verzeichnis erstellen"
|
||||||
upload: "Eine Datei hochladen"
|
upload: "Eine Datei hochladen"
|
||||||
url-upload: "Von einer URL 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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Folge ich"
|
following: "Folge ich"
|
||||||
follow: "Folgen"
|
follow: "Folgen"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Banner"
|
banner: "Banner"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Rename"
|
rename: "Rename"
|
||||||
|
mark-as-sensitive: "Mark as 'sensitive'"
|
||||||
|
unmark-as-sensitive: "Unmark as 'sensitive'"
|
||||||
copy-url: "Copy URL"
|
copy-url: "Copy URL"
|
||||||
download: "Download"
|
download: "Download"
|
||||||
else-files: "Others"
|
else-files: "Others"
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "Create a folder"
|
create-folder: "Create a folder"
|
||||||
upload: "Upload a file"
|
upload: "Upload a file"
|
||||||
url-upload: "Upload from a URL"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Following"
|
following: "Following"
|
||||||
follow: "Follow"
|
follow: "Follow"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "Move"
|
move: "Move"
|
||||||
hash: "Hash (md5)"
|
hash: "Hash (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "Following"
|
following: "Following"
|
||||||
follow: "Follow"
|
follow: "Follow"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Banner"
|
banner: "Banner"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Renombrar"
|
rename: "Renombrar"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "Copia la URL"
|
copy-url: "Copia la URL"
|
||||||
download: "Descargar"
|
download: "Descargar"
|
||||||
else-files: "Otros"
|
else-files: "Otros"
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "Crear una carpeta"
|
create-folder: "Crear una carpeta"
|
||||||
upload: "Subir fichero"
|
upload: "Subir fichero"
|
||||||
url-upload: "Subir desde una URL"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Siguiendo"
|
following: "Siguiendo"
|
||||||
follow: "Sigue"
|
follow: "Sigue"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Bannière"
|
banner: "Bannière"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Renommer"
|
rename: "Renommer"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "Copier l'URL"
|
copy-url: "Copier l'URL"
|
||||||
download: "Télécharger"
|
download: "Télécharger"
|
||||||
else-files: "Autres..."
|
else-files: "Autres..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "Créer un dossier"
|
create-folder: "Créer un dossier"
|
||||||
upload: "Uploader un fichier"
|
upload: "Uploader un fichier"
|
||||||
url-upload: "Uploader d'un URL"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Abonnements"
|
following: "Abonnements"
|
||||||
follow: "Suivre"
|
follow: "Suivre"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "Déplacer"
|
move: "Déplacer"
|
||||||
hash: "Hash (md5)"
|
hash: "Hash (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "Abonnements"
|
following: "Abonnements"
|
||||||
follow: "Suivre"
|
follow: "Suivre"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -330,6 +330,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -377,6 +379,14 @@ desktop/views/components/drive.vue:
|
|||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -853,6 +863,14 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Baner"
|
banner: "Baner"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Zmień nazwę"
|
rename: "Zmień nazwę"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "Skopiuj adres"
|
copy-url: "Skopiuj adres"
|
||||||
download: "Pobierz"
|
download: "Pobierz"
|
||||||
else-files: "Inne"
|
else-files: "Inne"
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "Utwórz katalog"
|
create-folder: "Utwórz katalog"
|
||||||
upload: "Wyślij plik"
|
upload: "Wyślij plik"
|
||||||
url-upload: "Wyślij z adresu URL"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Śledzisz"
|
following: "Śledzisz"
|
||||||
follow: "Śledź"
|
follow: "Śledź"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "Przenieś"
|
move: "Przenieś"
|
||||||
hash: "Hash (md5)"
|
hash: "Hash (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "Śledzisz"
|
following: "Śledzisz"
|
||||||
follow: "Śledź"
|
follow: "Śledź"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "バナー"
|
banner: "バナー"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "名前を変更"
|
rename: "名前を変更"
|
||||||
|
mark-as-sensitive: "閲覧注意に設定"
|
||||||
|
unmark-as-sensitive: "閲覧注意を解除"
|
||||||
copy-url: "URLをコピー"
|
copy-url: "URLをコピー"
|
||||||
download: "ダウンロード"
|
download: "ダウンロード"
|
||||||
else-files: "その他..."
|
else-files: "その他..."
|
||||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
|||||||
create-folder: "フォルダーを作成"
|
create-folder: "フォルダーを作成"
|
||||||
upload: "ファイルをアップロード"
|
upload: "ファイルをアップロード"
|
||||||
url-upload: "URLからアップロード"
|
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:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
move: "移動"
|
move: "移動"
|
||||||
hash: "ハッシュ (md5)"
|
hash: "ハッシュ (md5)"
|
||||||
exif: "EXIF"
|
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:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "フォロー中"
|
following: "フォロー中"
|
||||||
follow: "フォロー"
|
follow: "フォロー"
|
||||||
|
|||||||
Generated
-18198
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -1,20 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "4.22.1",
|
"version": "4.26.0",
|
||||||
"clientVersion": "1.0.7361",
|
"clientVersion": "1.0.7435",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./built",
|
"start": "node ./built",
|
||||||
"debug": "DEBUG=misskey:* node ./built",
|
"debug": "DEBUG=misskey:* node ./built",
|
||||||
"swagger": "node ./swagger.js",
|
|
||||||
"build": "webpack && gulp build",
|
"build": "webpack && gulp build",
|
||||||
"webpack": "webpack",
|
"webpack": "webpack",
|
||||||
"watch": "webpack --watch",
|
"watch": "webpack --watch",
|
||||||
"gulp": "gulp build",
|
"gulp": "gulp build",
|
||||||
"rebuild": "gulp rebuild",
|
|
||||||
"clean": "gulp clean",
|
"clean": "gulp clean",
|
||||||
"cleanall": "gulp cleanall",
|
"cleanall": "gulp cleanall",
|
||||||
"lint": "gulp lint",
|
"lint": "gulp lint",
|
||||||
@@ -100,7 +98,7 @@
|
|||||||
"dompurify": "1.0.5",
|
"dompurify": "1.0.5",
|
||||||
"elasticsearch": "15.1.1",
|
"elasticsearch": "15.1.1",
|
||||||
"element-ui": "2.4.4",
|
"element-ui": "2.4.4",
|
||||||
"emojilib": "2.2.12",
|
"emojilib": "2.3.0",
|
||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"eslint": "5.0.1",
|
"eslint": "5.0.1",
|
||||||
"eslint-plugin-vue": "4.7.0",
|
"eslint-plugin-vue": "4.7.0",
|
||||||
@@ -128,6 +126,7 @@
|
|||||||
"highlight.js": "9.12.0",
|
"highlight.js": "9.12.0",
|
||||||
"html-minifier": "3.5.19",
|
"html-minifier": "3.5.19",
|
||||||
"http-signature": "1.2.0",
|
"http-signature": "1.2.0",
|
||||||
|
"insert-text-at-cursor": "0.1.1",
|
||||||
"is-root": "2.0.0",
|
"is-root": "2.0.0",
|
||||||
"is-url": "1.2.4",
|
"is-url": "1.2.4",
|
||||||
"jquery": "3.3.1",
|
"jquery": "3.3.1",
|
||||||
@@ -188,7 +187,7 @@
|
|||||||
"stylus": "0.54.5",
|
"stylus": "0.54.5",
|
||||||
"stylus-loader": "3.0.2",
|
"stylus-loader": "3.0.2",
|
||||||
"summaly": "2.0.6",
|
"summaly": "2.0.6",
|
||||||
"swagger-jsdoc": "1.9.7",
|
"swagger-jsdoc": "1.10.2",
|
||||||
"syuilo-password-strength": "0.0.1",
|
"syuilo-password-strength": "0.0.1",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"tmp": "0.0.33",
|
"tmp": "0.0.33",
|
||||||
@@ -205,8 +204,9 @@
|
|||||||
"vue-cropperjs": "2.2.1",
|
"vue-cropperjs": "2.2.1",
|
||||||
"vue-js-modal": "1.3.16",
|
"vue-js-modal": "1.3.16",
|
||||||
"vue-json-tree-view": "2.1.4",
|
"vue-json-tree-view": "2.1.4",
|
||||||
"vue-loader": "15.2.5",
|
"vue-loader": "15.2.6",
|
||||||
"vue-router": "3.0.1",
|
"vue-router": "3.0.1",
|
||||||
|
"vue-style-loader": "4.1.1",
|
||||||
"vue-template-compiler": "2.5.16",
|
"vue-template-compiler": "2.5.16",
|
||||||
"vuedraggable": "2.16.0",
|
"vuedraggable": "2.16.0",
|
||||||
"vuex": "3.0.1",
|
"vuex": "3.0.1",
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
"web-push": "3.3.2",
|
"web-push": "3.3.2",
|
||||||
"webfinger.js": "2.6.6",
|
"webfinger.js": "2.6.6",
|
||||||
"webpack": "4.16.1",
|
"webpack": "4.16.1",
|
||||||
"webpack-cli": "3.0.8",
|
"webpack-cli": "3.1.0",
|
||||||
"websocket": "1.0.26",
|
"websocket": "1.0.26",
|
||||||
"ws": "5.2.2",
|
"ws": "5.2.2",
|
||||||
"xev": "2.0.1"
|
"xev": "2.0.1"
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ export default Vue.extend({
|
|||||||
dark: {
|
dark: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
smooth: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -75,7 +79,7 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
ms(): number {
|
ms(): number {
|
||||||
return this.now.getMilliseconds();
|
return this.now.getMilliseconds() * this.smooth;
|
||||||
}
|
}
|
||||||
s(): number {
|
s(): number {
|
||||||
return this.now.getSeconds();
|
return this.now.getSeconds();
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
<span class="username">@{{ user | acct }}</span>
|
<span class="username">@{{ user | acct }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
<ol class="hashtags" ref="suggests" v-if="hashtags.length > 0">
|
||||||
|
<li v-for="hashtag in hashtags" @click="complete(type, hashtag)" @keydown="onKeydown" tabindex="-1">
|
||||||
|
<span class="name">{{ hashtag }}</span>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
<ol class="emojis" ref="suggests" v-if="emojis.length > 0">
|
<ol class="emojis" ref="suggests" v-if="emojis.length > 0">
|
||||||
<li v-for="emoji in emojis" @click="complete(type, emoji.emoji)" @keydown="onKeydown" tabindex="-1">
|
<li v-for="emoji in emojis" @click="complete(type, emoji.emoji)" @keydown="onKeydown" tabindex="-1">
|
||||||
<span class="emoji">{{ emoji.emoji }}</span>
|
<span class="emoji">{{ emoji.emoji }}</span>
|
||||||
@@ -48,33 +53,33 @@ emjdb.sort((a, b) => a.name.length - b.name.length);
|
|||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['type', 'q', 'textarea', 'complete', 'close', 'x', 'y'],
|
props: ['type', 'q', 'textarea', 'complete', 'close', 'x', 'y'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fetching: true,
|
fetching: true,
|
||||||
users: [],
|
users: [],
|
||||||
|
hashtags: [],
|
||||||
emojis: [],
|
emojis: [],
|
||||||
select: -1,
|
select: -1,
|
||||||
emojilib
|
emojilib
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
items(): HTMLCollection {
|
items(): HTMLCollection {
|
||||||
return (this.$refs.suggests as Element).children;
|
return (this.$refs.suggests as Element).children;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updated() {
|
updated() {
|
||||||
//#region 位置調整
|
//#region 位置調整
|
||||||
const margin = 32;
|
if (this.x + this.$el.offsetWidth > window.innerWidth) {
|
||||||
|
this.$el.style.left = (window.innerWidth - this.$el.offsetWidth) + 'px';
|
||||||
if (this.x + this.$el.offsetWidth > window.innerWidth - margin) {
|
|
||||||
this.$el.style.left = (this.x - this.$el.offsetWidth) + 'px';
|
|
||||||
this.$el.style.marginLeft = '-16px';
|
|
||||||
} else {
|
} else {
|
||||||
this.$el.style.left = this.x + 'px';
|
this.$el.style.left = this.x + 'px';
|
||||||
this.$el.style.marginLeft = '0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.y + this.$el.offsetHeight > window.innerHeight - margin) {
|
if (this.y + this.$el.offsetHeight > window.innerHeight) {
|
||||||
this.$el.style.top = (this.y - this.$el.offsetHeight) + 'px';
|
this.$el.style.top = (this.y - this.$el.offsetHeight) + 'px';
|
||||||
this.$el.style.marginTop = '0';
|
this.$el.style.marginTop = '0';
|
||||||
} else {
|
} else {
|
||||||
@@ -83,6 +88,7 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.textarea.addEventListener('keydown', this.onKeydown);
|
this.textarea.addEventListener('keydown', this.onKeydown);
|
||||||
|
|
||||||
@@ -100,6 +106,7 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.textarea.removeEventListener('keydown', this.onKeydown);
|
this.textarea.removeEventListener('keydown', this.onKeydown);
|
||||||
|
|
||||||
@@ -107,6 +114,7 @@ export default Vue.extend({
|
|||||||
el.removeEventListener('mousedown', this.onMousedown);
|
el.removeEventListener('mousedown', this.onMousedown);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
exec() {
|
exec() {
|
||||||
this.select = -1;
|
this.select = -1;
|
||||||
@@ -117,7 +125,8 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.type == 'user') {
|
if (this.type == 'user') {
|
||||||
const cache = sessionStorage.getItem(this.q);
|
const cacheKey = 'autocomplete:user:' + this.q;
|
||||||
|
const cache = sessionStorage.getItem(cacheKey);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
const users = JSON.parse(cache);
|
const users = JSON.parse(cache);
|
||||||
this.users = users;
|
this.users = users;
|
||||||
@@ -131,7 +140,26 @@ export default Vue.extend({
|
|||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
|
||||||
// キャッシュ
|
// キャッシュ
|
||||||
sessionStorage.setItem(this.q, JSON.stringify(users));
|
sessionStorage.setItem(cacheKey, JSON.stringify(users));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (this.type == 'hashtag') {
|
||||||
|
const cacheKey = 'autocomplete:hashtag:' + this.q;
|
||||||
|
const cache = sessionStorage.getItem(cacheKey);
|
||||||
|
if (cache) {
|
||||||
|
const hashtags = JSON.parse(cache);
|
||||||
|
this.hashtags = hashtags;
|
||||||
|
this.fetching = false;
|
||||||
|
} else {
|
||||||
|
(this as any).api('hashtags/search', {
|
||||||
|
query: this.q,
|
||||||
|
limit: 30
|
||||||
|
}).then(hashtags => {
|
||||||
|
this.hashtags = hashtags;
|
||||||
|
this.fetching = false;
|
||||||
|
|
||||||
|
// キャッシュ
|
||||||
|
sessionStorage.setItem(cacheKey, JSON.stringify(hashtags));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (this.type == 'emoji') {
|
} else if (this.type == 'emoji') {
|
||||||
@@ -231,6 +259,7 @@ export default Vue.extend({
|
|||||||
root(isDark)
|
root(isDark)
|
||||||
position fixed
|
position fixed
|
||||||
z-index 65535
|
z-index 65535
|
||||||
|
max-width 100%
|
||||||
margin-top calc(1em + 8px)
|
margin-top calc(1em + 8px)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background isDark ? #313543 : #fff
|
background isDark ? #313543 : #fff
|
||||||
@@ -248,7 +277,8 @@ root(isDark)
|
|||||||
list-style none
|
list-style none
|
||||||
|
|
||||||
> li
|
> li
|
||||||
display block
|
display flex
|
||||||
|
align-items center
|
||||||
padding 4px 12px
|
padding 4px 12px
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow hidden
|
overflow hidden
|
||||||
@@ -259,7 +289,13 @@ root(isDark)
|
|||||||
&, *
|
&, *
|
||||||
user-select none
|
user-select none
|
||||||
|
|
||||||
|
*
|
||||||
|
overflow hidden
|
||||||
|
text-overflow ellipsis
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
|
background isDark ? rgba(#fff, 0.1) : rgba(#000, 0.1)
|
||||||
|
|
||||||
&[data-selected='true']
|
&[data-selected='true']
|
||||||
background $theme-color
|
background $theme-color
|
||||||
|
|
||||||
@@ -275,7 +311,6 @@ root(isDark)
|
|||||||
> .users > li
|
> .users > li
|
||||||
|
|
||||||
.avatar
|
.avatar
|
||||||
vertical-align middle
|
|
||||||
min-width 28px
|
min-width 28px
|
||||||
min-height 28px
|
min-height 28px
|
||||||
max-width 28px
|
max-width 28px
|
||||||
@@ -284,14 +319,18 @@ root(isDark)
|
|||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
.name
|
.name
|
||||||
vertical-align middle
|
|
||||||
margin 0 8px 0 0
|
margin 0 8px 0 0
|
||||||
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
||||||
|
|
||||||
.username
|
.username
|
||||||
vertical-align middle
|
|
||||||
color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
|
color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
|
||||||
|
|
||||||
|
> .hashtags > li
|
||||||
|
|
||||||
|
.name
|
||||||
|
margin 0 8px 0 0
|
||||||
|
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
||||||
|
|
||||||
> .emojis > li
|
> .emojis > li
|
||||||
|
|
||||||
.emoji
|
.emoji
|
||||||
@@ -300,11 +339,11 @@ root(isDark)
|
|||||||
width 24px
|
width 24px
|
||||||
|
|
||||||
.name
|
.name
|
||||||
color rgba(#000, 0.8)
|
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
||||||
|
|
||||||
.alias
|
.alias
|
||||||
margin 0 0 0 8px
|
margin 0 0 0 8px
|
||||||
color rgba(#000, 0.3)
|
color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
|
||||||
|
|
||||||
.mk-autocomplete[data-darkmode]
|
.mk-autocomplete[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
|||||||
@@ -46,33 +46,45 @@ export default Vue.extend({
|
|||||||
display grid
|
display grid
|
||||||
grid-gap 4px
|
grid-gap 4px
|
||||||
|
|
||||||
|
> *
|
||||||
|
overflow hidden
|
||||||
|
border-radius 4px
|
||||||
|
|
||||||
&[data-count="1"]
|
&[data-count="1"]
|
||||||
grid-template-rows 1fr
|
grid-template-rows 1fr
|
||||||
|
|
||||||
&[data-count="2"]
|
&[data-count="2"]
|
||||||
grid-template-columns 1fr 1fr
|
grid-template-columns 1fr 1fr
|
||||||
grid-template-rows 1fr
|
grid-template-rows 1fr
|
||||||
|
|
||||||
&[data-count="3"]
|
&[data-count="3"]
|
||||||
grid-template-columns 1fr 0.5fr
|
grid-template-columns 1fr 0.5fr
|
||||||
grid-template-rows 1fr 1fr
|
grid-template-rows 1fr 1fr
|
||||||
:nth-child(1)
|
|
||||||
|
> *:nth-child(1)
|
||||||
grid-row 1 / 3
|
grid-row 1 / 3
|
||||||
:nth-child(3)
|
|
||||||
|
> *:nth-child(3)
|
||||||
grid-column 2 / 3
|
grid-column 2 / 3
|
||||||
grid-row 2 / 3
|
grid-row 2 / 3
|
||||||
|
|
||||||
&[data-count="4"]
|
&[data-count="4"]
|
||||||
grid-template-columns 1fr 1fr
|
grid-template-columns 1fr 1fr
|
||||||
grid-template-rows 1fr 1fr
|
grid-template-rows 1fr 1fr
|
||||||
|
|
||||||
:nth-child(1)
|
> *:nth-child(1)
|
||||||
grid-column 1 / 2
|
grid-column 1 / 2
|
||||||
grid-row 1 / 2
|
grid-row 1 / 2
|
||||||
:nth-child(2)
|
|
||||||
|
> *:nth-child(2)
|
||||||
grid-column 2 / 3
|
grid-column 2 / 3
|
||||||
grid-row 1 / 2
|
grid-row 1 / 2
|
||||||
:nth-child(3)
|
|
||||||
|
> *:nth-child(3)
|
||||||
grid-column 1 / 2
|
grid-column 1 / 2
|
||||||
grid-row 2 / 3
|
grid-row 2 / 3
|
||||||
:nth-child(4)
|
|
||||||
|
> *:nth-child(4)
|
||||||
grid-column 2 / 3
|
grid-column 2 / 3
|
||||||
grid-row 2 / 3
|
grid-row 2 / 3
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="balloon" :data-no-text="message.text == null">
|
<div class="balloon" :data-no-text="message.text == null">
|
||||||
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
<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"/>
|
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
|
||||||
</button>
|
</button> -->
|
||||||
<div class="content" v-if="!message.isDeleted">
|
<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"/>
|
<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">
|
<div class="file" v-if="message.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>
|
<p slot="text" v-if="passwordRetypeState == 'not-match'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@password-not-matched%</p>
|
||||||
</div>
|
</div>
|
||||||
</ui-input>
|
</ui-input>
|
||||||
<div class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
|
<div v-if="recaptchaSitekey != null" 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>
|
|
||||||
<ui-button type="submit">%i18n:@create%</ui-button>
|
<ui-button type="submit">%i18n:@create%</ui-button>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,7 +37,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
const getPasswordStrength = require('syuilo-password-strength');
|
const getPasswordStrength = require('syuilo-password-strength');
|
||||||
import { host, url, docsUrl, lang, recaptchaSitekey } from '../../../config';
|
import { host, url, recaptchaSitekey } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@@ -51,7 +47,6 @@ export default Vue.extend({
|
|||||||
password: '',
|
password: '',
|
||||||
retypedPassword: '',
|
retypedPassword: '',
|
||||||
url,
|
url,
|
||||||
touUrl: `${docsUrl}/${lang}/tou`,
|
|
||||||
recaptchaSitekey,
|
recaptchaSitekey,
|
||||||
usernameState: null,
|
usernameState: null,
|
||||||
passwordStrength: '',
|
passwordStrength: '',
|
||||||
@@ -115,7 +110,7 @@ export default Vue.extend({
|
|||||||
(this as any).api('signup', {
|
(this as any).api('signup', {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
password: this.password,
|
||||||
'g-recaptcha-response': (window as any).grecaptcha.getResponse()
|
'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
(this as any).api('signin', {
|
(this as any).api('signin', {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
@@ -126,15 +121,19 @@ export default Vue.extend({
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
alert('%i18n:@some-error%');
|
alert('%i18n:@some-error%');
|
||||||
|
|
||||||
(window as any).grecaptcha.reset();
|
if (recaptchaSitekey != null) {
|
||||||
|
(window as any).grecaptcha.reset();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const head = document.getElementsByTagName('head')[0];
|
if (recaptchaSitekey != null) {
|
||||||
const script = document.createElement('script');
|
const head = document.getElementsByTagName('head')[0];
|
||||||
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
const script = document.createElement('script');
|
||||||
head.appendChild(script);
|
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
||||||
|
head.appendChild(script);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -144,22 +143,4 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.mk-signup
|
.mk-signup
|
||||||
min-width 302px
|
min-width 302px
|
||||||
|
|
||||||
.agree-tou
|
|
||||||
padding 4px
|
|
||||||
border-radius 4px
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
background #f4f4f4
|
|
||||||
|
|
||||||
&:active
|
|
||||||
background #eee
|
|
||||||
|
|
||||||
&, *
|
|
||||||
cursor pointer
|
|
||||||
|
|
||||||
p
|
|
||||||
display inline
|
|
||||||
color #555
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -67,15 +67,27 @@ class Autocomplete {
|
|||||||
* テキスト入力時
|
* テキスト入力時
|
||||||
*/
|
*/
|
||||||
private onInput() {
|
private onInput() {
|
||||||
const caret = this.textarea.selectionStart;
|
const caretPos = this.textarea.selectionStart;
|
||||||
const text = this.text.substr(0, caret);
|
const text = this.text.substr(0, caretPos);
|
||||||
|
|
||||||
const mentionIndex = text.lastIndexOf('@');
|
const mentionIndex = text.lastIndexOf('@');
|
||||||
|
const hashtagIndex = text.lastIndexOf('#');
|
||||||
const emojiIndex = text.lastIndexOf(':');
|
const emojiIndex = text.lastIndexOf(':');
|
||||||
|
|
||||||
|
const start = Math.min(
|
||||||
|
mentionIndex == -1 ? Infinity : mentionIndex,
|
||||||
|
hashtagIndex == -1 ? Infinity : hashtagIndex,
|
||||||
|
emojiIndex == -1 ? Infinity : emojiIndex);
|
||||||
|
|
||||||
|
if (start == Infinity) return;
|
||||||
|
|
||||||
|
const isMention = mentionIndex == start;
|
||||||
|
const isHashtag = hashtagIndex == start;
|
||||||
|
const isEmoji = emojiIndex == start;
|
||||||
|
|
||||||
let opened = false;
|
let opened = false;
|
||||||
|
|
||||||
if (mentionIndex != -1 && mentionIndex > emojiIndex) {
|
if (isMention) {
|
||||||
const username = text.substr(mentionIndex + 1);
|
const username = text.substr(mentionIndex + 1);
|
||||||
if (username != '' && username.match(/^[a-zA-Z0-9_]+$/)) {
|
if (username != '' && username.match(/^[a-zA-Z0-9_]+$/)) {
|
||||||
this.open('user', username);
|
this.open('user', username);
|
||||||
@@ -83,7 +95,15 @@ class Autocomplete {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emojiIndex != -1 && emojiIndex > mentionIndex) {
|
if (isHashtag || opened == false) {
|
||||||
|
const hashtag = text.substr(hashtagIndex + 1);
|
||||||
|
if (hashtag != '' && !hashtag.includes(' ') && !hashtag.includes('\n')) {
|
||||||
|
this.open('hashtag', hashtag);
|
||||||
|
opened = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isEmoji || opened == false) {
|
||||||
const emoji = text.substr(emojiIndex + 1);
|
const emoji = text.substr(emojiIndex + 1);
|
||||||
if (emoji != '' && emoji.match(/^[\+\-a-z0-9_]+$/)) {
|
if (emoji != '' && emoji.match(/^[\+\-a-z0-9_]+$/)) {
|
||||||
this.open('emoji', emoji);
|
this.open('emoji', emoji);
|
||||||
@@ -173,6 +193,22 @@ class Autocomplete {
|
|||||||
const pos = trimmedBefore.length + (value.username.length + 2);
|
const pos = trimmedBefore.length + (value.username.length + 2);
|
||||||
this.textarea.setSelectionRange(pos, pos);
|
this.textarea.setSelectionRange(pos, pos);
|
||||||
});
|
});
|
||||||
|
} else if (type == 'hashtag') {
|
||||||
|
const source = this.text;
|
||||||
|
|
||||||
|
const before = source.substr(0, caret);
|
||||||
|
const trimmedBefore = before.substring(0, before.lastIndexOf('#'));
|
||||||
|
const after = source.substr(caret);
|
||||||
|
|
||||||
|
// 挿入
|
||||||
|
this.text = trimmedBefore + '#' + value + ' ' + after;
|
||||||
|
|
||||||
|
// キャレットを戻す
|
||||||
|
this.vm.$nextTick(() => {
|
||||||
|
this.textarea.focus();
|
||||||
|
const pos = trimmedBefore.length + (value.length + 2);
|
||||||
|
this.textarea.setSelectionRange(pos, pos);
|
||||||
|
});
|
||||||
} else if (type == 'emoji') {
|
} else if (type == 'emoji') {
|
||||||
const source = this.text;
|
const source = this.text;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mkw-analog-clock">
|
<div class="mkw-analog-clock">
|
||||||
<mk-widget-container :naked="props.naked" :show-header="false">
|
<mk-widget-container :naked="!(props.design % 2)" :show-header="false">
|
||||||
<div class="mkw-analog-clock--body">
|
<div class="mkw-analog-clock--body">
|
||||||
<mk-analog-clock :dark="$store.state.device.darkmode"/>
|
<mk-analog-clock :dark="$store.state.device.darkmode" :smooth="!(props.design && ~props.design)"/>
|
||||||
</div>
|
</div>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
@@ -13,12 +13,13 @@ import define from '../../../common/define-widget';
|
|||||||
export default define({
|
export default define({
|
||||||
name: 'analog-clock',
|
name: 'analog-clock',
|
||||||
props: () => ({
|
props: () => ({
|
||||||
naked: false
|
design: -1
|
||||||
})
|
})
|
||||||
}).extend({
|
}).extend({
|
||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.naked = !this.props.naked;
|
if (++this.props.design > 2)
|
||||||
|
this.props.design = -1;
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ root(isDark)
|
|||||||
> .val
|
> .val
|
||||||
height 4px
|
height 4px
|
||||||
background $theme-color
|
background $theme-color
|
||||||
|
transition width .3s cubic-bezier(0.23, 1, 0.32, 1)
|
||||||
|
|
||||||
&:nth-child(1)
|
&:nth-child(1)
|
||||||
> .meter > .val
|
> .meter > .val
|
||||||
|
|||||||
@@ -35,10 +35,7 @@ import Vue from 'vue';
|
|||||||
const eachMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
const eachMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||||
|
|
||||||
function isLeapYear(year) {
|
function isLeapYear(year) {
|
||||||
return (year % 400 == 0) ? true :
|
return !(year % (year % 25 ? 4 : 16));
|
||||||
(year % 100 == 0) ? false :
|
|
||||||
(year % 4 == 0) ? true :
|
|
||||||
false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ export default Vue.extend({
|
|||||||
icon: '%fa:i-cursor%',
|
icon: '%fa:i-cursor%',
|
||||||
action: this.rename
|
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',
|
type: 'item',
|
||||||
text: '%i18n:@contextmenu.copy-url%',
|
text: '%i18n:@contextmenu.copy-url%',
|
||||||
icon: '%fa:link%',
|
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() {
|
copyUrl() {
|
||||||
copyToClipboard(this.file.url);
|
copyToClipboard(this.file.url);
|
||||||
(this as any).apis.dialog({
|
(this as any).apis.dialog({
|
||||||
|
|||||||
@@ -10,7 +10,10 @@
|
|||||||
<span class="separator" v-if="folder != null">%fa:angle-right%</span>
|
<span class="separator" v-if="folder != null">%fa:angle-right%</span>
|
||||||
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
|
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<input class="search" type="search" placeholder=" %i18n:@search%"/>
|
<!--
|
||||||
|
TODO: #343
|
||||||
|
<input class="search" type="search" placeholder=" %i18n:@search%"/>
|
||||||
|
-->
|
||||||
</nav>
|
</nav>
|
||||||
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
|
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
|
||||||
ref="main"
|
ref="main"
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<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"
|
:href="image.url"
|
||||||
@mousemove="onMousemove"
|
@mousemove="onMousemove"
|
||||||
@mouseleave="onMouseleave"
|
@mouseleave="onMouseleave"
|
||||||
@@ -21,6 +27,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
raw: {
|
raw: {
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -56,16 +66,30 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-media-image
|
.lcjomzwbohoelkxsnuqjiaccdbdfiazy
|
||||||
display block
|
display block
|
||||||
cursor zoom-in
|
cursor zoom-in
|
||||||
overflow hidden
|
overflow hidden
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background-position center
|
background-position center
|
||||||
border-radius 4px
|
|
||||||
|
|
||||||
&:not(:hover)
|
&:not(:hover)
|
||||||
background-size cover
|
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>
|
</style>
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
<template>
|
<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"
|
:src="video.url"
|
||||||
:title="video.name"
|
:title="video.name"
|
||||||
controls
|
controls
|
||||||
@dblclick.prevent="onClick"
|
@dblclick.prevent="onClick"
|
||||||
ref="video"
|
ref="video"
|
||||||
v-if="inlinePlayable" />
|
v-if="inlinePlayable" />
|
||||||
<a class="mk-media-video-thumbnail"
|
<a class="thumbnail"
|
||||||
:href="video.url"
|
:href="video.url"
|
||||||
:style="imageStyle"
|
:style="imageStyle"
|
||||||
@click.prevent="onClick"
|
@click.prevent="onClick"
|
||||||
@@ -14,6 +21,7 @@
|
|||||||
v-else>
|
v-else>
|
||||||
%fa:R play-circle%
|
%fa:R play-circle%
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -21,7 +29,19 @@ import Vue from 'vue';
|
|||||||
import MkMediaVideoDialog from './media-video-dialog.vue';
|
import MkMediaVideoDialog from './media-video-dialog.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['video', 'inlinePlayable'],
|
props: {
|
||||||
|
video: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
inlinePlayable: {
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
imageStyle(): any {
|
imageStyle(): any {
|
||||||
return {
|
return {
|
||||||
@@ -47,22 +67,39 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-media-video
|
.vwxdhznewyashiknzolsoihtlpicqepe
|
||||||
display block
|
.video
|
||||||
width 100%
|
display block
|
||||||
height 100%
|
width 100%
|
||||||
border-radius 4px
|
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
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
align-items 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>
|
</style>
|
||||||
|
|||||||
@@ -56,10 +56,10 @@
|
|||||||
<button @click="menu" ref="menuButton">
|
<button @click="menu" ref="menuButton">
|
||||||
%fa:ellipsis-h%
|
%fa:ellipsis-h%
|
||||||
</button>
|
</button>
|
||||||
<button title="%i18n:@detail">
|
<!-- <button title="%i18n:@detail">
|
||||||
<template v-if="!isDetailOpened">%fa:caret-down%</template>
|
<template v-if="!isDetailOpened">%fa:caret-down%</template>
|
||||||
<template v-if="isDetailOpened">%fa:caret-up%</template>
|
<template v-if="isDetailOpened">%fa:caret-up%</template>
|
||||||
</button>
|
</button> -->
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||||
<a @click="addVisibleUser">+ユーザーを追加</a>
|
<a @click="addVisibleUser">+ユーザーを追加</a>
|
||||||
</div>
|
</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="内容への注釈 (オプション)">
|
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
||||||
<textarea :class="{ with: (files.length != 0 || poll) }"
|
<textarea :class="{ with: (files.length != 0 || poll) }"
|
||||||
ref="text" v-model="text" :disabled="posting"
|
ref="text" v-model="text" :disabled="posting"
|
||||||
@@ -46,6 +49,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import * as XDraggable from 'vuedraggable';
|
import * as XDraggable from 'vuedraggable';
|
||||||
import getKao from '../../../common/scripts/get-kao';
|
import getKao from '../../../common/scripts/get-kao';
|
||||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||||
@@ -91,7 +95,8 @@ export default Vue.extend({
|
|||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
visibleUsers: [],
|
visibleUsers: [],
|
||||||
autocomplete: null,
|
autocomplete: null,
|
||||||
draghover: false
|
draghover: false,
|
||||||
|
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -183,6 +188,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
addTag(tag: string) {
|
||||||
|
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||||
|
},
|
||||||
|
|
||||||
watch() {
|
watch() {
|
||||||
this.$watch('text', () => this.saveDraft());
|
this.$watch('text', () => this.saveDraft());
|
||||||
this.$watch('poll', () => this.saveDraft());
|
this.$watch('poll', () => this.saveDraft());
|
||||||
@@ -370,6 +379,13 @@ export default Vue.extend({
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.posting = false;
|
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() {
|
saveDraft() {
|
||||||
@@ -478,6 +494,10 @@ root(isDark)
|
|||||||
margin-right 16px
|
margin-right 16px
|
||||||
color isDark ? #fff : #666
|
color isDark ? #fff : #666
|
||||||
|
|
||||||
|
> .hashtags
|
||||||
|
> *
|
||||||
|
margin-right 8px
|
||||||
|
|
||||||
> .medias
|
> .medias
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<div :class="$style.loading" v-if="fetching">
|
<div :class="$style.loading" v-if="fetching">
|
||||||
<mk-ellipsis-icon/>
|
<mk-ellipsis-icon/>
|
||||||
</div>
|
</div>
|
||||||
|
<p :class="$style.notAvailable" v-if="!fetching && notAvailable">検索機能を利用することができません。</p>
|
||||||
<p :class="$style.empty" v-if="!fetching && empty">%fa:search%「{{ q }}」に関する投稿は見つかりませんでした。</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-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
@@ -24,7 +25,8 @@ export default Vue.extend({
|
|||||||
moreFetching: false,
|
moreFetching: false,
|
||||||
existMore: false,
|
existMore: false,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
empty: false
|
empty: false,
|
||||||
|
notAvailable: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -71,7 +73,11 @@ export default Vue.extend({
|
|||||||
res(notes);
|
res(notes);
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
Progress.done();
|
Progress.done();
|
||||||
}, rej);
|
}, (e: string) => {
|
||||||
|
this.fetching = false;
|
||||||
|
Progress.done();
|
||||||
|
if (e === 'searching not available') this.notAvailable = true;
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
more() {
|
more() {
|
||||||
@@ -130,4 +136,18 @@ export default Vue.extend({
|
|||||||
font-size 3em
|
font-size 3em
|
||||||
color #ccc
|
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>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="mkw-notifications">
|
<div class="mkw-notifications">
|
||||||
<mk-widget-container :show-header="!props.compact">
|
<mk-widget-container :show-header="!props.compact">
|
||||||
<template slot="header">%fa:R bell%%i18n:@title%</template>
|
<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-notifications :class="$style.notifications"/>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<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>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -13,6 +19,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
raw: {
|
raw: {
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -35,13 +45,27 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-media-image
|
.gqnyydlzavusgskkfvwvjiattxdzsqlf
|
||||||
display block
|
display block
|
||||||
overflow hidden
|
overflow hidden
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background-position center
|
background-position center
|
||||||
background-size cover
|
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>
|
</style>
|
||||||
|
|||||||
@@ -1,17 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<a class="mk-media-video"
|
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="video.isSensitive && hide" @click="hide = false">
|
||||||
:href="video.url"
|
<div>
|
||||||
target="_blank"
|
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||||
:style="imageStyle"
|
<span>%i18n:@click-to-show%</span>
|
||||||
:title="video.name">
|
</div>
|
||||||
%fa:R play-circle%
|
</div>
|
||||||
</a>
|
<a class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else
|
||||||
|
:href="video.url"
|
||||||
|
target="_blank"
|
||||||
|
:style="imageStyle"
|
||||||
|
:title="video.name">
|
||||||
|
%fa:R play-circle%
|
||||||
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['video'],
|
props: {
|
||||||
|
video: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
imageStyle(): any {
|
imageStyle(): any {
|
||||||
return {
|
return {
|
||||||
@@ -22,7 +37,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-media-video
|
.kkjnbbplepmiyuadieoenjgutgcmtsvu
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
align-items center
|
align-items center
|
||||||
@@ -33,4 +48,20 @@ export default Vue.extend({
|
|||||||
background-size cover
|
background-size cover
|
||||||
width 100%
|
width 100%
|
||||||
height 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>
|
</style>
|
||||||
|
|||||||
@@ -1,47 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-post-form">
|
<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">
|
<div class="form">
|
||||||
<mk-note-preview v-if="reply" :note="reply"/>
|
<header>
|
||||||
<mk-note-preview v-if="renote" :note="renote"/>
|
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
<div>
|
||||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
|
||||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
<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>
|
</div>
|
||||||
<input v-show="useCw" v-model="cw" placeholder="%i18n:@cw-placeholder%">
|
</div>
|
||||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="placeholder"></textarea>
|
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||||
<div class="attaches" v-show="files.length != 0">
|
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import * as XDraggable from 'vuedraggable';
|
import * as XDraggable from 'vuedraggable';
|
||||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||||
import getKao from '../../../common/scripts/get-kao';
|
import getKao from '../../../common/scripts/get-kao';
|
||||||
@@ -85,7 +91,8 @@ export default Vue.extend({
|
|||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
visibleUsers: [],
|
visibleUsers: [],
|
||||||
useCw: false,
|
useCw: false,
|
||||||
cw: null
|
cw: null,
|
||||||
|
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -161,6 +168,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
addTag(tag: string) {
|
||||||
|
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||||
|
},
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
(this.$refs.text as any).focus();
|
(this.$refs.text as any).focus();
|
||||||
},
|
},
|
||||||
@@ -281,6 +292,13 @@ export default Vue.extend({
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.posting = false;
|
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() {
|
cancel() {
|
||||||
@@ -302,146 +320,156 @@ root(isDark)
|
|||||||
max-width 500px
|
max-width 500px
|
||||||
width calc(100% - 16px)
|
width calc(100% - 16px)
|
||||||
margin 8px auto
|
margin 8px auto
|
||||||
background isDark ? #282C37 : #fff
|
|
||||||
border-radius 8px
|
|
||||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
|
||||||
|
|
||||||
@media (min-width 500px)
|
@media (min-width 500px)
|
||||||
margin 16px auto
|
margin 16px auto
|
||||||
width calc(100% - 32px)
|
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)
|
@media (min-width 600px)
|
||||||
margin 32px auto
|
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
|
> .form
|
||||||
max-width 500px
|
background isDark ? #282C37 : #fff
|
||||||
margin 0 auto
|
border-radius 8px
|
||||||
|
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||||
|
|
||||||
> .mk-note-preview
|
> header
|
||||||
padding 16px
|
z-index 1000
|
||||||
|
height 50px
|
||||||
> .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 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||||
|
|
||||||
&:disabled
|
> .cancel
|
||||||
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
|
padding 0
|
||||||
margin 0
|
width 50px
|
||||||
width 48px
|
line-height 50px
|
||||||
height 48px
|
font-size 24px
|
||||||
font-size 20px
|
color isDark ? #9baec8 : #555
|
||||||
|
|
||||||
|
> div
|
||||||
|
position absolute
|
||||||
|
top 0
|
||||||
|
right 0
|
||||||
color #657786
|
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 none
|
||||||
border-radius 0
|
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]
|
.mk-post-form[data-darkmode]
|
||||||
root(true)
|
root(true)
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ export type Source = {
|
|||||||
port: number;
|
port: number;
|
||||||
pass: string;
|
pass: string;
|
||||||
};
|
};
|
||||||
recaptcha: {
|
recaptcha?: {
|
||||||
site_key: string;
|
site_key: string;
|
||||||
secret_key: string;
|
secret_key: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,3 +81,10 @@ props:
|
|||||||
desc:
|
desc:
|
||||||
ja: "フォルダ"
|
ja: "フォルダ"
|
||||||
en: "The folder of this file"
|
en: "The folder of this file"
|
||||||
|
|
||||||
|
sensitive:
|
||||||
|
type: "boolean"
|
||||||
|
optional: true
|
||||||
|
desc:
|
||||||
|
ja: "このメディアが「閲覧注意」(NSFW)かどうか"
|
||||||
|
en: "Whether this media is NSFW"
|
||||||
|
|||||||
+3
-6
@@ -12,9 +12,6 @@ main
|
|||||||
width 850px
|
width 850px
|
||||||
max-width calc(100% - 330px)
|
max-width calc(100% - 330px)
|
||||||
|
|
||||||
section
|
|
||||||
margin 32px 0
|
|
||||||
|
|
||||||
h1
|
h1
|
||||||
margin 0 0 24px 0
|
margin 0 0 24px 0
|
||||||
padding 16px 0
|
padding 16px 0
|
||||||
@@ -22,18 +19,18 @@ main
|
|||||||
border-bottom solid 2px #eee
|
border-bottom solid 2px #eee
|
||||||
|
|
||||||
h2
|
h2
|
||||||
margin 0 0 24px 0
|
margin 1em 0 24px 0
|
||||||
padding 0 0 16px 0
|
padding 0 0 16px 0
|
||||||
font-size 1.4em
|
font-size 1.4em
|
||||||
border-bottom solid 1px #eee
|
border-bottom solid 1px #eee
|
||||||
|
|
||||||
h3
|
h3
|
||||||
margin 0
|
margin 1em 0 0 0
|
||||||
padding 0
|
padding 0
|
||||||
font-size 1.25em
|
font-size 1.25em
|
||||||
|
|
||||||
h4
|
h4
|
||||||
margin 0
|
margin 1em 0 0 0
|
||||||
|
|
||||||
p
|
p
|
||||||
margin 1em 0
|
margin 1em 0
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export type IMetadata = {
|
|||||||
url?: string;
|
url?: string;
|
||||||
deletedAt?: Date;
|
deletedAt?: Date;
|
||||||
isMetaOnly?: boolean;
|
isMetaOnly?: boolean;
|
||||||
|
isSensitive?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IDriveFile = {
|
export type IDriveFile = {
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import * as mongo from 'mongodb';
|
||||||
|
import db from '../db/mongodb';
|
||||||
|
|
||||||
|
const Hashtag = db.get<IHashtags>('hashtags');
|
||||||
|
Hashtag.createIndex('tag', { unique: true });
|
||||||
|
Hashtag.createIndex('mentionedUserIdsCount');
|
||||||
|
export default Hashtag;
|
||||||
|
|
||||||
|
export interface IHashtags {
|
||||||
|
tag: string;
|
||||||
|
mentionedUserIds: mongo.ObjectID[];
|
||||||
|
mentionedUserIdsCount: number;
|
||||||
|
}
|
||||||
@@ -108,6 +108,7 @@ export interface ILocalUser extends IUserBase {
|
|||||||
|
|
||||||
export interface IRemoteUser extends IUserBase {
|
export interface IRemoteUser extends IUserBase {
|
||||||
inbox: string;
|
inbox: string;
|
||||||
|
sharedInbox?: string;
|
||||||
endpoints: string[];
|
endpoints: string[];
|
||||||
uri: string;
|
uri: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const image = await new Resolver().resolve(value);
|
const image = await new Resolver().resolve(value) as any;
|
||||||
|
|
||||||
if (image.url == null) {
|
if (image.url == null) {
|
||||||
throw new Error('invalid image: url not privided');
|
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}`);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
|
|||||||
publicKeyPem: person.publicKey.publicKeyPem
|
publicKeyPem: person.publicKey.publicKeyPem
|
||||||
},
|
},
|
||||||
inbox: person.inbox,
|
inbox: person.inbox,
|
||||||
|
sharedInbox: person.sharedInbox,
|
||||||
endpoints: person.endpoints,
|
endpoints: person.endpoints,
|
||||||
uri: person.id,
|
uri: person.id,
|
||||||
url: person.url,
|
url: person.url,
|
||||||
@@ -239,6 +240,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver)
|
|||||||
await User.update({ _id: exist._id }, {
|
await User.update({ _id: exist._id }, {
|
||||||
$set: {
|
$set: {
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
|
inbox: person.inbox,
|
||||||
|
sharedInbox: person.sharedInbox,
|
||||||
avatarId: avatar ? avatar._id : null,
|
avatarId: avatar ? avatar._id : null,
|
||||||
bannerId: banner ? banner._id : null,
|
bannerId: banner ? banner._id : null,
|
||||||
avatarUrl: avatar && avatar.metadata.isMetaOnly ? avatar.metadata.url : null,
|
avatarUrl: avatar && avatar.metadata.isMetaOnly ? avatar.metadata.url : null,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import config from '../../../config';
|
import config from '../../../config';
|
||||||
import { IDriveFile } from '../../../models/drive-file';
|
import { IDriveFile } from '../../../models/drive-file';
|
||||||
|
|
||||||
export default (fileId: IDriveFile['_id']) => ({
|
export default (file: IDriveFile) => ({
|
||||||
type: 'Image',
|
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 { ILocalUser } from '../../../models/user';
|
||||||
import toHtml from '../../../mfm/html';
|
import toHtml from '../../../mfm/html';
|
||||||
import parse from '../../../mfm/parse';
|
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 id = `${config.url}/users/${user._id}`;
|
||||||
|
|
||||||
|
const [avatar, banner] = await Promise.all([
|
||||||
|
DriveFile.findOne({ _id: user.avatarId }),
|
||||||
|
DriveFile.findOne({ _id: user.bannerId })
|
||||||
|
]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: user.isBot ? 'Service' : 'Person',
|
type: user.isBot ? 'Service' : 'Person',
|
||||||
id,
|
id,
|
||||||
@@ -18,8 +24,8 @@ export default (user: ILocalUser) => {
|
|||||||
preferredUsername: user.username,
|
preferredUsername: user.username,
|
||||||
name: user.name,
|
name: user.name,
|
||||||
summary: toHtml(parse(user.description)),
|
summary: toHtml(parse(user.description)),
|
||||||
icon: user.avatarId && renderImage(user.avatarId),
|
icon: user.avatarId && renderImage(avatar),
|
||||||
image: user.bannerId && renderImage(user.bannerId),
|
image: user.bannerId && renderImage(banner),
|
||||||
manuallyApprovesFollowers: user.isLocked,
|
manuallyApprovesFollowers: user.isLocked,
|
||||||
publicKey: renderKey(user)
|
publicKey: renderKey(user)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export interface IPerson extends IObject {
|
|||||||
preferredUsername: string;
|
preferredUsername: string;
|
||||||
manuallyApprovesFollowers: boolean;
|
manuallyApprovesFollowers: boolean;
|
||||||
inbox: string;
|
inbox: string;
|
||||||
|
sharedInbox?: string;
|
||||||
publicKey: any;
|
publicKey: any;
|
||||||
followers: any;
|
followers: any;
|
||||||
following: any;
|
following: any;
|
||||||
|
|||||||
@@ -111,13 +111,13 @@ router.get('/users/:user/publickey', async ctx => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// user
|
// user
|
||||||
function userInfo(ctx: Router.IRouterContext, user: IUser) {
|
async function userInfo(ctx: Router.IRouterContext, user: IUser) {
|
||||||
if (user === null) {
|
if (user === null) {
|
||||||
ctx.status = 404;
|
ctx.status = 404;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.body = pack(renderPerson(user as ILocalUser));
|
ctx.body = pack(await renderPerson(user as ILocalUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
router.get('/users/:user', async ctx => {
|
router.get('/users/:user', async ctx => {
|
||||||
@@ -128,7 +128,7 @@ router.get('/users/:user', async ctx => {
|
|||||||
host: null
|
host: null
|
||||||
});
|
});
|
||||||
|
|
||||||
userInfo(ctx, user);
|
await userInfo(ctx, user);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/@:user', async (ctx, next) => {
|
router.get('/@:user', async (ctx, next) => {
|
||||||
@@ -139,7 +139,7 @@ router.get('/@:user', async (ctx, next) => {
|
|||||||
host: null
|
host: null
|
||||||
});
|
});
|
||||||
|
|
||||||
userInfo(ctx, user);
|
await userInfo(ctx, user);
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { performance } from 'perf_hooks';
|
||||||
import limitter from './limitter';
|
import limitter from './limitter';
|
||||||
import { IUser } from '../../models/user';
|
import { IUser } from '../../models/user';
|
||||||
import { IApp } from '../../models/app';
|
import { IApp } from '../../models/app';
|
||||||
@@ -45,7 +46,13 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
|
|||||||
|
|
||||||
// API invoking
|
// API invoking
|
||||||
try {
|
try {
|
||||||
|
const a = performance.now();
|
||||||
res = await exec(data, user, app);
|
res = await exec(data, user, app);
|
||||||
|
const b = performance.now();
|
||||||
|
|
||||||
|
if (b - a > 500) {
|
||||||
|
console.warn(`SLOW API CALL DETECTED: ${ep.name}`);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rej(e);
|
rej(e);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ export const meta = {
|
|||||||
desc: {
|
desc: {
|
||||||
ja: 'フォルダID'
|
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 {
|
try {
|
||||||
// Create file
|
// 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();
|
cleanup();
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import DriveFolder from '../../../../../models/drive-folder';
|
|||||||
import DriveFile, { validateFileName, pack } from '../../../../../models/drive-file';
|
import DriveFile, { validateFileName, pack } from '../../../../../models/drive-file';
|
||||||
import { publishDriveStream } from '../../../../../stream';
|
import { publishDriveStream } from '../../../../../stream';
|
||||||
import { ILocalUser } from '../../../../../models/user';
|
import { ILocalUser } from '../../../../../models/user';
|
||||||
|
import getParams from '../../../get-params';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
desc: {
|
desc: {
|
||||||
@@ -12,18 +13,48 @@ export const meta = {
|
|||||||
|
|
||||||
requireCredential: true,
|
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) => {
|
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||||
// Get 'fileId' parameter
|
const [ps, psErr] = getParams(meta, params);
|
||||||
const [fileId, fileIdErr] = $.type(ID).get(params.fileId);
|
if (psErr) return rej(psErr);
|
||||||
if (fileIdErr) return rej('invalid fileId param');
|
|
||||||
|
|
||||||
// Fetch file
|
// Fetch file
|
||||||
const file = await DriveFile
|
const file = await DriveFile
|
||||||
.findOne({
|
.findOne({
|
||||||
_id: fileId,
|
_id: ps.fileId,
|
||||||
'metadata.userId': user._id
|
'metadata.userId': user._id
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -31,23 +62,18 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
return rej('file-not-found');
|
return rej('file-not-found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get 'name' parameter
|
if (ps.name) file.filename = ps.name;
|
||||||
const [name, nameErr] = $.str.optional.pipe(validateFileName).get(params.name);
|
|
||||||
if (nameErr) return rej('invalid name param');
|
|
||||||
if (name) file.filename = name;
|
|
||||||
|
|
||||||
// Get 'folderId' parameter
|
if (ps.isSensitive) file.metadata.isSensitive = ps.isSensitive;
|
||||||
const [folderId, folderIdErr] = $.type(ID).optional.nullable.get(params.folderId);
|
|
||||||
if (folderIdErr) return rej('invalid folderId param');
|
|
||||||
|
|
||||||
if (folderId !== undefined) {
|
if (ps.folderId !== undefined) {
|
||||||
if (folderId === null) {
|
if (ps.folderId === null) {
|
||||||
file.metadata.folderId = null;
|
file.metadata.folderId = null;
|
||||||
} else {
|
} else {
|
||||||
// Fetch folder
|
// Fetch folder
|
||||||
const folder = await DriveFolder
|
const folder = await DriveFolder
|
||||||
.findOne({
|
.findOne({
|
||||||
_id: folderId,
|
_id: ps.folderId,
|
||||||
userId: user._id
|
userId: user._id
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62,7 +88,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
|||||||
await DriveFile.update(file._id, {
|
await DriveFile.update(file._id, {
|
||||||
$set: {
|
$set: {
|
||||||
filename: file.filename,
|
filename: file.filename,
|
||||||
'metadata.folderId': file.metadata.folderId
|
'metadata.folderId': file.metadata.folderId,
|
||||||
|
'metadata.isSensitive': file.metadata.isSensitive
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import $ from 'cafy';
|
||||||
|
import Hashtag from '../../../../models/hashtag';
|
||||||
|
import getParams from '../../get-params';
|
||||||
|
const escapeRegexp = require('escape-regexp');
|
||||||
|
|
||||||
|
export const meta = {
|
||||||
|
desc: {
|
||||||
|
ja: 'ハッシュタグを検索します。'
|
||||||
|
},
|
||||||
|
|
||||||
|
requireCredential: false,
|
||||||
|
|
||||||
|
params: {
|
||||||
|
limit: $.num.optional.range(1, 100).note({
|
||||||
|
default: 10,
|
||||||
|
desc: {
|
||||||
|
ja: '最大数'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
query: $.str.note({
|
||||||
|
desc: {
|
||||||
|
ja: 'クエリ'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
offset: $.num.optional.min(0).note({
|
||||||
|
default: 0,
|
||||||
|
desc: {
|
||||||
|
ja: 'オフセット'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default (params: any) => new Promise(async (res, rej) => {
|
||||||
|
const [ps, psErr] = getParams(meta, params);
|
||||||
|
if (psErr) throw psErr;
|
||||||
|
|
||||||
|
const hashtags = await Hashtag
|
||||||
|
.find({
|
||||||
|
tag: new RegExp('^' + escapeRegexp(ps.query.toLowerCase()))
|
||||||
|
}, {
|
||||||
|
sort: {
|
||||||
|
count: -1
|
||||||
|
},
|
||||||
|
limit: ps.limit,
|
||||||
|
skip: ps.offset
|
||||||
|
});
|
||||||
|
|
||||||
|
res(hashtags.map(tag => tag.tag));
|
||||||
|
});
|
||||||
@@ -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);
|
const [limit = 10, limitErr] = $.num.optional.range(1, 30).get(params.limit);
|
||||||
if (limitErr) return rej('invalid limit param');
|
if (limitErr) return rej('invalid limit param');
|
||||||
|
|
||||||
|
if (es == null) return rej('searching not available');
|
||||||
|
|
||||||
es.search({
|
es.search({
|
||||||
index: 'misskey',
|
index: 'misskey',
|
||||||
type: 'note',
|
type: 'note',
|
||||||
@@ -53,10 +55,10 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
$in: hits
|
$in: hits
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
sort: {
|
sort: {
|
||||||
_id: -1
|
_id: -1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
res(await Promise.all(notes.map(note => pack(note, me))));
|
res(await Promise.all(notes.map(note => pack(note, me))));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import User, { pack, ILocalUser } from '../../../../models/user';
|
import User, { pack, ILocalUser } from '../../../../models/user';
|
||||||
|
const escapeRegexp = require('escape-regexp');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search a user by username
|
* Search a user by username
|
||||||
@@ -20,7 +21,7 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
let users = await User
|
let users = await User
|
||||||
.find({
|
.find({
|
||||||
host: null,
|
host: null,
|
||||||
usernameLower: new RegExp(query.toLowerCase())
|
usernameLower: new RegExp('^' + escapeRegexp(query.toLowerCase()))
|
||||||
}, {
|
}, {
|
||||||
limit: limit,
|
limit: limit,
|
||||||
skip: offset
|
skip: offset
|
||||||
@@ -30,7 +31,31 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
|||||||
const remoteUsers = await User
|
const remoteUsers = await User
|
||||||
.find({
|
.find({
|
||||||
host: { $ne: null },
|
host: { $ne: null },
|
||||||
usernameLower: new RegExp(query.toLowerCase())
|
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({
|
||||||
|
host: { $ne: null },
|
||||||
|
usernameLower: new RegExp(escapeRegexp(query.toLowerCase()))
|
||||||
}, {
|
}, {
|
||||||
limit: limit - users.length
|
limit: limit - users.length
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,14 +7,16 @@ import generateUserToken from '../common/generate-native-user-token';
|
|||||||
import config from '../../../config';
|
import config from '../../../config';
|
||||||
import Meta from '../../../models/meta';
|
import Meta from '../../../models/meta';
|
||||||
|
|
||||||
recaptcha.init({
|
if (config.recaptcha) {
|
||||||
secret_key: config.recaptcha.secret_key
|
recaptcha.init({
|
||||||
});
|
secret_key: config.recaptcha.secret_key
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export default async (ctx: Koa.Context) => {
|
export default async (ctx: Koa.Context) => {
|
||||||
// Verify recaptcha
|
// 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']);
|
const success = await recaptcha(ctx.request.body['g-recaptcha-response']);
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import config from '../../config';
|
|||||||
import I18n from '../../misc/i18n';
|
import I18n from '../../misc/i18n';
|
||||||
import { licenseHtml } from '../../misc/license';
|
import { licenseHtml } from '../../misc/license';
|
||||||
const constants = require('../../const.json');
|
const constants = require('../../const.json');
|
||||||
import endpoints from '../../server/api/endpoints';
|
import endpoints from '../api/endpoints';
|
||||||
|
|
||||||
async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
||||||
const vars = {} as { [key: string]: any };
|
const vars = {} as { [key: string]: any };
|
||||||
@@ -113,7 +113,7 @@ const parsePropDefinition = (key: string, prop: any) => {
|
|||||||
return prop;
|
return prop;
|
||||||
};
|
};
|
||||||
|
|
||||||
const sortParams = (params: Array<{name: string}>) => {
|
const sortParams = (params: Array<{ name: string }>) => {
|
||||||
return params;
|
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,
|
paramDefs: ep.meta.params ? extractParamDefRef(Object.entries(ep.meta.params).map(([k, v]) => v)) : null,
|
||||||
res: ep.meta.res,
|
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,
|
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`
|
src: `https://github.com/syuilo/misskey/tree/master/src/server/api/endpoints/${name}.ts`
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ export default async function(
|
|||||||
force: boolean = false,
|
force: boolean = false,
|
||||||
metaOnly: boolean = false,
|
metaOnly: boolean = false,
|
||||||
url: string = null,
|
url: string = null,
|
||||||
uri: string = null
|
uri: string = null,
|
||||||
|
sensitive = false
|
||||||
): Promise<IDriveFile> {
|
): Promise<IDriveFile> {
|
||||||
// Calc md5 hash
|
// Calc md5 hash
|
||||||
const calcHash = new Promise<string>((res, rej) => {
|
const calcHash = new Promise<string>((res, rej) => {
|
||||||
@@ -258,7 +259,8 @@ export default async function(
|
|||||||
folderId: folder !== null ? folder._id : null,
|
folderId: folder !== null ? folder._id : null,
|
||||||
comment: comment,
|
comment: comment,
|
||||||
properties: properties,
|
properties: properties,
|
||||||
isMetaOnly: metaOnly
|
isMetaOnly: metaOnly,
|
||||||
|
isSensitive: sensitive
|
||||||
} as IMetadata;
|
} as IMetadata;
|
||||||
|
|
||||||
if (url !== null) {
|
if (url !== null) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import * as mongodb from 'mongodb';
|
|||||||
|
|
||||||
const log = debug('misskey:drive:upload-from-url');
|
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}`);
|
log(`REQUESTED: ${url}`);
|
||||||
|
|
||||||
let name = URL.parse(url).pathname.split('/').pop();
|
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;
|
let error;
|
||||||
|
|
||||||
try {
|
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}`);
|
log(`got: ${driveFile._id}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error = e;
|
error = e;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import UserList from '../../models/user-list';
|
|||||||
import resolveUser from '../../remote/resolve-user';
|
import resolveUser from '../../remote/resolve-user';
|
||||||
import Meta from '../../models/meta';
|
import Meta from '../../models/meta';
|
||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
|
import registerHashtag from '../register-hashtag';
|
||||||
|
|
||||||
type Type = 'reply' | 'renote' | 'quote' | 'mention';
|
type Type = 'reply' | 'renote' | 'quote' | 'mention';
|
||||||
|
|
||||||
@@ -64,7 +65,6 @@ export default async (user: IUser, data: {
|
|||||||
geo?: any;
|
geo?: any;
|
||||||
poll?: any;
|
poll?: any;
|
||||||
viaMobile?: boolean;
|
viaMobile?: boolean;
|
||||||
tags?: string[];
|
|
||||||
cw?: string;
|
cw?: string;
|
||||||
visibility?: string;
|
visibility?: string;
|
||||||
visibleUsers?: IUser[];
|
visibleUsers?: IUser[];
|
||||||
@@ -75,7 +75,7 @@ export default async (user: IUser, data: {
|
|||||||
if (data.visibility == null) data.visibility = 'public';
|
if (data.visibility == null) data.visibility = 'public';
|
||||||
if (data.viaMobile == null) data.viaMobile = false;
|
if (data.viaMobile == null) data.viaMobile = false;
|
||||||
|
|
||||||
let tags = data.tags || [];
|
let tags: string[] = [];
|
||||||
|
|
||||||
let tokens: any[] = null;
|
let tokens: any[] = null;
|
||||||
|
|
||||||
@@ -149,6 +149,9 @@ export default async (user: IUser, data: {
|
|||||||
|
|
||||||
res(note);
|
res(note);
|
||||||
|
|
||||||
|
// ハッシュタグ登録
|
||||||
|
tags.map(tag => registerHashtag(user, tag));
|
||||||
|
|
||||||
//#region Increment notes count
|
//#region Increment notes count
|
||||||
if (isLocalUser(user)) {
|
if (isLocalUser(user)) {
|
||||||
Meta.update({}, {
|
Meta.update({}, {
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { IUser } from '../models/user';
|
||||||
|
import Hashtag from '../models/hashtag';
|
||||||
|
|
||||||
|
export default async function(user: IUser, tag: string) {
|
||||||
|
tag = tag.toLowerCase();
|
||||||
|
|
||||||
|
const index = await Hashtag.findOne({ tag });
|
||||||
|
|
||||||
|
if (index != null) {
|
||||||
|
// 自分が初めてこのタグを使ったなら
|
||||||
|
if (!index.mentionedUserIds.some(id => id.equals(user._id))) {
|
||||||
|
Hashtag.update({ tag }, {
|
||||||
|
$push: {
|
||||||
|
mentionedUserIds: user._id
|
||||||
|
},
|
||||||
|
$inc: {
|
||||||
|
mentionedUserIdsCount: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Hashtag.insert({
|
||||||
|
tag,
|
||||||
|
mentionedUserIds: [user._id],
|
||||||
|
mentionedUserIdsCount: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -72,7 +72,7 @@ const output = {
|
|||||||
|
|
||||||
//#region Define consts
|
//#region Define consts
|
||||||
const 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,
|
_SW_PUBLICKEY_: config.sw ? config.sw.public_key : null,
|
||||||
_THEME_COLOR_: constants.themeColor,
|
_THEME_COLOR_: constants.themeColor,
|
||||||
_COPYRIGHT_: constants.copyright,
|
_COPYRIGHT_: constants.copyright,
|
||||||
|
|||||||
Reference in New Issue
Block a user