Inital commit

This commit is contained in:
CyberRex
2026-08-19 13:55:59 +09:00
commit d61554d8b9
735 changed files with 86553 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
# サーバーのメンテナ情報
maintainer:
# メンテナの名前
name:
# メンテナの連絡先(URLかmailto形式のURL)
url:
# (Misskeyを動かす)URL
url:
# 待受ポート
port:
# TLSの設定(利用しない場合は省略してください)
https:
# 証明書のパス...
key:
cert:
# MongoDBの設定
mongodb:
host: localhost
port: 27017
db: misskey
user:
pass:
# Redisの設定
redis:
host: localhost
port: 6379
pass:
# reCAPTCHAの設定
recaptcha:
site_key:
secret_key:
# ServiceWrokerの設定
sw:
# VAPIDの公開鍵
public_key:
# VAPIDの秘密鍵
private_key:
# Google Maps API
google_maps_api_key:
# Twitterインテグレーションの設定(利用しない場合は省略可能)
twitter:
# インテグレーション用アプリのコンシューマーキー
consumer_key:
# インテグレーション用アプリのコンシューマーシークレット
consumer_secret:
+8
View File
@@ -0,0 +1,8 @@
.git
.config/default.yml
.config/test.yml
node_modules
build
built
data
npm-debug.log
+10
View File
@@ -0,0 +1,10 @@
root = true
[*]
indent_style = tab
indent_size = 2
charset = utf-8
insert_final_newline = true
[*.yml]
indent_style = space
+27
View File
@@ -0,0 +1,27 @@
{
"parserOptions": {
"parser": "typescript-eslint-parser"
},
"extends": [
"eslint:recommended",
"plugin:vue/recommended"
],
"rules": {
"vue/require-v-for-key": false,
"vue/max-attributes-per-line": false,
"vue/html-indent": false,
"vue/html-self-closing": false,
"vue/no-unused-vars": false,
"vue/attributes-order": false,
"vue/require-prop-types": false,
"vue/require-default-prop": false,
"no-console": 0,
"no-unused-vars": 0,
"no-empty": 0
},
"globals": {
"ENV": true,
"VERSION": true,
"API": true
}
}
+3
View File
@@ -0,0 +1,3 @@
*.svg -diff -text
*.psd -diff -text
*.ai -diff -text
+7
View File
@@ -0,0 +1,7 @@
<!--
Misskeyへの貢献ありがとうございます。
バグの報告や提案などで、可能であれば以下の情報を含めてください。
* お使いのブラウザ
* デスクトップ版Misskeyかモバイル版Misskeyか
-->
+11
View File
@@ -0,0 +1,11 @@
/.config/*
!/.config/example.yml
/.vscode
/node_modules
/build
/built
/data
npm-debug.log
*.pem
run.bat
api-docs.json
+2
View File
@@ -0,0 +1,2 @@
package-lock = true
legacy-peer-deps = true
+40
View File
@@ -0,0 +1,40 @@
# travis file
# https://docs.travis-ci.com/user/customizing-the-build
notifications:
email: false
language: node_js
node_js:
- 22
env:
- NODE_ENV=production
addons:
apt:
packages:
- imagemagick
cache:
directories:
# パッケージをキャッシュすると本来は動かないはずなのに動いてしまう
# 場合があり危険なのでキャッシュはしない:
#- node_modules
services:
- mongodb
- redis-server
before_script:
# 設定ファイルを配置
- cp ./.travis/default.yml ./.config
- cp ./.travis/test.yml ./.config
install:
- npm ci
script:
- travis_wait 20 npm run build
- npm test
+26
View File
@@ -0,0 +1,26 @@
maintainer: '@syuilo'
url: 'https://misskey.xyz'
secondary_url: 'https://himasaku.net'
port: 80
https:
enable: false
key: null
cert: null
ca: null
mongodb:
host: localhost
port: 27017
db: misskey
user: syuilo
pass: ''
redis:
host: localhost
port: 6379
pass: ''
elasticsearch:
host: localhost
port: 9200
pass: ''
recaptcha:
site_key: hima
secret_key: saku
+26
View File
@@ -0,0 +1,26 @@
maintainer: '@syuilo'
url: 'https://misskey.xyz'
secondary_url: 'https://himasaku.net'
port: 80
https:
enable: false
key: null
cert: null
ca: null
mongodb:
host: localhost
port: 27017
db: test-misskey
user: admin
pass: ''
redis:
host: localhost
port: 6379
pass: ''
elasticsearch:
host: localhost
port: 9200
pass: ''
recaptcha:
site_key: hima
secret_key: saku
+46
View File
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at syuilotan@yahoo.co.jp. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+27
View File
@@ -0,0 +1,27 @@
# Contribution guide
:v: Misskeyへの貢献ありがとうございます。 :v:
## Issueの報告
新機能の提案や不具合の報告は https://github.com/syuilo/misskey/issues で管理しています。
Issueを作成する前に、既に同じIssueが作成されていないかご確認ください。
もし既にIssueが作成されている場合は、既存のIssueにコメントをしたりリアクションをするようお願いします。
## Issueの解決
[pr-welcomeのラベルがついているIssue](https://github.com/syuilo/misskey/labels/pr-welcome)
の解決を目的としたPull Requestを作成してくださると非常にありがたいです。
## 翻訳の改善
ソースコード中の `%i18n:id%` という形の文字列は、言語ファイルの対応するテキストに置換されます。
言語ファイルは /locales ディレクトリに存在します。
## ドキュメントの編集
現在Misskeyはドキュメントが大きく不足しています。
ドキュメントは /docs ディレクトリに存在します。
## テストの追加
現在Misskeyはテストが大きく不足しています。
テストコードは /test ディレクトリに存在します。
## 自動テスト及び自動リリース
Travis CIで行っています。
設定ファイルは /.travis に存在します。
+29
View File
@@ -0,0 +1,29 @@
DONATORS
========
The list of people who have sent donation for Misskey.
(In random order, honorific titles are omitted.)
* らふぁ
* 俺様
* なぎうり
* スルメ https://surume.tk/
* 藍
* 音船 https://otofune.me/
* aqz https://misskey.xyz/aqz
* kotodu "虚無創作中"
* Maya Minatsuki
* Knzk https://knzk.me/@Knzk
* ねじりわさび https://knzk.me/@y
* NCLS https://knzk.me/@imncls]
* こじま @skoji@sandbox.skoji.jp
:heart: Thanks for donating, guys!
---
If your name is missing, please contact us!
If you want to donate to Misskey, please get in touch with [@syuilo][syuilo-link].
[syuilo-link]: https://syuilo.com
+661
View File
@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
+102
View File
@@ -0,0 +1,102 @@
<img src="https://github.com/syuilo/misskey/blob/b3f42e62af698a67c2250533c437569559f1fdf9/src/himasaku/resources/himasaku.png?raw=true" align="right" width="320px"/>
[![Misskey](/assets/title.png)](https://misskey.xyz/)
================================================================
[![][travis-badge]][travis-link]
[![][dependencies-badge]][dependencies-link]
[![][himawari-badge]][himasaku]
[![][sakurako-badge]][himasaku]
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
> Lead Maintainer: [syuilo][syuilo-link]
**[Misskey](https://misskey.xyz)** is a completely open source,
ultimately sophisticated new type of mini-blog based SNS.
<a href="https://www.patreon.com/syuilo"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160" /></a>
:sparkles: Features
----------------------------------------------------------------
* Automatically updated timeline
* Reactions
* Private messages
* ServiceWorker support
* ActivityPub compatible
and more! You can touch with your own eyes at https://misskey.xyz/.
:package: Create your instance
----------------------------------------------------------------
If you want to run your own instance of Misskey,
please see [Setup and installation guide](./docs/setup.en.md).
:wrench: Contribute
----------------------------------------------------------------
**[PR](https://github.com/syuilo/misskey/pulls)s welcome!**
If you want to translate Misskey, please see [Translation guide](./docs/translate.en.md).
:heart: Backers & Sponsors
----------------------------------------------------------------
[![Backers][backers-image]][support-url]
[![Sponsors][sponsors-image]][support-url]
:mortar_board: Notable contributors
----------------------------------------------------------------
| ![syuilo][syuilo-icon] | ![Morisawa Aya][ayamorisawa-icon] | ![otofune][otofune-icon] | ![akihikodaki][akihikodaki-icon] | ![tamaina][tamaina-icon] | ![rinsuki][rinsuki-icon] |
|:-:|:-:|:-:|:-:|:-:|:-:|
| [syuilo][syuilo-link]<br>Owner | [Aya Morisawa][ayamorisawa-link]<br>Collaborator | [otofune][otofune-link]<br>Collaborator | [akihikodaki][akihikodaki-link] | [tamaina][tamaina-link] | [rinsuki][rinsuki-link] |
[List of all contributors](https://github.com/syuilo/misskey/graphs/contributors)
### :earth_americas: Translators
| ![][mirro-san-icon] | ![][Conan-kun-icon] |
|:-:|:-:|
| [Mirro][mirro-san-link]<br>English, French | [Asriel][Conan-kun-link]<br>English, French |
:four_leaf_clover: Copyright
----------------------------------------------------------------
> Copyright (c) 2014-2018 syuilo
Misskey is an open-source software licensed under [GNU AGPLv3](LICENSE).
[![][agpl-3.0-badge]][AGPL-3.0]
[agpl-3.0]: https://www.gnu.org/licenses/agpl-3.0.en.html
[agpl-3.0-badge]: https://img.shields.io/badge/license-AGPL--3.0-444444.svg?style=flat-square
[travis-link]: https://travis-ci.org/syuilo/misskey
[travis-badge]: http://img.shields.io/travis/syuilo/misskey/master.svg?style=flat-square
[dependencies-link]: https://david-dm.org/syuilo/misskey
[dependencies-badge]: https://img.shields.io/david/syuilo/misskey.svg?style=flat-square
[himasaku]: https://himasaku.net
[himawari-badge]: https://img.shields.io/badge/%E5%8F%A4%E8%B0%B7-%E5%90%91%E6%97%A5%E8%91%B5-1684c5.svg?style=flat-square
[sakurako-badge]: https://img.shields.io/badge/%E5%A4%A7%E5%AE%A4-%E6%AB%BB%E5%AD%90-efb02a.svg?style=flat-square
[backer-url]: #backers
[backer-badge]: https://opencollective.com/misskey/backers/badge.svg
[backers-image]: https://opencollective.com/misskey/backers.svg
[sponsor-url]: #sponsors
[sponsor-badge]: https://opencollective.com/misskey/sponsors/badge.svg
[sponsors-image]: https://opencollective.com/misskey/sponsors.svg
[support-url]: https://opencollective.com/misskey#support
<!-- Contributors Info -->
[syuilo-link]: https://syuilo.com
[syuilo-icon]: https://avatars2.githubusercontent.com/u/4439005?v=3&s=70
[ayamorisawa-link]: https://github.com/ayamorisawa
[ayamorisawa-icon]: https://avatars0.githubusercontent.com/u/10798641?v=3&s=70
[otofune-link]: https://github.com/otofune
[otofune-icon]: https://avatars0.githubusercontent.com/u/15062473?v=3&s=70
[akihikodaki-link]: https://github.com/akihikodaki
[akihikodaki-icon]: https://avatars2.githubusercontent.com/u/17036990?s=70&v=4
[rinsuki-link]: https://github.com/rinsuki
[rinsuki-icon]: https://avatars0.githubusercontent.com/u/6533808?s=70&v=4
[tamaina-link]: https://github.com/tamaina
[tamaina-icon]: https://avatars1.githubusercontent.com/u/7973572?s=70&v=4
[mirro-san-link]: https://github.com/mirro-san
[mirro-san-icon]: https://avatars1.githubusercontent.com/u/17948612?s=70&v=4
[Conan-kun-link]: https://github.com/Conan-kun
[Conan-kun-icon]: https://avatars3.githubusercontent.com/u/30003708?s=70&v=4
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+13
View File
@@ -0,0 +1,13 @@
const deleteUser = require('../built/models/user').deleteUser;
const args = process.argv.slice(2);
const userId = args[0];
console.log(`deleting ${userId}...`);
deleteUser(userId).then(() => {
console.log('done');
}, e => {
console.error(e);
});
+40
View File
@@ -0,0 +1,40 @@
const { default: User, deleteUser } = require('../built/models/user');
const { default: zip } = require('@prezzemolo/zip')
const migrate = async (user) => {
try {
await deleteUser(user._id);
return true;
} catch (e) {
return false;
}
}
async function main() {
const count = await User.count({
uri: /#/
});
const dop = 1
const idop = ((count - (count % dop)) / dop) + 1
return zip(
1,
async (time) => {
console.log(`${time} / ${idop}`)
const doc = await User.find({
uri: /#/
}, {
limit: dop, skip: time * dop
})
return Promise.all(doc.map(migrate))
},
idop
).then(a => {
const rv = []
a.forEach(e => rv.push(...e))
return rv
})
}
main().then(console.dir).catch(console.error)
+164
View File
@@ -0,0 +1,164 @@
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:'
}, {
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);
}
});
+18
View File
@@ -0,0 +1,18 @@
const mongo = require('mongodb');
const User = require('../built/models/user').default;
const args = process.argv.slice(2);
const userId = new mongo.ObjectID(args[0]);
console.log(`Suspending ${userId}...`);
User.update({ _id: userId }, {
$set: {
isSuspended: true
}
}).then(() => {
console.log(`Suspended ${userId}`);
}, e => {
console.error(e);
});
+45
View File
@@ -0,0 +1,45 @@
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
environment:
NODE_ENV: production
ports:
- "3000:3000"
depends_on:
mongodb:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
- CMD
- node
- -e
- "require('http').get('http://127.0.0.1:3000/', r => process.exit(r.statusCode < 500 ? 0 : 1)).on('error', () => process.exit(1))"
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
mongodb:
image: mongo:4.4.29
volumes:
- mongodb-data:/data/db
healthcheck:
test: ["CMD", "mongo", "--quiet", "--eval", "db.adminCommand('ping').ok"]
interval: 5s
timeout: 5s
retries: 20
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
volumes:
mongodb-data:
+25
View File
@@ -0,0 +1,25 @@
FROM node:22-bookworm-slim AS build
WORKDIR /misskey
COPY package.json package-lock.json .npmrc ./
RUN npm ci --no-audit --no-fund
COPY . .
RUN cp docker/default.yml .config/default.yml \
&& cp docker/test.yml .config/test.yml \
&& NODE_ENV=production npm run build
FROM node:22-bookworm-slim AS runtime
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates imagemagick \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /misskey
ENV NODE_ENV=production
COPY --from=build /misskey ./
EXPOSE 3000
CMD ["npm", "start"]
+29
View File
@@ -0,0 +1,29 @@
maintainer: '@local'
url: 'http://localhost:3000'
port: 3000
https: null
mongodb:
host: mongodb
port: 27017
db: misskey
user: null
pass: null
redis:
host: redis
port: 6379
pass: null
elasticsearch:
enable: false
host: localhost
port: 9200
pass: null
recaptcha:
site_key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
secret_key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
+22
View File
@@ -0,0 +1,22 @@
maintainer: '@local'
url: 'http://localhost:3000'
port: 3000
https: null
mongodb:
host: mongodb
port: 27017
db: test-misskey
user: null
pass: null
redis:
host: redis
port: 6379
pass: null
elasticsearch:
enable: false
host: localhost
port: 9200
pass: null
recaptcha:
site_key: test
secret_key: test
+22
View File
@@ -0,0 +1,22 @@
How to backup your Misskey
==========================
Make sure **mongodb-tools** installed.
---
In your shell:
``` shell
$ mongodump --archive=db-backup -u <YourUserName> -p <YourPassword>
```
For details, plese see [mongodump docs](https://docs.mongodb.com/manual/reference/program/mongodump/).
Restore
-------
``` shell
$ mongorestore --archive=db-backup
```
For details, please see [mongorestore docs](https://docs.mongodb.com/manual/reference/program/mongorestore/).
+35
View File
@@ -0,0 +1,35 @@
Setup with Docker Compose :whale:
================================================================
The Compose environment builds Misskey with Node.js 22 and starts the app,
MongoDB 4.4, and Redis 7 as separate services.
From the repository root, run:
``` console
$ docker compose up --build
```
Open http://localhost:3000 after the `app` service becomes healthy.
MongoDB data is stored in the `mongodb-data` named volume.
Run the full test suite against the Compose databases with:
``` console
$ docker compose run --rm app npm test
```
To stop the services without deleting the database:
``` console
$ docker compose down
```
To also delete the local MongoDB data, explicitly remove the volume:
``` console
$ docker compose down --volumes
```
The supplied `docker/default.yml` is intended only for local verification.
Use your own `.config/default.yml` and secrets for a real deployment.
+26
View File
@@ -0,0 +1,26 @@
# Misskeyにカンパする方法
Misskeyのサポートにご興味をお持ちいただきありがとうございます!
Misskeyにカンパをしていただくと、貴方のお名前と好きなURLなどをMisskeyのリポジトリに刻む権利がもらえます。
Misskeyにカンパして開発・運営をサポートするには、次のいくつかの方法があります:
## ConoHaカードを購入する
(本家)Misskeyは、ConoHaというVPSサービスを利用しています。ConoHaカードを購入して、
カードに記載されているクーポンコードを syuilotan@yahoo.co.jp までお送りいただければ、
そのクーポンをチャージしてサーバーの運営費に充てることができます。
ConoHaカードについてはこちらをご覧ください: https://www.conoha.jp/conohacard/
Amazonでも買えます: https://www.amazon.co.jp/dp/B01N9E3416
## Amazonギフトカード
これは間接的な方法です。
## 銀行振込
syuilotan@yahoo.co.jp までお問い合わせください。
## 手渡し
オフ会を行ったときなどに行使できる方法です。
## その他
なにかいいアイデアがあればお教えください。
+13
View File
@@ -0,0 +1,13 @@
# 運営ガイド
## ジョブキューの状態を調べる
Misskeyのディレクトリで:
``` shell
node_modules/kue/bin/kue-dashboard -p 3050
```
ポート3050にアクセスするとUIが表示されます
## ユーザーを凍結する
``` shell
node cli/suspend (ユーザーID)
```
+68
View File
@@ -0,0 +1,68 @@
Misskey Setup and Installation Guide
================================================================
We thank you for your interest in setting up your Misskey server!
This guide describes how to install and setup Misskey.
[Japanese version also available - 日本語版もあります](./setup.ja.md)
----------------------------------------------------------------
*1.* reCAPTCHA tokens
----------------------------------------------------------------
Misskey requires 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:
``` shell
npm install web-push -g
web-push generate-vapid-keys
```
*2.* Install dependencies
----------------------------------------------------------------
Please install and setup these softwares:
#### Dependencies :package:
* **Node.js 22.x** and its bundled npm
* **[MongoDB](https://www.mongodb.com/)**
* **[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 ci`
*4.* Prepare configuration
----------------------------------------------------------------
1. Copy `example.yml` of `.config` directory
2. Rename it to `default.yml`
3. Edit it
---
Or you can generate config file via `npm run config` command.
*5.* Build Misskey
----------------------------------------------------------------
1. `npm run build`
*6.* That is it.
----------------------------------------------------------------
Well done! Now, you have an environment that run to Misskey.
### Launch
Run `npm start`. GLHF!
### Way to Update to latest version of your Misskey
1. `git reset --hard && git pull origin master`
2. `npm ci`
3. `npm run build`
+69
View File
@@ -0,0 +1,69 @@
Misskey構築の手引き
================================================================
Misskeyサーバーの構築にご関心をお寄せいただきありがとうございます!
このガイドではMisskeyのインストール・セットアップ方法について解説します。
[英語版もあります - English version also available](./setup.en.md)
----------------------------------------------------------------
*1.* reCAPTCHAトークンの用意
----------------------------------------------------------------
MisskeyはreCAPTCHAトークンを必要とします。
https://www.google.com/recaptcha/intro/ にアクセスしてトークンを生成してください。
*(オプション)* VAPIDキーペアの生成
----------------------------------------------------------------
ServiceWorkerを有効にする場合、VAPIDキーペアを生成する必要があります:
``` shell
npm install web-push -g
web-push generate-vapid-keys
```
*2.* 依存関係をインストールする
----------------------------------------------------------------
これらのソフトウェアをインストール・設定してください:
#### 依存関係 :package:
* **Node.js 22.x** と同梱の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のインストール
----------------------------------------------------------------
1. `git clone -b master git://github.com/syuilo/misskey.git`
2. `cd misskey`
3. `npm ci`
*4.* 設定ファイルを用意する
----------------------------------------------------------------
1. `.config`ディレクトリ内の`example.yml`をコピー
2. `default.yml`にリネーム
3. 編集する
---
または、`npm run config`コマンドを利用して、ガイドに従って情報を
入力して設定ファイルを生成することもできます。
*5.* Misskeyのビルド
----------------------------------------------------------------
1. `npm run build`
*6.* 以上です!
----------------------------------------------------------------
お疲れ様でした。これでMisskeyを動かす準備は整いました。
### 起動
`npm start`するだけです。GLHF!
### Misskeyを最新バージョンにアップデートする方法:
1. `git reset --hard && git pull origin master`
2. `npm ci`
3. `npm run build`
+27
View File
@@ -0,0 +1,27 @@
Misskey's Translation - English version
============
How to add a new language?
----------------------
Copy a language file to `/locales` and rename it after the language you wish to add.
If you find an untranslated part on Misskey:
-------------------------------
1. Look for untranslated parts in the miskey's source code.
- For instance, if you find an untranslated part in: `src/client/app/mobile/views/pages/home.vue`.
2. Replace the untranslated portion with a character string of the form `%i18n:@foo%`.
- In fact, `foo` should be a word that is appropriate for the situation and is easy to understand in English.
- For example, if the untranslated portion is the following "タイムライン" you must write: `%i18n:@timeline%`.
3. Open each language file in /locales, check whether the <strong>file name (path)</strong> found in step 1 exists, if not, create it.
- Do not put the beginning of the path `src/client/app/` in the locale file.
- For example, in this case we want to modify untranslated parts of `src/client/app/mobile/views/pages/home.vue`, so the key is `mobile/views/pages/home.vue`.
4. Add the translated text property using the `foo` keyword below the path that you found or created in step 2. Make sure to type your text in quotation marks. Text should always be inside of quotes.
- For example, in this case we add timeline: `timeline: "Timeline"` to `locales/en.yml`, and `timeline: "タイムライン"` to `locales/ja.yml`.
5. And done!
For more details, please refer to this [commit](https://github.com/syuilo/misskey/commit/10f6d5980fa7692ccb45fbc5f843458b69b7607c).
+27
View File
@@ -0,0 +1,27 @@
Traduction de Misskey - Version Française
============
Comment ajouter une nouvelle langue ?
----------------------
Veuillez copier un fichier de langue dans /locales puis renommez-le du nom de la langue que vous voulez ajouter et modifier.
Si vous trouvez un segment non-traduit sur Misskey :
-------------------------------
1. Veuillez chercher des parties non-traduites dans le code source de Misskey.
- Par exemple, supposons que vous trouviez un segment non-traduit dans : `src/client/app/mobile/views/pages/home.vue`.
2. Remplacez la portion non-traduite par une chaîne de caractères de type `%i18n:@foo%`.
- En fait, `foo` doit être un mot approprié à la situation et facile à comprendre en français.
- Par exemple, si le segment non-traduit est「タイムライン」on peut écrire : `%i18n:@timeline%`.
3. Ouvrez chaque fichier linguistique dans /locales, vérifiez si le <strong>nom du fichier (chemin)</strong> trouvé dans l'étape 1 existe, sinon créez-le.
- Ne mettez pas le début du chemin `src/client/app/` dans les fichiers /locales.
- Par exemple, dans ce cas de figure, nous voulons modifier le segment non-traduit de : `src/client/app/mobile/views/pages/home.vue`donc il faut juste écrire : `mobile/views/pages/home.vue` dans les fichiers linguistiques.
4. Ajoutez la propriété du texte traduit grâce à la clef `foo`, en-dessous du chemin correspondant à votre modification que vous avez trouvé ou créé dans l'étape 2. À côté, veuillez indiquer entre "guillemets" la valeur de votre traduction.
- Par exemple, dans ce cas de figure, nous ajoutons la propriété et la traduction `timeline: "Timeline"` à `locales/fr.yml`, mais aussi la propriété et la version originale `timeline: "タイムライン"` à `locales/ja.yml`.
5. Vous avez réussi à traduire une portion de misskey !
Pour plus de détails, veuillez vous référer à ce [commit](https://github.com/syuilo/misskey/commit/10f6d5980fa7692ccb45fbc5f843458b69b7607c).
+27
View File
@@ -0,0 +1,27 @@
Misskeyの翻訳
============
新たな言語を追加するには
----------------------
/locales 内に既にある何らかの言語ファイルをコピーして、追加したい言語名にリネームして編集してください。
Misskey内の未翻訳箇所を見つけたら
-------------------------------
1. Misskeyのソースコード内から未翻訳箇所を探してください。
- 例えば`src/client/app/mobile/views/pages/home.vue`で未翻訳箇所を見つけたとします。
2. 未翻訳箇所を`%i18n:@foo%`のような形式の文字列に置換してください。
- `foo`は実際にはその場に適したわかりやすい(英語の)名前にしてください。
- 例えば未翻訳箇所が「タイムライン」というテキストだった場合、`%i18n:@timeline%`のようにします。
3. /locales 内にあるそれぞれの言語ファイルを開き、1.で見つけた<strong>ファイル名(パス)</strong>のキーが存在するか確認し、無ければ作成してください。
- パスの`src/client/app/`は省略してください。
- 例えば、今回の例では`src/client/app/mobile/views/pages/home.vue`の未翻訳箇所を修正したいので、キーは`mobile/views/pages/home.vue`になります。
4. そのキーの直下に2.で置換した`foo`の部分をキーとし、翻訳後のテキストを値とするプロパティを追加します。
- 例えば、今回の例で言うと`locales/ja.yml`に`timeline: "タイムライン"`、`locales/en.yml`に`timeline: "Timeline"`を追加します。
5. 完了です!
詳しくは、[このコミット](https://github.com/syuilo/misskey/commit/10f6d5980fa7692ccb45fbc5f843458b69b7607c)などを参考にしてください。
+6
View File
@@ -0,0 +1,6 @@
How to create indexes
=====================
``` shell
curl -XPOST localhost:9200/misskey -d @path/to/mappings.json
```
+65
View File
@@ -0,0 +1,65 @@
{
"settings": {
"analysis": {
"analyzer": {
"bigram": {
"tokenizer": "bigram_tokenizer"
}
},
"tokenizer": {
"bigram_tokenizer": {
"type": "nGram",
"min_gram": 2,
"max_gram": 2,
"token_chars": [
"letter",
"digit"
]
}
}
}
},
"mappings": {
"user": {
"properties": {
"username": {
"type": "string",
"index": "analyzed",
"analyzer": "bigram"
},
"name": {
"type": "string",
"index": "analyzed",
"analyzer": "bigram"
},
"bio": {
"type": "string",
"index": "analyzed",
"analyzer": "kuromoji"
}
}
},
"post": {
"properties": {
"text": {
"type": "string",
"index": "analyzed",
"analyzer": "kuromoji"
}
}
},
"drive_file": {
"properties": {
"name": {
"type": "string",
"index": "analyzed",
"analyzer": "kuromoji"
},
"user": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
+187
View File
@@ -0,0 +1,187 @@
/**
* Gulp tasks
*/
import * as fs from 'fs';
import * as gulp from 'gulp';
import * as gutil from 'gulp-util';
import * as ts from 'gulp-typescript';
const sourcemaps = require('gulp-sourcemaps');
import tslint from 'gulp-tslint';
import cssnano = require('gulp-cssnano');
import * as uglifyComposer from 'gulp-uglify/composer';
import pug = require('gulp-pug');
import * as rimraf from 'rimraf';
import chalk from 'chalk';
import imagemin = require('gulp-imagemin');
import * as rename from 'gulp-rename';
import * as mocha from 'gulp-mocha';
import * as replace from 'gulp-replace';
import * as htmlmin from 'gulp-htmlmin';
const uglifyes = require('uglify-es');
import { fa } from './src/build/fa';
const client = require('./built/client/meta.json');
import config from './src/config';
const uglify = uglifyComposer(uglifyes, console);
const env = process.env.NODE_ENV || 'development';
const isProduction = env === 'production';
const isDebug = !isProduction;
if (isDebug) {
console.warn(chalk.yellow.bold('WARNING! NODE_ENV is not "production".'));
console.warn(chalk.yellow.bold(' built script will not be compressed.'));
}
const constants = require('./src/const.json');
require('./src/client/docs/gulpfile.ts');
gulp.task('build:ts', () => {
const tsProject = ts.createProject('./tsconfig.json');
return tsProject
.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.pipe(sourcemaps.write('.', { includeContent: false, sourceRoot: '../built' }))
.pipe(gulp.dest('./built/'));
});
gulp.task('build:copy', () =>
gulp.src([
'./src/**/assets/**/*',
'!./src/client/app/**/assets/**/*'
]).pipe(gulp.dest('./built/'))
);
gulp.task('lint', () =>
gulp.src('./src/**/*.ts')
.pipe(tslint({
formatter: 'verbose'
}))
.pipe(tslint.report())
);
gulp.task('format', () =>
gulp.src('./src/**/*.ts')
.pipe(tslint({
formatter: 'verbose',
fix: true
}))
.pipe(tslint.report())
);
gulp.task('mocha', () =>
gulp.src('./test/**/*.ts', { read: false })
.pipe(mocha({
exit: true,
compilers: 'ts:ts-node/register'
} as any))
);
gulp.task('clean', cb =>
rimraf('./built', cb)
);
gulp.task('cleanall:node_modules', cb =>
rimraf('./node_modules', cb)
);
gulp.task('build:client:script', () =>
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)))
.pipe(isProduction ? uglify({
toplevel: true
} as any) : gutil.noop())
.pipe(gulp.dest('./built/client/assets/')) as any
);
gulp.task('build:client:styles', () =>
gulp.src('./src/client/app/init.css')
.pipe(isProduction
? (cssnano as any)()
: gutil.noop())
.pipe(gulp.dest('./built/client/assets/'))
);
gulp.task('copy:client', () =>
gulp.src([
'./assets/**/*',
'./src/client/assets/**/*',
'./src/client/app/*/assets/**/*'
])
.pipe(isProduction ? (imagemin as any)() : gutil.noop())
.pipe(rename(path => {
path.dirname = path.dirname.replace('assets', '.');
}))
.pipe(gulp.dest('./built/client/assets/'))
);
gulp.task('build:client:pug', () =>
gulp.src('./src/client/app/base.pug')
.pipe(pug({
locals: {
themeColor: constants.themeColor,
facss: fa.dom.css(),
//hljscss: fs.readFileSync('./node_modules/highlight.js/styles/default.css', 'utf8')
hljscss: fs.readFileSync('./src/client/assets/code-highlight.css', 'utf8')
}
}))
.pipe(htmlmin({
// 真理値属性の簡略化 e.g.
// <input value="foo" readonly="readonly"> to
// <input value="foo" readonly>
collapseBooleanAttributes: true,
// テキストの一部かもしれない空白も削除する e.g.
// <div> <p> foo </p> </div> to
// <div><p>foo</p></div>
collapseWhitespace: true,
// タグ間の改行を保持する
preserveLineBreaks: true,
// (できる場合は)属性のクォーテーション削除する e.g.
// <p class="foo-bar" id="moo" title="blah blah">foo</p> to
// <p class=foo-bar id=moo title="blah blah">foo</p>
removeAttributeQuotes: true,
// 省略可能なタグを省略する e.g.
// <html><p>yo</p></html> ro
// <p>yo</p>
removeOptionalTags: true,
// 属性の値がデフォルトと同じなら省略する e.g.
// <input type="text"> to
// <input>
removeRedundantAttributes: true,
// CSSも圧縮する
minifyCSS: true
}))
.pipe(gulp.dest('./built/client/app/'))
);
const gulp4 = gulp as any;
gulp.task('build:client:assets', gulp4.series(
gulp4.parallel('build:client:script', 'build:client:styles', 'copy:client'),
'build:client:pug'
));
gulp.task('build:client', gulp4.series('build:ts', 'build:client:assets'));
gulp.task('build', gulp4.series(
'build:ts',
gulp4.parallel('build:copy', 'build:client:assets', 'doc')
));
gulp.task('rebuild', gulp4.series('clean', 'build'));
gulp.task('cleanall', gulp4.series('clean', 'cleanall:node_modules'));
gulp.task('test', gulp4.series('lint', 'mocha'));
gulp.task('default', gulp4.series('build'));
+13
View File
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"jspm_packages",
"tmp",
"temp"
]
}
+649
View File
@@ -0,0 +1,649 @@
common:
misskey: "Share everything with others using Misskey."
time:
unknown: "unknown"
future: "future"
just_now: "just now"
seconds_ago: "{}s ago"
minutes_ago: "{}m ago"
hours_ago: "{}h ago"
days_ago: "{}d ago"
weeks_ago: "{}week(s) ago"
months_ago: "{}month(s) ago"
years_ago: "{}year(s) ago"
weekday-short:
sunday: "S"
monday: "M"
tuesday: "T"
wednesday: "W"
thursday: "T"
friday: "F"
satruday: "S"
reactions:
like: "Like"
love: "Love"
laugh: "Laugh"
hmm: "Hmm...?"
surprise: "Wow"
congrats: "Congrats!"
angry: "Angry"
confused: "Confused"
pudding: "Pudding"
delete: "Delete"
loading: "Loading"
ok: "OK"
update-available: "A new version of Misskey is now available({newer}, current is {current}). Reload the page to apply the update."
my-token-regenerated: "Your token has been generated. You will now get logged out."
common/views/components/connect-failed.vue:
title: "Unable to connect to the server"
description: "There is a problem either with your internet connection, or the server may be down or under maintenance. Please {try again} later."
thanks: "Thank you for using Misskey."
troubleshoot: "Troubleshoot"
common/views/components/connect-failed.troubleshooter.vue:
title: "Troubleshooting"
network: "Network connection"
checking-network: "Checking network connection"
internet: "Internet connection"
checking-internet: "Checking internet connection"
server: "Server connection"
checking-server: "Checking server connection"
finding: "Finding a problem"
no-network: "There is no Network connection"
no-network-desc: "Please make sure you are connected to the Network."
no-internet: "There is no Internet connection"
no-internet-desc: "Please make sure you are connected to the Internet."
no-server: "Unable to connect to the server"
no-server-desc: "The network connection of your PC is normal, but you could not connect to Misskey's server. There is a possibility that the server is either down or under maintenance, please try again later."
success: "Successfully connected to Misskey's server"
success-desc: "It seems to be able to connect. Please reload the page."
flush: "Clean cache"
set-version: "Specify version"
common/views/components/messaging.vue:
search-user: "Find an user"
you: "You"
no-history: "No history"
common/views/components/messaging-room.vue:
empty: "No conversations"
more: "More"
no-history: "There is no more history"
resize-form: "Drag to resize"
new-message: "New message"
common/views/components/messaging-room.form.vue:
input-message-here: "Enter message here"
send: "Send"
attach-from-local: "Attach files from your pc"
attach-from-drive: "Attach files from your Drive"
common/views/components/messaging-room.message.vue:
is-read: "Read"
deleted: "This message has been deleted"
common/views/components/nav.vue:
about: "About"
stats: "Stats"
status: "Status"
wiki: "Wiki"
donors: "Donators"
repository: "Repository"
develop: "Developers"
feedback: "Feedback"
common/views/components/note-menu.vue:
favorite: "Favorite this note"
pin: "Pin to profile page"
remote: "Show on origin"
common/views/components/poll.vue:
vote-to: "Vote for '{}'"
vote-count: "{} votes"
total-users: "{} users voted"
vote: "Vote"
show-result: "Show results"
voted: "Voted"
common/views/components/poll-editor.vue:
no-only-one-choice: "You need to enter two or more choices."
choice-n: "Choice {}"
remove: "Remove this choice"
add: "+ Add a choice"
destroy: "Destroy this poll"
common/views/components/reaction-picker.vue:
choose-reaction: "Choose a reaction"
common/views/components/signin.vue:
username: "Username"
password: "Password"
token: "Token"
signing-in: "Signing in..."
signin: "Sign in"
common/views/components/signup.vue:
username: "Username"
checking: "Checking..."
available: "Available"
unavailable: "Unavailable"
error: "Network error"
invalid-format: "Only use letters, numbers and -."
too-short: "Please enter at least 1 character!"
too-long: "Please enter up to 20 characters."
password: "Password"
password-placeholder: "We recommend more than 8 characters."
weak-password: "Weak"
normal-password: "So so"
strong-password: "Strong"
retype: "Type again"
retype-placeholder: "Confirm your password"
password-matched: "OK"
password-not-matched: "Doesn't match"
recaptcha: "Verify"
create: "Create an Account"
some-error: "Account creation failed for some reason. Please try again."
common/views/components/special-message.vue:
new-year: "Happy New Year!"
christmas: "Merry Christmas!"
common/views/components/stream-indicator.vue:
connecting: "Connecting"
reconnecting: "Reconnecting"
connected: "Connected"
common/views/components/twitter-setting.vue:
description: "If you connect your Twitter account to your Misskey account, you will be able to see your Twitter account information on your profile and you can sign-in using Twitter."
connected-to: "You are connected to this Twitter account"
detail: "Detail..."
reconnect: "Reconnect"
connect: "Link your twitter account"
disconnect: "Disconnect"
common/views/components/uploader.vue:
waiting: "Waiting"
common/views/widgets/broadcast.vue:
fetching: "Fetching"
no-broadcasts: "No broadcasts"
have-a-nice-day: "Have a nice day!"
next: "Next"
common/views/widgets/donation.vue:
title: "Donation"
text: "To keep Misskey up and running we spend money for our domain name, servers and so on.. We don't get any money from it, and we would really appreciate it if you could donate. If you're interested contact {}. Thank you for your contribution!"
common/views/widgets/photo-stream.vue:
title: "Photostream"
no-photos: "No photos"
common/views/widgets/server.vue:
title: "Server info"
toggle: "Toggle views"
desktop/views/components/activity.vue:
title: "Activity"
toggle: "Toggle views"
desktop/views/components/calendar.vue:
title: "{1} / {2}"
prev: "Previous month"
next: "Next month"
go: "Click to naviguate"
desktop/views/components/drive-window.vue:
used: "used"
drive: "Drive"
desktop/views/components/drive.file.vue:
avatar: "Avatar"
banner: "Banner"
contextmenu:
rename: "Rename"
copy-url: "Copy URL"
download: "Download"
else-files: "Others"
set-as-avatar: "Set as avatar"
set-as-banner: "Set as banner"
open-in-app: "Open in app"
add-app: "Add app"
rename-file: "Rename file"
input-new-file-name: "Enter new name"
copied: "Copied"
copied-url-to-clipboard: "Copied URL to clipboard"
desktop/views/components/drive.folder.vue:
unable-to-process: "The operation could not be completed."
circular-reference-detected: "The destination folder is a subfolder of the folder you wish to move."
unhandled-error: "Unknown error"
contextmenu:
move-to-this-folder: "Move to this folder"
show-in-new-window: "Open in new window"
rename: "Rename"
rename-folder: "Rename folder"
input-new-folder-name: "Enter new name"
desktop/views/components/drive.nav-folder.vue:
drive: "Drive"
desktop/views/components/drive.vue:
search: "Search"
load-more: "Load more"
empty-draghover: "Drop Welcome!"
empty-drive: "Your drive is empty"
empty-drive-description: "You can also upload by right clicking and selecting \"Upload file\" or you can drag and drop a file onto the window."
empty-folder: "This folder is empty"
unable-to-process: "The operation could not be completed."
circular-reference-detected: "The destination folder is a subfolder of the folder you wish to move."
unhandled-error: "Unknown error"
url-upload: "Upload from a URL"
url-of-file: "URL of file you want to upload"
url-upload-requested: "Upload requested"
may-take-time: "It may take some time for the upload to complete."
create-folder: "Create a folder"
folder-name: "Folder name"
contextmenu:
create-folder: "Create a folder"
upload: "Upload a file"
url-upload: "Upload from a URL"
desktop/views/components/messaging-window.vue:
title: "Messaging"
desktop/views/components/notes.note.vue:
reposted-by: "Reposted by {}"
reply: "Reply"
renote: "Renote"
add-reaction: "Add a reaction"
detail: "Show detail"
desktop/views/components/notifications.vue:
more: "More"
empty: "No notifications"
desktop/views/components/post-form.vue:
note-placeholder: "What's happening?"
reply-placeholder: "Reply to this note..."
quote-placeholder: "Quote this note..."
note: "Post"
reply: "Reply"
renote: "Renote"
posted: "Posted!"
replied: "Replied!"
reposted: "Reposted!"
note-failed: "Failed to note"
reply-failed: "Failed to reply"
renote-failed: "Failed to renote"
posting: "Posting"
attach-media-from-local: "Attach media from your pc"
attach-media-from-drive: "Attach media from your Drive"
attach-cancel: "Cancel attachment"
insert-a-kao: "v(‘ω’)v"
create-poll: "Create a poll"
text-remain: "{} chars remaining"
desktop/views/components/post-form-window.vue:
note: "New note"
reply: "Reply"
attaches: "{} media attached"
uploading-media: "Uploading {} media"
desktop/views/components/renote-form.vue:
quote: "Quote..."
cancel: "Cancel"
renote: "Renote"
reposting: "Reposting..."
success: "Reposted!"
failure: "Failed to Renote"
desktop/views/components/renote-form-window.vue:
title: "Are you sure you want to renote this note?"
desktop/views/components/settings.vue:
profile: "Profile"
notification: "Notification"
apps: "Apps"
mute: "Mute"
drive: "Drive"
security: "Security"
password: "Password"
2fa: "Two-factor authentication"
other: "Other"
license: "License"
desktop/views/components/settings.2fa.vue:
intro: "If you set up 2-step verification, you will need not only a password at sign-in but also a pre-registered physical device (such as your smartphone), which will improve security. "
detail: "See details..."
url: "https://www.google.com/landing/2step/"
caution: "If you lose access to your device, you won't be able to connect to Misskey anymore!"
register: "Register a device"
already-registered: "A device is already registered"
unregister: "Disable"
unregistered: "Two-step authentication has been disabled."
enter-password: "Enter the password"
authenticator: "First, you need install Google Authenticator on your device:"
howtoinstall: "How to install"
scan: "And then, scan the QR code:"
done: "Please enter the token displaying on your device:"
submit: "Submit"
success: "Setup completed successfully!"
failed: "Failed to setup. please ensure that the token is correct."
info: "From now on, enter the token that is displayed on your device in addition to your password when signing-in to Misskey."
desktop/views/components/settings.api.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "Please do not show this token to third parties (do not enter it somewhere else other than here) otherwise your account could get compromised."
regeneration-of-token: "In the unlikely event that this token leaks out you can regenerate it."
regenerate-token: "Regenerate the token"
enter-password: "Please enter the password"
desktop/views/components/settings.app.vue:
no-apps: "No authorized apps"
desktop/views/components/settings.mute.vue:
no-users: "No muted users"
desktop/views/components/settings.password.vue:
reset: "Change your password"
enter-current-password: "Enter the current password"
enter-new-password: "Enter the new password"
enter-new-password-again: "Enter the new password again"
not-match: "New password doesn't match"
changed: "Password updated successfully"
desktop/views/components/settings.profile.vue:
avatar: "Avatar"
choice-avatar: "Choose an image"
name: "Name"
location: "Location"
description: "Description"
birthday: "Birthday"
save: "Update profile"
desktop/views/components/ui.header.account.vue:
profile: "Your profile"
drive: "Drive"
favorites: "Favorites"
lists: "Lists"
customize: "Customize"
settings: "Settings"
signout: "Sign out"
dark: "Fall in dark"
desktop/views/components/ui.header.nav.vue:
home: "Home"
messaging: "Messages"
game: "Game"
desktop/views/components/ui.header.notifications.vue:
title: "Notifications"
desktop/views/components/ui.header.post.vue:
post: "Compose new Post"
desktop/views/components/ui.header.search.vue:
placeholder: "Search"
desktop/views/pages/note.vue:
prev: "Previous note"
next: "Next note"
desktop/views/pages/selectdrive.vue:
title: "Choose file(s)"
ok: "OK"
cancel: "Cancel"
upload: "Upload files from you PC"
desktop/views/pages/user/user.followers-you-know.vue:
title: "Followers you know"
loading: "Loading"
no-users: "No users"
desktop/views/pages/user/user.friends.vue:
title: "Frequently replied"
loading: "Loading"
no-users: "No users"
desktop/views/pages/user/user.header.vue:
is-suspended: "This account has been suspended."
is-remote: "This user is a remote user, so the information is not accurate. "
view-remote: "See accurate information"
desktop/views/pages/user/user.home.vue:
last-used-at: "Last active: "
desktop/views/pages/user/user.photos.vue:
title: "Photos"
loading: "Loading"
no-photos: "No photos"
desktop/views/pages/user/user.profile.vue:
follows-you: "Follows you"
stalk: "Stalk"
stalking: "Stalking"
unstalk: "Unstalk"
mute: "Mute"
muted: "Muting"
unmute: "Unmute"
desktop/views/widgets/messaging.vue:
title: "Messaging"
desktop/views/widgets/notifications.vue:
title: "Notifications"
settings: "Settings"
desktop/views/widgets/polls.vue:
title: "Polls"
refresh: "Show others"
nothing: "Nothing"
desktop/views/widgets/post-form.vue:
title: "Post"
note: "Post"
placeholder: "What's happening?"
desktop/views/widgets/trends.vue:
title: "Trend"
refresh: "Show others"
nothing: "Nothing"
desktop/views/widgets/users.vue:
title: "Recommended users"
refresh: "Show others"
no-one: "No one"
desktop/views/widgets/channel.vue:
title: "Channel"
settings: "Widget settings"
get-started: "Please click the cog in the upper right corner to specify a channel"
mobile/views/components/drive.vue:
drive: "Drive"
used: "used"
folder-count: "Folder(s)"
count-separator: ", "
file-count: "File(s)"
load-more: "Load more"
nothing-in-drive: "Nothing"
folder-is-empty: "This folder is empty"
mobile/views/components/drive-file-chooser.vue:
select-file: "Choose a file"
mobile/views/components/drive-folder-chooser.vue:
select-folder: "Choose a folder"
mobile/views/components/drive.file-detail.vue:
download: "Download"
rename: "Rename"
move: "Move"
hash: "Hash (md5)"
exif: "EXIF"
mobile/views/components/follow-button.vue:
follow: "Follow"
unfollow: "Unfollow"
mobile/views/components/note.vue:
reposted-by: "Renoted by {}"
mobile/views/components/note-detail.vue:
reply: "Reply"
reaction: "Reaction"
mobile/views/components/notifications.vue:
more: "More"
empty: "No notifications"
mobile/views/components/post-form.vue:
submit: "Post"
reply-placeholder: "Reply to this note..."
note-placeholder: "What's happening?"
mobile/views/components/sub-note-content.vue:
media-count: "{} media"
poll: "Poll"
mobile/views/components/timeline.vue:
empty: "No notes"
load-more: "More"
mobile/views/components/ui.nav.vue:
home: "Home"
notifications: "Notifications"
messaging: "Messages"
drive: "Drive"
settings: "Settings"
about: "About Misskey"
search: "Search"
mobile/views/components/user-timeline.vue:
no-notes: "It seems this user hasn't posted yet"
no-notes-with-media: "There is no notes with attached media"
load-more: "More"
mobile/views/components/users-list.vue:
all: "All"
known: "You know"
load-more: "More"
mobile/views/pages/drive.vue:
drive: "Drive"
mobile/views/pages/followers.vue:
followers-of: "Followers of {}"
mobile/views/pages/following.vue:
following-of: "Following of {}"
mobile/views/pages/home.vue:
timeline: "Timeline"
mobile/views/pages/messaging.vue:
messaging: "Messaging"
mobile/views/pages/messaging-room.vue:
messaging: "Messaging"
mobile/views/pages/note.vue:
title: "Post"
prev: "Previous note"
next: "Next note"
mobile/views/pages/notifications.vue:
notifications: "Notifications"
read-all: "Are you sure you want to mark all unread notifications as read?"
mobile/views/pages/profile-setting.vue:
title: "Profile settings"
will-be-published: "These profile settings will be updated."
name: "Name"
location: "Location"
description: "Description"
birthday: "Birthday"
avatar: "Avatar"
banner: "Banner"
avatar-saved: "Avatar updated successfully"
banner-saved: "Banner updated successfully"
set-avatar: "Choose an avatar"
set-banner: "Choose a banner"
save: "Save"
saved: "Profile updated successfully"
mobile/views/pages/search.vue:
search: "Search"
empty: "No posts were found for '{}'"
mobile/views/pages/selectdrive.vue:
select-file: "Choose a file"
mobile/views/pages/settings.vue:
signed-in-as: "Signed in as {}"
profile: "Profile"
twitter-integration: "Twitter integration"
signin-history: "Sign in history"
settings: "Settings"
signout: "Sign out"
mobile/views/pages/user.vue:
follows-you: "Follows you"
following: "Following"
followers: "Followers"
notes: "Posts"
overview: "Overview"
timeline: "Timeline"
media: "Media"
is-suspended: "This account has been suspended."
is-remote: "This user is a remote user, so the information is not accurate. "
view-remote: "See accurate information"
mobile/views/pages/user/home.vue:
recent-notes: "Recent notes"
images: "Images"
activity: "Activity"
keywords: "Keywords"
domains: "Domains"
frequently-replied-users: "Frequently talking users"
followers-you-know: "Followers you know"
last-used-at: "Last active:"
mobile/views/pages/user/home.followers-you-know.vue:
loading: "Loading"
no-users: "No users"
mobile/views/pages/user/home.friends.vue:
loading: "Loading"
no-users: "No users"
mobile/views/pages/user/home.notes.vue:
loading: "Loading"
no-notes: "No notes"
mobile/views/pages/user/home.photos.vue:
loading: "Loading"
no-photos: "No photos"
docs:
edit-this-page-on-github: "Did you find an error or do you want to contribute to the documentation? "
edit-this-page-on-github-link: "Edit this page on Github!"
api:
entities:
properties: "Properties"
endpoints:
params: "Parameters"
res: "Response"
props:
name: "Name"
type: "Type"
optional: "Optional"
description: "Description"
yes: "Yes"
no: "No"
+649
View File
@@ -0,0 +1,649 @@
common:
misskey: "Partagez avec les autres en utilisant Misskey"
time:
unknown: "inconnu"
future: "future"
just_now: "maintenant"
seconds_ago: "Il y a {}seconde(s)"
minutes_ago: "Il y a {}minute(s)"
hours_ago: "Il y a {}heure(s)"
days_ago: "Il y a {}jour(s)"
weeks_ago: "Il y a{}semaines(s)"
months_ago: "Il y a {}mois"
years_ago: "Il y a {}an(s)"
weekday-short:
sunday: "D"
monday: "L"
tuesday: "M"
wednesday: "M"
thursday: "J"
friday: "V"
satruday: "S"
reactions:
like: "Aime"
love: "Adore"
laugh: "Rire"
hmm: "Hmm...?"
surprise: "Wow"
congrats: "Félicitations!"
angry: "En Colère"
confused: "Confus"
pudding: "Pudding"
delete: "Supprimer"
loading: "Chargement"
ok: "OK"
update-available: "Une nouvelle version de Misskey est disponible({newer}, version actuelle: {current}). Recharger la page pour appliquer la mise à jour."
my-token-regenerated: "Votre token vient d'être généré, vous allez maintenant être déconnecté."
common/views/components/connect-failed.vue:
title: "Impossible de se connecter au server."
description: "Il y a soit un problème avec votre connexion internet, soit le serveur est hors-ligne ou en maintenance. Veuillez {ressayer} plus tard."
thanks: "On vous remercie d'utiliser Misskey."
troubleshoot: "dépanner"
common/views/components/connect-failed.troubleshooter.vue:
title: "Dépannage"
network: "Connexion au réseau"
checking-network: "Vérification de la connexion au réseau"
internet: "Connexion Internet"
checking-internet: "Vérification de la connexion internet"
server: "Connexion au server"
checking-server: "Vérification de la connexion au serveur"
finding: "Recherche d'un problème"
no-network: "Aucune connexion au réseau"
no-network-desc: "Veuillez vérifier que vous êtes bien connecté au réseau."
no-internet: "Aucune connexion internet."
no-internet-desc: "Veuillez vérifier que vous êtes bien connecté à internet."
no-server: "Impossible de se connecter au serveur"
no-server-desc: "Votre connexion est OK, mais il a été impossible de vous connecter au serveur de Misskey. Il y a des chances que le serveur soit hors-ligne ou en maintenance, veuillez ressayer plus tard."
success: "Connexion au serveur de Misskey reussie!"
success-desc: "La connexion au serveur a été reussie. Veuillez recharger la page."
flush: "キャッシュの削除"
set-version: "バージョン指定"
common/views/components/messaging.vue:
search-user: "Trouver un utilisateur"
you: "Vous"
no-history: "Pas d'historique"
common/views/components/messaging-room.vue:
empty: "Pas de conversations"
more: "Voir Plus"
no-history: "Il n'y a pas plus d'historique"
resize-form: "Faites glisser pour redimensionner"
new-message: "Nouveau message"
common/views/components/messaging-room.form.vue:
input-message-here: "Tapez ici votre message"
send: "Envoyer"
attach-from-local: "Joindre un fichier depuis votre PC"
attach-from-drive: "Joindre un fichier depuis votre Drive"
common/views/components/messaging-room.message.vue:
is-read: "Lu"
deleted: "Ce message a été supprimé"
common/views/components/nav.vue:
about: "À propos"
stats: "Stats"
status: "Status"
wiki: "Wiki"
donors: "Donateurs"
repository: "Repo"
develop: "Développeurs"
feedback: "フィードバック"
common/views/components/note-menu.vue:
favorite: "Favorite this note"
pin: "Épingler sur votre profile"
remote: "投稿元で見る"
common/views/components/poll.vue:
vote-to: "Voter pour '{}'"
vote-count: "{} votes"
total-users: "{} utilisateurs ont voté"
vote: "Vote"
show-result: "Montrer les résultats"
voted: "Voté"
common/views/components/poll-editor.vue:
no-only-one-choice: "Vous devez entrer au moins deux choix"
choice-n: "Choix {}"
remove: "Supprimer ce choix"
add: "+ Ajouter un choix"
destroy: "Supprimer ce sondage"
common/views/components/reaction-picker.vue:
choose-reaction: "Choisissez votre réaction"
common/views/components/signin.vue:
username: "Nom d'utilisateur"
password: "Mot de passe"
token: "Token"
signing-in: "Connexion...."
signin: "Se connecter"
common/views/components/signup.vue:
username: "Nom d'utilisateur"
checking: "Vérification"
available: "Disponible"
unavailable: "Non disponible"
error: "Erreur de réseau"
invalid-format: "Utilisez seulement des lettres, nombres et/ou -."
too-short: "Veuillez taper au moins un charactère!"
too-long: "Veuillez entrer au maximum 20 charactères."
password: "Mot de Passe"
password-placeholder: "Nous recommendons au moins 8 charactères."
weak-password: "Faible"
normal-password: "Moyen"
strong-password: "Fort"
retype: "Retapez"
retype-placeholder: "Confirmez votre mot de passe"
password-matched: "OK"
password-not-matched: "Les mots de passes ne correspondent pas."
recaptcha: "Vérifier"
create: "Créer un compte"
some-error: "La création de compte a échoué. Veuillez ressayer."
common/views/components/special-message.vue:
new-year: "Bonne année!"
christmas: "Joyeux Noël!"
common/views/components/stream-indicator.vue:
connecting: "Connexion en cours"
reconnecting: "Re-connexion en cours"
connected: "Connecté"
common/views/components/twitter-setting.vue:
description: "Si vous liez votre compte Twitter à votre compte Misskey, vous verrez ensuite votre compte Twitter s'afficher sur votre profile, vous aurez aussi la possibilité de vous connecter à Misskey en utilisant votre compte Twitter."
connected-to: "Vous êtes connecté à ce compte"
detail: "Detail..."
reconnect: "Reconnecter"
connect: "Lier votre compte Twitter"
disconnect: "Deconnecter"
common/views/components/uploader.vue:
waiting: "En attente"
common/views/widgets/broadcast.vue:
fetching: "Récuperation"
no-broadcasts: "No broadcasts"
have-a-nice-day: "Passez une bonne journée!"
next: "Suivant"
common/views/widgets/donation.vue:
title: "Dons"
text: "Toutes les depences pour couvrir les frais de Misskey sortent directement de notre poche. Nous ne recevons pas d'argent, si vous pouvez nous faire dons d'argent, on vous serait eternellement reconnaissant. Si vous êtes intéressés veuilles contacter {}. Merci pour votre contribution!"
common/views/widgets/photo-stream.vue:
title: "Flux de photo"
no-photos: "Pas de photos"
common/views/widgets/server.vue:
title: "Info sur le serveur"
toggle: "Afficher les vues"
desktop/views/components/activity.vue:
title: "Activitié"
toggle: "Afficher les vues"
desktop/views/components/calendar.vue:
title: "{1} / {2}"
prev: "Mois dernier"
next: "Mois prochain"
go: "Cliquer pour naviguer"
desktop/views/components/drive-window.vue:
used: "utilisé"
drive: "Drive"
desktop/views/components/drive.file.vue:
avatar: "Avatar"
banner: "Bannière"
contextmenu:
rename: "Renommer"
copy-url: "Copier l'URL"
download: "Télécharger"
else-files: "Autres..."
set-as-avatar: "Utiliser en tant qu'avatar"
set-as-banner: "Utiliser en tant que bannière"
open-in-app: "Ouvrir dans l'application"
add-app: "Ajouter une application"
rename-file: "Renommer le ficher"
input-new-file-name: "Entrer un nouveau nom"
copied: "Copied"
copied-url-to-clipboard: "L'URL a été copié dans le presse-papier"
desktop/views/components/drive.folder.vue:
unable-to-process: "L'opération n'a pas pu être complétée"
circular-reference-detected: "Le dossier de destination est un sous-dossier du dossier que vous souhaitez déplacer."
unhandled-error: "Erreur inconnue"
contextmenu:
move-to-this-folder: "Bouger dans ce dossier"
show-in-new-window: "Ouvrir dans une nouvelle fenêtre"
rename: "Renommer"
rename-folder: "Renommer le dossier"
input-new-folder-name: "Entrer un nouveau nom"
desktop/views/components/drive.nav-folder.vue:
drive: "Drive"
desktop/views/components/drive.vue:
search: "Rechercher"
load-more: "Afficher plus"
empty-draghover: "Drop Welcome!"
empty-drive: "Votre Drive est vide"
empty-drive-description: "Vous pouvez également uploader le fichier en faisant un clic droit et en choisissant 'Uploader' ou tout simplement en faisant glisser votre fichier."
empty-folder: "Ce dossier est vide"
unable-to-process: "L'opération n'a pas pu être complétée"
circular-reference-detected: "Le dossier de destination est un sous-dossier du dossier que vous souhaitez déplacer."
unhandled-error: "Erreur inconnue"
url-upload: "Uploader d'un URL"
url-of-file: "URL de l'image que vous souhaitez uploader."
url-upload-requested: "Upload requested"
may-take-time: "L'upload de votre fichier peut prendre un certain temps."
create-folder: "Créer un dossier"
folder-name: "Nom du dossier"
contextmenu:
create-folder: "Créer un dossier"
upload: "Uploader un fichier"
url-upload: "Uploader d'un URL"
desktop/views/components/messaging-window.vue:
title: "Messagerie"
desktop/views/components/notes.note.vue:
reposted-by: "Reposté par {}"
reply: "Répondre"
renote: "Renote"
add-reaction: "Ajouter votre reaction"
detail: "Afficher les détails"
desktop/views/components/notifications.vue:
more: "Plus"
empty: "Pas de notifications"
desktop/views/components/post-form.vue:
note-placeholder: "Qu'est-ce qui se passe?"
reply-placeholder: "Répondre à cette note"
quote-placeholder: "Citer cette note"
note: "Poster"
reply: "Répondre"
renote: "Renote"
posted: "Posté!"
replied: "Répondu!"
reposted: "Reposté!"
note-failed: "La note à échoué"
reply-failed: "La réponse à échoué"
renote-failed: "La renote à échoué"
posting: "Publication..."
attach-media-from-local: "Joindre un media depuis votre PC"
attach-media-from-drive: "Joindre un media depuis votre Drive"
attach-cancel: "Annuler la jointure de fichier"
insert-a-kao: "v(‘ω’)v"
create-poll: "Créer un sondage"
text-remain: "{} charactères restants"
desktop/views/components/post-form-window.vue:
note: "Nouvelle note"
reply: "Répondre"
attaches: "{} media joint(s)"
uploading-media: "Upload du media {}"
desktop/views/components/renote-form.vue:
quote: "Citer..."
cancel: "Annuler"
renote: "Renote"
reposting: "Repost en cours..."
success: "Reposté!"
failure: "La renote a échoué"
desktop/views/components/renote-form-window.vue:
title: "Êtes vous sûr de vouloir renote cette note?"
desktop/views/components/settings.vue:
profile: "Profil"
notification: "Notification"
apps: "Applications"
mute: "Mettre en sourdine"
drive: "Drive"
security: "Sécurité"
password: "Mot de Passe"
2fa: "Vérification en deux étapes"
other: "Autres"
license: "License"
desktop/views/components/settings.2fa.vue:
intro: "Si vous configurez la vérication en deux étapes vous aurez non seulement besoin de votre mot de passe mais aussi un appareil déjà pré-enregistré(tel que votre smartphone) ce qui ameliora grandement la sécurité de votre compte."
detail: "Voir les détails..."
url: "https://www.google.com/landing/2step/"
caution: "Activer la vérification en deux étapes vient aussi avec des contraintes, si vous perdez votre appareil ou ne pouvez tout simplement plus y accèder vous ne serez plus en mesure de vous connecter à Misskey."
register: "Enregistrer un appareil"
already-registered: "Cette étape à déjà été complétée"
unregister: "Désactiver"
unregistered: "La vérication en deux étapes a été desactivée"
enter-password: "Entrez un mot de passe"
authenticator: "Tout d'abord vous devez installer Google Authenticator sur votre appareil"
howtoinstall: "Comment installer"
scan: "Ensuite scannez le QR code afficher sur votre écran:"
done: "Veuillez entrer le token qui s'affiche sur votre appareil:"
submit: "Envoyer"
success: "L'operation a été complétée avec succès!"
failed: "L'operation a échoué. Veuillez vous assurer que le token a été entrer correctement."
info: "À partir de maintenant, à chaque fois que vous vous connecter entrez votre mot de passe ainsi que le token généré sur votre appareil."
desktop/views/components/settings.api.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。"
regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。"
regenerate-token: "Regenerer le token"
enter-password: "Veuillez entrer le mot de passe"
desktop/views/components/settings.app.vue:
no-apps: "Aucune application authorisée"
desktop/views/components/settings.mute.vue:
no-users: "Aucun utilisateurs mis en sourdine"
desktop/views/components/settings.password.vue:
reset: "Changer votre mot de passe"
enter-current-password: "Entrez votre mot de passe actuel"
enter-new-password: "Entrez votre nouveau mot de passe"
enter-new-password-again: "Entrez à nouveau le nouveau mot de passe"
not-match: "Le nouveau mot de passe ne correspond pas."
changed: "Mot de passe modifié avec succès"
desktop/views/components/settings.profile.vue:
avatar: "Avatar"
choice-avatar: "Choose an image"
name: "Nom"
location: "Localisation"
description: "Description"
birthday: "Date de naissance"
save: "Mettre à jour le profil"
desktop/views/components/ui.header.account.vue:
profile: "Votre profil"
drive: "Drive"
favorites: "Favorites"
lists: "リスト"
customize: "Modifications"
settings: "Réglages"
signout: "Déconnexion"
dark: "Fall in dark"
desktop/views/components/ui.header.nav.vue:
home: "Accueil"
messaging: "Messages"
game: "Jeux"
desktop/views/components/ui.header.notifications.vue:
title: "Notifications"
desktop/views/components/ui.header.post.vue:
post: "Composer un nouveau post"
desktop/views/components/ui.header.search.vue:
placeholder: "Chercher"
desktop/views/pages/note.vue:
prev: "Note précédente"
next: "Note suivante"
desktop/views/pages/selectdrive.vue:
title: "Choisir fichier(s)"
ok: "OK"
cancel: "Annuler"
upload: "Uploader un ou plusieurs fichier(s) depuis votre PC"
desktop/views/pages/user/user.followers-you-know.vue:
title: "Abonnés que vous connaissez"
loading: "Chargement en cours"
no-users: "Pas d'utilisateurs"
desktop/views/pages/user/user.friends.vue:
title: "Personnes qui répondent le plus"
loading: "Chargement en cours"
no-users: "Pas d'utilisateurs"
desktop/views/pages/user/user.header.vue:
is-suspended: "This account has been suspended."
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
view-remote: "Voir les informations détaillées"
desktop/views/pages/user/user.home.vue:
last-used-at: "Last used at"
desktop/views/pages/user/user.photos.vue:
title: "Photos"
loading: "Chargement en cours"
no-photos: "Pas de photos"
desktop/views/pages/user/user.profile.vue:
follows-you: "Vous suis"
stalk: "ストークする"
stalking: "ストーキングしています"
unstalk: "ストーク解除"
mute: "Mettre en sourdine"
muted: "Muting"
unmute: "Enlever la sourdine"
desktop/views/widgets/messaging.vue:
title: "Messagerie"
desktop/views/widgets/notifications.vue:
title: "Notifications"
settings: "Réglages"
desktop/views/widgets/polls.vue:
title: "Sondages"
refresh: "Afficher d'autres"
nothing: "Rien"
desktop/views/widgets/post-form.vue:
title: "Post"
note: "Post"
placeholder: "Qu'est-ce qu'il se passe?"
desktop/views/widgets/trends.vue:
title: "Tendances"
refresh: "Afficher d'autres"
nothing: "Rien"
desktop/views/widgets/users.vue:
title: "Utilisateurs"
refresh: "Afficher d'autres"
no-one: "Personne"
desktop/views/widgets/channel.vue:
title: "Cannal"
settings: "Réglages des widgets"
get-started: "Veuillez cliquer sur la dent en haute à droite pour choisir un channel"
mobile/views/components/drive.vue:
drive: "Drive"
used: "utilisé"
folder-count: "Dossier(s)"
count-separator: ", "
file-count: "Fichiers(s)"
load-more: "Charger plus"
nothing-in-drive: "Rien"
folder-is-empty: "Ce dossier est vide"
mobile/views/components/drive-file-chooser.vue:
select-file: "Choisissez un fichier"
mobile/views/components/drive-folder-chooser.vue:
select-folder: "Choisissez un dossier"
mobile/views/components/drive.file-detail.vue:
download: "Télécharger"
rename: "Renommer"
move: "Déplacer"
hash: "Hash (md5)"
exif: "EXIF"
mobile/views/components/follow-button.vue:
follow: "Suivre"
unfollow: "Ne plus suivre"
mobile/views/components/note.vue:
reposted-by: "Renoté par {}"
mobile/views/components/note-detail.vue:
reply: "Répondre"
reaction: "Réaction"
mobile/views/components/notifications.vue:
more: "Plus"
empty: "Pas de notifications"
mobile/views/components/post-form.vue:
submit: "Poster"
reply-placeholder: "Répondre à cette note"
note-placeholder: "Qu'est-ce qu'il se passe?"
mobile/views/components/sub-note-content.vue:
media-count: "{} media"
poll: "Sondage"
mobile/views/components/timeline.vue:
empty: "Pas de notes"
load-more: "Afficher plus"
mobile/views/components/ui.nav.vue:
home: "Accueil"
notifications: "Notifications"
messaging: "Messages"
drive: "Drive"
settings: "Réglages"
about: "À propose de Misskey"
search: "Rechercher"
mobile/views/components/user-timeline.vue:
no-notes: "Cette utilisateur semble n'avoir rien poster pour le moment"
no-notes-with-media: "Aucune notes avec des médias"
load-more: "Afficher Plus"
mobile/views/components/users-list.vue:
all: "Tout"
known: "Vous connaissez"
load-more: "Afficher plus"
mobile/views/pages/drive.vue:
drive: "Drive"
mobile/views/pages/followers.vue:
followers-of: "Abonnés de {}"
mobile/views/pages/following.vue:
following-of: "Abonnements de {}"
mobile/views/pages/home.vue:
timeline: "Fil d'actualité"
mobile/views/pages/messaging.vue:
messaging: "Messagerie"
mobile/views/pages/messaging-room.vue:
messaging: "Messagerie"
mobile/views/pages/note.vue:
title: "Post"
prev: "Note précedante"
next: "Note suivante"
mobile/views/pages/notifications.vue:
notifications: "Notifications"
read-all: "Êtes vous sûr de vouloir marqués toutes les notifications non-lus en tant que lus?"
mobile/views/pages/profile-setting.vue:
title: "Réglages du profiles"
will-be-published: "Ces profiles vont être publier"
name: "Nom"
location: "Localisation"
description: "Description"
birthday: "Anniversaire"
avatar: "Avatar"
banner: "Bannière"
avatar-saved: "Avatar mis à jour avec succès!"
banner-saved: "Bannière mise à jour avec succès!"
set-avatar: "Choisir un avatar"
set-banner: "Choisir une bannière"
save: "Sauvegarder"
saved: "Profil mis à jour avec succès"
mobile/views/pages/search.vue:
search: "Chercher"
empty: "Aucun message trouvé pour '{}' "
mobile/views/pages/selectdrive.vue:
select-file: "Choisissez un fichier"
mobile/views/pages/settings.vue:
signed-in-as: "Connecté en tant que {}"
profile: "Profile"
twitter-integration: "Twitter integration"
signin-history: "Historique de connexion"
settings: "Réglages"
signout: "Déconnexion"
mobile/views/pages/user.vue:
follows-you: "vous suit"
following: "Abonnements"
followers: "Abonnés"
notes: "Posts"
overview: "Aperçu"
timeline: "Fil d'actualité"
media: "Media"
is-suspended: "This account has been suspended."
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
view-remote: "Voir les informations détaillées"
mobile/views/pages/user/home.vue:
recent-notes: "Notes récentes"
images: "Images"
activity: "Activité"
keywords: "Mot clés"
domains: "Domaines"
frequently-replied-users: "Utilisateurs qui interagissent souvent"
followers-you-know: "Abonnés que vous connaissez"
last-used-at: "Dernière connexion il y a"
mobile/views/pages/user/home.followers-you-know.vue:
loading: "Chargement"
no-users: "Pas d'utilisateurs"
mobile/views/pages/user/home.friends.vue:
loading: "Chargement"
no-users: "Pass d'utilisateurs"
mobile/views/pages/user/home.notes.vue:
loading: "Chargement"
no-notes: "Pas de notes"
mobile/views/pages/user/home.photos.vue:
loading: "Chargement"
no-photos: "Pas de photos"
docs:
edit-this-page-on-github: "Vous avez trouvé une erreur ou vous voulez contribuer à la documentation?"
edit-this-page-on-github-link: "Modifiez cette page sur github!"
api:
entities:
properties: "Propriétés"
endpoints:
params: "Paramètres"
res: "Réponse"
props:
name: "Nom"
type: "Type"
optional: "Optionel"
description: "Description"
yes: "Oui"
no: "Non"
+24
View File
@@ -0,0 +1,24 @@
/**
* Languages Loader
*/
import * as fs from 'fs';
import * as yaml from 'js-yaml';
const loadLang = lang => yaml.safeLoad(
fs.readFileSync(`./locales/${lang}.yml`, 'utf-8'));
const native = loadLang('ja');
const langs = {
'en': loadLang('en'),
'fr': loadLang('fr'),
'ja': native
};
Object.entries(langs).map(([, locale]) => {
// Extend native language (Japanese)
locale = Object.assign({}, native, locale);
});
export default langs;
+649
View File
@@ -0,0 +1,649 @@
common:
misskey: "Misskeyで皆と共有しよう。"
time:
unknown: "なぞのじかん"
future: "未来"
just_now: "たった今"
seconds_ago: "{}秒前"
minutes_ago: "{}分前"
hours_ago: "{}時間前"
days_ago: "{}日前"
weeks_ago: "{}週間前"
months_ago: "{}ヶ月前"
years_ago: "{}年前"
weekday-short:
sunday: "日"
monday: "月"
tuesday: "火"
wednesday: "水"
thursday: "木"
friday: "金"
satruday: "土"
reactions:
like: "いいね"
love: "しゅき"
laugh: "笑"
hmm: "ふぅ~む"
surprise: "わお"
congrats: "おめでとう"
angry: "おこ"
confused: "こまこまのこまり"
pudding: "Pudding"
delete: "削除"
loading: "読み込み中"
ok: "わかった"
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
common/views/components/connect-failed.vue:
title: "サーバーに接続できません"
description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから{再度お試し}ください。"
thanks: "いつもMisskeyをご利用いただきありがとうございます。"
troubleshoot: "トラブルシュート"
common/views/components/connect-failed.troubleshooter.vue:
title: "トラブルシューティング"
network: "ネットワーク接続"
checking-network: "ネットワーク接続を確認中"
internet: "インターネット接続"
checking-internet: "インターネット接続を確認中"
server: "サーバー接続"
checking-server: "サーバー接続を確認中"
finding: "問題を調べています"
no-network: "ネットワークに接続されていません"
no-network-desc: "お使いのPCのネットワーク接続が正常か確認してください。"
no-internet: "インターネットに接続されていません"
no-internet-desc: "ネットワークには接続されていますが、インターネットには接続されていないようです。お使いのPCのインターネット接続が正常か確認してください。"
no-server: "Misskeyのサーバーに接続できません"
no-server-desc: "お使いのPCのインターネット接続は正常ですが、Misskeyのサーバーには接続できませんでした。サーバーがダウンまたはメンテナンスしている可能性があるので、しばらくしてから再度御アクセスください。"
success: "Misskeyのサーバーに接続できました"
success-desc: "正常に接続できるようです。ページを再度読み込みしてください。"
flush: "キャッシュの削除"
set-version: "バージョン指定"
common/views/components/messaging.vue:
search-user: "ユーザーを探す"
you: "あなた"
no-history: "履歴はありません"
common/views/components/messaging-room.vue:
empty: "このユーザーと話したことはありません"
more: "もっと読む"
no-history: "これより過去の履歴はありません"
resize-form: "ドラッグしてフォームの広さを調整"
new-message: "新しいメッセージがあります"
common/views/components/messaging-room.form.vue:
input-message-here: "ここにメッセージを入力"
send: "送信"
attach-from-local: "PCからファイルを添付する"
attach-from-drive: "ドライブからファイルを添付する"
common/views/components/messaging-room.message.vue:
is-read: "既読"
deleted: "このメッセージは削除されました"
common/views/components/nav.vue:
about: "Misskeyについて"
stats: "統計"
status: "ステータス"
wiki: "Wiki"
donors: "ドナー"
repository: "リポジトリ"
develop: "開発者"
feedback: "フィードバック"
common/views/components/note-menu.vue:
favorite: "お気に入り"
pin: "ピン留め"
remote: "投稿元で見る"
common/views/components/poll.vue:
vote-to: "「{}」に投票する"
vote-count: "{}票"
total-users: "{}人が投票"
vote: "投票する"
show-result: "結果を見る"
voted: "投票済み"
common/views/components/poll-editor.vue:
no-only-one-choice: "投票には、選択肢が最低2つ必要です"
choice-n: "選択肢{}"
remove: "この選択肢を削除"
add: "+選択肢を追加"
destroy: "投票を破棄"
common/views/components/reaction-picker.vue:
choose-reaction: "リアクションを選択"
common/views/components/signin.vue:
username: "ユーザー名"
password: "パスワード"
token: "トークン"
signing-in: "やってます..."
signin: "サインイン"
common/views/components/signup.vue:
username: "ユーザー名"
checking: "確認しています..."
available: "利用できます"
unavailable: "既に利用されています"
error: "通信エラー"
invalid-format: "a~z、A~Z、0~9、_が使えます"
too-short: "1文字以上でお願いします!"
too-long: "20文字以内でお願いします"
password: "パスワード"
password-placeholder: "8文字以上を推奨します"
weak-password: "弱いパスワード"
normal-password: "まあまあのパスワード"
strong-password: "強いパスワード"
retype: "再入力"
retype-placeholder: "確認のため再入力してください"
password-matched: "確認されました"
password-not-matched: "一致していません"
recaptcha: "認証"
create: "アカウント作成"
some-error: "何らかの原因によりアカウントの作成に失敗しました。再度お試しください。"
common/views/components/special-message.vue:
new-year: "Happy New Year!"
christmas: "Merry Christmas!"
common/views/components/stream-indicator.vue:
connecting: "接続中"
reconnecting: "再接続中"
connected: "接続完了"
common/views/components/twitter-setting.vue:
description: "お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。"
connected-to: "次のTwitterアカウントに接続されています"
detail: "詳細..."
reconnect: "再接続する"
connect: "Twitterと接続する"
disconnect: "切断する"
common/views/components/uploader.vue:
waiting: "待機中"
common/views/widgets/broadcast.vue:
fetching: "確認中"
no-broadcasts: "お知らせはありません"
have-a-nice-day: "良い一日を!"
next: "次"
common/views/widgets/donation.vue:
title: "寄付のお願い"
text: "Misskeyの運営にはドメイン、サーバー等のコストが掛かります。Misskeyは広告を掲載したりしないため、収入を皆様からの寄付に頼っています。もしご興味があれば、{}までご連絡ください。ご協力ありがとうございます。"
common/views/widgets/photo-stream.vue:
title: "フォトストリーム"
no-photos: "写真はありません"
common/views/widgets/server.vue:
title: "サーバー情報"
toggle: "表示を切り替え"
desktop/views/components/activity.vue:
title: "アクティビティ"
toggle: "表示を切り替え"
desktop/views/components/calendar.vue:
title: "{1}年 {2}月"
prev: "前の月"
next: "次の月"
go: "クリックして時間遡行"
desktop/views/components/drive-window.vue:
used: "使用中"
drive: "ドライブ"
desktop/views/components/drive.file.vue:
avatar: "アイコン"
banner: "バナー"
contextmenu:
rename: "名前を変更"
copy-url: "URLをコピー"
download: "ダウンロード"
else-files: "その他..."
set-as-avatar: "アイコンに設定"
set-as-banner: "バナーに設定"
open-in-app: "アプリで開く"
add-app: "アプリを追加"
rename-file: "ファイル名の変更"
input-new-file-name: "新しいファイル名を入力してください"
copied: "コピー完了"
copied-url-to-clipboard: "URLをクリップボードにコピーしました"
desktop/views/components/drive.folder.vue:
unable-to-process: "操作を完了できません"
circular-reference-detected: "移動先のフォルダーは、移動するフォルダーのサブフォルダーです。"
unhandled-error: "不明なエラー"
contextmenu:
move-to-this-folder: "このフォルダへ移動"
show-in-new-window: "新しいウィンドウで表示"
rename: "名前を変更"
rename-folder: "フォルダ名の変更"
input-new-folder-name: "新しいフォルダ名を入力してください"
desktop/views/components/drive.nav-folder.vue:
drive: "ドライブ"
desktop/views/components/drive.vue:
search: "検索"
load-more: "もっと読み込む"
empty-draghover: "ドロップですか?いいですよ、ボクはカワイイですからね"
empty-drive: "ドライブには何もありません。"
empty-drive-description: "右クリックして「ファイルをアップロード」を選んだり、ファイルをドラッグ&ドロップすることでもアップロードできます。"
empty-folder: "このフォルダーは空です"
unable-to-process: "操作を完了できません"
circular-reference-detected: "移動先のフォルダーは、移動するフォルダーのサブフォルダーです。"
unhandled-error: "不明なエラー"
url-upload: "URLアップロード"
url-of-file: "アップロードしたいファイルのURL"
url-upload-requested: "アップロードをリクエストしました"
may-take-time: "アップロードが完了するまで時間がかかる場合があります。"
create-folder: "フォルダー作成"
folder-name: "フォルダー名"
contextmenu:
create-folder: "フォルダーを作成"
upload: "ファイルをアップロード"
url-upload: "URLからアップロード"
desktop/views/components/messaging-window.vue:
title: "メッセージ"
desktop/views/components/notes.note.vue:
reposted-by: "{}がRenote"
reply: "返信"
renote: "Renote"
add-reaction: "リアクション"
detail: "詳細"
desktop/views/components/notifications.vue:
more: "もっと見る"
empty: "ありません!"
desktop/views/components/post-form.vue:
note-placeholder: "いまどうしてる?"
reply-placeholder: "この投稿への返信..."
quote-placeholder: "この投稿を引用..."
note: "投稿"
reply: "返信"
renote: "Renote"
posted: "投稿しました!"
replied: "返信しました!"
reposted: "Renoteしました!"
note-failed: "投稿に失敗しました"
reply-failed: "返信に失敗しました"
renote-failed: "Renoteに失敗しました"
posting: "投稿中"
attach-media-from-local: "PCからメディアを添付"
attach-media-from-drive: "ドライブからメディアを添付"
attach-cancel: "添付取り消し"
insert-a-kao: "v(‘ω’)v"
create-poll: "投票を作成"
text-remain: "残り{}文字"
desktop/views/components/post-form-window.vue:
note: "新規投稿"
reply: "返信"
attaches: "添付: {}メディア"
uploading-media: "{}個のメディアをアップロード中"
desktop/views/components/renote-form.vue:
quote: "引用する..."
cancel: "キャンセル"
renote: "Renote"
reposting: "しています..."
success: "Renoteしました!"
failure: "Renoteに失敗しました"
desktop/views/components/renote-form-window.vue:
title: "この投稿をRenoteしますか?"
desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
drive: "ドライブ"
security: "セキュリティ"
password: "パスワード"
2fa: "二段階認証"
other: "その他"
license: "ライセンス"
desktop/views/components/settings.2fa.vue:
intro: "二段階認証を設定すると、サインイン時にパスワードだけでなく、予め登録しておいた物理的なデバイス(例えばあなたのスマートフォンなど)も必要になり、よりセキュリティが向上します。"
detail: "詳細..."
url: "https://www.google.co.jp/intl/ja/landing/2step/"
caution: "登録したデバイスを紛失するなどした場合、Misskeyにサインインできなくなりますのでご注意ください。"
register: "デバイスを登録する"
already-registered: "既に設定は完了しています。"
unregister: "設定を解除"
unregistered: "二段階認証が無効になりました。"
enter-password: "パスワードを入力してください"
authenticator: "まず、Google Authenticatorをお使いのデバイスにインストールします:"
howtoinstall: "インストール方法はこちら"
scan: "次に、表示されているQRコードをスキャンします:"
done: "お使いのデバイスに表示されているトークンを入力して完了します:"
submit: "完了"
success: "設定が完了しました!"
failed: "設定に失敗しました。トークンに誤りがないかご確認ください。"
info: "次回サインインからは、同様にパスワードに加えてデバイスに表示されているトークンを入力します。"
desktop/views/components/settings.api.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。"
regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。"
regenerate-token: "トークンを再生成"
enter-password: "パスワードを入力してください"
desktop/views/components/settings.app.vue:
no-apps: "連携しているアプリケーションはありません"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"
enter-new-password: "新しいパスワードを入力してください"
enter-new-password-again: "もう一度新しいパスワードを入力してください"
not-match: "新しいパスワードが一致しません"
changed: "パスワードを変更しました"
desktop/views/components/settings.profile.vue:
avatar: "アイコン"
choice-avatar: "画像を選択"
name: "名前"
location: "場所"
description: "自己紹介"
birthday: "誕生日"
save: "保存"
desktop/views/components/ui.header.account.vue:
profile: "プロフィール"
drive: "ドライブ"
favorites: "お気に入り"
lists: "リスト"
customize: "カスタマイズ"
settings: "設定"
signout: "サインアウト"
dark: "闇に飲まれる"
desktop/views/components/ui.header.nav.vue:
home: "ホーム"
messaging: "メッセージ"
game: "ゲーム"
desktop/views/components/ui.header.notifications.vue:
title: "通知"
desktop/views/components/ui.header.post.vue:
post: "新規投稿"
desktop/views/components/ui.header.search.vue:
placeholder: "検索"
desktop/views/pages/note.vue:
prev: "前の投稿"
next: "次の投稿"
desktop/views/pages/selectdrive.vue:
title: "ファイルを選択してください"
ok: "決定"
cancel: "キャンセル"
upload: "PCからドライブにファイルをアップロード"
desktop/views/pages/user/user.followers-you-know.vue:
title: "知り合いのフォロワー"
loading: "読み込み中"
no-users: "知り合いのフォロワーはいません"
desktop/views/pages/user/user.friends.vue:
title: "よく話すユーザー"
loading: "読み込み中"
no-users: "よく話すユーザーはいません"
desktop/views/pages/user/user.header.vue:
is-suspended: "このユーザーは凍結されています。"
is-remote: "このユーザーはリモートユーザーです。"
view-remote: "正確な情報を見る"
desktop/views/pages/user/user.home.vue:
last-used-at: "最終アクセス"
desktop/views/pages/user/user.photos.vue:
title: "フォト"
loading: "読み込み中"
no-photos: "写真はありません"
desktop/views/pages/user/user.profile.vue:
follows-you: "フォローされています"
stalk: "ストークする"
stalking: "ストーキングしています"
unstalk: "ストーク解除"
mute: "ミュートする"
muted: "ミュートしています"
unmute: "ミュート解除"
desktop/views/widgets/messaging.vue:
title: "メッセージ"
desktop/views/widgets/notifications.vue:
title: "通知"
settings: "通知の設定"
desktop/views/widgets/polls.vue:
title: "投票"
refresh: "他を見る"
nothing: "ありません!"
desktop/views/widgets/post-form.vue:
title: "投稿"
note: "投稿"
placeholder: "いまどうしてる?"
desktop/views/widgets/trends.vue:
title: "トレンド"
refresh: "他を見る"
nothing: "ありません!"
desktop/views/widgets/users.vue:
title: "おすすめユーザー"
refresh: "他を見る"
no-one: "いません!"
desktop/views/widgets/channel.vue:
title: "チャンネル"
settings: "ウィジェットの設定"
get-started: "右上の歯車をクリックして受信するチャンネルを指定してください"
mobile/views/components/drive.vue:
drive: "ドライブ"
used: "使用中"
folder-count: "フォルダ"
count-separator: "、"
file-count: "ファイル"
load-more: "もっと読み込む"
nothing-in-drive: "ドライブには何もありません"
folder-is-empty: "このフォルダは空です"
mobile/views/components/drive-file-chooser.vue:
select-file: "ファイルを選択"
mobile/views/components/drive-folder-chooser.vue:
select-folder: "フォルダーを選択"
mobile/views/components/drive.file-detail.vue:
download: "ダウンロード"
rename: "名前を変更"
move: "移動"
hash: "ハッシュ (md5)"
exif: "EXIF"
mobile/views/components/follow-button.vue:
follow: "フォロー"
unfollow: "フォロー解除"
mobile/views/components/note.vue:
reposted-by: "{}がRenote"
mobile/views/components/note-detail.vue:
reply: "返信"
reaction: "リアクション"
mobile/views/components/notifications.vue:
more: "もっと見る"
empty: "ありません!"
mobile/views/components/post-form.vue:
submit: "投稿"
reply-placeholder: "この投稿への返信..."
note-placeholder: "いまどうしてる?"
mobile/views/components/sub-note-content.vue:
media-count: "{}個のメディア"
poll: "投票"
mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
settings: "設定"
about: "Misskeyについて"
mobile/views/components/user-timeline.vue:
no-notes: "このユーザーは投稿していないようです。"
no-notes-with-media: "メディア付き投稿はありません。"
load-more: "もっと"
mobile/views/components/users-list.vue:
all: "すべて"
known: "知り合い"
load-more: "もっと"
mobile/views/pages/drive.vue:
drive: "ドライブ"
mobile/views/pages/followers.vue:
followers-of: "{}のフォロワー"
mobile/views/pages/following.vue:
following-of: "{}のフォロー"
mobile/views/pages/home.vue:
timeline: "タイムライン"
mobile/views/pages/messaging.vue:
messaging: "メッセージ"
mobile/views/pages/messaging-room.vue:
messaging: "メッセージ"
mobile/views/pages/note.vue:
title: "投稿"
prev: "前の投稿"
next: "次の投稿"
mobile/views/pages/notifications.vue:
notifications: "通知"
read-all: "すべての通知を既読にしますか?"
mobile/views/pages/profile-setting.vue:
title: "プロフィール設定"
will-be-published: "これらのプロフィールは公開されます。"
name: "名前"
location: "場所"
description: "自己紹介"
birthday: "誕生日"
avatar: "アイコン"
banner: "バナー"
avatar-saved: "アイコンを保存しました"
banner-saved: "バナーを保存しました"
set-avatar: "アイコンを選択する"
set-banner: "バナーを選択する"
save: "保存"
saved: "プロフィールを保存しました"
mobile/views/pages/search.vue:
search: "検索"
empty: "「{}」に関する投稿は見つかりませんでした。"
mobile/views/pages/selectdrive.vue:
select-file: "ファイルを選択"
mobile/views/pages/settings.vue:
signed-in-as: "{}としてサインイン中"
profile: "プロフィール"
twitter: "Twitter連携"
signin-history: "サインイン履歴"
settings: "設定"
signout: "サインアウト"
mobile/views/pages/user.vue:
follows-you: "フォローされています"
following: "フォロー"
followers: "フォロワー"
notes: "投稿"
overview: "概要"
timeline: "タイムライン"
media: "メディア"
is-suspended: "このユーザーは凍結されています。"
is-remote: "このユーザーはリモートユーザーです。"
view-remote: "正確な情報を見る"
mobile/views/pages/user/home.vue:
recent-notes: "最近の投稿"
images: "画像"
activity: "アクティビティ"
keywords: "キーワード"
domains: "頻出ドメイン"
frequently-replied-users: "よく会話するユーザー"
followers-you-know: "知り合いのフォロワー"
last-used-at: "最終ログイン"
mobile/views/pages/user/home.followers-you-know.vue:
loading: "読み込み中"
no-users: "知り合いのユーザーはいません"
mobile/views/pages/user/home.friends.vue:
loading: "読み込み中"
no-users: "よく会話するユーザーはいません"
mobile/views/pages/user/home.notes.vue:
loading: "読み込み中"
no-notes: "投稿はありません"
mobile/views/pages/user/home.photos.vue:
loading: "読み込み中"
no-photos: "写真はありません"
docs:
edit-this-page-on-github: "間違いや改善点を見つけましたか?"
edit-this-page-on-github-link: "このページをGitHubで編集"
api:
entities:
properties: "プロパティ"
endpoints:
params: "パラメータ"
res: "レスポンス"
props:
name: "名前"
type: "型"
optional: "オプション"
description: "説明"
yes: "はい"
no: "いいえ"
+49
View File
@@ -0,0 +1,49 @@
// for Node.js interpret
const { default: User } = require('../built/models/user');
const { default: Following } = require('../built/models/following');
const { default: zip } = require('@prezzemolo/zip')
const migrate = async (following) => {
const follower = await User.findOne({ _id: following.followerId });
const followee = await User.findOne({ _id: following.followeeId });
const result = await Following.update(following._id, {
$set: {
stalk: true,
_follower: {
host: follower.host,
inbox: follower.host != null ? follower.inbox : undefined
},
_followee: {
host: followee.host,
inbox: followee.host != null ? followee.inbox : undefined
}
}
});
return result.ok === 1;
}
async function main() {
const count = await Following.count({});
const dop = Number.parseInt(process.argv[2]) || 5
const idop = ((count - (count % dop)) / dop) + 1
return zip(
1,
async (time) => {
console.log(`${time} / ${idop}`)
const doc = await Following.find({}, {
limit: dop, skip: time * dop
})
return Promise.all(doc.map(migrate))
},
idop
).then(a => {
const rv = []
a.forEach(e => rv.push(...e))
return rv
})
}
main().then(console.dir).catch(console.error)
+11
View File
@@ -0,0 +1,11 @@
Misskeyの破壊的変更に対応するいくつかのスニペットがあります。
MongoDBシェルで実行する必要のあるものとnodeで直接実行する必要のあるものがあります。
ファイル名が `shell.` から始まるものは前者、 `node.` から始まるものは後者です。
MongoDBシェルで実行する場合、`use`でデータベースを選択しておく必要があります。
nodeで実行するいくつかのスニペットは、並列処理させる数を引数で設定できるものがあります。
処理中にエラーで落ちる場合は、メモリが足りていない可能性があるので、少ない数に設定してみてください。
※デフォルトは`5`です。
ファイルを作成する際は `../init-migration-file.sh -t _type_ -n _name_` を実行すると _type_._unixtime_._name_.js が生成されます
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
usage() {
echo "$0 [-t type] [-n name]"
echo " type: [node | shell]"
echo " name: if no present, set untitled"
exit 0
}
while getopts :t:n:h OPT
do
case $OPT in
t) type=$OPTARG
;;
n) name=$OPTARG
;;
h) usage
;;
\?) usage
;;
:) usage
;;
esac
done
if [ "$type" = "" ]
then
echo "no type present!!!"
usage
fi
if [ "$name" = "" ]
then
name="untitled"
fi
touch "$(realpath $(dirname $BASH_SOURCE))/migration/$type.$(date +%s).$name.js"
+23362
View File
File diff suppressed because it is too large Load Diff
+228
View File
@@ -0,0 +1,228 @@
{
"name": "misskey",
"author": "syuilo <[email protected]>",
"version": "1.0.0-cbrx-modernized.0",
"clientVersion": "1.0.0-cbrx-modernized.0",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
"engines": {
"node": "22.x"
},
"overrides": {
"@types/babel-types": "7.0.0",
"@types/cookies": "0.7.1",
"@types/express": "4.11.1",
"@types/express-serve-static-core": "4.11.1",
"@types/koa-compose": "3.2.0",
"@types/tapable": "1.0.2"
},
"scripts": {
"config": "node ./cli/init.js",
"start": "node ./built",
"debug": "DEBUG=misskey:* node ./built",
"swagger": "node ./swagger.js",
"build": "npm run webpack && gulp build",
"webpack": "node ./webpack/build.js",
"watch": "webpack --watch",
"gulp": "gulp build",
"rebuild": "gulp rebuild",
"clean": "gulp clean",
"cleanall": "gulp cleanall",
"lint": "gulp lint",
"test": "cross-env NODE_ENV=test gulp test",
"format": "gulp format"
},
"dependencies": {
"@fortawesome/fontawesome": "1.0.1",
"@fortawesome/fontawesome-free-brands": "5.0.2",
"@fortawesome/fontawesome-free-regular": "5.0.2",
"@fortawesome/fontawesome-free-solid": "5.0.2",
"@koa/cors": "2.2.1",
"@prezzemolo/rap": "0.1.2",
"@prezzemolo/zip": "0.0.3",
"@types/bcryptjs": "2.4.1",
"@types/chai": "4.1.2",
"@types/chai-http": "3.0.4",
"@types/debug": "0.0.30",
"@types/deep-equal": "1.0.1",
"@types/elasticsearch": "5.0.22",
"@types/eventemitter3": "2.0.2",
"@types/gm": "1.17.33",
"@types/gulp": "3.8.36",
"@types/gulp-htmlmin": "1.3.32",
"@types/gulp-mocha": "0.0.32",
"@types/gulp-rename": "0.0.33",
"@types/gulp-replace": "0.0.31",
"@types/gulp-uglify": "3.0.5",
"@types/gulp-util": "3.0.34",
"@types/inquirer": "0.0.41",
"@types/is-root": "1.0.0",
"@types/is-url": "1.2.28",
"@types/js-yaml": "3.11.1",
"@types/koa": "2.0.45",
"@types/koa-bodyparser": "4.2.0",
"@types/koa-compress": "^2.0.8",
"@types/koa-favicon": "2.0.19",
"@types/koa-logger": "^3.1.0",
"@types/koa-mount": "3.0.1",
"@types/koa-multer": "1.0.0",
"@types/koa-router": "7.0.27",
"@types/koa-send": "4.1.1",
"@types/koa__cors": "2.2.2",
"@types/kue": "0.11.8",
"@types/license-checker": "15.0.0",
"@types/mkdirp": "0.5.2",
"@types/mocha": "5.0.0",
"@types/mongodb": "3.0.15",
"@types/monk": "6.0.0",
"@types/ms": "0.7.30",
"@types/node": "12.20.55",
"@types/nopt": "3.0.29",
"@types/pug": "2.0.4",
"@types/qrcode": "0.8.1",
"@types/ratelimiter": "2.1.28",
"@types/redis": "2.8.6",
"@types/request": "2.47.0",
"@types/request-promise-native": "1.0.14",
"@types/rimraf": "2.0.2",
"@types/seedrandom": "2.4.27",
"@types/speakeasy": "2.0.2",
"@types/tmp": "0.0.33",
"@types/uuid": "3.4.3",
"@types/webpack": "4.1.3",
"@types/webpack-stream": "3.2.10",
"@types/websocket": "0.0.38",
"@types/ws": "4.0.2",
"animejs": "2.2.0",
"autosize": "4.0.1",
"autwh": "0.1.0",
"bcryptjs": "2.4.3",
"bootstrap-vue": "2.0.0-rc.6",
"cafy": "6.0.0",
"chai": "4.1.2",
"chai-http": "4.4.0",
"chalk": "2.4.0",
"crc-32": "1.2.0",
"cross-env": "7.0.3",
"css-loader": "0.28.11",
"debug": "3.1.0",
"deep-equal": "1.0.1",
"deepcopy": "0.6.3",
"dompurify": "1.0.3",
"elasticsearch": "14.2.2",
"element-ui": "2.3.4",
"emojilib": "2.2.12",
"escape-regexp": "0.0.1",
"eslint": "4.19.1",
"eslint-plugin-vue": "4.4.0",
"eventemitter3": "3.0.1",
"exif-js": "2.3.0",
"file-loader": "1.1.11",
"file-type": "7.6.0",
"fuckadblock": "3.2.1",
"gm": "1.23.1",
"gulp": "4.0.2",
"gulp-cssnano": "2.1.3",
"gulp-htmlmin": "4.0.0",
"gulp-imagemin": "7.1.0",
"gulp-mocha": "5.0.0",
"gulp-pug": "4.0.1",
"gulp-rename": "1.2.2",
"gulp-replace": "0.6.1",
"gulp-sourcemaps": "2.6.4",
"gulp-stylus": "2.7.0",
"gulp-tslint": "8.1.3",
"gulp-typescript": "4.0.2",
"gulp-uglify": "3.0.0",
"gulp-util": "3.0.8",
"glob": "7.2.3",
"hard-source-webpack-plugin": "0.6.4",
"highlight.js": "9.12.0",
"html-minifier": "3.5.15",
"http-signature": "1.2.0",
"inquirer": "5.2.0",
"is-root": "2.0.0",
"is-url": "1.2.4",
"js-yaml": "3.11.0",
"jsdom": "11.8.0",
"koa": "2.5.0",
"koa-bodyparser": "4.2.0",
"koa-compress": "3.0.0",
"koa-favicon": "2.0.1",
"koa-json-body": "^5.3.0",
"koa-logger": "^3.2.0",
"koa-mount": "3.0.0",
"koa-multer": "1.0.2",
"koa-router": "7.4.0",
"koa-send": "4.1.3",
"koa-slow": "^2.1.0",
"kue": "0.11.6",
"license-checker": "18.0.0",
"loader-utils": "1.1.0",
"mkdirp": "0.5.1",
"mocha": "5.1.0",
"moji": "0.5.1",
"mongodb": "3.0.7",
"monk": "6.0.5",
"ms": "2.1.1",
"nopt": "4.0.1",
"nprogress": "0.2.0",
"object-assign-deep": "0.4.0",
"on-build-webpack": "0.1.0",
"os-utils": "0.0.14",
"progress-bar-webpack-plugin": "1.11.0",
"prominence": "0.2.0",
"pug": "2.0.3",
"punycode": "2.1.0",
"qrcode": "1.2.0",
"ratelimiter": "3.0.3",
"recaptcha-promise": "0.1.3",
"reconnecting-websocket": "3.2.2",
"redis": "2.8.0",
"request": "2.85.0",
"request-promise-native": "1.0.5",
"rimraf": "2.6.2",
"rndstr": "1.0.0",
"s-age": "1.1.2",
"sass": "1.77.8",
"sass-loader": "10.5.2",
"seedrandom": "2.4.3",
"speakeasy": "2.0.0",
"style-loader": "0.21.0",
"stylus": "0.54.5",
"stylus-loader": "3.0.2",
"summaly": "2.0.4",
"swagger-jsdoc": "1.9.7",
"syuilo-password-strength": "0.0.1",
"tcp-port-used": "0.1.2",
"textarea-caret": "3.1.0",
"tmp": "0.0.33",
"ts-loader": "4.2.0",
"ts-node": "6.0.0",
"tslint": "5.9.1",
"typescript": "3.9.10",
"typescript-eslint-parser": "15.0.0",
"uglify-es": "3.3.9",
"url-loader": "1.0.1",
"uuid": "3.2.1",
"v-animate-css": "0.0.2",
"vue": "2.5.16",
"vue-cropperjs": "2.2.0",
"vue-js-modal": "1.3.13",
"vue-json-tree-view": "2.1.3",
"vue-loader": "14.2.2",
"vue-router": "3.0.1",
"vue-template-compiler": "2.5.16",
"vuedraggable": "2.16.0",
"vuex": "^3.0.1",
"web-push": "3.3.0",
"webfinger.js": "2.6.6",
"webpack": "4.47.0",
"webpack-cli": "3.3.12",
"webpack-replace-loader": "1.3.0",
"websocket": "1.0.25",
"ws": "5.1.1",
"xev": "2.0.0"
}
}
+4
View File
@@ -0,0 +1,4 @@
export default acct => {
const splitted = acct.split('@', 2);
return { username: splitted[0], host: splitted[1] || null };
};
+3
View File
@@ -0,0 +1,3 @@
export default user => {
return user.host === null ? user.username : `${user.username}@${user.host}`;
};
+57
View File
@@ -0,0 +1,57 @@
/**
* Replace fontawesome symbols
*/
import * as fontawesome from '@fortawesome/fontawesome';
import * as regular from '@fortawesome/fontawesome-free-regular';
import * as solid from '@fortawesome/fontawesome-free-solid';
import * as brands from '@fortawesome/fontawesome-free-brands';
// Add icons
fontawesome.library.add(regular);
fontawesome.library.add(solid);
fontawesome.library.add(brands);
export const pattern = /%fa:(.+?)%/g;
export const replacement = (match, key) => {
const args = key.split(' ');
let prefix = 'fas';
const classes = [];
let transform = '';
let name;
args.forEach(arg => {
if (arg == 'R' || arg == 'S' || arg == 'B') {
prefix =
arg == 'R' ? 'far' :
arg == 'S' ? 'fas' :
arg == 'B' ? 'fab' :
'';
} else if (arg[0] == '.') {
classes.push('fa-' + arg.substr(1));
} else if (arg[0] == '-') {
transform = arg.substr(1).split('|').join(' ');
} else {
name = arg;
}
});
const icon = fontawesome.icon({ prefix, iconName: name }, {
classes: classes
});
if (icon) {
icon.transform = fontawesome.parse.transform(transform);
return `<i data-fa class="${name}">${icon.html[0]}</i>`;
} else {
console.warn(`'${name}' not found in fa`);
return '';
}
};
export default (src: string) => {
return src.replace(pattern, replacement);
};
export const fa = fontawesome;
+78
View File
@@ -0,0 +1,78 @@
/**
* Replace i18n texts
*/
import locale from '../../locales';
export default class Replacer {
private lang: string;
public pattern = /%i18n:([a-z_\-@\.\!]+?)%/g;
constructor(lang: string) {
this.lang = lang;
this.get = this.get.bind(this);
this.replacement = this.replacement.bind(this);
}
private get(path: string, key: string) {
const texts = locale[this.lang];
if (texts == null) {
console.warn(`lang '${this.lang}' is not supported`);
return key; // Fallback
}
let text = texts;
if (path) {
if (text.hasOwnProperty(path)) {
text = text[path];
} else {
console.warn(`path '${path}' not found in '${this.lang}'`);
return key; // Fallback
}
}
// Check the key existance
const error = key.split('.').some(k => {
if (text.hasOwnProperty(k)) {
text = text[k];
return false;
} else {
return true;
}
});
if (error) {
console.warn(`key '${key}' not found in '${path}' of '${this.lang}'`);
return key; // Fallback
} else {
return text;
}
}
public replacement(ctx, match, key) {
const client = '/src/client/app/';
let name = null;
const shouldEscape = key[0] == '!';
if (shouldEscape) {
key = key.substr(1);
}
if (key[0] == '@') {
name = ctx.src.substr(ctx.src.indexOf(client) + client.length);
key = key.substr(1);
}
if (ctx && ctx.lang) this.lang = ctx.lang;
const txt = this.get(name, key);
return shouldEscape
? txt.replace(/'/g, '\\x27').replace(/"/g, '\\x22')
: txt.replace(/"/g, '&quot;');
}
}
+13
View File
@@ -0,0 +1,13 @@
import * as fs from 'fs';
const license = fs.readFileSync(__dirname + '/../../LICENSE', 'utf-8');
const licenseHtml = license
.replace(/\r\n/g, '\n')
.replace(/(.)\n(.)/g, '$1 $2')
.replace(/(^|\n)(.*?)($|\n)/g, '<p>$2</p>');
export {
license,
licenseHtml
};
+29
View File
@@ -0,0 +1,29 @@
import * as mongo from 'mongodb';
import { Query } from 'cafy';
export const isAnId = x => mongo.ObjectID.isValid(x);
export const isNotAnId = x => !isAnId(x);
/**
* ID
*/
export default class ID extends Query<mongo.ObjectID> {
constructor(...args) {
super(...args);
this.transform = v => {
if (isAnId(v) && !mongo.ObjectID.prototype.isPrototypeOf(v)) {
return new mongo.ObjectID(v);
} else {
return v;
}
};
this.pushValidator(v => {
if (!mongo.ObjectID.prototype.isPrototypeOf(v) && isNotAnId(v)) {
return new Error('must-be-an-id');
}
return true;
});
}
}
+12
View File
@@ -0,0 +1,12 @@
.zoom-in-top-enter-active,
.zoom-in-top-leave-active {
opacity: 1;
transform: scaleY(1);
transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
transform-origin: center top;
}
.zoom-in-top-enter,
.zoom-in-top-leave-active {
opacity: 0;
transform: scaleY(0);
}
+128
View File
@@ -0,0 +1,128 @@
@import "../style"
@import "../animation"
html
&.progress
&, *
cursor progress !important
body
overflow-wrap break-word
#error
padding 32px
color #fff
hr
border solid 1px #fff
#nprogress
pointer-events none
position absolute
z-index 65536
.bar
background $theme-color
position fixed
z-index 65537
top 0
left 0
width 100%
height 2px
/* Fancy blur effect */
.peg
display block
position absolute
right 0px
width 100px
height 100%
box-shadow 0 0 10px $theme-color, 0 0 5px $theme-color
opacity 1
transform rotate(3deg) translate(0px, -4px)
#wait
display block
position fixed
z-index 65537
top 15px
right 15px
&:before
content ""
display block
width 18px
height 18px
box-sizing border-box
border solid 2px transparent
border-top-color $theme-color
border-left-color $theme-color
border-radius 50%
animation progress-spinner 400ms linear infinite
@keyframes progress-spinner
0%
transform rotate(0deg)
100%
transform rotate(360deg)
code
font-family Consolas, 'Courier New', Courier, Monaco, monospace
.comment
opacity 0.5
.string
color #e96900
.regexp
color #e9003f
.keyword
color #2973b7
&.true
&.false
&.null
&.nil
&.undefined
color #ae81ff
.symbol
color #42b983
.number
.nan
color #ae81ff
.var:not(.keyword)
font-weight bold
font-style italic
//text-decoration underline
.method
font-style italic
color #8964c1
.property
color #a71d5d
.label
color #e9003f
pre
display block
> code
display block
overflow auto
tab-size 2
[data-fa]
display inline-block
+3
View File
@@ -0,0 +1,3 @@
<template>
<router-view id="app"></router-view>
</template>
Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

+30
View File
@@ -0,0 +1,30 @@
/**
* Authorize Form
*/
import VueRouter from 'vue-router';
// Style
import './style.styl';
import init from '../init';
import Index from './views/index.vue';
/**
* init
*/
init(launch => {
document.title = 'Misskey | アプリの連携';
// Init router
const router = new VueRouter({
mode: 'history',
routes: [
{ path: '/:token', component: Index },
]
});
// Launch the app
launch(router);
});
+15
View File
@@ -0,0 +1,15 @@
@import "../app"
@import "../reset"
html
background #eee
@media (max-width 600px)
background #fff
body
margin 0
padding 32px 0
@media (max-width 600px)
padding 0
+141
View File
@@ -0,0 +1,141 @@
<template>
<div class="form">
<header>
<h1><i>{{ app.name }}</i>があなたのアカウントにアクセスすることを<b>許可</b>しますか?</h1>
<img :src="`${app.iconUrl}?thumbnail&size=64`"/>
</header>
<div class="app">
<section>
<h2>{{ app.name }}</h2>
<p class="nid">{{ app.nameId }}</p>
<p class="description">{{ app.description }}</p>
</section>
<section>
<h2>このアプリは次の権限を要求しています:</h2>
<ul>
<template v-for="p in app.permission">
<li v-if="p == 'account-read'">アカウントの情報を見る。</li>
<li v-if="p == 'account-write'">アカウントの情報を操作する。</li>
<li v-if="p == 'note-write'">投稿する。</li>
<li v-if="p == 'like-write'">いいねしたりいいね解除する。</li>
<li v-if="p == 'following-write'">フォローしたりフォロー解除する。</li>
<li v-if="p == 'drive-read'">ドライブを見る。</li>
<li v-if="p == 'drive-write'">ドライブを操作する。</li>
<li v-if="p == 'notification-read'">通知を見る。</li>
<li v-if="p == 'notification-write'">通知を操作する。</li>
</template>
</ul>
</section>
</div>
<div class="action">
<button @click="cancel">キャンセル</button>
<button @click="accept">アクセスを許可</button>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: ['session'],
computed: {
app(): any {
return this.session.app;
}
},
methods: {
cancel() {
(this as any).api('auth/deny', {
token: this.session.token
}).then(() => {
this.$emit('denied');
});
},
accept() {
(this as any).api('auth/accept', {
token: this.session.token
}).then(() => {
this.$emit('accepted');
});
}
}
});
</script>
<style lang="stylus" scoped>
.form
> header
> h1
margin 0
padding 32px 32px 20px 32px
font-size 24px
font-weight normal
color #777
i
color #77aeca
&:before
content '「'
&:after
content '」'
b
color #666
> img
display block
z-index 1
width 84px
height 84px
margin 0 auto -38px auto
border solid 5px #fff
border-radius 100%
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1)
> .app
padding 44px 16px 0 16px
color #555
background #eee
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1) inset
&:after
content ''
display block
clear both
> section
float left
width 50%
padding 8px
text-align left
> h2
margin 0
font-size 16px
color #777
> .action
padding 16px
> button
margin 0 8px
padding 0
@media (max-width 600px)
> header
> img
box-shadow none
> .app
box-shadow none
@media (max-width 500px)
> header
> h1
font-size 16px
</style>
+149
View File
@@ -0,0 +1,149 @@
<template>
<div class="index">
<main v-if="os.isSignedIn">
<p class="fetching" v-if="fetching">読み込み中<mk-ellipsis/></p>
<x-form
ref="form"
v-if="state == 'waiting'"
:session="session"
@denied="state = 'denied'"
@accepted="accepted"
/>
<div class="denied" v-if="state == 'denied'">
<h1>アプリケーションの連携をキャンセルしました。</h1>
<p>このアプリがあなたのアカウントにアクセスすることはありません。</p>
</div>
<div class="accepted" v-if="state == 'accepted'">
<h1>{{ session.app.isAuthorized ? 'このアプリは既に連携済みです' : 'アプリケーションの連携を許可しました' }}</h1>
<p v-if="session.app.callbackUrl">アプリケーションに戻っています<mk-ellipsis/></p>
<p v-if="!session.app.callbackUrl">アプリケーションに戻って、やっていってください。</p>
</div>
<div class="error" v-if="state == 'fetch-session-error'">
<p>セッションが存在しません。</p>
</div>
</main>
<main class="signin" v-if="!os.isSignedIn">
<h1>サインインしてください</h1>
<mk-signin/>
</main>
<footer><img src="/assets/auth/logo.svg" alt="Misskey"/></footer>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import XForm from './form.vue';
export default Vue.extend({
components: {
XForm
},
data() {
return {
state: null,
session: null,
fetching: true
};
},
computed: {
token(): string {
return this.$route.params.token;
}
},
mounted() {
if (!this.$root.$data.os.isSignedIn) return;
// Fetch session
(this as any).api('auth/session/show', {
token: this.token
}).then(session => {
this.session = session;
this.fetching = false;
// 既に連携していた場合
if (this.session.app.isAuthorized) {
this.$root.$data.os.api('auth/accept', {
token: this.session.token
}).then(() => {
this.accepted();
});
} else {
this.state = 'waiting';
}
}).catch(error => {
this.state = 'fetch-session-error';
});
},
methods: {
accepted() {
this.state = 'accepted';
if (this.session.app.callbackUrl) {
location.href = this.session.app.callbackUrl + '?token=' + this.session.token;
}
}
}
});
</script>
<style lang="stylus" scoped>
.index
> main
width 100%
max-width 500px
margin 0 auto
text-align center
background #fff
box-shadow 0px 4px 16px rgba(0, 0, 0, 0.2)
> .fetching
margin 0
padding 32px
color #555
> div
padding 64px
> h1
margin 0 0 8px 0
padding 0
font-size 20px
font-weight normal
> p
margin 0
color #555
&.denied > h1
color #e65050
&.accepted > h1
color #54af7c
&.signin
padding 32px 32px 16px 32px
> h1
margin 0 0 22px 0
padding 0
font-size 20px
font-weight normal
color #555
@media (max-width 600px)
max-width none
box-shadow none
@media (max-width 500px)
> div
> h1
font-size 16px
> footer
> img
display block
width 64px
height 64px
margin 0 auto
</style>
+38
View File
@@ -0,0 +1,38 @@
doctype html
!= '\n<!-- Thank you for using Misskey! @syuilo -->\n'
html
head
meta(charset='utf-8')
meta(name='application-name' content='Misskey')
meta(name='theme-color' content=themeColor)
meta(name='referrer' content='origin')
link(rel='manifest' href='/manifest.json')
title Misskey
style
include ./../../../built/client/assets/init.css
script
include ./../../../built/client/assets/boot.js
script
include ./../../../built/client/assets/safe.js
//- FontAwesome style
style #{facss}
//- highlight.js style
style #{hljscss}
body
noscript: p
| JavaScriptを有効にしてください
br
| Please turn on your JavaScript
div#ini: p
span .
span .
span .
+142
View File
@@ -0,0 +1,142 @@
/**
* MISSKEY BOOT LOADER
* (ENTRY POINT)
*/
/**
* ドメインに基づいて適切なスクリプトを読み込みます。
* ユーザーの言語およびモバイル端末か否かも考慮します。
* webpackは介さないためrequireやimportは使えません。
*/
'use strict';
(function() {
// キャッシュ削除要求があれば従う
if (localStorage.getItem('shouldFlush') == 'true') {
refresh();
return;
}
// Get the current url information
const url = new URL(location.href);
//#region Detect app name
let app = null;
if (url.pathname == '/docs') app = 'docs';
if (url.pathname == '/dev') app = 'dev';
if (url.pathname == '/auth') app = 'auth';
//#endregion
// Detect the user language
// Note: The default language is Japanese
// Stored values from older clients may be full BCP 47 tags such as
// "ja-JP", while Webpack emits bundles using base tags ("ja").
const storedLang = localStorage.getItem('lang');
let lang = (storedLang || navigator.language).split('-')[0].toLowerCase();
if (!/^(en|fr|ja)$/.test(lang)) lang = 'ja';
// Detect the user agent
const ua = navigator.userAgent.toLowerCase();
const isMobile = /mobile|iphone|ipad|android/.test(ua);
// Get the <head> element
const head = document.getElementsByTagName('head')[0];
// If mobile, insert the viewport meta tag
if (isMobile) {
const meta = document.createElement('meta');
meta.setAttribute('name', 'viewport');
meta.setAttribute('content',
'width=device-width,' +
'initial-scale=1,' +
'minimum-scale=1,' +
'maximum-scale=1,' +
'user-scalable=no');
head.appendChild(meta);
}
// Switch desktop or mobile version
if (app == null) {
app = isMobile ? 'mobile' : 'desktop';
}
// Dark/Light
if (localStorage.getItem('darkmode') == 'true') {
document.documentElement.setAttribute('data-darkmode', 'true');
}
// Script version
const ver = localStorage.getItem('v') || VERSION;
// Whether in debug mode
const isDebug = localStorage.getItem('debug') == 'true';
// Whether use raw version script
const raw = (localStorage.getItem('useRawScript') == 'true' && isDebug)
|| ENV != 'production';
// Get salt query
const salt = localStorage.getItem('salt')
? '?salt=' + localStorage.getItem('salt')
: '';
// Load an app script
// Note: 'async' make it possible to load the script asyncly.
// 'defer' make it possible to run the script when the dom loaded.
const script = document.createElement('script');
script.setAttribute('src', `/assets/${app}.${ver}.${lang}.${raw ? 'raw' : 'min'}.js${salt}`);
script.setAttribute('async', 'true');
script.setAttribute('defer', 'true');
head.appendChild(script);
// 3秒経ってもスクリプトがロードされない場合はバージョンが古くて
// 404になっているせいかもしれないので、バージョンを確認して古ければ更新する
//
// 読み込まれたスクリプトからこのタイマーを解除できるように、
// グローバルにタイマーIDを代入しておく
window.mkBootTimer = window.setTimeout(async () => {
// Fetch meta
const res = await fetch(API + '/meta', {
method: 'POST',
cache: 'no-cache'
});
// Parse
const meta = await res.json();
// Compare versions
if (meta.clientVersion != ver) {
localStorage.setItem('v', meta.clientVersion);
alert(
'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
'\n\n' +
'New version of Misskey available. The page will be reloaded.');
refresh();
}
}, 3000);
function refresh() {
localStorage.setItem('shouldFlush', 'false');
// Random
localStorage.setItem('salt', Math.random().toString());
// Clear cache (serive worker)
try {
navigator.serviceWorker.controller.postMessage('clear');
navigator.serviceWorker.getRegistrations().then(registrations => {
registrations.forEach(registration => registration.unregister());
});
} catch (e) {
console.error(e);
}
// Force reload
location.reload(true);
}
})();
+15
View File
@@ -0,0 +1,15 @@
/**
* Channels
*/
// Style
import './style.styl';
require('./tags');
import init from '../init';
/**
* init
*/
init(() => {
});
+10
View File
@@ -0,0 +1,10 @@
@import "../app"
html
padding 8px
background #efefef
#wait
top auto
bottom 15px
left 15px
+409
View File
@@ -0,0 +1,409 @@
<mk-channel>
<mk-header/>
<hr>
<main v-if="!fetching">
<h1>{ channel.title }</h1>
<div v-if="$root.$data.os.isSignedIn">
<p v-if="channel.isWatching">このチャンネルをウォッチしています <a @click="unwatch">ウォッチ解除</a></p>
<p v-if="!channel.isWatching"><a @click="watch">このチャンネルをウォッチする</a></p>
</div>
<div class="share">
<mk-twitter-button/>
<mk-line-button/>
</div>
<div class="body">
<p v-if="notesFetching">読み込み中<mk-ellipsis/></p>
<div v-if="!notesFetching">
<p v-if="notes == null || notes.length == 0">まだ投稿がありません</p>
<template v-if="notes != null">
<mk-channel-note each={ note in notes.slice().reverse() } note={ note } form={ parent.refs.form }/>
</template>
</div>
</div>
<hr>
<mk-channel-form v-if="$root.$data.os.isSignedIn" channel={ channel } ref="form"/>
<div v-if="!$root.$data.os.isSignedIn">
<p>参加するには<a href={ _URL_ }>ログインまたは新規登録</a>してください</p>
</div>
<hr>
<footer>
<small><a href={ _URL_ }>Misskey</a> ver { _VERSION_ } (葵 aoi)</small>
</footer>
</main>
<style lang="stylus" scoped>
:scope
display block
> main
> h1
font-size 1.5em
color #f00
> .share
> *
margin-right 4px
> .body
margin 8px 0 0 0
> mk-channel-form
max-width 500px
</style>
<script lang="typescript">
import Progress from '../../common/scripts/loading';
import ChannelStream from '../../common/scripts/streaming/channel-stream';
this.mixin('i');
this.mixin('api');
this.id = this.opts.id;
this.fetching = true;
this.notesFetching = true;
this.channel = null;
this.notes = null;
this.connection = new ChannelStream(this.id);
this.unreadCount = 0;
this.on('mount', () => {
document.documentElement.style.background = '#efefef';
Progress.start();
let fetched = false;
// チャンネル概要読み込み
this.$root.$data.os.api('channels/show', {
channelId: this.id
}).then(channel => {
if (fetched) {
Progress.done();
} else {
Progress.set(0.5);
fetched = true;
}
this.update({
fetching: false,
channel: channel
});
document.title = channel.title + ' | Misskey'
});
// 投稿読み込み
this.$root.$data.os.api('channels/notes', {
channelId: this.id
}).then(notes => {
if (fetched) {
Progress.done();
} else {
Progress.set(0.5);
fetched = true;
}
this.update({
notesFetching: false,
notes: notes
});
});
this.connection.on('note', this.onNote);
document.addEventListener('visibilitychange', this.onVisibilitychange, false);
});
this.on('unmount', () => {
this.connection.off('note', this.onNote);
this.connection.close();
document.removeEventListener('visibilitychange', this.onVisibilitychange);
});
this.onNote = note => {
this.notes.unshift(note);
this.update();
if (document.hidden && this.$root.$data.os.isSignedIn && note.userId !== this.$root.$data.os.i.id) {
this.unreadCount++;
document.title = `(${this.unreadCount}) ${this.channel.title} | Misskey`;
}
};
this.onVisibilitychange = () => {
if (!document.hidden) {
this.unreadCount = 0;
document.title = this.channel.title + ' | Misskey'
}
};
this.watch = () => {
this.$root.$data.os.api('channels/watch', {
channelId: this.id
}).then(() => {
this.channel.isWatching = true;
this.update();
}, e => {
alert('error');
});
};
this.unwatch = () => {
this.$root.$data.os.api('channels/unwatch', {
channelId: this.id
}).then(() => {
this.channel.isWatching = false;
this.update();
}, e => {
alert('error');
});
};
</script>
</mk-channel>
<mk-channel-note>
<header>
<a class="index" @click="reply">{ note.index }:</a>
<a class="name" href={ _URL_ + '/@' + acct }><b>{ getUserName(note.user) }</b></a>
<mk-time time={ note.createdAt }/>
<mk-time time={ note.createdAt } mode="detail"/>
<span>ID:<i>{ acct }</i></span>
</header>
<div>
<a v-if="note.reply">&gt;&gt;{ note.reply.index }</a>
{ note.text }
<div class="media" v-if="note.media">
<template each={ file in note.media }>
<a href={ file.url } target="_blank">
<img src={ file.url + '?thumbnail&size=512' } alt={ file.name } title={ file.name }/>
</a>
</template>
</div>
</div>
<style lang="stylus" scoped>
:scope
display block
margin 0
padding 0
> header
position -webkit-sticky
position sticky
z-index 1
top 0
background rgba(239, 239, 239, 0.9)
> .index
margin-right 0.25em
color #000
> .name
margin-right 0.5em
color #008000
> mk-time
margin-right 0.5em
&:first-of-type
display none
@media (max-width 600px)
> mk-time
&:first-of-type
display initial
&:last-of-type
display none
> div
padding 0 0 1em 2em
> .media
> a
display inline-block
> img
max-width 100%
vertical-align bottom
</style>
<script lang="typescript">
import getAcct from '../../../../acct/render';
import getUserName from '../../../../renderers/get-user-name';
this.note = this.opts.note;
this.form = this.opts.form;
this.acct = getAcct(this.note.user);
this.name = getUserName(this.note.user);
this.reply = () => {
this.form.update({
reply: this.note
});
};
</script>
</mk-channel-note>
<mk-channel-form>
<p v-if="reply"><b>&gt;&gt;{ reply.index }</b> ({ getUserName(reply.user) }): <a @click="clearReply">[x]</a></p>
<textarea ref="text" disabled={ wait } oninput={ update } onkeydown={ onkeydown } onpaste={ onpaste } placeholder="%i18n:ch.tags.mk-channel-form.textarea%"></textarea>
<div class="actions">
<button @click="selectFile">%fa:upload%%i18n:ch.tags.mk-channel-form.upload%</button>
<button @click="drive">%fa:cloud%%i18n:ch.tags.mk-channel-form.drive%</button>
<button :class="{ wait: wait }" ref="submit" disabled={ wait || (refs.text.value.length == 0) } @click="note">
<template v-if="!wait">%fa:paper-plane%</template>{ wait ? '%i18n:!ch.tags.mk-channel-form.posting%' : '%i18n:!ch.tags.mk-channel-form.note%' }<mk-ellipsis v-if="wait"/>
</button>
</div>
<mk-uploader ref="uploader"/>
<ol v-if="files">
<li each={ files }>{ name }</li>
</ol>
<input ref="file" type="file" accept="image/*" multiple="multiple" onchange={ changeFile }/>
<style lang="stylus" scoped>
:scope
display block
> textarea
width 100%
max-width 100%
min-width 100%
min-height 5em
> .actions
display flex
> button
> [data-fa]
margin-right 0.25em
&:last-child
margin-left auto
&.wait
cursor wait
> input[type='file']
display none
</style>
<script lang="typescript">
import getUserName from '../../../../renderers/get-user-name';
this.mixin('api');
this.channel = this.opts.channel;
this.files = null;
this.on('mount', () => {
this.$refs.uploader.on('uploaded', file => {
this.update({
files: [file]
});
});
});
this.upload = file => {
this.$refs.uploader.upload(file);
};
this.clearReply = () => {
this.update({
reply: null
});
};
this.clear = () => {
this.clearReply();
this.update({
files: null
});
this.$refs.text.value = '';
};
this.note = () => {
this.update({
wait: true
});
const files = this.files && this.files.length > 0
? this.files.map(f => f.id)
: undefined;
this.$root.$data.os.api('notes/create', {
text: this.$refs.text.value == '' ? undefined : this.$refs.text.value,
mediaIds: files,
replyId: this.reply ? this.reply.id : undefined,
channelId: this.channel.id
}).then(data => {
this.clear();
}).catch(err => {
alert('失敗した');
}).then(() => {
this.update({
wait: false
});
});
};
this.changeFile = () => {
Array.from(this.$refs.file.files).forEach(this.upload);
};
this.selectFile = () => {
this.$refs.file.click();
};
this.drive = () => {
window['cb'] = files => {
this.update({
files: files
});
};
window.open(_URL_ + '/selectdrive?multiple=true',
'drive_window',
'height=500,width=800');
};
this.onkeydown = e => {
if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post();
};
this.onpaste = e => {
Array.from(e.clipboardData.items).forEach(item => {
if (item.kind == 'file') {
this.upload(item.getAsFile());
}
});
};
this.getUserName = getUserName;
</script>
</mk-channel-form>
<mk-twitter-button>
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a>
<script lang="typescript">
this.on('mount', () => {
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('src', 'https://platform.twitter.com/widgets.js');
script.setAttribute('async', 'async');
head.appendChild(script);
});
</script>
</mk-twitter-button>
<mk-line-button>
<div class="line-it-button" data-lang="ja" data-type="share-a" data-url={ _CH_URL_ } style="display: none;"></div>
<script lang="typescript">
this.on('mount', () => {
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('src', 'https://d.line-scdn.net/r/web/social-plugin/js/thirdparty/loader.min.js');
script.setAttribute('async', 'async');
head.appendChild(script);
});
</script>
</mk-line-button>
+20
View File
@@ -0,0 +1,20 @@
<mk-header>
<div>
<a href={ _CH_URL_ }>Index</a> | <a href={ _URL_ }>Misskey</a>
</div>
<div>
<a v-if="!$root.$data.os.isSignedIn" href={ _URL_ }>ログイン(新規登録)</a>
<a v-if="$root.$data.os.isSignedIn" href={ _URL_ + '/@' + I.username }>{ I.username }</a>
</div>
<style lang="stylus" scoped>
:scope
display flex
> div:last-child
margin-left auto
</style>
<script lang="typescript">
this.mixin('i');
</script>
</mk-header>
+37
View File
@@ -0,0 +1,37 @@
<mk-index>
<mk-header/>
<hr>
<button @click="n">%i18n:ch.tags.mk-index.new%</button>
<hr>
<ul v-if="channels">
<li each={ channels }><a href={ '/' + this.id }>{ this.title }</a></li>
</ul>
<style lang="stylus" scoped>
:scope
display block
</style>
<script lang="typescript">
this.mixin('api');
this.on('mount', () => {
this.$root.$data.os.api('channels', {
limit: 100
}).then(channels => {
this.update({
channels: channels
});
});
});
this.n = () => {
const title = window.prompt('%i18n:!ch.tags.mk-index.channel-title%');
this.$root.$data.os.api('channels/create', {
title: title
}).then(channel => {
location.href = '/' + channel.id;
});
};
</script>
</mk-index>
+3
View File
@@ -0,0 +1,3 @@
require('./index.tag');
require('./channel.tag');
require('./header.tag');
+79
View File
@@ -0,0 +1,79 @@
import Vue from 'vue';
export default function<T extends object>(data: {
name: string;
props?: () => T;
}) {
return Vue.extend({
props: {
widget: {
type: Object
},
isMobile: {
type: Boolean,
default: false
},
isCustomizeMode: {
type: Boolean,
default: false
}
},
computed: {
id(): string {
return this.widget.id;
}
},
data() {
return {
props: data.props ? data.props() : {} as T,
bakedOldProps: null,
preventSave: false
};
},
created() {
if (this.props) {
Object.keys(this.props).forEach(prop => {
if (this.widget.data.hasOwnProperty(prop)) {
this.props[prop] = this.widget.data[prop];
}
});
}
this.bakeProps();
this.$watch('props', newProps => {
if (this.preventSave) {
this.preventSave = false;
this.bakeProps();
return;
}
if (this.bakedOldProps == JSON.stringify(newProps)) return;
this.bakeProps();
if (this.isMobile) {
(this as any).api('i/update_mobile_home', {
id: this.id,
data: newProps
}).then(() => {
(this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps;
});
} else {
(this as any).api('i/update_home', {
id: this.id,
data: newProps
}).then(() => {
(this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps;
});
}
}, {
deep: true
});
},
methods: {
bakeProps() {
this.bakedOldProps = JSON.stringify(this.props);
}
}
});
}
+607
View File
@@ -0,0 +1,607 @@
import Vue from 'vue';
import { EventEmitter } from 'eventemitter3';
import * as merge from 'object-assign-deep';
import * as uuid from 'uuid';
import { hostname, apiUrl, swPublickey, version, lang, googleMapsApiKey } from '../config';
import Progress from './scripts/loading';
import Connection from './scripts/streaming/stream';
import { HomeStreamManager } from './scripts/streaming/home';
import { DriveStreamManager } from './scripts/streaming/drive';
import { ServerStreamManager } from './scripts/streaming/server';
import { MessagingIndexStreamManager } from './scripts/streaming/messaging-index';
import { OthelloStreamManager } from './scripts/streaming/othello';
import Err from '../common/views/components/connect-failed.vue';
import { LocalTimelineStreamManager } from './scripts/streaming/local-timeline';
import { GlobalTimelineStreamManager } from './scripts/streaming/global-timeline';
const defaultSettings = {
fetchOnScroll: true,
showMaps: true,
showPostFormOnTopOfTl: false,
gradientWindowHeader: false,
showReplyTarget: true,
showMyRenotes: true,
showRenotedMyNotes: true
};
//#region api requests
let spinner = null;
let pending = 0;
//#endregion
export type API = {
chooseDriveFile: (opts: {
title?: string;
currentFolder?: any;
multiple?: boolean;
}) => Promise<any>;
chooseDriveFolder: (opts: {
title?: string;
currentFolder?: any;
}) => Promise<any>;
dialog: (opts: {
title: string;
text: string;
actions?: Array<{
text: string;
id?: string;
}>;
}) => Promise<string>;
input: (opts: {
title: string;
placeholder?: string;
default?: string;
}) => Promise<string>;
post: (opts?: {
reply?: any;
renote?: any;
}) => void;
notify: (message: string) => void;
};
/**
* Misskey Operating System
*/
export default class MiOS extends EventEmitter {
/**
* Misskeyの /meta で取得できるメタ情報
*/
private meta: {
data: { [x: string]: any };
chachedAt: Date;
};
private isMetaFetching = false;
public app: Vue;
public new(vm, props) {
const w = new vm({
parent: this.app,
propsData: props
}).$mount();
document.body.appendChild(w.$el);
return w;
}
/**
* A signing user
*/
public i: { [x: string]: any };
/**
* Whether signed in
*/
public get isSignedIn() {
return this.i != null;
}
/**
* Whether is debug mode
*/
public get debug() {
return localStorage.getItem('debug') == 'true';
}
/**
* Whether enable sounds
*/
public get isEnableSounds() {
return localStorage.getItem('enableSounds') == 'true';
}
public apis: API;
/**
* A connection manager of home stream
*/
public stream: HomeStreamManager;
/**
* Connection managers
*/
public streams: {
localTimelineStream: LocalTimelineStreamManager;
globalTimelineStream: GlobalTimelineStreamManager;
driveStream: DriveStreamManager;
serverStream: ServerStreamManager;
messagingIndexStream: MessagingIndexStreamManager;
othelloStream: OthelloStreamManager;
} = {
localTimelineStream: null,
globalTimelineStream: null,
driveStream: null,
serverStream: null,
messagingIndexStream: null,
othelloStream: null
};
/**
* A registration of service worker
*/
private swRegistration: ServiceWorkerRegistration = null;
/**
* Whether should register ServiceWorker
*/
private shouldRegisterSw: boolean;
/**
* ウィンドウシステム
*/
public windows = new WindowSystem();
/**
* MiOSインスタンスを作成します
* @param shouldRegisterSw ServiceWorkerを登録するかどうか
*/
constructor(shouldRegisterSw = false) {
super();
this.shouldRegisterSw = shouldRegisterSw;
//#region BIND
this.log = this.log.bind(this);
this.logInfo = this.logInfo.bind(this);
this.logWarn = this.logWarn.bind(this);
this.logError = this.logError.bind(this);
this.init = this.init.bind(this);
this.api = this.api.bind(this);
this.getMeta = this.getMeta.bind(this);
this.registerSw = this.registerSw.bind(this);
//#endregion
if (this.debug) {
(window as any).os = this;
}
}
private googleMapsIniting = false;
public getGoogleMaps() {
return new Promise((res, rej) => {
if ((window as any).google && (window as any).google.maps) {
res((window as any).google.maps);
} else {
this.once('init-google-maps', () => {
res((window as any).google.maps);
});
//#region load google maps api
if (!this.googleMapsIniting) {
this.googleMapsIniting = true;
(window as any).initGoogleMaps = () => {
this.emit('init-google-maps');
};
const head = document.getElementsByTagName('head')[0];
const script = document.createElement('script');
script.setAttribute('src', `https://maps.googleapis.com/maps/api/js?key=${googleMapsApiKey}&callback=initGoogleMaps`);
script.setAttribute('async', 'true');
script.setAttribute('defer', 'true');
head.appendChild(script);
}
//#endregion
}
});
}
public log(...args) {
if (!this.debug) return;
console.log.apply(null, args);
}
public logInfo(...args) {
if (!this.debug) return;
console.info.apply(null, args);
}
public logWarn(...args) {
if (!this.debug) return;
console.warn.apply(null, args);
}
public logError(...args) {
if (!this.debug) return;
console.error.apply(null, args);
}
public signout() {
localStorage.removeItem('me');
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
location.href = '/';
}
/**
* Initialize MiOS (boot)
* @param callback A function that call when initialized
*/
public async init(callback) {
//#region Init stream managers
this.streams.serverStream = new ServerStreamManager(this);
this.once('signedin', () => {
// Init home stream manager
this.stream = new HomeStreamManager(this, this.i);
// Init other stream manager
this.streams.localTimelineStream = new LocalTimelineStreamManager(this, this.i);
this.streams.globalTimelineStream = new GlobalTimelineStreamManager(this, this.i);
this.streams.driveStream = new DriveStreamManager(this, this.i);
this.streams.messagingIndexStream = new MessagingIndexStreamManager(this, this.i);
this.streams.othelloStream = new OthelloStreamManager(this, this.i);
});
//#endregion
// ユーザーをフェッチしてコールバックする
const fetchme = (token, cb) => {
let me = null;
// Return when not signed in
if (token == null) {
return done();
}
// Fetch user
fetch(`${apiUrl}/i`, {
method: 'POST',
body: JSON.stringify({
i: token
})
})
// When success
.then(res => {
// When failed to authenticate user
if (res.status !== 200) {
return this.signout();
}
// Parse response
res.json().then(i => {
me = i;
me.token = token;
done();
});
})
// When failure
.catch(() => {
// Render the error screen
document.body.innerHTML = '<div id="err"></div>';
new Vue({
render: createEl => createEl(Err)
}).$mount('#err');
Progress.done();
});
function done() {
if (cb) cb(me);
}
};
// フェッチが完了したとき
const fetched = me => {
if (me) {
// デフォルトの設定をマージ
me.clientSettings = Object.assign(defaultSettings, me.clientSettings);
// ローカルストレージにキャッシュ
localStorage.setItem('me', JSON.stringify(me));
}
this.i = me;
this.emit('signedin');
// Finish init
callback();
//#region Note
// Init service worker
if (this.shouldRegisterSw) this.registerSw();
//#endregion
};
// Get cached account data
const cachedMe = JSON.parse(localStorage.getItem('me'));
// キャッシュがあったとき
if (cachedMe) {
if (cachedMe.token == null) {
this.signout();
return;
}
// とりあえずキャッシュされたデータでお茶を濁して(?)おいて、
fetched(cachedMe);
// 後から新鮮なデータをフェッチ
fetchme(cachedMe.token, freshData => {
merge(cachedMe, freshData);
});
} else {
// Get token from cookie
const i = (document.cookie.match(/i=(!\w+)/) || [null, null])[1];
fetchme(i, fetched);
}
}
/**
* Register service worker
*/
private registerSw() {
// Check whether service worker and push manager supported
const isSwSupported =
('serviceWorker' in navigator) && ('PushManager' in window);
// Reject when browser not service worker supported
if (!isSwSupported) return;
// Reject when not signed in to Misskey
if (!this.isSignedIn) return;
// When service worker activated
navigator.serviceWorker.ready.then(registration => {
this.log('[sw] ready: ', registration);
this.swRegistration = registration;
// Options of pushManager.subscribe
// SEE: https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters
const opts = {
// A boolean indicating that the returned push subscription
// will only be used for messages whose effect is made visible to the user.
userVisibleOnly: true,
// A public key your push server will use to send
// messages to client apps via a push server.
applicationServerKey: urlBase64ToUint8Array(swPublickey)
};
// Subscribe push notification
this.swRegistration.pushManager.subscribe(opts).then(subscription => {
this.log('[sw] Subscribe OK:', subscription);
function encode(buffer: ArrayBuffer) {
return btoa(String.fromCharCode.apply(null, new Uint8Array(buffer)));
}
// Register
this.api('sw/register', {
endpoint: subscription.endpoint,
auth: encode(subscription.getKey('auth')),
publickey: encode(subscription.getKey('p256dh'))
});
})
// When subscribe failed
.catch(async (err: Error) => {
this.logError('[sw] Subscribe Error:', err);
// 通知が許可されていなかったとき
if (err.name == 'NotAllowedError') {
this.logError('[sw] Subscribe failed due to notification not allowed');
return;
}
// 違うapplicationServerKey (または gcm_sender_id)のサブスクリプションが
// 既に存在していることが原因でエラーになった可能性があるので、
// そのサブスクリプションを解除しておく
const subscription = await this.swRegistration.pushManager.getSubscription();
if (subscription) subscription.unsubscribe();
});
});
// Whether use raw version script
const raw = (localStorage.getItem('useRawScript') == 'true' && this.debug)
|| process.env.NODE_ENV != 'production';
// The path of service worker script
const sw = `/sw.${version}.${lang}.${raw ? 'raw' : 'min'}.js`;
// Register service worker
navigator.serviceWorker.register(sw).then(registration => {
// 登録成功
this.logInfo('[sw] Registration successful with scope: ', registration.scope);
}).catch(err => {
// 登録失敗 :(
this.logError('[sw] Registration failed: ', err);
});
}
public requests = [];
/**
* Misskey APIにリクエストします
* @param endpoint エンドポイント名
* @param data パラメータ
*/
public api(endpoint: string, data: { [x: string]: any } = {}): Promise<{ [x: string]: any }> {
if (++pending === 1) {
spinner = document.createElement('div');
spinner.setAttribute('id', 'wait');
document.body.appendChild(spinner);
}
const onFinally = () => {
if (--pending === 0) spinner.parentNode.removeChild(spinner);
};
const promise = new Promise((resolve, reject) => {
const viaStream = this.stream.hasConnection &&
(localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true);
if (viaStream) {
const stream = this.stream.borrow();
const id = Math.random().toString();
stream.once(`api-res:${id}`, res => {
if (res == null || Object.keys(res).length == 0) {
resolve(null);
} else if (res.res) {
resolve(res.res);
} else {
reject(res.e);
}
});
stream.send({
type: 'api',
id,
endpoint,
data
});
} else {
// Append a credential
if (this.isSignedIn) (data as any).i = this.i.token;
const req = {
id: uuid(),
date: new Date(),
name: endpoint,
data,
res: null,
status: null
};
if (this.debug) {
this.requests.push(req);
}
// Send request
fetch(endpoint.indexOf('://') > -1 ? endpoint : `${apiUrl}/${endpoint}`, {
method: 'POST',
body: JSON.stringify(data),
credentials: endpoint === 'signin' ? 'include' : 'omit',
cache: 'no-cache'
}).then(async (res) => {
const body = res.status === 204 ? null : await res.json();
if (this.debug) {
req.status = res.status;
req.res = body;
}
if (res.status === 200) {
resolve(body);
} else if (res.status === 204) {
resolve();
} else {
reject(body.error);
}
}).catch(reject);
}
});
promise.then(onFinally, onFinally);
return promise;
}
/**
* Misskeyのメタ情報を取得します
* @param force キャッシュを無視するか否か
*/
public getMeta(force = false) {
return new Promise<{ [x: string]: any }>(async (res, rej) => {
if (this.isMetaFetching) {
this.once('_meta_fetched_', () => {
res(this.meta.data);
});
return;
}
const expire = 1000 * 60; // 1min
// forceが有効, meta情報を保持していない or 期限切れ
if (force || this.meta == null || Date.now() - this.meta.chachedAt.getTime() > expire) {
this.isMetaFetching = true;
const meta = await this.api('meta');
this.meta = {
data: meta,
chachedAt: new Date()
};
this.isMetaFetching = false;
this.emit('_meta_fetched_');
res(meta);
} else {
res(this.meta.data);
}
});
}
public connections: Connection[] = [];
public registerStreamConnection(connection: Connection) {
this.connections.push(connection);
}
public unregisterStreamConnection(connection: Connection) {
this.connections = this.connections.filter(c => c != connection);
}
}
class WindowSystem extends EventEmitter {
public windows = new Set();
public add(window) {
this.windows.add(window);
this.emit('added', window);
}
public remove(window) {
this.windows.delete(window);
this.emit('removed', window);
}
public getAll() {
return this.windows;
}
}
/**
* Convert the URL safe base64 string to a Uint8Array
* @param base64String base64 string
*/
function urlBase64ToUint8Array(base64String: string): Uint8Array {
const padding = '='.repeat((4 - base64String.length % 4) % 4);
const base64 = (base64String + padding)
.replace(/\-/g, '+')
.replace(/_/g, '/');
const rawData = window.atob(base64);
const outputArray = new Uint8Array(rawData.length);
for (let i = 0; i < rawData.length; ++i) {
outputArray[i] = rawData.charCodeAt(i);
}
return outputArray;
}
@@ -0,0 +1,33 @@
import MiOS from '../mios';
import { version as current } from '../../config';
export default async function(mios: MiOS, force = false, silent = false) {
const meta = await mios.getMeta(force);
const newer = meta.clientVersion;
if (newer != current) {
localStorage.setItem('should-refresh', 'true');
localStorage.setItem('v', newer);
// Clear cache (serive worker)
try {
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.controller.postMessage('clear');
}
navigator.serviceWorker.getRegistrations().then(registrations => {
registrations.forEach(registration => registration.unregister());
});
} catch (e) {
console.error(e);
}
if (!silent) {
alert('%i18n:!common.update-available%'.replace('{newer}', newer).replace('{current}', current));
}
return newer;
} else {
return null;
}
}
@@ -0,0 +1,68 @@
import getNoteSummary from '../../../../renderers/get-note-summary';
import getReactionEmoji from '../../../../renderers/get-reaction-emoji';
import getUserName from '../../../../renderers/get-user-name';
type Notification = {
title: string;
body: string;
icon: string;
onclick?: any;
};
// TODO: i18n
export default function(type, data): Notification {
switch (type) {
case 'drive_file_created':
return {
title: 'ファイルがアップロードされました',
body: data.name,
icon: data.url + '?thumbnail&size=64'
};
case 'mention':
return {
title: `${getUserName(data.user)}さんから:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
};
case 'reply':
return {
title: `${getUserName(data.user)}さんから返信:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
};
case 'quote':
return {
title: `${getUserName(data.user)}さんが引用:`,
body: getNoteSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
};
case 'reaction':
return {
title: `${getUserName(data.user)}: ${getReactionEmoji(data.reaction)}:`,
body: getNoteSummary(data.note),
icon: data.user.avatarUrl + '?thumbnail&size=64'
};
case 'unread_messaging_message':
return {
title: `${getUserName(data.user)}さんからメッセージ:`,
body: data.text, // TODO: getMessagingMessageSummary(data),
icon: data.user.avatarUrl + '?thumbnail&size=64'
};
case 'othello_invited':
return {
title: '対局への招待があります',
body: `${getUserName(data.parent)}さんから`,
icon: data.parent.avatarUrl + '?thumbnail&size=64'
};
default:
return null;
}
}
@@ -0,0 +1,8 @@
export default (parent, child) => {
let node = child.parentNode;
while (node) {
if (node == parent) return true;
node = node.parentNode;
}
return false;
};
@@ -0,0 +1,13 @@
/**
* Clipboardに値をコピー(TODO: 文字列以外も対応)
*/
export default val => {
const form = document.createElement('textarea');
form.textContent = val;
document.body.appendChild(form);
form.select();
const result = document.execCommand('copy');
document.body.removeChild(form);
return result;
};
@@ -0,0 +1,13 @@
export default date => {
if (typeof date == 'string') date = new Date(date);
return (
date.getFullYear() + '年' +
(date.getMonth() + 1) + '月' +
date.getDate() + '日' +
' ' +
date.getHours() + '時' +
date.getMinutes() + '分' +
' ' +
`(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})`
);
};
@@ -0,0 +1,21 @@
require('fuckadblock');
declare const fuckAdBlock: any;
export default (os) => {
function adBlockDetected() {
os.apis.dialog({
title: '%fa:exclamation-triangle%広告ブロッカーを無効にしてください',
text: '<strong>Misskeyは広告を掲載していません</strong>が、広告をブロックする機能が有効だと一部の機能が利用できなかったり、不具合が発生する場合があります。',
actins: [{
text: 'OK'
}]
});
}
if (fuckAdBlock === undefined) {
adBlockDetected();
} else {
fuckAdBlock.onDetected(adBlockDetected);
}
};
+2
View File
@@ -0,0 +1,2 @@
const gcd = (a, b) => !b ? a : gcd(b, a % b);
export default gcd;
+5
View File
@@ -0,0 +1,5 @@
export default () => [
'(=^・・^=)',
'v(‘ω’)v',
'🐡( \'-\' 🐡 )フグパンチ!!!!'
][Math.floor(Math.random() * 3)];
@@ -0,0 +1,11 @@
/**
* 中央値を求めます
* @param samples サンプル
*/
export default function(samples) {
if (!samples.length) return 0;
const numbers = samples.slice(0).sort((a, b) => a - b);
const middle = Math.floor(numbers.length / 2);
const isEven = numbers.length % 2 === 0;
return isEven ? (numbers[middle] + numbers[middle - 1]) / 2 : numbers[middle];
}
+21
View File
@@ -0,0 +1,21 @@
const NProgress = require('nprogress');
NProgress.configure({
trickleSpeed: 500,
showSpinner: false
});
const root = document.getElementsByTagName('html')[0];
export default {
start: () => {
root.classList.add('progress');
NProgress.start();
},
done: () => {
root.classList.remove('progress');
NProgress.done();
},
set: val => {
NProgress.set(val);
}
};
@@ -0,0 +1,53 @@
export default function(qs: string) {
const q = {
text: ''
};
qs.split(' ').forEach(x => {
if (/^([a-z_]+?):(.+?)$/.test(x)) {
const [key, value] = x.split(':');
switch (key) {
case 'user':
q['includeUserUsernames'] = value.split(',');
break;
case 'exclude_user':
q['excludeUserUsernames'] = value.split(',');
break;
case 'follow':
q['following'] = value == 'null' ? null : value == 'true';
break;
case 'reply':
q['reply'] = value == 'null' ? null : value == 'true';
break;
case 'renote':
q['renote'] = value == 'null' ? null : value == 'true';
break;
case 'media':
q['media'] = value == 'null' ? null : value == 'true';
break;
case 'poll':
q['poll'] = value == 'null' ? null : value == 'true';
break;
case 'until':
case 'since':
// YYYY-MM-DD
if (/^[0-9]+\-[0-9]+\-[0-9]+$/) {
const [yyyy, mm, dd] = value.split('-');
q[`${key}_date`] = (new Date(parseInt(yyyy, 10), parseInt(mm, 10) - 1, parseInt(dd, 10))).getTime();
}
break;
default:
q[key] = value;
break;
}
} else {
q.text += x + ' ';
}
});
if (q.text) {
q.text = q.text.trim();
}
return q;
}
@@ -0,0 +1,13 @@
import Stream from './stream';
import MiOS from '../../mios';
/**
* Channel stream connection
*/
export default class Connection extends Stream {
constructor(os: MiOS, channelId) {
super(os, 'channel', {
channel: channelId
});
}
}
@@ -0,0 +1,34 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
/**
* Drive stream connection
*/
export class DriveStream extends Stream {
constructor(os: MiOS, me) {
super(os, 'drive', {
i: me.token
});
}
}
export class DriveStreamManager extends StreamManager<DriveStream> {
private me;
private os: MiOS;
constructor(os: MiOS, me) {
super();
this.me = me;
this.os = os;
}
public getConnection() {
if (this.connection == null) {
this.connection = new DriveStream(this.os, this.me);
}
return this.connection;
}
}
@@ -0,0 +1,34 @@
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
/**
* Global timeline stream connection
*/
export class GlobalTimelineStream extends Stream {
constructor(os: MiOS, me) {
super(os, 'global-timeline', {
i: me.token
});
}
}
export class GlobalTimelineStreamManager extends StreamManager<GlobalTimelineStream> {
private me;
private os: MiOS;
constructor(os: MiOS, me) {
super();
this.me = me;
this.os = os;
}
public getConnection() {
if (this.connection == null) {
this.connection = new GlobalTimelineStream(this.os, this.me);
}
return this.connection;
}
}
@@ -0,0 +1,57 @@
import * as merge from 'object-assign-deep';
import Stream from './stream';
import StreamManager from './stream-manager';
import MiOS from '../../mios';
/**
* Home stream connection
*/
export class HomeStream extends Stream {
constructor(os: MiOS, me) {
super(os, '', {
i: me.token
});
// 最終利用日時を更新するため定期的にaliveメッセージを送信
setInterval(() => {
this.send({ type: 'alive' });
me.lastUsedAt = new Date();
}, 1000 * 60);
// 自分の情報が更新されたとき
this.on('i_updated', i => {
if (os.debug) {
console.log('I updated:', i);
}
merge(me, i);
});
// トークンが再生成されたとき
// このままではAPIが利用できないので強制的にサインアウトさせる
this.on('my_token_regenerated', () => {
alert('%i18n:!common.my-token-regenerated%');
os.signout();
});
}
}
export class HomeStreamManager extends StreamManager<HomeStream> {
private me;
private os: MiOS;
constructor(os: MiOS, me) {
super();
this.me = me;
this.os = os;
}
public getConnection() {
if (this.connection == null) {
this.connection = new HomeStream(this.os, this.me);
}
return this.connection;
}
}

Some files were not shown because too many files have changed in this diff Show More