Merge branch 'swn' of https://github.com/tamaina/misskey into swn
This commit is contained in:
commit
753696b4f5
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -1,30 +1,10 @@
|
|||
<!-- ℹ お読みください
|
||||
PRありがとうございます! PRを作成する前に、以下をご確認ください:
|
||||
- 可能であればタイトルに、以下で示すようなPRの種類が分かるキーワードをプリフィクスしてください。
|
||||
- fix / refactor / feat / enhance / perf / chore
|
||||
- また、PRの粒度が適切であることを確認してください。ひとつのPRに複数の種類の変更や関心を含めることは避けてください。
|
||||
- このPRによって解決されるIssueがある場合は、そのIssueへの参照を本文内に含めてください。
|
||||
- CHANGELOG.mdに変更点を追記してください。リファクタリングなど、利用者に影響を与えない変更についてはこの限りではありません。
|
||||
- この変更により新たに作成、もしくは更新すべきドキュメントがないか確認してください。
|
||||
- 機能追加やバグ修正をした場合は、可能であればテストケースを追加してください。
|
||||
- テスト、Lintが通っていることを予め確認してください。
|
||||
- `npm run test`、`npm run lint`でぞれぞれ実施可能です
|
||||
- UIに変更がある場合はスクリーンショットを本文内に添付してください。
|
||||
ご協力ありがとうございます🤗
|
||||
PRありがとうございます! PRを作成する前に、コントリビューションガイドをご確認ください:
|
||||
https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md
|
||||
-->
|
||||
<!-- ℹ README
|
||||
Thank you for your PR! Before creating a PR, please check the following:
|
||||
- If possible, prefix the title with a keyword that identifies the type of this PR, as shown below.
|
||||
- fix / refactor / feat / enhance / perf / chore
|
||||
- Also, make sure that the granularity of this PR is appropriate. Please do not include more than one type of change or interest in a single PR.
|
||||
- If there is an Issue which will be resolved by this PR, please include a reference to the Issue in the text.
|
||||
- Please add the summary of the changes to CHANGELOG.md. However, this is not necessary for changes that do not affect the users, such as refactoring.
|
||||
- Check if there are any documents that need to be created or updated due to this change.
|
||||
- If you have added a feature or fixed a bug, please add a test case if possible.
|
||||
- Please make sure that tests and Lint are passed in advance.
|
||||
- You can run it with `npm run test` and `npm run lint`.
|
||||
- If this PR includes UI changes, please attach a screenshot in the text.
|
||||
Thanks for your cooperation 🤗
|
||||
Thank you for your PR! Before creating a PR, please check the contribution guide:
|
||||
https://github.com/misskey-dev/misskey/blob/develop/docs/CONTRIBUTING.en.md
|
||||
-->
|
||||
|
||||
# What
|
||||
|
|
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -9,6 +9,19 @@
|
|||
|
||||
-->
|
||||
|
||||
## 12.x.x (unreleased)
|
||||
|
||||
### Improvements
|
||||
|
||||
### Bugfixes
|
||||
- CWを維持する設定を復活
|
||||
- クライアントの表示を修正
|
||||
|
||||
## 12.89.2 (2021/08/24)
|
||||
|
||||
### Bugfixes
|
||||
- カスタムCSSを有効にしているとエラーになる問題を修正
|
||||
|
||||
## 12.89.1 (2021/08/24)
|
||||
|
||||
### Improvements
|
||||
|
|
166
CONTRIBUTING.md
166
CONTRIBUTING.md
|
@ -1,22 +1,41 @@
|
|||
# Contribution guide
|
||||
:v: Thanks for your contributions :v:
|
||||
**[✨ English version available](/docs/CONTRIBUTING.en.md)**
|
||||
|
||||
## When you contribute...
|
||||
- 任意のIssueについて、せっかく実装してくださっても、実装方法や設計の認識が揃ってないとマージできない/しないことになりかねないので、初めにそのIssue上で着手することを宣言し、必要に応じて他メンバーと実装方法や設計のすり合わせを行ってください。宣言することは作業が他の人と被るのを防止する効果もあります。
|
||||
- 設計に迷った時はプロジェクトリーダーの判断を仰いでください。
|
||||
- 時間や優先度の都合上、提出してくださったPRが長期間放置されることもありますがご理解ください。
|
||||
- 温度感高めで見てほしいものは責付いてください。
|
||||
プロジェクトに興味を持っていただきありがとうございます! このドキュメントでは、プロジェクトに貢献する際に必要な情報をまとめています。
|
||||
|
||||
## Issues
|
||||
Feature suggestions and bug reports are filed in https://github.com/misskey-dev/misskey/issues .
|
||||
Issueを作成する前に、以下をご確認ください:
|
||||
- 重複を防ぐため、既に同様の内容のIssueが作成されていないか検索してから新しいIssueを作ってください。
|
||||
- Issueを質問に使わないでください。
|
||||
- Issueは、要望、提案、問題の報告にのみ使用してください。
|
||||
- 質問は、[Misskey Forum](https://forum.misskey.io/)や[Discord](https://discord.gg/Wp8gVStHW3)でお願いします。
|
||||
|
||||
* Please search existing issues to avoid duplication. If your issue is already filed, please add your reaction or comment to the existing one.
|
||||
* If you have multiple independent issues, please submit them separately.
|
||||
## 実装をする前に
|
||||
機能追加やバグ修正をしたいときは、まずIssueで設計、方針をレビューしてもらいましょう(無い場合は作ってください)。このステップがないと、せっかく実装してもPRがマージされない可能性が高くなります。
|
||||
|
||||
## Branches
|
||||
* **master** branch is tracking the latest release and used for production purposes.
|
||||
* **develop** branch is where we work for the next release.
|
||||
* **l10n_develop** branch is reserved for localization management.
|
||||
また、実装に取り掛かるときは当該Issueに自分をアサインしてください(自分でできない場合は他メンバーに自分をアサインしてもらうようお願いしてください)。
|
||||
自分が実装するという意思表示をすることで、作業がバッティングするのを防ぎます。
|
||||
|
||||
## PRの作成
|
||||
PRありがとうございます! PRを作成する前に、以下をご確認ください:
|
||||
- 可能であればタイトルに、以下で示すようなPRの種類が分かるキーワードをプリフィクスしてください。
|
||||
- `fix` / `refactor` / `feat` / `enhance` / `perf` / `chore` など
|
||||
- また、PRの粒度が適切であることを確認してください。ひとつのPRに複数の種類の変更や関心を含めることは避けてください。
|
||||
- このPRによって解決されるIssueがある場合は、そのIssueへの参照を本文内に含めてください。
|
||||
- [`CHANGELOG.md`](/CHANGELOG.md)に変更点を追記してください。リファクタリングなど、利用者に影響を与えない変更についてはこの限りではありません。
|
||||
- この変更により新たに作成、もしくは更新すべきドキュメントがないか確認してください。
|
||||
- 機能追加やバグ修正をした場合は、可能であればテストケースを追加してください。
|
||||
- テスト、Lintが通っていることを予め確認してください。
|
||||
- `npm run test`、`npm run lint`でぞれぞれ実施可能です。[詳細](#testing)
|
||||
- UIに変更がある場合はスクリーンショットを本文内に添付してください。
|
||||
|
||||
ご協力ありがとうございます🤗
|
||||
|
||||
## ブランチ
|
||||
- **`master`** branch is tracking the latest release and used for production purposes.
|
||||
- **`develop`** branch is where we work for the next release.
|
||||
- PRを作成するときは、基本的にこのブランチに向けてください。
|
||||
- **`l10n_develop`** branch is reserved for localization management.
|
||||
|
||||
## Localization (l10n)
|
||||
Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management.
|
||||
|
@ -32,14 +51,22 @@ If your language is not listed in Crowdin, please open an issue.
|
|||
* Documents for instance admins are located in [`/docs`](/docs).
|
||||
* Documents for end users are located in [`/src/docs`](/src/docs).
|
||||
|
||||
## Test
|
||||
* Test codes are located in [`/test`](/test).
|
||||
## Testing
|
||||
- Test codes are located in [`/test`](/test).
|
||||
|
||||
### Run specify test
|
||||
### Run test
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
#### Run specify test
|
||||
```
|
||||
npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" npx mocha test/foo.ts --require ts-node/register
|
||||
```
|
||||
|
||||
### e2e tests
|
||||
TODO
|
||||
|
||||
## Continuous integration
|
||||
Misskey uses GitHub Actions for executing automated tests.
|
||||
Configuration files are located in [`/.github/workflows`](/.github/workflows).
|
||||
|
@ -55,116 +82,11 @@ Configuration files are located in [`/.github/workflows`](/.github/workflows).
|
|||
If you have no experience on 3D modeling, we suggest to use the free 3DCG software [Blender](https://www.blender.org/).
|
||||
You can find information on glTF 2.0 at [glTF 2.0 — Blender Manual]( https://docs.blender.org/manual/en/dev/addons/io_scene_gltf2.html).
|
||||
|
||||
## FAQ
|
||||
## Notes
|
||||
### How to resolve conflictions occurred at yarn.lock?
|
||||
|
||||
Just execute `yarn` to fix it.
|
||||
|
||||
## Glossary
|
||||
### AP
|
||||
Stands for _**A**ctivity**P**ub_.
|
||||
|
||||
### MFM
|
||||
Stands for _**M**isskey **F**lavored **M**arkdown_.
|
||||
|
||||
### Mk
|
||||
Stands for _**M**iss**k**ey_.
|
||||
|
||||
### SW
|
||||
Stands for _**S**ervice**W**orker_.
|
||||
|
||||
### Nyaize
|
||||
Convert な(na) to にゃ(nya)
|
||||
|
||||
#### Denyaize
|
||||
Revert Nyaize
|
||||
|
||||
## TypeScript Coding Style
|
||||
### Do not omit semicolons
|
||||
This is to avoid Automatic Semicolon Insertion (ASI) hazard.
|
||||
|
||||
Ref:
|
||||
* https://www.ecma-international.org/ecma-262/#sec-automatic-semicolon-insertion
|
||||
* https://github.com/tc39/ecma262/pull/1062
|
||||
|
||||
### Do not omit curly brackets
|
||||
Bad:
|
||||
``` ts
|
||||
if (foo)
|
||||
bar;
|
||||
else
|
||||
baz;
|
||||
```
|
||||
|
||||
Good:
|
||||
``` ts
|
||||
if (foo) {
|
||||
bar;
|
||||
} else {
|
||||
baz;
|
||||
}
|
||||
```
|
||||
|
||||
As a special case, you can omit the curly brackets if
|
||||
|
||||
* the body of the `if`-statement have only one statement and,
|
||||
* the `if`-statement does not have `else`-clause.
|
||||
|
||||
Good:
|
||||
``` ts
|
||||
if (foo) bar;
|
||||
```
|
||||
|
||||
Make sure that the condition and the body statement are on the same line.
|
||||
|
||||
### Do not use `==` when it can simply be replaced with `===`.
|
||||
🥰
|
||||
|
||||
### Use only boolean (or null related) values in the condition of an `if`-statement.
|
||||
Bad:
|
||||
``` ts
|
||||
if (foo.length)
|
||||
```
|
||||
|
||||
Good:
|
||||
``` ts
|
||||
if (foo.length > 0)
|
||||
```
|
||||
|
||||
### Do not use `export default`
|
||||
This is because the current language support does not work well with `export default`.
|
||||
|
||||
Ref:
|
||||
* https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
|
||||
* https://gfx.hatenablog.com/entry/2017/11/24/135343
|
||||
|
||||
Bad:
|
||||
``` ts
|
||||
export default function(foo: string): string {
|
||||
```
|
||||
|
||||
Good:
|
||||
``` ts
|
||||
export function something(foo: string): string {
|
||||
```
|
||||
|
||||
## Directory structure
|
||||
```
|
||||
src ... Source code
|
||||
@types ... Type definitions
|
||||
prelude ... Independence utils for coding JavaScript without side effects
|
||||
misc ... Independence utils for Misskey without side effects
|
||||
service ... Common functions with side effects
|
||||
queue ... Job queues and Jobs
|
||||
server ... Web Server
|
||||
client ... Client
|
||||
mfm ... MFM
|
||||
|
||||
test ... Test code
|
||||
|
||||
```
|
||||
|
||||
## Notes
|
||||
### placeholder
|
||||
SQLをクエリビルダで組み立てる際、使用するプレースホルダは重複してはならない
|
||||
例えば
|
||||
|
|
66
docs/CONTRIBUTING.en.md
Normal file
66
docs/CONTRIBUTING.en.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Contribution guide
|
||||
:v: Thanks for your contributions :v:
|
||||
|
||||
**ℹ️ Important:** This project uses Japanese as its major language, **but you do not need to translate and write the Issues/PRs in Japanese.**
|
||||
Also, you might receive comments on your Issue/PR in Japanese, but you do not need to reply to them in Japanese as well.\
|
||||
The accuracy of translation into Japanese is not high, so it will be easier for us to understand if you write it in the original language.
|
||||
It will also allow the reader to use the translation tool of their preference if necessary.
|
||||
|
||||
## Issues
|
||||
Before creating an issue, please check the following:
|
||||
- To avoid duplication, please search for similar issues before creating a new issue.
|
||||
- Do not use Issues as a question.
|
||||
- Issues should only be used to feature requests, suggestions, and report problems.
|
||||
- Please ask questions in the [Misskey Forum](https://forum.misskey.io/) or [Discord](https://discord.gg/Wp8gVStHW3).
|
||||
|
||||
## Before implementation
|
||||
When you want to add a feature or fix a bug, first have the design and policy reviewed in an Issue (if it is not there, please make one). Without this step, there is a high possibility that the PR will not be merged even if it is implemented.
|
||||
|
||||
Also, when you start implementation, assign yourself to the Issue (if you cannot do it yourself, ask another member to assign you). By expressing your intention to work the Issue, you can prevent conflicts in the work.
|
||||
|
||||
## Well-known branches
|
||||
- **`master`** branch is tracking the latest release and used for production purposes.
|
||||
- **`develop`** branch is where we work for the next release.
|
||||
- When you create a PR, basically target it to this branch.
|
||||
- **`l10n_develop`** branch is reserved for localization management.
|
||||
|
||||
## Creating a PR
|
||||
Thank you for your PR! Before creating a PR, please check the following:
|
||||
- If possible, prefix the title with a keyword that identifies the type of this PR, as shown below.
|
||||
- `fix` / `refactor` / `feat` / `enhance` / `perf` / `chore` etc
|
||||
- Also, make sure that the granularity of this PR is appropriate. Please do not include more than one type of change or interest in a single PR.
|
||||
- If there is an Issue which will be resolved by this PR, please include a reference to the Issue in the text.
|
||||
- Please add the summary of the changes to [`CHANGELOG.md`](/CHANGELOG.md). However, this is not necessary for changes that do not affect the users, such as refactoring.
|
||||
- Check if there are any documents that need to be created or updated due to this change.
|
||||
- If you have added a feature or fixed a bug, please add a test case if possible.
|
||||
- Please make sure that tests and Lint are passed in advance.
|
||||
- You can run it with `npm run test` and `npm run lint`. [See more info](#testing)
|
||||
- If this PR includes UI changes, please attach a screenshot in the text.
|
||||
|
||||
Thanks for your cooperation 🤗
|
||||
|
||||
## Localization (l10n)
|
||||
Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management.
|
||||
You can improve our translations with your Crowdin account.
|
||||
Your changes in Crowdin are automatically submitted as a PR (with the title "New Crowdin translations") to the repository.
|
||||
The owner [@syuilo](https://github.com/syuilo) merges the PR into the develop branch before the next release.
|
||||
|
||||
If your language is not listed in Crowdin, please open an issue.
|
||||
|
||||
![Crowdin](https://d322cqt584bo4o.cloudfront.net/misskey/localized.svg)
|
||||
|
||||
## Testing
|
||||
- Test codes are located in [`/test`](/test).
|
||||
|
||||
### Run test
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
#### Run specify test
|
||||
```
|
||||
npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" npx mocha test/foo.ts --require ts-node/register
|
||||
```
|
||||
|
||||
### e2e tests
|
||||
TODO
|
1
lib/CubismWebFramework
Submodule
1
lib/CubismWebFramework
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 85b4313dbea6b9765aec2f865977bb7fe8750bab
|
|
@ -779,6 +779,7 @@ translate: "Translate"
|
|||
translatedFrom: "Translated from {x}"
|
||||
accountDeletionInProgress: "Account deletion is currently in progress"
|
||||
usernameInfo: "A name that identifies your account from others on this server. You can use the alphabet (a~z, A~Z), digits (0~9) or underscores (_). Usernames can not be changed later."
|
||||
keepCw: "Keep Content Warning"
|
||||
_accountDelete:
|
||||
accountDelete: "Delete Account"
|
||||
mayTakeTime: "As account deletion is a resource-heavy process, it may take some time to complete depending on how much content you have created and how many files you have uploaded."
|
||||
|
|
|
@ -779,6 +779,7 @@ translate: "翻訳"
|
|||
translatedFrom: "{x}から翻訳"
|
||||
accountDeletionInProgress: "アカウントの削除が進行中です"
|
||||
usernameInfo: "サーバー上であなたのアカウントを一意に識別するための名前。アルファベット(a~z, A~Z)、数字(0~9)、およびアンダーバー(_)が使用できます。ユーザー名は後から変更することは出来ません。"
|
||||
keepCw: "CWを維持する"
|
||||
|
||||
_accountDelete:
|
||||
accountDelete: "アカウントの削除"
|
||||
|
|
1
misskey-assets
Submodule
1
misskey-assets
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0179793ec891856d6f37a3be16ba4c22f67a81b5
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <syuilotan@yahoo.co.jp>",
|
||||
"version": "12.89.1",
|
||||
"version": "12.89.2",
|
||||
"codename": "indigo",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { get, set } from '@client/scripts/idb-proxy';
|
||||
import { del, get, set } from '@client/scripts/idb-proxy';
|
||||
import { reactive } from 'vue';
|
||||
import { apiUrl } from '@client/config';
|
||||
import { waiting } from '@client/os';
|
||||
|
@ -26,14 +26,17 @@ export async function signout() {
|
|||
//#region Remove account
|
||||
const accounts = await getAccounts();
|
||||
accounts.splice(accounts.findIndex(x => x.id === $i.id), 1);
|
||||
set('accounts', accounts);
|
||||
|
||||
if (accounts.length > 0) await set('accounts', accounts);
|
||||
else await del('accounts');
|
||||
//#endregion
|
||||
|
||||
//#region Remove push notification registration
|
||||
//#region Remove service worker registration
|
||||
try {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
const registration = await navigator.serviceWorker.ready;
|
||||
const push = await registration.pushManager.getSubscription();
|
||||
if (!push) return;
|
||||
if (push) {
|
||||
await fetch(`${apiUrl}/sw/unregister`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
|
@ -41,6 +44,15 @@ export async function signout() {
|
|||
endpoint: push.endpoint,
|
||||
}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (accounts.length === 0) {
|
||||
await navigator.serviceWorker.getRegistrations()
|
||||
.then(registrations => {
|
||||
return Promise.all(registrations.map(registration => registration.unregister()));
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
//#endregion
|
||||
|
||||
|
|
|
@ -111,7 +111,9 @@ export default defineComponent({
|
|||
|
||||
onLogin(res) {
|
||||
if (this.autoSet) {
|
||||
login(res.i);
|
||||
return login(res.i);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -144,7 +146,7 @@ export default defineComponent({
|
|||
});
|
||||
}).then(res => {
|
||||
this.$emit('login', res);
|
||||
this.onLogin(res);
|
||||
return this.onLogin(res);
|
||||
}).catch(err => {
|
||||
if (err === null) return;
|
||||
os.dialog({
|
||||
|
|
|
@ -178,14 +178,14 @@ export default defineComponent({
|
|||
'hcaptcha-response': this.hCaptchaResponse,
|
||||
'g-recaptcha-response': this.reCaptchaResponse,
|
||||
}).then(() => {
|
||||
os.api('signin', {
|
||||
return os.api('signin', {
|
||||
username: this.username,
|
||||
password: this.password
|
||||
}).then(res => {
|
||||
this.$emit('signup', res);
|
||||
|
||||
if (this.autoSet) {
|
||||
login(res.i);
|
||||
return login(res.i);
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
</FormSelect>
|
||||
<FormSwitch v-model:value="defaultNoteLocalOnly">{{ $ts._visibility.localOnly }}</FormSwitch>
|
||||
</FormGroup>
|
||||
<FormSwitch v-model:value="keepCw" @update:value="save()">{{ $ts.keepCw }}</FormSwitch>
|
||||
</FormBase>
|
||||
</template>
|
||||
|
||||
|
@ -69,6 +70,7 @@ export default defineComponent({
|
|||
defaultNoteVisibility: defaultStore.makeGetterSetter('defaultNoteVisibility'),
|
||||
defaultNoteLocalOnly: defaultStore.makeGetterSetter('defaultNoteLocalOnly'),
|
||||
rememberNoteVisibility: defaultStore.makeGetterSetter('rememberNoteVisibility'),
|
||||
keepCw: defaultStore.makeGetterSetter('keepCw'),
|
||||
},
|
||||
|
||||
created() {
|
||||
|
|
|
@ -53,7 +53,7 @@ export default defineComponent({
|
|||
username: this.username,
|
||||
password: this.password,
|
||||
}).then(res => {
|
||||
login(res.i);
|
||||
return login(res.token);
|
||||
}).catch(() => {
|
||||
this.submitting = false;
|
||||
|
||||
|
|
|
@ -159,7 +159,6 @@ hr {
|
|||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0; // for Safari
|
||||
width: max-content;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
if (customCss && customCss.length > 0) {
|
||||
const style = document.createElement('style');
|
||||
style.innerHTML = customCss;
|
||||
head.appendChild(style);
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-inner-declarations
|
||||
|
|
Loading…
Reference in a new issue