diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c649af315..965a55ac4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,16 @@ ## 12.x.x (unreleased) ### Improvements +- アカウント登録にメールアドレスの設定を必須にするオプション - クライアント: アニメーションを減らす設定をメニューのアニメーションにも適用するように - クライアント: MFM関数構文のサジェストを実装 +- クライアント: 未読の通知のみ表示する機能 +- クライアント: 通知ページで通知の種類によるフィルタ - ActivityPub: HTML -> MFMの変換を強化 +- API: i/notifications に unreadOnly オプションを追加 +- API: ap系のエンドポイントをログイン必須化+レートリミット追加 +- Misskeyのコマンドラインオプションを廃止 + - 代わりに環境変数で設定することができます ### Bugfixes - Fix createDeleteAccountJob diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1c06a11255..fa1e6d1994 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -791,6 +791,14 @@ resolved: "解決済み" unresolved: "未解決" itsOn: "オンになっています" itsOff: "オフになっています" +emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする" +unread: "未読" +filter: "フィルタ" + +_signup: + almostThere: "ほとんど完了です" + emailAddressInfo: "あなたが使っているメールアドレスを入力してください。" + emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。" _accountDelete: accountDelete: "アカウントの削除" diff --git a/migration/1633068642000-email-required-for-signup.ts b/migration/1633068642000-email-required-for-signup.ts new file mode 100644 index 0000000000..ab7be7a0d1 --- /dev/null +++ b/migration/1633068642000-email-required-for-signup.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class emailRequiredForSignup1633068642000 implements MigrationInterface { + name = 'emailRequiredForSignup1633068642000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "meta" ADD "emailRequiredForSignup" boolean NOT NULL DEFAULT false`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "emailRequiredForSignup"`); + } + +} diff --git a/migration/1633071909016-user-pending.ts b/migration/1633071909016-user-pending.ts new file mode 100644 index 0000000000..28b556888a --- /dev/null +++ b/migration/1633071909016-user-pending.ts @@ -0,0 +1,16 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class userPending1633071909016 implements MigrationInterface { + name = 'userPending1633071909016' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`CREATE TABLE "user_pending" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "code" character varying(128) NOT NULL, "username" character varying(128) NOT NULL, "email" character varying(128) NOT NULL, "password" character varying(128) NOT NULL, CONSTRAINT "PK_d4c84e013c98ec02d19b8fbbafa" PRIMARY KEY ("id"))`); + await queryRunner.query(`CREATE UNIQUE INDEX "IDX_4e5c4c99175638ec0761714ab0" ON "user_pending" ("code") `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP INDEX "IDX_4e5c4c99175638ec0761714ab0"`); + await queryRunner.query(`DROP TABLE "user_pending"`); + } + +} diff --git a/package.json b/package.json index 3f9c71f017..13f83ded89 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@sinonjs/fake-timers": "7.1.2", "@syuilo/aiscript": "0.11.1", "@types/bcryptjs": "2.4.2", - "@types/bull": "3.15.4", + "@types/bull": "3.15.5", "@types/cbor": "6.0.0", "@types/dateformat": "3.0.1", "@types/escape-regexp": "0.0.0", @@ -63,17 +63,17 @@ "@types/koa-bodyparser": "4.3.3", "@types/koa-cors": "0.0.2", "@types/koa-favicon": "2.0.21", - "@types/koa-logger": "3.1.1", + "@types/koa-logger": "3.1.2", "@types/koa-mount": "4.0.1", "@types/koa-send": "4.1.3", "@types/koa-views": "7.0.0", "@types/koa__cors": "3.0.3", "@types/koa__multer": "2.0.3", "@types/koa__router": "8.0.8", - "@types/markdown-it": "12.2.1", + "@types/markdown-it": "12.2.3", "@types/matter-js": "0.17.5", "@types/mocha": "8.2.3", - "@types/node": "16.9.6", + "@types/node": "16.10.3", "@types/node-fetch": "2.5.12", "@types/nodemailer": "6.4.4", "@types/nprogress": "0.2.0", @@ -102,28 +102,27 @@ "@types/webpack": "5.28.0", "@types/webpack-stream": "3.2.12", "@types/websocket": "1.0.4", - "@types/ws": "7.4.7", - "@typescript-eslint/parser": "4.31.2", + "@types/ws": "8.2.0", + "@typescript-eslint/parser": "4.33.0", "@vue/compiler-sfc": "3.2.19", "abort-controller": "3.0.0", "apexcharts": "3.28.3", "autobind-decorator": "2.4.0", "autosize": "4.0.4", "autwh": "0.1.0", - "aws-sdk": "2.992.0", + "aws-sdk": "2.1003.0", "bcryptjs": "2.4.3", "blurhash": "1.1.4", "broadcast-channel": "4.2.0", "bull": "3.29.2", - "cacheable-lookup": "6.0.1", + "cacheable-lookup": "6.0.2", "cafy": "15.2.1", - "cbor": "8.0.0", + "cbor": "8.0.2", "chalk": "4.1.2", "chart.js": "2.9.4", "cli-highlight": "2.1.11", - "commander": "8.1.0", "compare-versions": "3.6.0", - "concurrently": "6.2.1", + "concurrently": "6.3.0", "content-disposition": "0.5.3", "crc-32": "1.2.0", "css-loader": "6.3.0", @@ -131,18 +130,18 @@ "dateformat": "4.5.1", "escape-regexp": "0.0.1", "eslint": "7.32.0", - "eslint-plugin-vue": "7.18.0", + "eslint-plugin-vue": "7.19.1", "eventemitter3": "4.0.7", "feed": "4.2.2", "file-type": "16.5.3", "fluent-ffmpeg": "2.1.2", - "glob": "7.1.7", + "glob": "7.2.0", "got": "11.8.2", "gulp": "4.0.2", "gulp-cssnano": "2.1.3", "gulp-rename": "2.0.0", "gulp-replace": "1.1.3", - "gulp-terser": "2.0.1", + "gulp-terser": "2.1.0", "gulp-tslint": "8.1.4", "hpagent": "0.1.2", "http-signature": "1.3.5", @@ -157,7 +156,7 @@ "jsonld": "5.2.0", "jsrsasign": "8.0.20", "katex": "0.13.18", - "koa": "2.13.1", + "koa": "2.13.3", "koa-bodyparser": "4.3.0", "koa-favicon": "2.1.0", "koa-json-body": "5.3.0", @@ -170,19 +169,19 @@ "markdown-it": "12.2.0", "markdown-it-anchor": "7.1.0", "matter-js": "0.17.1", - "mfm-js": "0.19.0", + "mfm-js": "0.20.0", "misskey-js": "0.0.6", "mocha": "8.4.0", "ms": "2.1.3", "multer": "1.4.3", "nested-property": "4.0.0", "node-fetch": "2.6.1", - "nodemailer": "6.6.3", + "nodemailer": "6.6.5", "os-utils": "0.0.14", "parse5": "6.0.1", "pg": "8.7.1", "portscanner": "2.2.0", - "postcss": "8.3.7", + "postcss": "8.3.9", "postcss-loader": "6.1.1", "prismjs": "1.25.0", "private-ip": "2.2.1", @@ -214,7 +213,7 @@ "style-loader": "3.3.0", "summaly": "2.4.1", "syslog-pro": "1.0.0", - "systeminformation": "5.9.3", + "systeminformation": "5.9.4", "syuilo-password-strength": "0.0.1", "textarea-caret": "3.1.0", "three": "0.117.1", @@ -223,12 +222,12 @@ "tmp": "0.2.1", "ts-loader": "9.2.6", "ts-node": "10.2.1", - "tsc-alias": "1.3.9", + "tsc-alias": "1.3.10", "tsconfig-paths": "3.11.0", "tslint": "6.1.3", "tslint-sonarts": "1.9.0", "twemoji-parser": "13.1.0", - "typeorm": "0.2.37", + "typeorm": "0.2.38", "typescript": "4.4.3", "ulid": "2.3.0", "uuid": "8.3.2", @@ -242,17 +241,17 @@ "vue-svg-loader": "0.17.0-beta.2", "vuedraggable": "4.0.1", "web-push": "3.4.5", - "webpack": "5.54.0", - "webpack-cli": "4.8.0", + "webpack": "5.58.0", + "webpack-cli": "4.9.0", "websocket": "1.0.34", - "ws": "8.2.2", + "ws": "8.2.3", "xev": "2.0.1" }, "devDependencies": { "@redocly/openapi-core": "1.0.0-beta.54", "@types/fluent-ffmpeg": "2.1.17", "cross-env": "7.0.3", - "cypress": "8.4.1", + "cypress": "8.5.0", "start-server-and-test": "1.14.0" } } diff --git a/src/argv.ts b/src/argv.ts deleted file mode 100644 index 106ecf2675..0000000000 --- a/src/argv.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Command } from 'commander'; -import config from '@/config/index'; - -const program = new Command(); - -program.version(config.version); -program.option('--no-daemons', 'Disable daemon processes (for debbuging)'); -program.option('--disable-clustering', 'Disable clustering'); -program.option('--only-server', 'Run server only (without job queue processing)'); -program.option('--only-queue', 'Pocessing job queue only (without server)'); -program.option('--quiet', 'Suppress all logs'); -program.option('--verbose', 'Enable all logs'); -program.option('--with-log-time', 'Include timestamp for each logs'); -program.option('--slow', 'Delay all requests (for debbuging)'); -program.option('--color', 'This option is a dummy for some external program\'s (e.g. forever) issue.'); -program.parse(process.argv); - -if (process.env.MK_ONLY_QUEUE) program.onlyQueue = true; -if (process.env.NODE_ENV === 'test') program.disableClustering = true; -//if (process.env.NODE_ENV === 'test') program.quiet = true; -if (process.env.NODE_ENV === 'test') program.noDaemons = true; - -export { program }; diff --git a/src/boot/index.ts b/src/boot/index.ts index 20c53a366c..cb4c8536db 100644 --- a/src/boot/index.ts +++ b/src/boot/index.ts @@ -3,7 +3,7 @@ import * as chalk from 'chalk'; import Xev from 'xev'; import Logger from '@/services/logger'; -import { program } from '../argv'; +import { envOption } from '../env'; // for typeorm import 'reflect-metadata'; @@ -20,7 +20,7 @@ const ev = new Xev(); export default async function() { process.title = `Misskey (${cluster.isMaster ? 'master' : 'worker'})`; - if (cluster.isMaster || program.disableClustering) { + if (cluster.isMaster || envOption.disableClustering) { await masterMain(); if (cluster.isMaster) { @@ -28,7 +28,7 @@ export default async function() { } } - if (cluster.isWorker || program.disableClustering) { + if (cluster.isWorker || envOption.disableClustering) { await workerMain(); } @@ -60,7 +60,7 @@ cluster.on('exit', worker => { }); // Display detail of unhandled promise rejection -if (!program.quiet) { +if (!envOption.quiet) { process.on('unhandledRejection', console.dir); } diff --git a/src/boot/master.ts b/src/boot/master.ts index d9cc7c16be..071b37b76d 100644 --- a/src/boot/master.ts +++ b/src/boot/master.ts @@ -11,7 +11,7 @@ import Logger from '@/services/logger'; import loadConfig from '@/config/load'; import { Config } from '@/config/types'; import { lessThan } from '@/prelude/array'; -import { program } from '../argv'; +import { envOption } from '../env'; import { showMachineInfo } from '@/misc/show-machine-info'; import { initDb } from '../db/postgre'; @@ -25,7 +25,7 @@ const logger = new Logger('core', 'cyan'); const bootLogger = logger.createSubLogger('boot', 'magenta', false); function greet() { - if (!program.quiet) { + if (!envOption.quiet) { //#region Misskey logo const v = `v${meta.version}`; console.log(' _____ _ _ '); @@ -73,13 +73,13 @@ export async function masterMain() { bootLogger.succ('Misskey initialized'); - if (!program.disableClustering) { + if (!envOption.disableClustering) { await spawnWorkers(config.clusterLimit); } bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true); - if (!program.noDaemons) { + if (!envOption.noDaemons) { require('../daemons/server-stats').default(); require('../daemons/queue-stats').default(); require('../daemons/janitor').default(); diff --git a/src/client/ui/_common_/header.vue b/src/client/components/global/header.vue similarity index 73% rename from src/client/ui/_common_/header.vue rename to src/client/components/global/header.vue index f21be2f9cd..7953d8a6d6 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/components/global/header.vue @@ -1,10 +1,5 @@ + + diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 9dda82462d..abe9ccd7e0 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -1,18 +1,21 @@ @@ -43,6 +46,11 @@ export default defineComponent({ title: this.$ts.timeline, icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home', bg: 'var(--bg)', + })), + header: computed(() => ({ + title: this.$ts.timeline, + icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home', + bg: 'var(--bg)', actions: [{ icon: 'fas fa-list-ul', text: this.$ts.lists, @@ -129,7 +137,7 @@ export default defineComponent({ }, top() { - scroll(this.$el, 0); + scroll(this.$el, { top: 0 }); }, async chooseList(ev) { diff --git a/src/client/pages/user-list-timeline.vue b/src/client/pages/user-list-timeline.vue index 491fe948c1..b5e37d4843 100644 --- a/src/client/pages/user-list-timeline.vue +++ b/src/client/pages/user-list-timeline.vue @@ -89,7 +89,7 @@ export default defineComponent({ }, top() { - scroll(this.$el, 0); + scroll(this.$el, { top: 0 }); }, settings() { diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index 458ce4b618..f34c42797a 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -1,98 +1,117 @@