Compare commits
237 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 | ||
|
|
935a254c97 | ||
|
|
3c678f0e92 | ||
|
|
a053e1c1de | ||
|
|
b8fa1751ba | ||
|
|
c4243d54a9 | ||
|
|
1767f54fed | ||
|
|
7e465cdbbe | ||
|
|
47f67fcba9 | ||
|
|
3fff20fb13 | ||
|
|
06a2d87129 | ||
|
|
a8076e306a | ||
|
|
05e5829260 | ||
|
|
5a91416f34 | ||
|
|
70db1d0066 | ||
|
|
26c936d19e | ||
|
|
3b0ae3f80d | ||
|
|
2570d85543 | ||
|
|
b274c4160e | ||
|
|
f9d5d9e30b | ||
|
|
8cdf5ff6df | ||
|
|
409ebf6e14 | ||
|
|
a3d34ba919 | ||
|
|
242bb1a428 | ||
|
|
4a25ed0627 | ||
|
|
f65fbf9d55 | ||
|
|
6169acd478 | ||
|
|
481f1a7c36 | ||
|
|
16726789da | ||
|
|
e71f650ade | ||
|
|
e8a7f571e1 | ||
|
|
3117c8a98f | ||
|
|
90b845f3db | ||
|
|
f5dd972e38 | ||
|
|
4b210e1a6a | ||
|
|
1a7eb3c1df | ||
|
|
52f84d8603 | ||
|
|
f92d218c0c | ||
|
|
81c5ece8a9 | ||
|
|
a97bc38f3e | ||
|
|
aacfb5e221 | ||
|
|
f88ac3c04e | ||
|
|
1fb53acc46 | ||
|
|
ae3b0d5437 | ||
|
|
f9b2da1bb0 | ||
|
|
d0bea052ad | ||
|
|
c012faa958 | ||
|
|
c8cfd1ee65 | ||
|
|
e8da0bcd80 | ||
|
|
591ff9095a | ||
|
|
6df91d3078 | ||
|
|
288c14efce | ||
|
|
ee8d636ca8 | ||
|
|
a3ceecae91 | ||
|
|
5ad89a3b3d | ||
|
|
e1089cc18d | ||
|
|
f9e780187c | ||
|
|
42cbe96a14 | ||
|
|
1f23b11dcc | ||
|
|
ad3b4bbd58 | ||
|
|
455f4ffa27 | ||
|
|
1d867b8aca | ||
|
|
1f9c18e615 | ||
|
|
5bf439851d | ||
|
|
9df3f99a1c | ||
|
|
f41232703b | ||
|
|
abc4e53943 | ||
|
|
f846508fc1 | ||
|
|
7343003287 | ||
|
|
25ca3d610b | ||
|
|
9d286786d4 | ||
|
|
91037ebdd6 | ||
|
|
26b2eafea0 | ||
|
|
432beedd94 | ||
|
|
3a919bab45 | ||
|
|
11af9b808d | ||
|
|
af35335772 | ||
|
|
7b9047cc82 | ||
|
|
4cad36572c | ||
|
|
b5625a4550 | ||
|
|
ec41d8053c | ||
|
|
284cfe6989 | ||
|
|
ad8f363c5d | ||
|
|
3d3cf73c30 | ||
|
|
fd9bd28361 | ||
|
|
d2919dece0 | ||
|
|
a86442bff7 | ||
|
|
4b915d43cf | ||
|
|
b20c3d84a6 | ||
|
|
d2bbf5ffc4 | ||
|
|
4ef9411f35 | ||
|
|
168d13d6e6 | ||
|
|
1e921a9fd5 | ||
|
|
9e438ed674 | ||
|
|
3a02a7dad8 | ||
|
|
1744316656 | ||
|
|
1e4a86da8e | ||
|
|
2b31b6a6b0 | ||
|
|
c7a3f40eba | ||
|
|
8b9710df9f | ||
|
|
ce6f750fa5 | ||
|
|
468eb02ff3 | ||
|
|
dfca7f1340 | ||
|
|
7bfa56d199 | ||
|
|
c579cbdf10 | ||
|
|
0b3609c775 | ||
|
|
be52eb9b3f | ||
|
|
5f5156561f | ||
|
|
d47f92f396 | ||
|
|
2a30bc9a56 | ||
|
|
a427b7a1af | ||
|
|
05d5e70c58 | ||
|
|
62858caaa4 | ||
|
|
b9b48a55ef | ||
|
|
7276ec185b | ||
|
|
e063ac10c5 | ||
|
|
eca9a7ea13 | ||
|
|
86d9a72bbf | ||
|
|
073707b2d0 | ||
|
|
b971fbaac6 | ||
|
|
86795f1091 | ||
|
|
5b9dd4fb80 | ||
|
|
5ff31e197b | ||
|
|
0bd5e64b86 | ||
|
|
3089b56f70 | ||
|
|
46bf0eae40 | ||
|
|
97f411130f | ||
|
|
b9ce7bc99d | ||
|
|
9d3ecda43d | ||
|
|
8356f6d128 | ||
|
|
05a084dadf | ||
|
|
f338fa552e | ||
|
|
7ab9d01bac | ||
|
|
5b0aaf66eb | ||
|
|
6a4e92a999 | ||
|
|
0a4b652493 | ||
|
|
eebc1af672 | ||
|
|
41fa045999 | ||
|
|
4b52c89a75 | ||
|
|
28dcf8bc1e | ||
|
|
5af469282a | ||
|
|
4c58dc61bc | ||
|
|
c4bf80c262 | ||
|
|
e485e8936f | ||
|
|
e495e0d2e6 | ||
|
|
3695e6db15 | ||
|
|
ac7df96f68 | ||
|
|
cf17a39446 | ||
|
|
87cc5f790c | ||
|
|
b03987290c | ||
|
|
1f4969547b | ||
|
|
d12d201ef4 | ||
|
|
c91a4c9da1 | ||
|
|
1213e95ddd | ||
|
|
90a836d587 | ||
|
|
973c2ebafd | ||
|
|
24f52aee46 | ||
|
|
4d2c0e4161 | ||
|
|
b687546fcd | ||
|
|
3c701aaf86 | ||
|
|
d50e99c17b | ||
|
|
41d5e0ab24 | ||
|
|
c99e864dbc | ||
|
|
f39adfdf87 |
@@ -1,73 +1,84 @@
|
||||
# インスタンス名
|
||||
name:
|
||||
name: example-instance-name # Name of your instance
|
||||
description: example-description # Description of your instance
|
||||
|
||||
# インスタンスの紹介
|
||||
description:
|
||||
|
||||
# サーバーのメンテナ情報
|
||||
maintainer:
|
||||
# メンテナの名前
|
||||
name:
|
||||
name: example-maitainer-name # Your name
|
||||
url: http://example.com/ # Your contact (http or mailto)
|
||||
repository_url: https://github.com/syuilo/misskey # Repository URL
|
||||
feedback_url: https://github.com/syuilo/misskey/issues # Feedback URL (e.g. github issue)
|
||||
|
||||
# メンテナの連絡先(URLかmailto形式のURL)
|
||||
url:
|
||||
# URL and Port settings overview
|
||||
# e.g., If you want to realize following structure:
|
||||
#
|
||||
# +--- https://example.com:123 ----------+
|
||||
# +------+ |+-------------+ +---------------+|
|
||||
# | User | ---> || Proxy (123) | ---> | Misskey (456) ||
|
||||
# +------+ |+-------------+ +---------------+|
|
||||
# +--------------------------------------+
|
||||
#
|
||||
# You need to set 'https://example.com:123' to 'url' prop and
|
||||
# You need to set 456 to 'port' prop.
|
||||
#
|
||||
# In other words, the 'url' prop should be the final accessible URL seen by a user.
|
||||
# 'port' prop is a port that the Misskey server should actually listen
|
||||
# on and it is not necessarily the port that a user accesses.
|
||||
|
||||
# レポジトリのURL
|
||||
repository_url:
|
||||
url: http://localhost/
|
||||
|
||||
# フィードバックのURL(issueなど)
|
||||
feedback_url:
|
||||
# A port that your Misskey server should listen.
|
||||
# This value is not a port to use when accessing with a browser.
|
||||
port: 80
|
||||
|
||||
# (Misskeyを動かす)URL
|
||||
url:
|
||||
|
||||
# 待受ポート
|
||||
port:
|
||||
|
||||
# TLSの設定(利用しない場合はフィールドごと削除してください)
|
||||
https:
|
||||
# 証明書のパス...
|
||||
key:
|
||||
cert:
|
||||
|
||||
# MongoDBの設定
|
||||
mongodb:
|
||||
host: localhost
|
||||
port: 27017
|
||||
db: misskey
|
||||
user:
|
||||
pass:
|
||||
user: example-misskey-user
|
||||
pass: example-misskey-pass
|
||||
|
||||
# Redisの設定
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
pass:
|
||||
pass: example-pass
|
||||
|
||||
# reCAPTCHAの設定
|
||||
recaptcha:
|
||||
site_key:
|
||||
secret_key:
|
||||
|
||||
# ServiceWorkerの設定
|
||||
sw:
|
||||
# VAPIDの公開鍵
|
||||
public_key:
|
||||
|
||||
# VAPIDの秘密鍵
|
||||
private_key:
|
||||
|
||||
# Google Maps API
|
||||
google_maps_api_key:
|
||||
|
||||
# Twitterインテグレーションの設定(利用しない場合は省略可能)
|
||||
twitter:
|
||||
# インテグレーション用アプリのコンシューマーキー
|
||||
consumer_key:
|
||||
|
||||
# インテグレーション用アプリのコンシューマーシークレット
|
||||
consumer_secret:
|
||||
|
||||
# true にすると、リモートのファイルをキャッシュしなくなります(直リンクします)。
|
||||
# ストレージ容量を節約することができますが、「リモートメディアを表示しない」設定をオンにしているユーザーは、リモートの画像などは見えなくなります。
|
||||
# If enabled:
|
||||
# Server will not cache remote files (Using direct link instead).
|
||||
# You can save your storage.
|
||||
# Users cannot see remote images when they turn off "Show media from a remote server" setting.
|
||||
preventCache: false
|
||||
|
||||
#
|
||||
# Below settings are optional
|
||||
#
|
||||
|
||||
# TLS
|
||||
# https:
|
||||
# # path for certification
|
||||
# key: example-tls-key
|
||||
# cert: example-tls-cert
|
||||
|
||||
# Elasticsearch
|
||||
# elasticsearch:
|
||||
# host: localhost
|
||||
# port: 9200
|
||||
# pass: null
|
||||
|
||||
# reCAPTCHA
|
||||
# recaptcha:
|
||||
# site_key: example-site-key
|
||||
# secret_key: example-secret-key
|
||||
|
||||
# ServiceWorker
|
||||
# sw:
|
||||
# # Public key of VAPID
|
||||
# public_key: example-sw-public-key
|
||||
|
||||
# # Private key of VAPID
|
||||
# private_key: example-sw-private-key
|
||||
|
||||
# google_maps_api_key: example-google-maps-api-key
|
||||
|
||||
# Twitter integration
|
||||
# twitter:
|
||||
# consumer_key: example-twitter-consumer-key
|
||||
# consumer_secret: example-twitter-consumer-secret-key
|
||||
|
||||
9
.github/ISSUE_TEMPLATE
vendored
@@ -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か
|
||||
|
||||
-->
|
||||
|
||||
14
README.md
@@ -7,7 +7,7 @@
|
||||
[![][dependencies-badge]][dependencies-link]
|
||||
[](http://makeapullrequest.com) [](https://greenkeeper.io/)
|
||||
|
||||
> Lead Maintainer: [syuilo][syuilo-link]
|
||||
**Microblogging. Redefined.**
|
||||
|
||||
**[Misskey](https://misskey.xyz)** is a completely open source,
|
||||
ultimately sophisticated professional microblogging software.
|
||||
@@ -44,9 +44,9 @@ If you want to...
|
||||
|
||||
:heart: Backers & Sponsors
|
||||
----------------------------------------------------------------
|
||||
| ![][nagarus-icon] | ![][dansup-icon] |
|
||||
|:-:|:-:|
|
||||
| [nagarus][nagarus-link] | [dansup][dansup-link] |
|
||||
| <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/619786/32cf01444db24e578cd1982c197f6fc6/1?token-time=2145916800&token-hash=tB1e_r8RlZ5sFL0KV_e8dugapxatNBRK1Z3h67TO1g8%3D"> | <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/12378075/0156f769e20f412594fa6b87d85fe228/1?token-time=2145916800&token-hash=IsIJRUXszzoD6-7pDnRY8I05T9nSznc4GTaxj7C9SwU%3D"> | <img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/4503830/ccf2cc867ea64de0b524bb2e24b9a1cb/1?token-time=2145916800&token-hash=S1zP0QyLU52Dqq6dtc9qNYyWfW86XrYHiR4NMbeOrnA%3D"> |
|
||||
|:-:|:-:|:-:|
|
||||
| [Gargron](https://www.patreon.com/mastodon) | [39ff](https://www.patreon.com/user/creators?u=12378075) | [dansup](https://www.patreon.com/dansup) |
|
||||
|
||||
:four_leaf_clover: Copyright
|
||||
----------------------------------------------------------------
|
||||
@@ -73,9 +73,3 @@ Misskey is an open-source software licensed under the [GNU AGPLv3](LICENSE).
|
||||
|
||||
[syuilo-link]: https://syuilo.com
|
||||
[syuilo-icon]: https://avatars2.githubusercontent.com/u/4439005?v=3&s=70
|
||||
|
||||
[nagarus-link]: https://www.patreon.com/user/creators?u=11601413
|
||||
[nagarus-icon]: https://c10.patreonusercontent.com/3/eyJ2IjoiMSIsInciOjIwMH0%3D/patreon-media/user/11601413/20cb15f209924302b399b99d3c98b850?token-time=2145916800&token-hash=IO31nK6VZCMWBWU2VAk2c824BX2QZ4DNPKyHHZXS0iw%3D
|
||||
[dansup-link]: https://www.patreon.com/dansup
|
||||
[dansup-icon]: https://c10.patreonusercontent.com/3/eyJ2IjoiMSIsInciOjIwMH0%3D/patreon-media/user/4503830/ccf2cc867ea64de0b524bb2e24b9a1cb?token-time=2145916800&token-hash=opXAM_pnhUTuN1jCA6p_Nn_YsaqohY465YFjWFqMEEE%3D
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
assets/title.png
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 3.8 KiB |
168
cli/init.js
@@ -1,168 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const yaml = require('js-yaml');
|
||||
const inquirer = require('inquirer');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const configDirPath = `${__dirname}/../.config`;
|
||||
const configPath = `${configDirPath}/default.yml`;
|
||||
|
||||
const form = [{
|
||||
type: 'input',
|
||||
name: 'maintainerName',
|
||||
message: 'Your name:'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'maintainerUrl',
|
||||
message: 'Your home page URL or your mailto URL:'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'url',
|
||||
message: 'URL you want to run Misskey:',
|
||||
validate: function(wannabeurl) {
|
||||
return wannabeurl.match('^http\(s?\)://') ? true :
|
||||
'URL needs to start with http:// or https://';
|
||||
}
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'port',
|
||||
message: 'Listen port (e.g. 443):'
|
||||
}, {
|
||||
type: 'confirm',
|
||||
name: 'https',
|
||||
message: 'Use TLS?',
|
||||
default: false
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'https_key',
|
||||
message: 'Path of tls key:',
|
||||
when: ctx => ctx.https
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'https_cert',
|
||||
message: 'Path of tls cert:',
|
||||
when: ctx => ctx.https
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'https_ca',
|
||||
message: 'Path of tls ca:',
|
||||
when: ctx => ctx.https
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'mongo_host',
|
||||
message: 'MongoDB\'s host:',
|
||||
default: 'localhost'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'mongo_port',
|
||||
message: 'MongoDB\'s port:',
|
||||
default: '27017'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'mongo_db',
|
||||
message: 'MongoDB\'s db:',
|
||||
default: 'misskey'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'mongo_user',
|
||||
message: 'MongoDB\'s user:'
|
||||
}, {
|
||||
type: 'password',
|
||||
name: 'mongo_pass',
|
||||
message: 'MongoDB\'s password:'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'redis_host',
|
||||
message: 'Redis\'s host:',
|
||||
default: 'localhost'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'redis_port',
|
||||
message: 'Redis\'s port:',
|
||||
default: '6379'
|
||||
}, {
|
||||
type: 'password',
|
||||
name: 'redis_pass',
|
||||
message: 'Redis\'s password:'
|
||||
}, {
|
||||
type: 'confirm',
|
||||
name: 'elasticsearch',
|
||||
message: 'Use Elasticsearch?',
|
||||
default: false
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'es_host',
|
||||
message: 'Elasticsearch\'s host:',
|
||||
default: 'localhost',
|
||||
when: ctx => ctx.elasticsearch
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'es_port',
|
||||
message: 'Elasticsearch\'s port:',
|
||||
default: '9200',
|
||||
when: ctx => ctx.elasticsearch
|
||||
}, {
|
||||
type: 'password',
|
||||
name: 'es_pass',
|
||||
message: 'Elasticsearch\'s password:',
|
||||
when: ctx => ctx.elasticsearch
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'recaptcha_site',
|
||||
message: 'reCAPTCHA\'s site key:'
|
||||
}, {
|
||||
type: 'input',
|
||||
name: 'recaptcha_secret',
|
||||
message: 'reCAPTCHA\'s secret key:'
|
||||
}];
|
||||
|
||||
inquirer.prompt(form).then(as => {
|
||||
// Mapping answers
|
||||
const conf = {
|
||||
maintainer: {
|
||||
name: as['maintainerName'],
|
||||
url: as['maintainerUrl']
|
||||
},
|
||||
url: as['url'],
|
||||
port: parseInt(as['port'], 10),
|
||||
mongodb: {
|
||||
host: as['mongo_host'],
|
||||
port: parseInt(as['mongo_port'], 10),
|
||||
db: as['mongo_db'],
|
||||
user: as['mongo_user'],
|
||||
pass: as['mongo_pass']
|
||||
},
|
||||
redis: {
|
||||
host: as['redis_host'],
|
||||
port: parseInt(as['redis_port'], 10),
|
||||
pass: as['redis_pass']
|
||||
},
|
||||
elasticsearch: {
|
||||
enable: as['elasticsearch'],
|
||||
host: as['es_host'] || null,
|
||||
port: parseInt(as['es_port'], 10) || null,
|
||||
pass: as['es_pass'] || null
|
||||
},
|
||||
recaptcha: {
|
||||
site_key: as['recaptcha_site'],
|
||||
secret_key: as['recaptcha_secret']
|
||||
}
|
||||
};
|
||||
|
||||
if (as['https']) {
|
||||
conf.https = {
|
||||
key: as['https_key'] || null,
|
||||
cert: as['https_cert'] || null,
|
||||
ca: as['https_ca'] || null
|
||||
};
|
||||
}
|
||||
|
||||
console.log(`Thanks. Writing the configuration to ${chalk.bold(path.resolve(configPath))}`);
|
||||
|
||||
try {
|
||||
fs.writeFileSync(configPath, yaml.dump(conf));
|
||||
console.log(chalk.green('Well done.'));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
6
docs/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Docs
|
||||
These docs are for contributors of Misskey or admins of instance of Misskey.
|
||||
Docs for users are located in `src/docs`.
|
||||
|
||||
これらのドキュメントはMisskeyの開発者またはMisskeyインスタンス運営者向けです。
|
||||
利用者向けのドキュメントは`src/docs`にあります。
|
||||
35
docs/manage.en.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Management guide
|
||||
|
||||
## Check the status of the job queue
|
||||
In the directory of Misskey:
|
||||
``` shell
|
||||
node_modules/kue/bin/kue-dashboard -p 3050
|
||||
```
|
||||
When you access port 3050, you will see the UI.
|
||||
|
||||
## Suspend users
|
||||
``` shell
|
||||
node cli/suspend (User-ID or Username)
|
||||
```
|
||||
e.g.
|
||||
``` shell
|
||||
# Use id
|
||||
node cli/suspend 57d01a501fdf2d07be417afe
|
||||
|
||||
# Use username
|
||||
node cli/suspend @syuilo
|
||||
|
||||
# Use username (remote)
|
||||
node cli/suspend @syuilo@misskey.xyz
|
||||
```
|
||||
|
||||
## Clean up cached remote files
|
||||
``` shell
|
||||
node cli/clean-cached-remote-files
|
||||
```
|
||||
|
||||
## Clean up unused drive files
|
||||
``` shell
|
||||
node cli/clean-unused-drive-files
|
||||
```
|
||||
> We recommend that you announce a user that unused drive files will be deleted before performing this operation, as it may delete the user's important files.
|
||||
@@ -9,5 +9,27 @@ node_modules/kue/bin/kue-dashboard -p 3050
|
||||
|
||||
## ユーザーを凍結する
|
||||
``` shell
|
||||
node cli/suspend (ユーザーID)
|
||||
node cli/suspend (ユーザーID または ユーザー名)
|
||||
```
|
||||
例:
|
||||
``` shell
|
||||
# ユーザーID
|
||||
node cli/suspend 57d01a501fdf2d07be417afe
|
||||
|
||||
# ユーザー名
|
||||
node cli/suspend @syuilo
|
||||
|
||||
# ユーザー名 (リモート)
|
||||
node cli/suspend @syuilo@misskey.xyz
|
||||
```
|
||||
|
||||
## キャッシュされたリモートファイルをクリーンアップする
|
||||
``` shell
|
||||
node cli/clean-cached-remote-files
|
||||
```
|
||||
|
||||
## 使われていないドライブのファイルをクリーンアップする
|
||||
``` shell
|
||||
node cli/clean-unused-drive-files
|
||||
```
|
||||
> ユーザーの大事なファイルを削除する可能性があるので、この操作を実行する前にユーザーに告知することをお勧めします。
|
||||
|
||||
103
docs/setup.en.md
@@ -8,18 +8,13 @@ This guide describes how to install and setup Misskey.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
*1.* reCAPTCHA tokens
|
||||
*1.* Create Misskey user
|
||||
----------------------------------------------------------------
|
||||
Misskey requires reCAPTCHA tokens.
|
||||
Please visit https://www.google.com/recaptcha/intro/ and generate keys.
|
||||
Running misskey on root is not a good idea so we create a user for that.
|
||||
In debian for exemple :
|
||||
|
||||
*(optional)* Generating VAPID keys
|
||||
----------------------------------------------------------------
|
||||
If you want to enable ServiceWroker, you need to generate VAPID keys:
|
||||
|
||||
``` shell
|
||||
npm install web-push -g
|
||||
web-push generate-vapid-keys
|
||||
```
|
||||
adduser --disabled-password --disabled-login misskey
|
||||
```
|
||||
|
||||
*2.* Install dependencies
|
||||
@@ -28,24 +23,52 @@ Please install and setup these softwares:
|
||||
|
||||
#### Dependencies :package:
|
||||
* *Node.js* and *npm*
|
||||
* **[MongoDB](https://www.mongodb.com/)**
|
||||
* **[MongoDB](https://www.mongodb.com/)** >= 3.6
|
||||
* **[Redis](https://redis.io/)**
|
||||
* **[ImageMagick](http://www.imagemagick.org/script/index.php)** >= 7.0
|
||||
|
||||
##### Optional
|
||||
* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB
|
||||
|
||||
*3.* Install Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `git clone -b master git://github.com/syuilo/misskey.git`
|
||||
2. `cd misskey`
|
||||
3. `npm install`
|
||||
|
||||
*4.* Prepare configuration
|
||||
*3.* Setup Mongodb Database
|
||||
----------------------------------------------------------------
|
||||
You need to generate config file via `npm run config` command.
|
||||
In root :
|
||||
1. `mongo` Go to the mongo shell
|
||||
2. `use misskey` Use the misskey database
|
||||
3. `db.users.save( {dummy:"dummy"} )` Write dummy data to initialize the db.
|
||||
4. `db.createUser( { user: "misskey", pwd: "<password>", roles: [ { role: "readWrite", db: "misskey" } ] } )` Create the misskey user.
|
||||
5. `exit` You're done !
|
||||
|
||||
*5.* Build Misskey
|
||||
*4.* Install Misskey
|
||||
----------------------------------------------------------------
|
||||
1. `su - misskey` Connect to misskey user.
|
||||
2. `git clone -b master git://github.com/syuilo/misskey.git` Clone the misskey repo from master branch.
|
||||
3. `cd misskey` Navigate to misskey directory
|
||||
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.
|
||||
|
||||
*(optional)* reCAPTCHA tokens
|
||||
----------------------------------------------------------------
|
||||
If you want to enable reCAPTCHA, you need to generate reCAPTCHA tokens:
|
||||
Please visit https://www.google.com/recaptcha/intro/ and generate keys.
|
||||
|
||||
*(optional)* Generating VAPID keys
|
||||
----------------------------------------------------------------
|
||||
If you want to enable ServiceWroker, you need to generate VAPID keys:
|
||||
Unless you have set your global node_modules location elsewhere, you need to run this in root.
|
||||
|
||||
``` shell
|
||||
npm install web-push -g
|
||||
web-push generate-vapid-keys
|
||||
```
|
||||
|
||||
*5.* Make configuration file
|
||||
----------------------------------------------------------------
|
||||
1. `cp .config/example.yml .config/default.yml` Copy the `.config/example.yml` and rename it to `default.yml`.
|
||||
2. Edit `default.yml`
|
||||
|
||||
*6.* Build Misskey
|
||||
----------------------------------------------------------------
|
||||
|
||||
Build misskey with the following:
|
||||
@@ -61,14 +84,44 @@ If you're still encountering errors about some modules, use node-gyp:
|
||||
3. `node-gyp build`
|
||||
4. `npm run build`
|
||||
|
||||
*6.* That is it.
|
||||
*7.* That is it.
|
||||
----------------------------------------------------------------
|
||||
Well done! Now, you have an environment that run to Misskey.
|
||||
|
||||
### Launch
|
||||
Just `sudo npm start`. GLHF!
|
||||
### Launch normally
|
||||
Just `npm start`. GLHF!
|
||||
|
||||
### Launch with systemd
|
||||
|
||||
1. Create a systemd service here: `/etc/systemd/system/misskey.service`
|
||||
2. Edit it, and paste this and save:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Misskey daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=misskey
|
||||
ExecStart=/usr/bin/npm start
|
||||
WorkingDirectory=/home/misskey/misskey
|
||||
TimeoutSec=60
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=misskey
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
3. `systemctl daemon-reload ; systemctl enable misskey` Reload systemd and enable the misskey service.
|
||||
4. `systemctl start misskey` Start the misskey service.
|
||||
|
||||
You can check if the service is running with `systemctl status misskey`.
|
||||
|
||||
### Way to Update to latest version of your Misskey
|
||||
1. `git reset --hard && git pull origin master`
|
||||
2. `npm install`
|
||||
3. `npm run build`
|
||||
1. `git fetch`
|
||||
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
3. `npm install`
|
||||
4. `npm run build`
|
||||
|
||||
117
docs/setup.ja.md
@@ -8,10 +8,49 @@ Misskeyサーバーの構築にご関心をお寄せいただきありがとう
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
*1.* reCAPTCHAトークンの用意
|
||||
*1.* Misskeyユーザーの作成
|
||||
----------------------------------------------------------------
|
||||
MisskeyはreCAPTCHAトークンを必要とします。
|
||||
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを生成してください。
|
||||
Misskeyのrootで実行しない方がよいため、代わりにユーザーを作成します。
|
||||
Debianの例:
|
||||
|
||||
```
|
||||
adduser --disabled-password --disabled-login misskey
|
||||
```
|
||||
|
||||
*2.* 依存関係をインストールする
|
||||
----------------------------------------------------------------
|
||||
これらのソフトウェアをインストール・設定してください:
|
||||
|
||||
#### 依存関係 :package:
|
||||
* *Node.js* と *npm*
|
||||
* **[MongoDB](https://www.mongodb.com/)** (3.6以上)
|
||||
* **[Redis](https://redis.io/)**
|
||||
* **[ImageMagick](http://www.imagemagick.org/script/index.php)**
|
||||
|
||||
##### オプション
|
||||
* [Elasticsearch](https://www.elastic.co/) - 検索機能を向上させるために用います。
|
||||
|
||||
*3.* Mongodbの設定
|
||||
----------------------------------------------------------------
|
||||
ルートで:
|
||||
1. `mongo` mongoシェルを起動
|
||||
2. `use misskey` misskeyデータベースを使用
|
||||
3. `db.users.save( {dummy:"dummy"} )` ダミーデータを書き込みDBを初期化
|
||||
4. `db.createUser( { user: "misskey", pwd: "<password>", roles: [ { role: "readWrite", db: "misskey" } ] } )` misskeyユーザーを作成
|
||||
5. `exit` mongoシェルを終了
|
||||
|
||||
*4.* Misskeyのインストール
|
||||
----------------------------------------------------------------
|
||||
1. `su - misskey` misskeyユーザーを使用
|
||||
2. `git clone -b master git://github.com/syuilo/misskey.git` masterブランチからMisskeyレポジトリをクローン
|
||||
3. `cd misskey` misskeyディレクトリに移動
|
||||
4. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)` [最新のリリース](https://github.com/syuilo/misskey/releases/latest)を確認
|
||||
5. `npm install` Misskeyの依存パッケージをインストール
|
||||
|
||||
*(オプション)* reCAPTCHAトークン
|
||||
----------------------------------------------------------------
|
||||
reCAPTCHAを有効にする場合、reCAPTCHAトークンを取得する必要があります。
|
||||
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを取得してください。
|
||||
|
||||
*(オプション)* VAPIDキーペアの生成
|
||||
----------------------------------------------------------------
|
||||
@@ -22,47 +61,66 @@ npm install web-push -g
|
||||
web-push generate-vapid-keys
|
||||
```
|
||||
|
||||
*2.* 依存関係をインストールする
|
||||
*5.* 設定ファイルを作成する
|
||||
----------------------------------------------------------------
|
||||
これらのソフトウェアをインストール・設定してください:
|
||||
1. `cp .config/example.yml .config/default.yml` `.config/example.yml`をコピーし名前を`default.yml`にする。
|
||||
2. `default.yml` を編集する。
|
||||
|
||||
#### 依存関係 :package:
|
||||
* *Node.js* と *npm*
|
||||
* **[MongoDB](https://www.mongodb.com/)**
|
||||
* **[Redis](https://redis.io/)**
|
||||
* **[ImageMagick](http://www.imagemagick.org/script/index.php)**
|
||||
|
||||
##### オプション
|
||||
* [Elasticsearch](https://www.elastic.co/) - 検索機能を向上させるために用います。
|
||||
|
||||
*3.* Misskeyのインストール
|
||||
*6.* Misskeyのビルド
|
||||
----------------------------------------------------------------
|
||||
1. `git clone -b master git://github.com/syuilo/misskey.git`
|
||||
2. `cd misskey`
|
||||
3. `npm install`
|
||||
|
||||
*4.* 設定ファイルを用意する
|
||||
----------------------------------------------------------------
|
||||
`npm run config`コマンドを利用して、ガイドに従って情報を入力してください。
|
||||
次のコマンドでMisskeyをビルドしてください:
|
||||
|
||||
*5.* Misskeyのビルド
|
||||
----------------------------------------------------------------
|
||||
`npm run build`
|
||||
|
||||
Debianをお使いであれば、`build-essential`パッケージをインストールする必要があります。
|
||||
|
||||
何らかのモジュールでエラーが発生する場合はnode-gypを使ってください:
|
||||
1. `npm install -g node-gyp`
|
||||
2. `node-gyp configure`
|
||||
3. `node-gyp build`
|
||||
4. `npm run build`
|
||||
|
||||
*6.* 以上です!
|
||||
*7.* 以上です!
|
||||
----------------------------------------------------------------
|
||||
お疲れ様でした。これでMisskeyを動かす準備は整いました。
|
||||
|
||||
### 起動
|
||||
`sudo npm start`するだけです。GLHF!
|
||||
### 通常起動
|
||||
`npm start`するだけです。GLHF!
|
||||
|
||||
### systemdを用いた起動
|
||||
1. systemdサービスのファイルを作成: `/etc/systemd/system/misskey.service`
|
||||
2. エディタで開き、以下のコードを貼り付けて保存:
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Misskey daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=misskey
|
||||
ExecStart=/usr/bin/npm start
|
||||
WorkingDirectory=/home/misskey/misskey
|
||||
TimeoutSec=60
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=misskey
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
3. `systemctl daemon-reload ; systemctl enable misskey` systemdを再読み込みしmisskeyサービスを有効化
|
||||
4. `systemctl start misskey` misskeyサービスの起動
|
||||
|
||||
`systemctl status misskey`と入力すると、サービスの状態を調べることができます。
|
||||
|
||||
### Misskeyを最新バージョンにアップデートする方法:
|
||||
1. `git reset --hard && git pull origin master`
|
||||
2. `npm install`
|
||||
3. `npm run build`
|
||||
1. `git fetch`
|
||||
2. `git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)`
|
||||
3. `npm install`
|
||||
4. `npm run build`
|
||||
|
||||
## メモリが足りなくてビルドできない場合
|
||||
Misskeyの(クライアントの)ビルドには、目安として8GBくらいのメモリを必要とします。
|
||||
@@ -74,4 +132,3 @@ VPSなどでビルドする時は、もしかしたらメモリが足りなく
|
||||
3. npm run webpack
|
||||
4. built/client をサーバーにアップロードする
|
||||
5. サーバー上で、npm run gulp
|
||||
6. 完了
|
||||
|
||||
34
gulpfile.ts
@@ -9,6 +9,7 @@ import * as ts from 'gulp-typescript';
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
import tslint from 'gulp-tslint';
|
||||
const cssnano = require('gulp-cssnano');
|
||||
const stylus = require('gulp-stylus');
|
||||
import * as uglifyComposer from 'gulp-uglify/composer';
|
||||
import pug = require('gulp-pug');
|
||||
import * as rimraf from 'rimraf';
|
||||
@@ -22,7 +23,6 @@ const uglifyes = require('uglify-es');
|
||||
|
||||
const locales = require('./locales');
|
||||
import { fa } from './src/misc/fa';
|
||||
const client = require('./built/client/meta.json');
|
||||
import config from './src/config';
|
||||
|
||||
const uglify = uglifyComposer(uglifyes, console);
|
||||
@@ -38,8 +38,6 @@ if (isDebug) {
|
||||
|
||||
const constants = require('./src/const.json');
|
||||
|
||||
require('./src/client/docs/gulpfile.ts');
|
||||
|
||||
gulp.task('build', [
|
||||
'build:ts',
|
||||
'build:copy',
|
||||
@@ -47,8 +45,6 @@ gulp.task('build', [
|
||||
'doc'
|
||||
]);
|
||||
|
||||
gulp.task('rebuild', ['clean', 'build']);
|
||||
|
||||
gulp.task('build:ts', () => {
|
||||
const tsProject = ts.createProject('./tsconfig.json');
|
||||
|
||||
@@ -85,12 +81,12 @@ gulp.task('lint', () =>
|
||||
);
|
||||
|
||||
gulp.task('format', () =>
|
||||
gulp.src('./src/**/*.ts')
|
||||
.pipe(tslint({
|
||||
formatter: 'verbose',
|
||||
fix: true
|
||||
}))
|
||||
.pipe(tslint.report())
|
||||
gulp.src('./src/**/*.ts')
|
||||
.pipe(tslint({
|
||||
formatter: 'verbose',
|
||||
fix: true
|
||||
}))
|
||||
.pipe(tslint.report())
|
||||
);
|
||||
|
||||
gulp.task('mocha', () =>
|
||||
@@ -118,8 +114,9 @@ gulp.task('build:client', [
|
||||
'copy:client'
|
||||
]);
|
||||
|
||||
gulp.task('build:client:script', () =>
|
||||
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
||||
gulp.task('build:client:script', () => {
|
||||
const client = require('./built/client/meta.json');
|
||||
return gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
||||
.pipe(replace('VERSION', JSON.stringify(client.version)))
|
||||
.pipe(replace('API', JSON.stringify(config.api_url)))
|
||||
.pipe(replace('ENV', JSON.stringify(env)))
|
||||
@@ -127,8 +124,8 @@ gulp.task('build:client:script', () =>
|
||||
.pipe(isProduction ? uglify({
|
||||
toplevel: true
|
||||
} as any) : gutil.noop())
|
||||
.pipe(gulp.dest('./built/client/assets/')) as any
|
||||
);
|
||||
.pipe(gulp.dest('./built/client/assets/'));
|
||||
});
|
||||
|
||||
gulp.task('build:client:styles', () =>
|
||||
gulp.src('./src/client/app/init.css')
|
||||
@@ -201,3 +198,10 @@ gulp.task('build:client:pug', [
|
||||
}))
|
||||
.pipe(gulp.dest('./built/client/app/'))
|
||||
);
|
||||
|
||||
gulp.task('doc', () =>
|
||||
gulp.src('./src/docs/**/*.styl')
|
||||
.pipe(stylus())
|
||||
.pipe((cssnano as any)())
|
||||
.pipe(gulp.dest('./built/docs/assets/'))
|
||||
);
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Umbenennen"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URL kopieren"
|
||||
download: "Download"
|
||||
else-files: "Anderes…"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Ein Verzeichnis erstellen"
|
||||
upload: "Eine Datei hochladen"
|
||||
url-upload: "Von einer URL hochladen"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Folge ich"
|
||||
follow: "Folgen"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -91,7 +91,7 @@ common:
|
||||
list: "Lists"
|
||||
swap-left: "Move to the left"
|
||||
swap-right: "Move to the right"
|
||||
swap-up: "Move upward"
|
||||
swap-up: "Move up"
|
||||
swap-down: "Move downward"
|
||||
remove: "Remove"
|
||||
add-column: "Add a column"
|
||||
@@ -271,7 +271,7 @@ desktop/views/components/choose-file-from-drive-window.vue:
|
||||
upload: "Upload files from your device"
|
||||
cancel: "Cancel"
|
||||
ok: "OK"
|
||||
choose-prompt: "Choose a file"
|
||||
choose-prompt: "Choose files"
|
||||
desktop/views/components/choose-folder-from-drive-window.vue:
|
||||
cancel: "Cancel"
|
||||
ok: "OK"
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Rename"
|
||||
mark-as-sensitive: "Mark as 'sensitive'"
|
||||
unmark-as-sensitive: "Unmark as 'sensitive'"
|
||||
copy-url: "Copy URL"
|
||||
download: "Download"
|
||||
else-files: "Others"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Create a folder"
|
||||
upload: "Upload a file"
|
||||
url-upload: "Upload from a URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Following"
|
||||
follow: "Follow"
|
||||
@@ -716,7 +724,7 @@ mobile/views/components/drive.vue:
|
||||
mobile/views/components/drive-file-detail.vue:
|
||||
rename: "Rename"
|
||||
mobile/views/components/drive-file-chooser.vue:
|
||||
select-file: "Choose a file"
|
||||
select-file: "Choose files"
|
||||
mobile/views/components/drive-folder-chooser.vue:
|
||||
select-folder: "Choose a folder"
|
||||
mobile/views/components/drive.file-detail.vue:
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Move"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "The content is NSFW"
|
||||
click-to-show: "Click to show"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Following"
|
||||
follow: "Follow"
|
||||
@@ -855,7 +869,7 @@ mobile/views/pages/search.vue:
|
||||
search: "Search"
|
||||
empty: "No posts were found for '{}'"
|
||||
mobile/views/pages/selectdrive.vue:
|
||||
select-file: "Choose a file"
|
||||
select-file: "Choose files"
|
||||
mobile/views/pages/settings.vue:
|
||||
signed-in-as: "Signed in as {}"
|
||||
lang: "Language"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "Properties"
|
||||
endpoints:
|
||||
params: "Parameters"
|
||||
no-params: "No parameter."
|
||||
res: "Response"
|
||||
require-credential: "This endpoint requires the authentication information."
|
||||
require-permission: "This endpoint requires {permission} permission."
|
||||
has-limit: "There is a rate limit."
|
||||
duration-limit: "You can't request when a frequency of a request in during {duration} milliseconds exceeds {max} times."
|
||||
min-interval-limit: "You can't request before {interval} milliseconds has passed since previous request."
|
||||
show-src: "You can view source code for this endpoint."
|
||||
show-src-link: "See the code on GitHub"
|
||||
generated: "This doc is generated by an API definition."
|
||||
props:
|
||||
name: "Name"
|
||||
type: "Type"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Banner"
|
||||
contextmenu:
|
||||
rename: "Renombrar"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Copia la URL"
|
||||
download: "Descargar"
|
||||
else-files: "Otros"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Crear una carpeta"
|
||||
upload: "Subir fichero"
|
||||
url-upload: "Subir desde una URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Siguiendo"
|
||||
follow: "Sigue"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Bannière"
|
||||
contextmenu:
|
||||
rename: "Renommer"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Copier l'URL"
|
||||
download: "Télécharger"
|
||||
else-files: "Autres..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Créer un dossier"
|
||||
upload: "Uploader un fichier"
|
||||
url-upload: "Uploader d'un URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Abonnements"
|
||||
follow: "Suivre"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Déplacer"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Abonnements"
|
||||
follow: "Suivre"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "Propriétés"
|
||||
endpoints:
|
||||
params: "Paramètres"
|
||||
no-params: "パラメータはありません"
|
||||
res: "Réponse"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "Nom"
|
||||
type: "Type"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -330,6 +330,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -377,6 +379,14 @@ desktop/views/components/drive.vue:
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -853,6 +863,14 @@ mobile/views/components/drive.file-detail.vue:
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -1098,7 +1116,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -85,7 +85,7 @@ common:
|
||||
widgets: "Widżety"
|
||||
home: "Strona główna"
|
||||
local: "Lokalne"
|
||||
hybrid: "ソーシャル"
|
||||
hybrid: "Społeczność"
|
||||
global: "Globalne"
|
||||
notifications: "Powiadomienia"
|
||||
list: "Listy"
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "Baner"
|
||||
contextmenu:
|
||||
rename: "Zmień nazwę"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "Skopiuj adres"
|
||||
download: "Pobierz"
|
||||
else-files: "Inne"
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "Utwórz katalog"
|
||||
upload: "Wyślij plik"
|
||||
url-upload: "Wyślij z adresu URL"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "Śledzisz"
|
||||
follow: "Śledź"
|
||||
@@ -557,7 +565,7 @@ desktop/views/components/taskmanager.vue:
|
||||
desktop/views/components/timeline.vue:
|
||||
home: "Strona główna"
|
||||
local: "Lokalne"
|
||||
hybrid: "ソーシャル"
|
||||
hybrid: "Społeczność"
|
||||
global: "Globalne"
|
||||
list: "Listy"
|
||||
desktop/views/components/ui.header.vue:
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "Przenieś"
|
||||
hash: "Hash (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "Śledzisz"
|
||||
follow: "Śledź"
|
||||
@@ -820,7 +834,7 @@ mobile/views/pages/following.vue:
|
||||
mobile/views/pages/home.vue:
|
||||
home: "Strona główna"
|
||||
local: "Lokalne"
|
||||
hybrid: "ソーシャル"
|
||||
hybrid: "Społeczność"
|
||||
global: "Globalne"
|
||||
mobile/views/pages/messaging.vue:
|
||||
messaging: "Wiadomości"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "Właściwości"
|
||||
endpoints:
|
||||
params: "Parametry"
|
||||
no-params: "パラメータはありません"
|
||||
res: "Odpowiedź"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "Zobacz kod na GitHubie"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "Nazwa"
|
||||
type: "Rodzaj"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
@@ -288,6 +288,8 @@ desktop/views/components/drive.file.vue:
|
||||
banner: "バナー"
|
||||
contextmenu:
|
||||
rename: "名前を変更"
|
||||
mark-as-sensitive: "閲覧注意に設定"
|
||||
unmark-as-sensitive: "閲覧注意を解除"
|
||||
copy-url: "URLをコピー"
|
||||
download: "ダウンロード"
|
||||
else-files: "その他..."
|
||||
@@ -331,6 +333,12 @@ desktop/views/components/drive.vue:
|
||||
create-folder: "フォルダーを作成"
|
||||
upload: "ファイルをアップロード"
|
||||
url-upload: "URLからアップロード"
|
||||
desktop/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
desktop/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -725,6 +733,12 @@ mobile/views/components/drive.file-detail.vue:
|
||||
move: "移動"
|
||||
hash: "ハッシュ (md5)"
|
||||
exif: "EXIF"
|
||||
mobile/views/components/media-image.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/media-video.vue:
|
||||
sensitive: "閲覧注意"
|
||||
click-to-show: "クリックして表示"
|
||||
mobile/views/components/follow-button.vue:
|
||||
following: "フォロー中"
|
||||
follow: "フォロー"
|
||||
@@ -934,7 +948,16 @@ docs:
|
||||
properties: "プロパティ"
|
||||
endpoints:
|
||||
params: "パラメータ"
|
||||
no-params: "パラメータはありません"
|
||||
res: "レスポンス"
|
||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
||||
has-limit: "レートリミットがあります。"
|
||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
||||
show-src-link: "コードをGitHubで見る"
|
||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||
props:
|
||||
name: "名前"
|
||||
type: "型"
|
||||
|
||||
18183
package-lock.json
generated
33
package.json
@@ -1,21 +1,18 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "4.19.1",
|
||||
"clientVersion": "1.0.7183",
|
||||
"version": "4.26.0",
|
||||
"clientVersion": "1.0.7435",
|
||||
"codename": "nighthike",
|
||||
"main": "./built/index.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"config": "node ./cli/init.js",
|
||||
"start": "node ./built",
|
||||
"debug": "DEBUG=misskey:* node ./built",
|
||||
"swagger": "node ./swagger.js",
|
||||
"build": "webpack && gulp build",
|
||||
"webpack": "webpack",
|
||||
"watch": "webpack --watch",
|
||||
"gulp": "gulp build",
|
||||
"rebuild": "gulp rebuild",
|
||||
"clean": "gulp clean",
|
||||
"cleanall": "gulp cleanall",
|
||||
"lint": "gulp lint",
|
||||
@@ -31,6 +28,7 @@
|
||||
"@prezzemolo/rap": "0.1.2",
|
||||
"@prezzemolo/zip": "0.0.3",
|
||||
"@types/bcryptjs": "2.4.1",
|
||||
"@types/dateformat": "1.0.1",
|
||||
"@types/debug": "0.0.30",
|
||||
"@types/deep-equal": "1.0.1",
|
||||
"@types/elasticsearch": "5.0.25",
|
||||
@@ -43,7 +41,6 @@
|
||||
"@types/gulp-replace": "0.0.31",
|
||||
"@types/gulp-uglify": "3.0.5",
|
||||
"@types/gulp-util": "3.0.34",
|
||||
"@types/inquirer": "0.0.42",
|
||||
"@types/is-root": "1.0.0",
|
||||
"@types/is-url": "1.2.28",
|
||||
"@types/js-yaml": "3.11.2",
|
||||
@@ -75,11 +72,12 @@
|
||||
"@types/request-promise-native": "1.0.15",
|
||||
"@types/rimraf": "2.0.2",
|
||||
"@types/seedrandom": "2.4.27",
|
||||
"@types/showdown": "1.7.5",
|
||||
"@types/single-line-log": "1.1.0",
|
||||
"@types/speakeasy": "2.0.2",
|
||||
"@types/tmp": "0.0.33",
|
||||
"@types/uuid": "3.4.3",
|
||||
"@types/webpack": "4.4.6",
|
||||
"@types/webpack": "4.4.7",
|
||||
"@types/webpack-stream": "3.2.10",
|
||||
"@types/websocket": "0.0.39",
|
||||
"@types/ws": "5.1.2",
|
||||
@@ -92,6 +90,7 @@
|
||||
"chalk": "2.4.1",
|
||||
"crc-32": "1.2.0",
|
||||
"css-loader": "1.0.0",
|
||||
"dateformat": "3.0.3",
|
||||
"debug": "3.1.0",
|
||||
"deep-equal": "1.0.1",
|
||||
"deepcopy": "0.6.3",
|
||||
@@ -99,10 +98,10 @@
|
||||
"dompurify": "1.0.5",
|
||||
"elasticsearch": "15.1.1",
|
||||
"element-ui": "2.4.4",
|
||||
"emojilib": "2.2.12",
|
||||
"emojilib": "2.3.0",
|
||||
"escape-regexp": "0.0.1",
|
||||
"eslint": "5.0.1",
|
||||
"eslint-plugin-vue": "4.5.0",
|
||||
"eslint-plugin-vue": "4.7.0",
|
||||
"eventemitter3": "3.1.0",
|
||||
"exif-js": "2.3.0",
|
||||
"file-loader": "1.1.11",
|
||||
@@ -127,9 +126,10 @@
|
||||
"highlight.js": "9.12.0",
|
||||
"html-minifier": "3.5.19",
|
||||
"http-signature": "1.2.0",
|
||||
"inquirer": "6.0.0",
|
||||
"insert-text-at-cursor": "0.1.1",
|
||||
"is-root": "2.0.0",
|
||||
"is-url": "1.2.4",
|
||||
"jquery": "3.3.1",
|
||||
"js-yaml": "3.12.0",
|
||||
"jsdom": "11.11.0",
|
||||
"koa": "2.5.1",
|
||||
@@ -179,13 +179,15 @@
|
||||
"s-age": "1.1.2",
|
||||
"sass-loader": "7.0.3",
|
||||
"seedrandom": "2.4.3",
|
||||
"showdown": "1.8.6",
|
||||
"showdown-highlightjs-extension": "0.1.2",
|
||||
"single-line-log": "1.1.2",
|
||||
"speakeasy": "2.0.0",
|
||||
"style-loader": "0.21.0",
|
||||
"stylus": "0.54.5",
|
||||
"stylus-loader": "3.0.2",
|
||||
"summaly": "2.0.6",
|
||||
"swagger-jsdoc": "1.9.7",
|
||||
"swagger-jsdoc": "1.10.2",
|
||||
"syuilo-password-strength": "0.0.1",
|
||||
"textarea-caret": "3.1.0",
|
||||
"tmp": "0.0.33",
|
||||
@@ -202,16 +204,17 @@
|
||||
"vue-cropperjs": "2.2.1",
|
||||
"vue-js-modal": "1.3.16",
|
||||
"vue-json-tree-view": "2.1.4",
|
||||
"vue-loader": "15.2.4",
|
||||
"vue-loader": "15.2.6",
|
||||
"vue-router": "3.0.1",
|
||||
"vue-style-loader": "4.1.1",
|
||||
"vue-template-compiler": "2.5.16",
|
||||
"vuedraggable": "2.16.0",
|
||||
"vuex": "3.0.1",
|
||||
"vuex-persistedstate": "^2.5.4",
|
||||
"vuex-persistedstate": "2.5.4",
|
||||
"web-push": "3.3.2",
|
||||
"webfinger.js": "2.6.6",
|
||||
"webpack": "4.16.0",
|
||||
"webpack-cli": "3.0.8",
|
||||
"webpack": "4.16.1",
|
||||
"webpack-cli": "3.1.0",
|
||||
"websocket": "1.0.26",
|
||||
"ws": "5.2.2",
|
||||
"xev": "2.0.1"
|
||||
|
||||
@@ -39,13 +39,17 @@ export default Vue.extend({
|
||||
dark: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
smooth: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
now: new Date(),
|
||||
clock: null,
|
||||
enabled: true,
|
||||
|
||||
graduationsPadding: 0.5,
|
||||
handsPadding: 1,
|
||||
@@ -74,6 +78,9 @@ export default Vue.extend({
|
||||
return themeColor;
|
||||
},
|
||||
|
||||
ms(): number {
|
||||
return this.now.getMilliseconds() * this.smooth;
|
||||
}
|
||||
s(): number {
|
||||
return this.now.getSeconds();
|
||||
},
|
||||
@@ -85,13 +92,13 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
hAngle(): number {
|
||||
return Math.PI * (this.h % 12 + this.m / 60) / 6;
|
||||
return Math.PI * (this.h % 12 + (this.m + (this.s + this.ms / 1000) / 60) / 60) / 6;
|
||||
},
|
||||
mAngle(): number {
|
||||
return Math.PI * (this.m + this.s / 60) / 30;
|
||||
return Math.PI * (this.m + (this.s + this.ms / 1000) / 60) / 30;
|
||||
},
|
||||
sAngle(): number {
|
||||
return Math.PI * this.s / 30;
|
||||
return Math.PI * (this.s + this.ms / 1000) / 30;
|
||||
},
|
||||
|
||||
graduations(): any {
|
||||
@@ -106,11 +113,17 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.clock = setInterval(this.tick, 1000);
|
||||
const update = () => {
|
||||
if (this.enabled) {
|
||||
this.tick();
|
||||
requestAnimationFrame(update);
|
||||
}
|
||||
};
|
||||
update();
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
clearInterval(this.clock);
|
||||
this.enabled = false;
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
<span class="username">@{{ user | acct }}</span>
|
||||
</li>
|
||||
</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">
|
||||
<li v-for="emoji in emojis" @click="complete(type, emoji.emoji)" @keydown="onKeydown" tabindex="-1">
|
||||
<span class="emoji">{{ emoji.emoji }}</span>
|
||||
@@ -48,33 +53,33 @@ emjdb.sort((a, b) => a.name.length - b.name.length);
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['type', 'q', 'textarea', 'complete', 'close', 'x', 'y'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
users: [],
|
||||
hashtags: [],
|
||||
emojis: [],
|
||||
select: -1,
|
||||
emojilib
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
items(): HTMLCollection {
|
||||
return (this.$refs.suggests as Element).children;
|
||||
}
|
||||
},
|
||||
|
||||
updated() {
|
||||
//#region 位置調整
|
||||
const margin = 32;
|
||||
|
||||
if (this.x + this.$el.offsetWidth > window.innerWidth - margin) {
|
||||
this.$el.style.left = (this.x - this.$el.offsetWidth) + 'px';
|
||||
this.$el.style.marginLeft = '-16px';
|
||||
if (this.x + this.$el.offsetWidth > window.innerWidth) {
|
||||
this.$el.style.left = (window.innerWidth - this.$el.offsetWidth) + 'px';
|
||||
} else {
|
||||
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.marginTop = '0';
|
||||
} else {
|
||||
@@ -83,6 +88,7 @@ export default Vue.extend({
|
||||
}
|
||||
//#endregion
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.textarea.addEventListener('keydown', this.onKeydown);
|
||||
|
||||
@@ -100,6 +106,7 @@ export default Vue.extend({
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.textarea.removeEventListener('keydown', this.onKeydown);
|
||||
|
||||
@@ -107,6 +114,7 @@ export default Vue.extend({
|
||||
el.removeEventListener('mousedown', this.onMousedown);
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
exec() {
|
||||
this.select = -1;
|
||||
@@ -117,7 +125,8 @@ export default Vue.extend({
|
||||
}
|
||||
|
||||
if (this.type == 'user') {
|
||||
const cache = sessionStorage.getItem(this.q);
|
||||
const cacheKey = 'autocomplete:user:' + this.q;
|
||||
const cache = sessionStorage.getItem(cacheKey);
|
||||
if (cache) {
|
||||
const users = JSON.parse(cache);
|
||||
this.users = users;
|
||||
@@ -131,7 +140,26 @@ export default Vue.extend({
|
||||
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') {
|
||||
@@ -228,12 +256,13 @@ export default Vue.extend({
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
.mk-autocomplete
|
||||
root(isDark)
|
||||
position fixed
|
||||
z-index 65535
|
||||
max-width 100%
|
||||
margin-top calc(1em + 8px)
|
||||
overflow hidden
|
||||
background #fff
|
||||
background isDark ? #313543 : #fff
|
||||
border solid 1px rgba(#000, 0.1)
|
||||
border-radius 4px
|
||||
transition top 0.1s ease, left 0.1s ease
|
||||
@@ -248,7 +277,8 @@ export default Vue.extend({
|
||||
list-style none
|
||||
|
||||
> li
|
||||
display block
|
||||
display flex
|
||||
align-items center
|
||||
padding 4px 12px
|
||||
white-space nowrap
|
||||
overflow hidden
|
||||
@@ -259,7 +289,13 @@ export default Vue.extend({
|
||||
&, *
|
||||
user-select none
|
||||
|
||||
*
|
||||
overflow hidden
|
||||
text-overflow ellipsis
|
||||
|
||||
&:hover
|
||||
background isDark ? rgba(#fff, 0.1) : rgba(#000, 0.1)
|
||||
|
||||
&[data-selected='true']
|
||||
background $theme-color
|
||||
|
||||
@@ -275,7 +311,6 @@ export default Vue.extend({
|
||||
> .users > li
|
||||
|
||||
.avatar
|
||||
vertical-align middle
|
||||
min-width 28px
|
||||
min-height 28px
|
||||
max-width 28px
|
||||
@@ -285,10 +320,16 @@ export default Vue.extend({
|
||||
|
||||
.name
|
||||
margin 0 8px 0 0
|
||||
color rgba(#000, 0.8)
|
||||
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
||||
|
||||
.username
|
||||
color 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
|
||||
|
||||
@@ -298,10 +339,15 @@ export default Vue.extend({
|
||||
width 24px
|
||||
|
||||
.name
|
||||
color rgba(#000, 0.8)
|
||||
color isDark ? rgba(#fff, 0.8) : rgba(#000, 0.8)
|
||||
|
||||
.alias
|
||||
margin 0 0 0 8px
|
||||
color rgba(#000, 0.3)
|
||||
color isDark ? rgba(#fff, 0.3) : rgba(#000, 0.3)
|
||||
|
||||
.mk-autocomplete[data-darkmode]
|
||||
root(true)
|
||||
|
||||
.mk-autocomplete:not([data-darkmode])
|
||||
root(false)
|
||||
</style>
|
||||
|
||||
@@ -46,33 +46,45 @@ export default Vue.extend({
|
||||
display grid
|
||||
grid-gap 4px
|
||||
|
||||
> *
|
||||
overflow hidden
|
||||
border-radius 4px
|
||||
|
||||
&[data-count="1"]
|
||||
grid-template-rows 1fr
|
||||
|
||||
&[data-count="2"]
|
||||
grid-template-columns 1fr 1fr
|
||||
grid-template-rows 1fr
|
||||
|
||||
&[data-count="3"]
|
||||
grid-template-columns 1fr 0.5fr
|
||||
grid-template-rows 1fr 1fr
|
||||
:nth-child(1)
|
||||
|
||||
> *:nth-child(1)
|
||||
grid-row 1 / 3
|
||||
:nth-child(3)
|
||||
|
||||
> *:nth-child(3)
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
|
||||
&[data-count="4"]
|
||||
grid-template-columns 1fr 1fr
|
||||
grid-template-rows 1fr 1fr
|
||||
|
||||
:nth-child(1)
|
||||
> *:nth-child(1)
|
||||
grid-column 1 / 2
|
||||
grid-row 1 / 2
|
||||
:nth-child(2)
|
||||
|
||||
> *:nth-child(2)
|
||||
grid-column 2 / 3
|
||||
grid-row 1 / 2
|
||||
:nth-child(3)
|
||||
|
||||
> *:nth-child(3)
|
||||
grid-column 1 / 2
|
||||
grid-row 2 / 3
|
||||
:nth-child(4)
|
||||
|
||||
> *:nth-child(4)
|
||||
grid-column 2 / 3
|
||||
grid-row 2 / 3
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<div class="content">
|
||||
<div class="balloon" :data-no-text="message.text == null">
|
||||
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
||||
<button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
|
||||
<!-- <button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
|
||||
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
|
||||
</button>
|
||||
</button> -->
|
||||
<div class="content" v-if="!message.isDeleted">
|
||||
<misskey-flavored-markdown class="text" v-if="message.text" ref="text" :text="message.text" :i="$store.state.i"/>
|
||||
<div class="file" v-if="message.file">
|
||||
|
||||
@@ -255,8 +255,7 @@ root(isDark)
|
||||
width 100%
|
||||
max-width 600px
|
||||
margin 0 auto
|
||||
flex 1 1 0
|
||||
overflow-y auto
|
||||
flex 1
|
||||
|
||||
> .init
|
||||
width 100%
|
||||
@@ -342,6 +341,10 @@ root(isDark)
|
||||
background isDark ? #191b22 : #fff
|
||||
|
||||
> footer
|
||||
position -webkit-sticky
|
||||
position sticky
|
||||
z-index 2
|
||||
bottom 0
|
||||
width 100%
|
||||
max-width 600px
|
||||
margin 0 auto
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
<p slot="text" v-if="passwordRetypeState == 'not-match'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@password-not-matched%</p>
|
||||
</div>
|
||||
</ui-input>
|
||||
<div class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
|
||||
<label class="agree-tou" style="display: block; margin: 16px 0;">
|
||||
<input name="agree-tou" type="checkbox" required/>
|
||||
<p><a :href="touUrl" target="_blank">利用規約</a>に同意する</p>
|
||||
</label>
|
||||
<div v-if="recaptchaSitekey != null" class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
|
||||
<ui-button type="submit">%i18n:@create%</ui-button>
|
||||
</form>
|
||||
</template>
|
||||
@@ -41,7 +37,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
const getPasswordStrength = require('syuilo-password-strength');
|
||||
import { host, url, docsUrl, lang, recaptchaSitekey } from '../../../config';
|
||||
import { host, url, recaptchaSitekey } from '../../../config';
|
||||
|
||||
export default Vue.extend({
|
||||
data() {
|
||||
@@ -51,7 +47,6 @@ export default Vue.extend({
|
||||
password: '',
|
||||
retypedPassword: '',
|
||||
url,
|
||||
touUrl: `${docsUrl}/${lang}/tou`,
|
||||
recaptchaSitekey,
|
||||
usernameState: null,
|
||||
passwordStrength: '',
|
||||
@@ -115,7 +110,7 @@ export default Vue.extend({
|
||||
(this as any).api('signup', {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
'g-recaptcha-response': (window as any).grecaptcha.getResponse()
|
||||
'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
|
||||
}).then(() => {
|
||||
(this as any).api('signin', {
|
||||
username: this.username,
|
||||
@@ -126,15 +121,19 @@ export default Vue.extend({
|
||||
}).catch(() => {
|
||||
alert('%i18n:@some-error%');
|
||||
|
||||
(window as any).grecaptcha.reset();
|
||||
if (recaptchaSitekey != null) {
|
||||
(window as any).grecaptcha.reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const head = document.getElementsByTagName('head')[0];
|
||||
const script = document.createElement('script');
|
||||
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
||||
head.appendChild(script);
|
||||
if (recaptchaSitekey != null) {
|
||||
const head = document.getElementsByTagName('head')[0];
|
||||
const script = document.createElement('script');
|
||||
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
||||
head.appendChild(script);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -144,22 +143,4 @@ export default Vue.extend({
|
||||
|
||||
.mk-signup
|
||||
min-width 302px
|
||||
|
||||
.agree-tou
|
||||
padding 4px
|
||||
border-radius 4px
|
||||
|
||||
&:hover
|
||||
background #f4f4f4
|
||||
|
||||
&:active
|
||||
background #eee
|
||||
|
||||
&, *
|
||||
cursor pointer
|
||||
|
||||
p
|
||||
display inline
|
||||
color #555
|
||||
|
||||
</style>
|
||||
|
||||
@@ -67,15 +67,27 @@ class Autocomplete {
|
||||
* テキスト入力時
|
||||
*/
|
||||
private onInput() {
|
||||
const caret = this.textarea.selectionStart;
|
||||
const text = this.text.substr(0, caret);
|
||||
const caretPos = this.textarea.selectionStart;
|
||||
const text = this.text.substr(0, caretPos);
|
||||
|
||||
const mentionIndex = text.lastIndexOf('@');
|
||||
const hashtagIndex = 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;
|
||||
|
||||
if (mentionIndex != -1 && mentionIndex > emojiIndex) {
|
||||
if (isMention) {
|
||||
const username = text.substr(mentionIndex + 1);
|
||||
if (username != '' && username.match(/^[a-zA-Z0-9_]+$/)) {
|
||||
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);
|
||||
if (emoji != '' && emoji.match(/^[\+\-a-z0-9_]+$/)) {
|
||||
this.open('emoji', emoji);
|
||||
@@ -173,6 +193,22 @@ class Autocomplete {
|
||||
const pos = trimmedBefore.length + (value.username.length + 2);
|
||||
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') {
|
||||
const source = this.text;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<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">
|
||||
<mk-analog-clock :dark="$store.state.device.darkmode"/>
|
||||
<mk-analog-clock :dark="$store.state.device.darkmode" :smooth="!(props.design && ~props.design)"/>
|
||||
</div>
|
||||
</mk-widget-container>
|
||||
</div>
|
||||
@@ -13,12 +13,13 @@ import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'analog-clock',
|
||||
props: () => ({
|
||||
naked: false
|
||||
design: -1
|
||||
})
|
||||
}).extend({
|
||||
methods: {
|
||||
func() {
|
||||
this.props.naked = !this.props.naked;
|
||||
if (++this.props.design > 2)
|
||||
this.props.design = -1;
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,6 +175,7 @@ root(isDark)
|
||||
> .val
|
||||
height 4px
|
||||
background $theme-color
|
||||
transition width .3s cubic-bezier(0.23, 1, 0.32, 1)
|
||||
|
||||
&:nth-child(1)
|
||||
> .meter > .val
|
||||
|
||||
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 400 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 424 B |
@@ -35,10 +35,7 @@ import Vue from 'vue';
|
||||
const eachMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
|
||||
function isLeapYear(year) {
|
||||
return (year % 400 == 0) ? true :
|
||||
(year % 100 == 0) ? false :
|
||||
(year % 4 == 0) ? true :
|
||||
false;
|
||||
return !(year % (year % 25 ? 4 : 16));
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@@ -68,6 +68,11 @@ export default Vue.extend({
|
||||
icon: '%fa:i-cursor%',
|
||||
action: this.rename
|
||||
}, {
|
||||
type: 'item',
|
||||
text: this.file.isSensitive ? '%i18n:@contextmenu.unmark-as-sensitive%' : '%i18n:@contextmenu.mark-as-sensitive%',
|
||||
icon: this.file.isSensitive ? '%fa:R eye%' : '%fa:R eye-slash%',
|
||||
action: this.toggleSensitive
|
||||
}, null, {
|
||||
type: 'item',
|
||||
text: '%i18n:@contextmenu.copy-url%',
|
||||
icon: '%fa:link%',
|
||||
@@ -149,6 +154,13 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
|
||||
toggleSensitive() {
|
||||
(this as any).api('drive/files/update', {
|
||||
fileId: this.file.id,
|
||||
isSensitive: !this.file.isSensitive
|
||||
});
|
||||
},
|
||||
|
||||
copyUrl() {
|
||||
copyToClipboard(this.file.url);
|
||||
(this as any).apis.dialog({
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
<span class="separator" v-if="folder != null">%fa:angle-right%</span>
|
||||
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
|
||||
</div>
|
||||
<input class="search" type="search" placeholder=" %i18n:@search%"/>
|
||||
<!--
|
||||
TODO: #343
|
||||
<input class="search" type="search" placeholder=" %i18n:@search%"/>
|
||||
-->
|
||||
</nav>
|
||||
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
|
||||
ref="main"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<a class="mk-media-image"
|
||||
<div class="ldwbgwstjsdgcjruamauqdrffetqudry" v-if="image.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="lcjomzwbohoelkxsnuqjiaccdbdfiazy" v-else
|
||||
:href="image.url"
|
||||
@mousemove="onMousemove"
|
||||
@mouseleave="onMouseleave"
|
||||
@@ -21,6 +27,10 @@ export default Vue.extend({
|
||||
},
|
||||
raw: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -56,16 +66,30 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-image
|
||||
.lcjomzwbohoelkxsnuqjiaccdbdfiazy
|
||||
display block
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
width 100%
|
||||
height 100%
|
||||
background-position center
|
||||
border-radius 4px
|
||||
|
||||
&:not(:hover)
|
||||
background-size cover
|
||||
|
||||
.ldwbgwstjsdgcjruamauqdrffetqudry
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<video class="mk-media-video"
|
||||
<div class="uofhebxjdgksfmltszlxurtjnjjsvioh" v-if="video.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vwxdhznewyashiknzolsoihtlpicqepe" v-else>
|
||||
<video class="video"
|
||||
:src="video.url"
|
||||
:title="video.name"
|
||||
controls
|
||||
@dblclick.prevent="onClick"
|
||||
ref="video"
|
||||
v-if="inlinePlayable" />
|
||||
<a class="mk-media-video-thumbnail"
|
||||
<a class="thumbnail"
|
||||
:href="video.url"
|
||||
:style="imageStyle"
|
||||
@click.prevent="onClick"
|
||||
@@ -14,6 +21,7 @@
|
||||
v-else>
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -21,7 +29,19 @@ import Vue from 'vue';
|
||||
import MkMediaVideoDialog from './media-video-dialog.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['video', 'inlinePlayable'],
|
||||
props: {
|
||||
video: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
inlinePlayable: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageStyle(): any {
|
||||
return {
|
||||
@@ -47,22 +67,39 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-video
|
||||
display block
|
||||
width 100%
|
||||
height 100%
|
||||
border-radius 4px
|
||||
.vwxdhznewyashiknzolsoihtlpicqepe
|
||||
.video
|
||||
display block
|
||||
width 100%
|
||||
height 100%
|
||||
border-radius 4px
|
||||
|
||||
.mk-media-video-thumbnail
|
||||
.thumbnail
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
font-size 3.5em
|
||||
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
background-position center
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
.uofhebxjdgksfmltszlxurtjnjjsvioh
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
font-size 3.5em
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
cursor zoom-in
|
||||
overflow hidden
|
||||
background-position center
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
</style>
|
||||
|
||||
@@ -56,10 +56,10 @@
|
||||
<button @click="menu" ref="menuButton">
|
||||
%fa:ellipsis-h%
|
||||
</button>
|
||||
<button title="%i18n:@detail">
|
||||
<!-- <button title="%i18n:@detail">
|
||||
<template v-if="!isDetailOpened">%fa:caret-down%</template>
|
||||
<template v-if="isDetailOpened">%fa:caret-up%</template>
|
||||
</button>
|
||||
</button> -->
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+ユーザーを追加</a>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="内容への注釈 (オプション)">
|
||||
<textarea :class="{ with: (files.length != 0 || poll) }"
|
||||
ref="text" v-model="text" :disabled="posting"
|
||||
@@ -46,6 +49,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
@@ -91,7 +95,8 @@ export default Vue.extend({
|
||||
visibility: 'public',
|
||||
visibleUsers: [],
|
||||
autocomplete: null,
|
||||
draghover: false
|
||||
draghover: false,
|
||||
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||
};
|
||||
},
|
||||
|
||||
@@ -183,6 +188,10 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
methods: {
|
||||
addTag(tag: string) {
|
||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||
},
|
||||
|
||||
watch() {
|
||||
this.$watch('text', () => this.saveDraft());
|
||||
this.$watch('poll', () => this.saveDraft());
|
||||
@@ -370,6 +379,13 @@ export default Vue.extend({
|
||||
}).then(() => {
|
||||
this.posting = false;
|
||||
});
|
||||
|
||||
if (this.text && this.text != '') {
|
||||
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
|
||||
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
|
||||
history = history.filter(x => !hashtags.includes(x));
|
||||
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
|
||||
}
|
||||
},
|
||||
|
||||
saveDraft() {
|
||||
@@ -478,6 +494,10 @@ root(isDark)
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> .hashtags
|
||||
> *
|
||||
margin-right 8px
|
||||
|
||||
> .medias
|
||||
margin 0
|
||||
padding 0
|
||||
|
||||
@@ -29,9 +29,7 @@ export default Vue.extend({
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~const.styl'
|
||||
|
||||
.search
|
||||
|
||||
root(isDark)
|
||||
> [data-fa]
|
||||
display block
|
||||
position absolute
|
||||
@@ -60,15 +58,20 @@ export default Vue.extend({
|
||||
border none
|
||||
border-radius 16px
|
||||
transition color 0.5s ease, border 0.5s ease
|
||||
font-family FontAwesome, sans-serif
|
||||
color isDark ? #fff : #000
|
||||
|
||||
&::placeholder
|
||||
color #9eaba8
|
||||
|
||||
&:hover
|
||||
background rgba(#000, 0.08)
|
||||
background isDark ? rgba(#fff, 0.04) : rgba(#000, 0.08)
|
||||
|
||||
&:focus
|
||||
box-shadow 0 0 0 2px rgba($theme-color, 0.5) !important
|
||||
|
||||
.search[data-darkmode]
|
||||
root(true)
|
||||
|
||||
.search:not([data-darkmode])
|
||||
root(false)
|
||||
</style>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<div :class="$style.loading" v-if="fetching">
|
||||
<mk-ellipsis-icon/>
|
||||
</div>
|
||||
<p :class="$style.notAvailable" v-if="!fetching && notAvailable">検索機能を利用することができません。</p>
|
||||
<p :class="$style.empty" v-if="!fetching && empty">%fa:search%「{{ q }}」に関する投稿は見つかりませんでした。</p>
|
||||
<mk-notes ref="timeline" :class="$style.notes" :more="existMore ? more : null"/>
|
||||
</mk-ui>
|
||||
@@ -24,7 +25,8 @@ export default Vue.extend({
|
||||
moreFetching: false,
|
||||
existMore: false,
|
||||
offset: 0,
|
||||
empty: false
|
||||
empty: false,
|
||||
notAvailable: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -71,7 +73,11 @@ export default Vue.extend({
|
||||
res(notes);
|
||||
this.fetching = false;
|
||||
Progress.done();
|
||||
}, rej);
|
||||
}, (e: string) => {
|
||||
this.fetching = false;
|
||||
Progress.done();
|
||||
if (e === 'searching not available') this.notAvailable = true;
|
||||
});
|
||||
}));
|
||||
},
|
||||
more() {
|
||||
@@ -130,4 +136,18 @@ export default Vue.extend({
|
||||
font-size 3em
|
||||
color #ccc
|
||||
|
||||
|
||||
.notAvailable
|
||||
display block
|
||||
margin 0 auto
|
||||
padding 32px
|
||||
max-width 400px
|
||||
text-align center
|
||||
color #999
|
||||
|
||||
> [data-fa]
|
||||
display block
|
||||
margin-bottom 16px
|
||||
font-size 3em
|
||||
color #ccc
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="mkw-notifications">
|
||||
<mk-widget-container :show-header="!props.compact">
|
||||
<template slot="header">%fa:R bell%%i18n:@title%</template>
|
||||
<button slot="func" title="%i18n:@settings%" @click="settings">%fa:cog%</button>
|
||||
<!-- <button slot="func" title="%i18n:@settings%" @click="settings">%fa:cog%</button> -->
|
||||
|
||||
<mk-notifications :class="$style.notifications"/>
|
||||
</mk-widget-container>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<a class="mk-media-image" :href="image.url" target="_blank" :style="style" :title="image.name"></a>
|
||||
<div class="qjewsnkgzzxlxtzncydssfbgjibiehcy" v-if="image.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="gqnyydlzavusgskkfvwvjiattxdzsqlf" v-else :href="image.url" target="_blank" :style="style" :title="image.name"></a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -13,6 +19,10 @@ export default Vue.extend({
|
||||
},
|
||||
raw: {
|
||||
default: false
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -35,13 +45,27 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-image
|
||||
.gqnyydlzavusgskkfvwvjiattxdzsqlf
|
||||
display block
|
||||
overflow hidden
|
||||
width 100%
|
||||
height 100%
|
||||
background-position center
|
||||
background-size cover
|
||||
border-radius 4px
|
||||
|
||||
.qjewsnkgzzxlxtzncydssfbgjibiehcy
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,17 +1,32 @@
|
||||
<template>
|
||||
<a class="mk-media-video"
|
||||
:href="video.url"
|
||||
target="_blank"
|
||||
:style="imageStyle"
|
||||
:title="video.name">
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="video.isSensitive && hide" @click="hide = false">
|
||||
<div>
|
||||
<b>%fa:exclamation-triangle% %i18n:@sensitive%</b>
|
||||
<span>%i18n:@click-to-show%</span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else
|
||||
:href="video.url"
|
||||
target="_blank"
|
||||
:style="imageStyle"
|
||||
:title="video.name">
|
||||
%fa:R play-circle%
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
export default Vue.extend({
|
||||
props: ['video'],
|
||||
props: {
|
||||
video: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
hide: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageStyle(): any {
|
||||
return {
|
||||
@@ -22,7 +37,7 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-media-video
|
||||
.kkjnbbplepmiyuadieoenjgutgcmtsvu
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
@@ -33,4 +48,20 @@ export default Vue.extend({
|
||||
background-size cover
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
.icozogqfvdetwohsdglrbswgrejoxbdj
|
||||
display flex
|
||||
justify-content center
|
||||
align-items center
|
||||
background #111
|
||||
color #fff
|
||||
|
||||
> div
|
||||
display table-cell
|
||||
text-align center
|
||||
font-size 12px
|
||||
|
||||
> b
|
||||
display block
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,47 +1,53 @@
|
||||
<template>
|
||||
<div class="mk-post-form">
|
||||
<header>
|
||||
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||
<div>
|
||||
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
|
||||
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
|
||||
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="form">
|
||||
<mk-note-preview v-if="reply" :note="reply"/>
|
||||
<mk-note-preview v-if="renote" :note="renote"/>
|
||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
||||
<header>
|
||||
<button class="cancel" @click="cancel">%fa:times%</button>
|
||||
<div>
|
||||
<span class="text-count" :class="{ over: text.length > 1000 }">{{ 1000 - text.length }}</span>
|
||||
<span class="geo" v-if="geo">%fa:map-marker-alt%</span>
|
||||
<button class="submit" :disabled="!canPost" @click="post">{{ submitText }}</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="form">
|
||||
<mk-note-preview v-if="reply" :note="reply"/>
|
||||
<mk-note-preview v-if="renote" :note="renote"/>
|
||||
<div v-if="visibility == 'specified'" class="visibleUsers">
|
||||
<span v-for="u in visibleUsers">{{ u | userName }}<a @click="removeVisibleUser(u)">[x]</a></span>
|
||||
<a @click="addVisibleUser">+%i18n:@add-visible-user%</a>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="%i18n:@cw-placeholder%">
|
||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="placeholder" v-autocomplete="'text'"></textarea>
|
||||
<div class="attaches" v-show="files.length != 0">
|
||||
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
||||
<div class="file" v-for="file in files" :key="file.id">
|
||||
<div class="img" :style="`background-image: url(${file.url}?thumbnail&size=128)`" @click="detachMedia(file)"></div>
|
||||
</div>
|
||||
</x-draggable>
|
||||
</div>
|
||||
<mk-poll-editor v-if="poll" ref="poll" @destroyed="poll = false"/>
|
||||
<mk-uploader ref="uploader" @uploaded="attachMedia" @change="onChangeUploadings"/>
|
||||
<footer>
|
||||
<button class="upload" @click="chooseFile">%fa:upload%</button>
|
||||
<button class="drive" @click="chooseFileFromDrive">%fa:cloud%</button>
|
||||
<button class="kao" @click="kao">%fa:R smile%</button>
|
||||
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
||||
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||
<button class="visibility" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||
</footer>
|
||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||
</div>
|
||||
<input v-show="useCw" v-model="cw" placeholder="%i18n:@cw-placeholder%">
|
||||
<textarea v-model="text" ref="text" :disabled="posting" :placeholder="placeholder"></textarea>
|
||||
<div class="attaches" v-show="files.length != 0">
|
||||
<x-draggable class="files" :list="files" :options="{ animation: 150 }">
|
||||
<div class="file" v-for="file in files" :key="file.id">
|
||||
<div class="img" :style="`background-image: url(${file.url}?thumbnail&size=128)`" @click="detachMedia(file)"></div>
|
||||
</div>
|
||||
</x-draggable>
|
||||
</div>
|
||||
<mk-poll-editor v-if="poll" ref="poll" @destroyed="poll = false"/>
|
||||
<mk-uploader ref="uploader" @uploaded="attachMedia" @change="onChangeUploadings"/>
|
||||
<footer>
|
||||
<button class="upload" @click="chooseFile">%fa:upload%</button>
|
||||
<button class="drive" @click="chooseFileFromDrive">%fa:cloud%</button>
|
||||
<button class="kao" @click="kao">%fa:R smile%</button>
|
||||
<button class="poll" @click="poll = true">%fa:chart-pie%</button>
|
||||
<button class="poll" @click="useCw = !useCw">%fa:eye-slash%</button>
|
||||
<button class="geo" @click="geo ? removeGeo() : setGeo()">%fa:map-marker-alt%</button>
|
||||
<button class="visibility" @click="setVisibility" ref="visibilityButton">%fa:lock%</button>
|
||||
</footer>
|
||||
<input ref="file" class="file" type="file" accept="image/*" multiple="multiple" @change="onChangeFile"/>
|
||||
</div>
|
||||
<div class="hashtags" v-if="recentHashtags.length > 0">
|
||||
<a v-for="tag in recentHashtags" @click="addTag(tag)">#{{ tag }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as XDraggable from 'vuedraggable';
|
||||
import MkVisibilityChooser from '../../../common/views/components/visibility-chooser.vue';
|
||||
import getKao from '../../../common/scripts/get-kao';
|
||||
@@ -85,7 +91,8 @@ export default Vue.extend({
|
||||
visibility: 'public',
|
||||
visibleUsers: [],
|
||||
useCw: false,
|
||||
cw: null
|
||||
cw: null,
|
||||
recentHashtags: JSON.parse(localStorage.getItem('hashtags') || '[]')
|
||||
};
|
||||
},
|
||||
|
||||
@@ -161,6 +168,10 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
methods: {
|
||||
addTag(tag: string) {
|
||||
insertTextAtCursor(this.$refs.text, ` #${tag} `);
|
||||
},
|
||||
|
||||
focus() {
|
||||
(this.$refs.text as any).focus();
|
||||
},
|
||||
@@ -281,6 +292,13 @@ export default Vue.extend({
|
||||
}).catch(err => {
|
||||
this.posting = false;
|
||||
});
|
||||
|
||||
if (this.text && this.text != '') {
|
||||
const hashtags = parse(this.text).filter(x => x.type == 'hashtag').map(x => x.hashtag);
|
||||
let history = JSON.parse(localStorage.getItem('hashtags') || '[]') as string[];
|
||||
history = history.filter(x => !hashtags.includes(x));
|
||||
localStorage.setItem('hashtags', JSON.stringify(hashtags.concat(history)));
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
@@ -302,146 +320,156 @@ root(isDark)
|
||||
max-width 500px
|
||||
width calc(100% - 16px)
|
||||
margin 8px auto
|
||||
background isDark ? #282C37 : #fff
|
||||
border-radius 8px
|
||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||
|
||||
@media (min-width 500px)
|
||||
margin 16px auto
|
||||
width calc(100% - 32px)
|
||||
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||
|
||||
> .form
|
||||
box-shadow 0 8px 32px rgba(#000, 0.1)
|
||||
|
||||
@media (min-width 600px)
|
||||
margin 32px auto
|
||||
|
||||
> header
|
||||
z-index 1000
|
||||
height 50px
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
> .cancel
|
||||
padding 0
|
||||
width 50px
|
||||
line-height 50px
|
||||
font-size 24px
|
||||
color isDark ? #9baec8 : #555
|
||||
|
||||
> div
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
color #657786
|
||||
|
||||
> .text-count
|
||||
line-height 50px
|
||||
|
||||
> .geo
|
||||
margin 0 8px
|
||||
line-height 50px
|
||||
|
||||
> .submit
|
||||
margin 8px
|
||||
padding 0 16px
|
||||
line-height 34px
|
||||
vertical-align bottom
|
||||
color $theme-color-foreground
|
||||
background $theme-color
|
||||
border-radius 4px
|
||||
|
||||
&:disabled
|
||||
opacity 0.7
|
||||
|
||||
> .form
|
||||
max-width 500px
|
||||
margin 0 auto
|
||||
background isDark ? #282C37 : #fff
|
||||
border-radius 8px
|
||||
box-shadow 0 0 2px rgba(#000, 0.1)
|
||||
|
||||
> .mk-note-preview
|
||||
padding 16px
|
||||
|
||||
> .visibleUsers
|
||||
margin-bottom 8px
|
||||
font-size 14px
|
||||
|
||||
> span
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> input
|
||||
z-index 1
|
||||
|
||||
> input
|
||||
> textarea
|
||||
display block
|
||||
padding 12px
|
||||
margin 0
|
||||
width 100%
|
||||
font-size 16px
|
||||
color isDark ? #fff : #333
|
||||
background isDark ? #191d23 : #fff
|
||||
border none
|
||||
border-radius 0
|
||||
> header
|
||||
z-index 1000
|
||||
height 50px
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
&:disabled
|
||||
opacity 0.5
|
||||
|
||||
> textarea
|
||||
max-width 100%
|
||||
min-width 100%
|
||||
min-height 80px
|
||||
|
||||
> .attaches
|
||||
|
||||
> .files
|
||||
display block
|
||||
margin 0
|
||||
padding 4px
|
||||
list-style none
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
clear both
|
||||
|
||||
> .file
|
||||
display block
|
||||
float left
|
||||
margin 0
|
||||
padding 0
|
||||
border solid 4px transparent
|
||||
|
||||
> .img
|
||||
width 64px
|
||||
height 64px
|
||||
background-size cover
|
||||
background-position center center
|
||||
|
||||
> .mk-uploader
|
||||
margin 8px 0 0 0
|
||||
padding 8px
|
||||
|
||||
> .file
|
||||
display none
|
||||
|
||||
> footer
|
||||
white-space nowrap
|
||||
overflow auto
|
||||
-webkit-overflow-scrolling touch
|
||||
overflow-scrolling touch
|
||||
|
||||
> *
|
||||
display inline-block
|
||||
> .cancel
|
||||
padding 0
|
||||
margin 0
|
||||
width 48px
|
||||
height 48px
|
||||
font-size 20px
|
||||
width 50px
|
||||
line-height 50px
|
||||
font-size 24px
|
||||
color isDark ? #9baec8 : #555
|
||||
|
||||
> div
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
color #657786
|
||||
background transparent
|
||||
outline none
|
||||
|
||||
> .text-count
|
||||
line-height 50px
|
||||
|
||||
> .geo
|
||||
margin 0 8px
|
||||
line-height 50px
|
||||
|
||||
> .submit
|
||||
margin 8px
|
||||
padding 0 16px
|
||||
line-height 34px
|
||||
vertical-align bottom
|
||||
color $theme-color-foreground
|
||||
background $theme-color
|
||||
border-radius 4px
|
||||
|
||||
&:disabled
|
||||
opacity 0.7
|
||||
|
||||
> .form
|
||||
max-width 500px
|
||||
margin 0 auto
|
||||
|
||||
> .mk-note-preview
|
||||
padding 16px
|
||||
|
||||
> .visibleUsers
|
||||
margin-bottom 8px
|
||||
font-size 14px
|
||||
|
||||
> span
|
||||
margin-right 16px
|
||||
color isDark ? #fff : #666
|
||||
|
||||
> input
|
||||
z-index 1
|
||||
|
||||
> input
|
||||
> textarea
|
||||
display block
|
||||
padding 12px
|
||||
margin 0
|
||||
width 100%
|
||||
font-size 16px
|
||||
color isDark ? #fff : #333
|
||||
background isDark ? #191d23 : #fff
|
||||
border none
|
||||
border-radius 0
|
||||
box-shadow none
|
||||
box-shadow 0 1px 0 0 isDark ? rgba(#000, 0.2) : rgba(#000, 0.1)
|
||||
|
||||
&:disabled
|
||||
opacity 0.5
|
||||
|
||||
> textarea
|
||||
max-width 100%
|
||||
min-width 100%
|
||||
min-height 80px
|
||||
|
||||
> .attaches
|
||||
|
||||
> .files
|
||||
display block
|
||||
margin 0
|
||||
padding 4px
|
||||
list-style none
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
clear both
|
||||
|
||||
> .file
|
||||
display block
|
||||
float left
|
||||
margin 0
|
||||
padding 0
|
||||
border solid 4px transparent
|
||||
|
||||
> .img
|
||||
width 64px
|
||||
height 64px
|
||||
background-size cover
|
||||
background-position center center
|
||||
|
||||
> .mk-uploader
|
||||
margin 8px 0 0 0
|
||||
padding 8px
|
||||
|
||||
> .file
|
||||
display none
|
||||
|
||||
> footer
|
||||
white-space nowrap
|
||||
overflow auto
|
||||
-webkit-overflow-scrolling touch
|
||||
overflow-scrolling touch
|
||||
|
||||
> *
|
||||
display inline-block
|
||||
padding 0
|
||||
margin 0
|
||||
width 48px
|
||||
height 48px
|
||||
font-size 20px
|
||||
color #657786
|
||||
background transparent
|
||||
outline none
|
||||
border none
|
||||
border-radius 0
|
||||
box-shadow none
|
||||
|
||||
> .hashtags
|
||||
margin 8px
|
||||
|
||||
> *
|
||||
margin-right 8px
|
||||
|
||||
.mk-post-form[data-darkmode]
|
||||
root(true)
|
||||
|
||||
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 3.7 KiB |
@@ -1,3 +0,0 @@
|
||||
h1 About Misskey
|
||||
|
||||
p Misskey is a mini blog SNS.
|
||||
@@ -1,3 +0,0 @@
|
||||
h1 Misskeyについて
|
||||
|
||||
p MisskeyはミニブログSNSです。
|
||||
@@ -1,103 +0,0 @@
|
||||
h1 Misskey API
|
||||
|
||||
p MisskeyはWeb APIを公開しており、様々な操作をプログラム上から行うことができます。
|
||||
p APIを自分のアカウントから利用する場合(自分のアカウントのみ操作したい場合)と、アプリケーションから利用する場合(不特定のアカウントを操作したい場合)とで利用手順が異なりますので、それぞれのケースについて説明します。
|
||||
|
||||
section
|
||||
h2 自分の所有するアカウントからAPIにアクセスする場合
|
||||
p 「設定 > API」で、APIにアクセスするのに必要なAPIキーを取得してください。
|
||||
p APIにアクセスする際には、リクエストにAPIキーを「i」というパラメータ名で含めます。
|
||||
div.ui.info.warn: p %fa:exclamation-triangle%アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。
|
||||
p APIの詳しい使用法は「Misskey APIの利用」セクションをご覧ください。
|
||||
|
||||
section
|
||||
h2 アプリケーションからAPIにアクセスする場合
|
||||
p
|
||||
| 直接ユーザーのAPIキーをアプリケーションが扱うのは危険なので、
|
||||
| アプリケーションからAPIを利用する際には、アプリケーションとアプリケーションを利用するユーザーが結び付けられた専用のトークン(アクセストークン)をMisskeyに発行してもらい、
|
||||
| そのトークンをリクエストのパラメータに含める必要があります。
|
||||
div.ui.info: p %fa:info-circle%アクセストークンは、ユーザーが自分のアカウントにあなたのアプリケーションがアクセスすることを許可した場合のみ発行されます
|
||||
|
||||
p それでは、アクセストークンを取得するまでの流れを説明します。
|
||||
|
||||
section
|
||||
h3 1.アプリケーションを登録する
|
||||
p まず、あなたのアプリケーションやWebサービス(以後、あなたのアプリと呼びます)をMisskeyに登録します。
|
||||
p
|
||||
a(href=common.config.dev_url, target="_blank") デベロッパーセンター
|
||||
| にアクセスし、「アプリ > アプリ作成」に進みます。
|
||||
| フォームに必要事項を記入し、アプリを作成してください。フォームの記入欄の説明は以下の通りです:
|
||||
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th 名前
|
||||
th 説明
|
||||
tbody
|
||||
tr
|
||||
td アプリケーション名
|
||||
td あなたのアプリの名称。
|
||||
tr
|
||||
td アプリの概要
|
||||
td あなたのアプリの簡単な説明や紹介。
|
||||
tr
|
||||
td コールバックURL
|
||||
td ユーザーが後述する認証フォームで認証を終えた際にリダイレクトするURLを設定できます。あなたのアプリがWebサービスである場合に有用です。
|
||||
tr
|
||||
td 権限
|
||||
td あなたのアプリが要求する権限。ここで要求した機能だけがAPIからアクセスできます。
|
||||
|
||||
p 登録が済むとあなたのアプリのシークレットキーが入手できます。このシークレットキーは後で使用します。
|
||||
div.ui.info.warn: p %fa:exclamation-triangle%アプリに成りすまされる可能性があるため、極力このシークレットキーは公開しないようにしてください。
|
||||
|
||||
section
|
||||
h3 2.ユーザーに認証させる
|
||||
p あなたのアプリを使ってもらうには、ユーザーにアカウントへのアクセスの許可をもらう必要があります。
|
||||
p
|
||||
| 認証セッションを開始するには、#{common.config.api_url}/auth/session/generate へパラメータに appSecret としてシークレットキーを含めたリクエストを送信します。
|
||||
| リクエスト形式はJSONで、メソッドはPOSTです。
|
||||
| レスポンスとして認証セッションのトークンや認証フォームのURLが取得できるので、認証フォームのURLをブラウザで表示し、ユーザーにフォームを提示してください。
|
||||
|
||||
p
|
||||
| あなたのアプリがコールバックURLを設定している場合、
|
||||
| ユーザーがあなたのアプリの連携を許可すると設定しているコールバックURLに token という名前でセッションのトークンが含まれたクエリを付けてリダイレクトします。
|
||||
|
||||
p
|
||||
| あなたのアプリがコールバックURLを設定していない場合、ユーザーがあなたのアプリの連携を許可したことを(何らかの方法で(たとえばボタンを押させるなど))確認出来るようにしてください。
|
||||
|
||||
section
|
||||
h3 3.ユーザーのアクセストークンを取得する
|
||||
p ユーザーが連携を許可したら、#{common.config.api_url}/auth/session/userkey へ次のパラメータを含むリクエストを送信します:
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th 名前
|
||||
th 型
|
||||
th 説明
|
||||
tbody
|
||||
tr
|
||||
td appSecret
|
||||
td string
|
||||
td あなたのアプリのシークレットキー
|
||||
tr
|
||||
td token
|
||||
td string
|
||||
td セッションのトークン
|
||||
p 上手くいけば、認証したユーザーのアクセストークンがレスポンスとして取得できます。おめでとうございます!
|
||||
|
||||
p アクセストークンが取得できたら、「ユーザーのアクセストークン+あなたのアプリのシークレットキーをsha256したもの」を「i」というパラメータでリクエストに含めると、APIにアクセスすることができます。
|
||||
|
||||
p 「i」パラメータの生成方法を擬似コードで表すと次のようになります:
|
||||
pre: code
|
||||
| const i = sha256(accessToken + secretKey);
|
||||
|
||||
p APIの詳しい使用法は「Misskey APIの利用」セクションをご覧ください。
|
||||
|
||||
section
|
||||
h2 Misskey APIの利用
|
||||
p APIはすべてリクエストのパラメータ・レスポンスともにJSON形式です。また、すべてのエンドポイントはPOSTメソッドのみ受け付けます。
|
||||
p APIリファレンスもご確認ください。
|
||||
|
||||
section
|
||||
h3 レートリミット
|
||||
p Misskey APIにはレートリミットがあり、短時間のうちに多数のリクエストを送信すると、一定時間APIを利用することができなくなることがあります。
|
||||
@@ -1,38 +0,0 @@
|
||||
extends ../../layout.pug
|
||||
include ../mixins
|
||||
|
||||
block meta
|
||||
link(rel="stylesheet" href="/docs/assets/api/endpoints/style.css")
|
||||
|
||||
block main
|
||||
h1= endpoint
|
||||
|
||||
p#url
|
||||
span.method POST
|
||||
span.host
|
||||
= url.host
|
||||
| /
|
||||
span.path= url.path
|
||||
|
||||
p#desc= desc[lang] || desc['ja']
|
||||
|
||||
section
|
||||
h2= i18n('docs.api.endpoints.params')
|
||||
+propTable(params)
|
||||
|
||||
if paramDefs
|
||||
each paramDef in paramDefs
|
||||
section(id= paramDef.name)
|
||||
h3= paramDef.name
|
||||
+propTable(paramDef.params)
|
||||
|
||||
if res
|
||||
section
|
||||
h2= i18n('docs.api.endpoints.res')
|
||||
+propTable(res)
|
||||
|
||||
if resDefs
|
||||
each resDef in resDefs
|
||||
section(id= resDef.name)
|
||||
h3= resDef.name
|
||||
+propTable(resDef.props)
|
||||
@@ -1,168 +0,0 @@
|
||||
name: "Note"
|
||||
|
||||
desc:
|
||||
ja: "投稿。"
|
||||
en: "A note."
|
||||
|
||||
props:
|
||||
- name: "id"
|
||||
type: "id"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿ID"
|
||||
en: "The ID of this note"
|
||||
- name: "createdAt"
|
||||
type: "date"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿日時"
|
||||
en: "The posted date of this note"
|
||||
- name: "viaMobile"
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "モバイル端末から投稿したか否か(自己申告であることに留意)"
|
||||
en: "Whether this note sent via a mobile device"
|
||||
- name: "text"
|
||||
type: "string"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投稿の本文 (ローカルの場合Markdown風のフォーマット)"
|
||||
en: "The text of this note (in Markdown like format if local)"
|
||||
- name: "mediaIds"
|
||||
type: "id(DriveFile)[]"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "添付されているメディアのID (なければレスポンスでは空配列)"
|
||||
en: "The IDs of the attached media (empty array for response if no media is attached)"
|
||||
- name: "media"
|
||||
type: "entity(DriveFile)[]"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "添付されているメディア"
|
||||
en: "The attached media"
|
||||
- name: "userId"
|
||||
type: "id(User)"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿者ID"
|
||||
en: "The ID of author of this note"
|
||||
- name: "user"
|
||||
type: "entity(User)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投稿者"
|
||||
en: "The author of this note"
|
||||
- name: "myReaction"
|
||||
type: "string"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "この投稿に対する自分の<a href='/docs/api/reactions'>リアクション</a>"
|
||||
en: "The your <a href='/docs/api/reactions'>reaction</a> of this note"
|
||||
- name: "reactionCounts"
|
||||
type: "object"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "<a href='/docs/api/reactions'>リアクション</a>をキーとし、この投稿に対するそのリアクションの数を値としたオブジェクト"
|
||||
- name: "replyId"
|
||||
type: "id(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "返信した投稿のID"
|
||||
en: "The ID of the replyed note"
|
||||
- name: "reply"
|
||||
type: "entity(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "返信した投稿"
|
||||
en: "The replyed note"
|
||||
- name: "renoteId"
|
||||
type: "id(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "引用した投稿のID"
|
||||
en: "The ID of the quoted note"
|
||||
- name: "renote"
|
||||
type: "entity(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "引用した投稿"
|
||||
en: "The quoted note"
|
||||
- name: "poll"
|
||||
type: "object"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投票"
|
||||
en: "The poll"
|
||||
defName: "poll"
|
||||
def:
|
||||
- name: "choices"
|
||||
type: "object[]"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投票の選択肢"
|
||||
en: "The choices of this poll"
|
||||
defName: "choice"
|
||||
def:
|
||||
- name: "id"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "選択肢ID"
|
||||
en: "The ID of this choice"
|
||||
- name: "isVoted"
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "自分がこの選択肢に投票したかどうか"
|
||||
en: "Whether you voted to this choice"
|
||||
- name: "text"
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "選択肢本文"
|
||||
en: "The text of this choice"
|
||||
- name: "votes"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "この選択肢に投票された数"
|
||||
en: "The number voted for this choice"
|
||||
- name: "geo"
|
||||
type: "object"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "位置情報"
|
||||
en: "Geo location"
|
||||
defName: "geo"
|
||||
def:
|
||||
- name: "coordinates"
|
||||
type: "number[]"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "座標。最初に経度:-180〜180で表す。最後に緯度:-90〜90で表す。"
|
||||
- name: "altitude"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "高度。メートル単位で表す。"
|
||||
- name: "accuracy"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "緯度、経度の精度。メートル単位で表す。"
|
||||
- name: "altitudeAccuracy"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "高度の精度。メートル単位で表す。"
|
||||
- name: "heading"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "方角。0〜360の角度で表す。0が北、90が東、180が南、270が西。"
|
||||
- name: "speed"
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "速度。メートル / 秒数で表す。"
|
||||
@@ -1,31 +0,0 @@
|
||||
mixin propTable(props)
|
||||
table.props
|
||||
thead: tr
|
||||
th= i18n('docs.api.props.name')
|
||||
th= i18n('docs.api.props.type')
|
||||
th= i18n('docs.api.props.description')
|
||||
tbody
|
||||
each prop in props
|
||||
tr
|
||||
td.name= prop.name
|
||||
td.type
|
||||
i= prop.type
|
||||
if prop.kind == 'id'
|
||||
if prop.entity
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| ID)
|
||||
else
|
||||
| (ID)
|
||||
else if prop.kind == 'entity'
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| )
|
||||
else if prop.kind == 'object'
|
||||
if prop.hasDef
|
||||
| (
|
||||
a(href=`#${prop.name}`)= prop.name
|
||||
| )
|
||||
else if prop.kind == 'date'
|
||||
| (Date)
|
||||
td.desc!= prop.desc ? prop.desc[lang] || prop.desc['ja'] : null
|
||||
@@ -1,9 +0,0 @@
|
||||
h1 フォロー
|
||||
p ユーザーをフォローすると、タイムラインにそのユーザーの投稿が表示されるようになります。ただし、他のユーザーに対する返信は含まれません。
|
||||
p ユーザーをフォローするには、ユーザーページの「フォロー」ボタンをクリックします。フォローを解除するには、もう一度クリックします。
|
||||
|
||||
section
|
||||
h2 ストーキング
|
||||
p ユーザーをフォローしている状態では、さらに「ストーキング」モードをオンにすることができます。ストーキングを行うと、タイムラインにそのユーザーの全ての投稿が表示されるようになります。つまり、他のユーザーに対する返信も含まれることになります。
|
||||
p ストーキングするには、ユーザーページの「ストークする」をクリックします。ストーキングをやめるには、もう一度クリックします。
|
||||
p ストーキングしていることは相手に通知されません。
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Gulp tasks
|
||||
*/
|
||||
|
||||
import * as gulp from 'gulp';
|
||||
const stylus = require('gulp-stylus');
|
||||
const cssnano = require('gulp-cssnano');
|
||||
|
||||
gulp.task('doc', [
|
||||
'doc:styles'
|
||||
]);
|
||||
|
||||
gulp.task('doc:styles', () =>
|
||||
gulp.src('./src/client/docs/**/*.styl')
|
||||
.pipe(stylus())
|
||||
.pipe((cssnano as any)())
|
||||
.pipe(gulp.dest('./built/client/docs/assets/'))
|
||||
);
|
||||
@@ -1,3 +0,0 @@
|
||||
h1 Misskey Docs
|
||||
|
||||
p Welcome to docs of Misskey.
|
||||
@@ -1,3 +0,0 @@
|
||||
h1 Misskey ドキュメント
|
||||
|
||||
p Misskeyのドキュメントへようこそ
|
||||
@@ -1,17 +0,0 @@
|
||||
h1 License
|
||||
|
||||
div!= common.license
|
||||
|
||||
details
|
||||
summary Libraries
|
||||
|
||||
section
|
||||
h2 Libraries
|
||||
|
||||
each dependency, name in common.dependencies
|
||||
details
|
||||
summary= name
|
||||
|
||||
section
|
||||
h3= name
|
||||
pre= dependency.licenseText
|
||||
@@ -1,17 +0,0 @@
|
||||
h1 ライセンス
|
||||
|
||||
div!= common.license
|
||||
|
||||
details
|
||||
summary サードパーティ
|
||||
|
||||
section
|
||||
h2 サードパーティ
|
||||
|
||||
each dependency, name in common.dependencies
|
||||
details
|
||||
summary= name
|
||||
|
||||
section
|
||||
h3= name
|
||||
pre= dependency.licenseText
|
||||
@@ -1,13 +0,0 @@
|
||||
h1 ミュート
|
||||
|
||||
p ユーザーページから、そのユーザーをミュートすることができます。
|
||||
|
||||
p ユーザーをミュートすると、そのユーザーに関する次のコンテンツがMisskeyに表示されなくなります:
|
||||
ul
|
||||
li タイムラインや投稿の検索結果内の、そのユーザーの投稿(およびそれらの投稿に対する返信やRenote)
|
||||
li そのユーザーからの通知
|
||||
li メッセージ履歴一覧内の、そのユーザーとのメッセージ履歴
|
||||
|
||||
p ミュートを行ったことは相手に通知されず、ミュートされていることを知ることもできません。
|
||||
|
||||
p 設定>ミュート から、自分がミュートしているユーザー一覧を確認することができます。
|
||||
@@ -1,120 +0,0 @@
|
||||
h1 検索
|
||||
|
||||
p 投稿を検索することができます。
|
||||
p
|
||||
| キーワードを半角スペースで区切ると、and検索になります。
|
||||
| 例えば、「git コミット」と検索すると、「gitで編集したファイルの特定の行だけコミットする方法がわからない」などがマッチします。
|
||||
|
||||
section
|
||||
h2 キーワードの除外
|
||||
p キーワードの前に「-」(ハイフン)をプリフィクスすると、そのキーワードを含まない投稿に限定します。
|
||||
p 例えば、「gitというキーワードを含むが、コミットというキーワードは含まない投稿」を検索したい場合、クエリは以下のようになります:
|
||||
code git -コミット
|
||||
|
||||
section
|
||||
h2 完全一致
|
||||
p テキストを「"""」で囲むと、そのテキストと完全に一致する投稿を検索します。
|
||||
p 例えば、「"""にゃーん"""」と検索すると、「にゃーん」という投稿のみがヒットし、「にゃーん…」という投稿はヒットしません。
|
||||
|
||||
section
|
||||
h2 タグ
|
||||
p キーワードの前に「#」(シャープ)をプリフィクスすると、そのキーワードと一致するタグを持つ投稿に限定します。
|
||||
|
||||
section
|
||||
h2 オプション
|
||||
p
|
||||
| オプションを使用して、より高度な検索を行えます。
|
||||
| オプションを指定するには、「オプション名:値」という形式でクエリに含めます。
|
||||
p 利用可能なオプション一覧です:
|
||||
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th 名前
|
||||
th 説明
|
||||
tbody
|
||||
tr
|
||||
td user
|
||||
td
|
||||
| 指定されたユーザー名のユーザーの投稿に限定します。
|
||||
| 「,」(カンマ)で区切って、複数ユーザーを指定することもできます。
|
||||
br
|
||||
| 例えば、
|
||||
code user:himawari,sakurako
|
||||
| と検索すると「@himawariまたは@sakurakoの投稿」だけに限定します。
|
||||
| (つまりユーザーのホワイトリストです)
|
||||
tr
|
||||
td exclude_user
|
||||
td
|
||||
| 指定されたユーザー名のユーザーの投稿を除外します。
|
||||
| 「,」(カンマ)で区切って、複数ユーザーを指定することもできます。
|
||||
br
|
||||
| 例えば、
|
||||
code exclude_user:akari,chinatsu
|
||||
| と検索すると「@akariまたは@chinatsu以外の投稿」に限定します。
|
||||
| (つまりユーザーのブラックリストです)
|
||||
tr
|
||||
td follow
|
||||
td
|
||||
| true ... フォローしているユーザーに限定。
|
||||
br
|
||||
| false ... フォローしていないユーザーに限定。
|
||||
br
|
||||
| null ... 特に限定しない(デフォルト)
|
||||
tr
|
||||
td mute
|
||||
td
|
||||
| mute_all ... ミュートしているユーザーの投稿とその投稿に対する返信やRenoteを除外する(デフォルト)
|
||||
br
|
||||
| mute_related ... ミュートしているユーザーの投稿に対する返信やRenoteだけ除外する
|
||||
br
|
||||
| mute_direct ... ミュートしているユーザーの投稿だけ除外する
|
||||
br
|
||||
| disabled ... ミュートしているユーザーの投稿とその投稿に対する返信やRenoteも含める
|
||||
br
|
||||
| direct_only ... ミュートしているユーザーの投稿だけに限定
|
||||
br
|
||||
| related_only ... ミュートしているユーザーの投稿に対する返信やRenoteだけに限定
|
||||
br
|
||||
| all_only ... ミュートしているユーザーの投稿とその投稿に対する返信やRenoteに限定
|
||||
tr
|
||||
td reply
|
||||
td
|
||||
| true ... 返信に限定。
|
||||
br
|
||||
| false ... 返信でない投稿に限定。
|
||||
br
|
||||
| null ... 特に限定しない(デフォルト)
|
||||
tr
|
||||
td renote
|
||||
td
|
||||
| true ... Renoteに限定。
|
||||
br
|
||||
| false ... Renoteでない投稿に限定。
|
||||
br
|
||||
| null ... 特に限定しない(デフォルト)
|
||||
tr
|
||||
td media
|
||||
td
|
||||
| true ... メディアが添付されている投稿に限定。
|
||||
br
|
||||
| false ... メディアが添付されていない投稿に限定。
|
||||
br
|
||||
| null ... 特に限定しない(デフォルト)
|
||||
tr
|
||||
td poll
|
||||
td
|
||||
| true ... 投票が添付されている投稿に限定。
|
||||
br
|
||||
| false ... 投票が添付されていない投稿に限定。
|
||||
br
|
||||
| null ... 特に限定しない(デフォルト)
|
||||
tr
|
||||
td until
|
||||
td 上限の日時。(YYYY-MM-DD)
|
||||
tr
|
||||
td since
|
||||
td 下限の日時。(YYYY-MM-DD)
|
||||
|
||||
p 例えば、「@syuiloの2017年11月1日から2017年12月31日までの『Misskey』というテキストを含む返信ではない投稿」を検索したい場合、クエリは以下のようになります:
|
||||
code user:syuilo since:2017-11-01 until:2017-12-31 reply:false Misskey
|
||||
@@ -1,3 +0,0 @@
|
||||
h1 利用規約
|
||||
|
||||
p 公序良俗に反する行為はおやめください。
|
||||
@@ -26,7 +26,7 @@ export default function load() {
|
||||
const mixin = {} as Mixin;
|
||||
|
||||
// Validate URLs
|
||||
if (!isUrl(config.url)) urlError(config.url);
|
||||
if (!isUrl(config.url)) throw `url="${config.url}" is not a valid URL`;
|
||||
|
||||
const url = new URL(config.url);
|
||||
config.url = normalizeUrl(config.url);
|
||||
@@ -50,8 +50,3 @@ export default function load() {
|
||||
function normalizeUrl(url: string) {
|
||||
return url[url.length - 1] === '/' ? url.substr(0, url.length - 1) : url;
|
||||
}
|
||||
|
||||
function urlError(url: string) {
|
||||
console.error(`「${url}」は、正しいURLではありません。先頭に http:// または https:// をつけ忘れてないかなど確認してください。`);
|
||||
process.exit(99);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export type Source = {
|
||||
port: number;
|
||||
pass: string;
|
||||
};
|
||||
recaptcha: {
|
||||
recaptcha?: {
|
||||
site_key: string;
|
||||
secret_key: string;
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import Xev from 'xev';
|
||||
|
||||
const ev = new Xev();
|
||||
|
||||
export default function () {
|
||||
export default function() {
|
||||
const log: any[] = [];
|
||||
|
||||
const p = childProcess.fork(__dirname + '/notes-stats-child.js');
|
||||
|
||||
@@ -27,7 +27,7 @@ const nativeDbConn = async (): Promise<mongodb.Db> => {
|
||||
if (mdb) return mdb;
|
||||
|
||||
const db = await ((): Promise<mongodb.Db> => new Promise((resolve, reject) => {
|
||||
(mongodb as any).MongoClient.connect(uri, (e: Error, client: any) => {
|
||||
mongodb.MongoClient.connect(uri, (e: Error, client: any) => {
|
||||
if (e) return reject(e);
|
||||
resolve(client.db(config.mongodb.db));
|
||||
});
|
||||
|
||||
3
src/docs/about.en.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# About Misskey
|
||||
|
||||
Misskey is a mini blog SNS.
|
||||
3
src/docs/about.ja.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Misskeyについて
|
||||
|
||||
MisskeyはミニブログSNSです。
|
||||
77
src/docs/api.ja.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# Misskey API
|
||||
|
||||
MisskeyのWeb APIを使って、プログラムからMisskeyの様々な機能にアクセスすることができます。
|
||||
APIを自分のアカウントから利用する場合(自分のアカウントのみ操作したい場合)と、アプリケーションから利用する場合(不特定のアカウントを操作したい場合)とで利用手順が異なりますので、それぞれのケースについて説明します。
|
||||
|
||||
## 自分の所有するアカウントからAPIにアクセスする場合
|
||||
「設定 > API」で、APIにアクセスするのに必要なAPIキーを取得してください。
|
||||
APIにアクセスする際には、リクエストにAPIキーを「i」というパラメータ名で含めます。
|
||||
|
||||
<div class="ui info warn">
|
||||
<p><i class="fas fa-exclamation-triangle"></i> アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。</p>
|
||||
</div>
|
||||
|
||||
APIの詳しい使用法は「Misskey APIの利用」セクションをご覧ください。
|
||||
|
||||
## アプリケーションからAPIにアクセスする場合
|
||||
直接ユーザーのAPIキーをアプリケーションが扱うのは危険なので、
|
||||
アプリケーションからAPIを利用する際には、アプリケーションとアプリケーションを利用するユーザーが結び付けられた専用のトークン(アクセストークン)をMisskeyに発行してもらい、
|
||||
そのトークンをリクエストのパラメータに含める必要があります。
|
||||
|
||||
<div class="ui info">
|
||||
<p><i class="fas fa-info-circle"></i> アクセストークンは、ユーザーが自分のアカウントにあなたのアプリケーションがアクセスすることを許可した場合のみ発行されます</p>
|
||||
</div>
|
||||
|
||||
### 1.アプリケーションを登録する
|
||||
まず、あなたのアプリケーションやWebサービス(以後、あなたのアプリと呼びます)をMisskeyに登録します。
|
||||
[デベロッパーセンター](/dev)にアクセスし、「アプリ > アプリ作成」からアプリを作成してください。
|
||||
フォームの記入欄の説明は以下の通りです:
|
||||
|
||||
| 名前 | 説明 |
|
||||
|---|---|
|
||||
| アプリケーション名 | あなたのアプリの名称。 |
|
||||
| アプリの概要 | あなたのアプリの簡単な説明や紹介。 |
|
||||
| コールバックURL | ユーザーが後述する認証フォームで認証を終えた際にリダイレクトするURLを設定できます。あなたのアプリがWebサービスである場合に有用です。 |
|
||||
| 権限 | あなたのアプリが要求する権限。ここで要求した機能だけがAPIからアクセスできます。 |
|
||||
|
||||
登録が済むとあなたのアプリのシークレットキーが入手できます。このシークレットキーは後で使用します。
|
||||
|
||||
<div class="ui info warn">
|
||||
<p><i class="fas fa-exclamation-triangle"></i> アプリに成りすまされる可能性があるため、極力このシークレットキーは公開しないようにしてください。</p>
|
||||
</div>
|
||||
|
||||
### 2.ユーザーに認証させる
|
||||
アプリを使ってもらうには、ユーザーにアカウントへのアクセスの許可をもらう必要があります。
|
||||
|
||||
認証セッションを開始するには、%API_URL%/auth/session/generate へパラメータに appSecret としてシークレットキーを含めたリクエストを送信します。
|
||||
リクエスト形式はJSONで、メソッドはPOSTです。
|
||||
レスポンスとして認証セッションのトークンや認証フォームのURLが取得できるので、認証フォームのURLをブラウザで表示し、ユーザーにフォームを提示してください。
|
||||
|
||||
あなたのアプリがコールバックURLを設定している場合、
|
||||
ユーザーがあなたのアプリの連携を許可すると設定しているコールバックURLに token という名前でセッションのトークンが含まれたクエリを付けてリダイレクトします。
|
||||
|
||||
あなたのアプリがコールバックURLを設定していない場合、ユーザーがあなたのアプリの連携を許可したことを(何らかの方法で(たとえばボタンを押させるなど))確認出来るようにしてください。
|
||||
|
||||
### 3.ユーザーのアクセストークンを取得する
|
||||
ユーザーが連携を許可したら、%URL%/auth/session/userkey へ次のパラメータを含むリクエストを送信します:
|
||||
|
||||
| 名前 | 型 | 説明 |
|
||||
|---|---|---|
|
||||
| appSecret | string | アプリのシークレットキー |
|
||||
| token | string | セッションのトークン |
|
||||
|
||||
上手くいけば、認証したユーザーのアクセストークンがレスポンスとして取得できます。おめでとうございます!
|
||||
|
||||
アクセストークンが取得できたら、「ユーザーのアクセストークン+あなたのアプリのシークレットキーをsha256したもの」を「i」というパラメータでリクエストに含めると、APIにアクセスすることができます。
|
||||
|
||||
「i」パラメータの生成方法を擬似コードで表すと次のようになります:
|
||||
<pre><code>const i = sha256(accessToken + secretKey);</code></pre>
|
||||
|
||||
APIの詳しい使用法は「Misskey APIの利用」セクションをご覧ください。
|
||||
|
||||
## Misskey APIの利用
|
||||
APIはすべてリクエストのパラメータ・レスポンスともにJSON形式です。また、すべてのエンドポイントはPOSTメソッドのみ受け付けます。
|
||||
APIリファレンスもご確認ください。
|
||||
|
||||
### レートリミット
|
||||
Misskey APIにはレートリミットがあり、短時間のうちに多数のリクエストを送信すると、一定時間APIを利用することができなくなることがあります。
|
||||
@@ -6,12 +6,14 @@
|
||||
color #fff
|
||||
background #222e40
|
||||
border-radius 4px
|
||||
overflow auto
|
||||
white-space nowrap
|
||||
|
||||
> .method
|
||||
display inline-block
|
||||
margin 0 8px 0 0
|
||||
padding 0 6px
|
||||
color #f4fcff
|
||||
color #fff
|
||||
background #17afc7
|
||||
border-radius 4px
|
||||
user-select none
|
||||
76
src/docs/api/endpoints/view.pug
Normal file
@@ -0,0 +1,76 @@
|
||||
extends ../../base
|
||||
include ../mixins
|
||||
|
||||
block meta
|
||||
link(rel="stylesheet" href="/docs/assets/api/endpoints/style.css")
|
||||
|
||||
block main
|
||||
h1= title
|
||||
|
||||
p#url
|
||||
span.method POST
|
||||
span.host
|
||||
= url.host
|
||||
| /
|
||||
span.path= url.path
|
||||
|
||||
if endpoint.desc
|
||||
p#desc= endpoint.desc[lang] || endpoint.desc['ja']
|
||||
|
||||
if endpoint.requireCredential
|
||||
div.ui.info: p
|
||||
i.fas.fa-id-card-alt(style="margin-right: 4px")
|
||||
= i18n('docs.api.endpoints.require-credential')
|
||||
|
||||
if endpoint.kind
|
||||
div.ui.info: p
|
||||
i.fas.fa-unlock-alt(style="margin-right: 4px")
|
||||
!= i18n('docs.api.endpoints.require-permission').replace('{permission}', `<code>${endpoint.kind}</code>`)
|
||||
|
||||
if endpoint.limit
|
||||
div.ui.info.warn: p
|
||||
i.far.fa-clock(style="margin-right: 4px")
|
||||
b!= i18n('docs.api.endpoints.has-limit')
|
||||
if endpoint.limit.duration
|
||||
!= i18n('docs.api.endpoints.duration-limit').replace('{duration}', endpoint.limit.duration).replace('{max}', endpoint.limit.max)
|
||||
if endpoint.limit.minInterval
|
||||
!= i18n('docs.api.endpoints.min-interval-limit').replace('{interval}', endpoint.limit.minInterval)
|
||||
|
||||
if params && Object.keys(params).length > 0
|
||||
section
|
||||
h2= i18n('docs.api.endpoints.params')
|
||||
+propTable(params)
|
||||
|
||||
if paramDefs
|
||||
each paramDef in paramDefs
|
||||
section(id= paramDef.name)
|
||||
h3= paramDef.name
|
||||
+propTable(paramDef.params)
|
||||
if params && Object.keys(params).length == 0
|
||||
section
|
||||
h2= i18n('docs.api.endpoints.params')
|
||||
p= i18n('docs.api.endpoints.no-params')
|
||||
|
||||
if res
|
||||
section
|
||||
h2= i18n('docs.api.endpoints.res')
|
||||
|
||||
if resProps
|
||||
+propTable(resProps)
|
||||
|
||||
if resDefs
|
||||
each resDef in resDefs
|
||||
section(id= resDef.name)
|
||||
h3= resDef.name
|
||||
+propTable(resDef.props)
|
||||
else
|
||||
if res.type.startsWith('entity')
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(res.entity)}`)= res.entity
|
||||
|
||||
block footer
|
||||
div.ui.info: p
|
||||
i.fas.fa-info-circle(style="margin-right: 4px")
|
||||
= i18n('docs.api.endpoints.generated')
|
||||
p
|
||||
= i18n('docs.api.endpoints.show-src')
|
||||
a(href=src target="_blank")= i18n('docs.api.endpoints.show-src-link')
|
||||
@@ -5,69 +5,86 @@ desc:
|
||||
en: "A file of Drive."
|
||||
|
||||
props:
|
||||
- name: "id"
|
||||
id:
|
||||
type: "id"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイルID"
|
||||
en: "The ID of this file"
|
||||
- name: "createdAt"
|
||||
|
||||
createdAt:
|
||||
type: "date"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "アップロード日時"
|
||||
en: "The upload date of this file"
|
||||
- name: "userId"
|
||||
|
||||
userId:
|
||||
type: "id(User)"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "所有者ID"
|
||||
en: "The ID of the owner of this file"
|
||||
- name: "user"
|
||||
|
||||
user:
|
||||
type: "entity(User)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "所有者"
|
||||
en: "The owner of this file"
|
||||
- name: "name"
|
||||
|
||||
name:
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイル名"
|
||||
en: "The name of this file"
|
||||
- name: "md5"
|
||||
|
||||
md5:
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイルのMD5ハッシュ値"
|
||||
en: "The md5 hash value of this file"
|
||||
- name: "type"
|
||||
|
||||
type:
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイルの種類"
|
||||
en: "The type of this file"
|
||||
- name: "datasize"
|
||||
|
||||
datasize:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイルサイズ(bytes)"
|
||||
en: "The size of this file (bytes)"
|
||||
- name: "url"
|
||||
|
||||
url:
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "ファイルのURL"
|
||||
en: "The URL of this file"
|
||||
- name: "folderId"
|
||||
|
||||
folderId:
|
||||
type: "id(DriveFolder)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "フォルダID"
|
||||
en: "The ID of the folder of this file"
|
||||
- name: "folder"
|
||||
|
||||
folder:
|
||||
type: "entity(DriveFolder)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "フォルダ"
|
||||
en: "The folder of this file"
|
||||
|
||||
sensitive:
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "このメディアが「閲覧注意」(NSFW)かどうか"
|
||||
en: "Whether this media is NSFW"
|
||||
@@ -5,163 +5,185 @@ desc:
|
||||
en: "A note."
|
||||
|
||||
props:
|
||||
- name: "id"
|
||||
id:
|
||||
type: "id"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿ID"
|
||||
en: "The ID of this note"
|
||||
- name: "createdAt"
|
||||
|
||||
createdAt:
|
||||
type: "date"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿日時"
|
||||
en: "The posted date of this note"
|
||||
- name: "viaMobile"
|
||||
|
||||
viaMobile:
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "モバイル端末から投稿したか否か(自己申告であることに留意)"
|
||||
en: "Whether this note sent via a mobile device"
|
||||
- name: "text"
|
||||
|
||||
text:
|
||||
type: "string"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投稿の本文"
|
||||
en: "The text of this note"
|
||||
- name: "mediaIds"
|
||||
|
||||
mediaIds:
|
||||
type: "id(DriveFile)[]"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "添付されているメディアのID (なければレスポンスでは空配列)"
|
||||
en: "The IDs of the attached media (empty array for response if no media is attached)"
|
||||
- name: "media"
|
||||
|
||||
media:
|
||||
type: "entity(DriveFile)[]"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "添付されているメディア"
|
||||
en: "The attached media"
|
||||
- name: "userId"
|
||||
|
||||
userId:
|
||||
type: "id(User)"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投稿者ID"
|
||||
en: "The ID of author of this note"
|
||||
- name: "user"
|
||||
|
||||
user:
|
||||
type: "entity(User)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投稿者"
|
||||
en: "The author of this note"
|
||||
- name: "myReaction"
|
||||
|
||||
myReaction:
|
||||
type: "string"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "この投稿に対する自分の<a href='/docs/api/reactions'>リアクション</a>"
|
||||
en: "The your <a href='/docs/api/reactions'>reaction</a> of this note"
|
||||
- name: "reactionCounts"
|
||||
|
||||
reactionCounts:
|
||||
type: "object"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "<a href='/docs/api/reactions'>リアクション</a>をキーとし、この投稿に対するそのリアクションの数を値としたオブジェクト"
|
||||
- name: "replyId"
|
||||
|
||||
replyId:
|
||||
type: "id(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "返信した投稿のID"
|
||||
en: "The ID of the replyed note"
|
||||
- name: "reply"
|
||||
|
||||
reply:
|
||||
type: "entity(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "返信した投稿"
|
||||
en: "The replyed note"
|
||||
- name: "renoteId"
|
||||
|
||||
renoteId:
|
||||
type: "id(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "引用した投稿のID"
|
||||
en: "The ID of the quoted note"
|
||||
- name: "renote"
|
||||
|
||||
renote:
|
||||
type: "entity(Note)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "引用した投稿"
|
||||
en: "The quoted note"
|
||||
- name: "poll"
|
||||
|
||||
poll:
|
||||
type: "object"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投票"
|
||||
en: "The poll"
|
||||
defName: "poll"
|
||||
def:
|
||||
- name: "choices"
|
||||
|
||||
props:
|
||||
choices:
|
||||
type: "object[]"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投票の選択肢"
|
||||
en: "The choices of this poll"
|
||||
defName: "choice"
|
||||
def:
|
||||
- name: "id"
|
||||
|
||||
props:
|
||||
id:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "選択肢ID"
|
||||
en: "The ID of this choice"
|
||||
- name: "isVoted"
|
||||
|
||||
isVoted:
|
||||
type: "boolean"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "自分がこの選択肢に投票したかどうか"
|
||||
en: "Whether you voted to this choice"
|
||||
- name: "text"
|
||||
|
||||
text:
|
||||
type: "string"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "選択肢本文"
|
||||
en: "The text of this choice"
|
||||
- name: "votes"
|
||||
|
||||
votes:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "この選択肢に投票された数"
|
||||
en: "The number voted for this choice"
|
||||
- name: "geo"
|
||||
geo:
|
||||
type: "object"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "位置情報"
|
||||
en: "Geo location"
|
||||
defName: "geo"
|
||||
def:
|
||||
- name: "coordinates"
|
||||
|
||||
props:
|
||||
coordinates:
|
||||
type: "number[]"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "座標。最初に経度:-180〜180で表す。最後に緯度:-90〜90で表す。"
|
||||
- name: "altitude"
|
||||
|
||||
altitude:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "高度。メートル単位で表す。"
|
||||
- name: "accuracy"
|
||||
|
||||
accuracy:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "緯度、経度の精度。メートル単位で表す。"
|
||||
- name: "altitudeAccuracy"
|
||||
|
||||
altitudeAccuracy:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "高度の精度。メートル単位で表す。"
|
||||
- name: "heading"
|
||||
|
||||
heading:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "方角。0〜360の角度で表す。0が北、90が東、180が南、270が西。"
|
||||
- name: "speed"
|
||||
|
||||
speed:
|
||||
type: "number"
|
||||
optional: false
|
||||
desc:
|
||||
@@ -135,6 +135,7 @@ props:
|
||||
desc:
|
||||
ja: "連携されているTwitterアカウント情報"
|
||||
en: "The info of the connected twitter account of this user"
|
||||
|
||||
props:
|
||||
userId:
|
||||
type: "string"
|
||||
@@ -142,6 +143,7 @@ props:
|
||||
desc:
|
||||
ja: "ユーザーID"
|
||||
en: "The user ID"
|
||||
|
||||
screenName:
|
||||
type: "string"
|
||||
optional: false
|
||||
@@ -162,6 +164,7 @@ props:
|
||||
desc:
|
||||
ja: "プロフィール"
|
||||
en: "The profile of this user"
|
||||
|
||||
props:
|
||||
location:
|
||||
type: "string"
|
||||
@@ -169,6 +172,7 @@ props:
|
||||
desc:
|
||||
ja: "場所"
|
||||
en: "The location of this user"
|
||||
|
||||
birthday:
|
||||
type: "string"
|
||||
optional: true
|
||||
@@ -1,4 +1,4 @@
|
||||
extends ../../layout.pug
|
||||
extends ../../base
|
||||
include ../mixins
|
||||
|
||||
block meta
|
||||
34
src/docs/api/mixins.pug
Normal file
@@ -0,0 +1,34 @@
|
||||
mixin type(prop)
|
||||
i= prop.type
|
||||
if prop.kind == 'id'
|
||||
if prop.entity
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| ID)
|
||||
else
|
||||
| (ID)
|
||||
else if prop.kind == 'entity'
|
||||
| (
|
||||
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
|
||||
| )
|
||||
else if prop.kind == 'object'
|
||||
if prop.hasDef
|
||||
| (
|
||||
a(href=`#${prop.name}`)= prop.name
|
||||
| )
|
||||
else if prop.kind == 'date'
|
||||
| (Date)
|
||||
|
||||
mixin propTable(props)
|
||||
table.props
|
||||
thead: tr
|
||||
th= i18n('docs.api.props.name')
|
||||
th= i18n('docs.api.props.type')
|
||||
th= i18n('docs.api.props.description')
|
||||
tbody
|
||||
each prop in props
|
||||
tr
|
||||
td.name= prop.name
|
||||
td.type
|
||||
+type(prop)
|
||||
td.desc!= prop.desc ? prop.desc[lang] || prop.desc['ja'] : null
|
||||
9
src/docs/article.pug
Normal file
@@ -0,0 +1,9 @@
|
||||
extends ./base
|
||||
|
||||
block main
|
||||
!= html
|
||||
|
||||
block footer
|
||||
p
|
||||
= i18n('docs.edit-this-page-on-github')
|
||||
a(href=src target="_blank")= i18n('docs.edit-this-page-on-github-link')
|
||||
@@ -7,11 +7,11 @@ html(lang= lang)
|
||||
title
|
||||
| #{title} | Misskey Docs
|
||||
link(rel="stylesheet" href="/docs/assets/style.css")
|
||||
link(rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css")
|
||||
script(src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js")
|
||||
link(rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous")
|
||||
block meta
|
||||
|
||||
//- FontAwesome style
|
||||
style #{facss}
|
||||
|
||||
body
|
||||
nav
|
||||
ul
|
||||
@@ -27,7 +27,7 @@ html(lang= lang)
|
||||
li Endpoints
|
||||
ul
|
||||
each endpoint in endpoints
|
||||
li: a(href=`/docs/${lang}/api/endpoints/${kebab(endpoint)}`)= endpoint
|
||||
li: a(href=`/docs/${lang}/api/endpoints/${kebab(endpoint.name)}`)= endpoint.name
|
||||
main
|
||||
article
|
||||
block main
|
||||
@@ -35,7 +35,5 @@ html(lang= lang)
|
||||
| !{content}
|
||||
|
||||
footer
|
||||
p
|
||||
| %i18n:docs.edit-this-page-on-github%
|
||||
a(href=src target="_blank") %i18n:docs.edit-this-page-on-github-link%
|
||||
block footer
|
||||
small= copyright
|
||||