diff --git a/locales/en-US.yml b/locales/en-US.yml index c1854ba06..cc327c5aa 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1513,6 +1513,7 @@ _2fa: renewTOTPConfirm: "This will cause verification codes from your previous app to stop working" renewTOTPOk: "Reconfigure" renewTOTPCancel: "Cancel" + token: "2FA Token" _permissions: "read:account": "View your account information" "write:account": "Edit your account information" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 617930db1..21f616808 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1336,6 +1336,7 @@ _2fa: renewTOTPConfirm: "今までの認証アプリの確認コードは使用できなくなります" renewTOTPOk: "再設定する" renewTOTPCancel: "やめておく" + token: "多要素認証トークン" _permissions: "read:account": "アカウントの情報を見る" "write:account": "アカウントの情報を変更する" diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index eeccf6938..f34083233 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -32,6 +32,12 @@ export const paramDef = { username: { type: "string", nullable: true }, host: { type: "string", nullable: true }, limit: { type: "integer", minimum: 1, maximum: 100, default: 10 }, + maxDaysSinceLastActive: { + type: "integer", + minimum: 1, + maximum: 1000, + default: 30, + }, detail: { type: "boolean", default: true }, }, anyOf: [{ required: ["username"] }, { required: ["host"] }], @@ -40,7 +46,9 @@ export const paramDef = { // TODO: avatar,bannerをJOINしたいけどエラーになる export default define(meta, paramDef, async (ps, me) => { - const activeThreshold = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); // 30日 + const activeThreshold = ps.maxDaysSinceLastActive + ? new Date(Date.now() - 1000 * 60 * 60 * 24 * ps.maxDaysSinceLastActive) + : null; if (ps.host) { const q = Users.createQueryBuilder("user") @@ -75,8 +83,10 @@ export default define(meta, paramDef, async (ps, me) => { .andWhere("user.isSuspended = FALSE") .andWhere("user.usernameLower LIKE :username", { username: `${sqlLikeEscape(ps.username.toLowerCase())}%`, - }) - .andWhere( + }); + + if (activeThreshold) { + query.andWhere( new Brackets((qb) => { qb.where("user.updatedAt IS NULL").orWhere( "user.updatedAt > :activeThreshold", @@ -84,6 +94,7 @@ export default define(meta, paramDef, async (ps, me) => { ); }), ); + } query.setParameters(followingQuery.getParameters()); diff --git a/packages/client/package.json b/packages/client/package.json index a843d63ed..2ec569381 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -89,7 +89,6 @@ "vue-isyourpasswordsafe": "^2.0.0", "vue-plyr": "^7.0.0", "vue-prism-editor": "2.0.0-alpha.2", - "vue3-otp-input": "^0.4.1", "vuedraggable": "4.1.0" } } diff --git a/packages/client/src/components/MkEmojiPickerDialog.vue b/packages/client/src/components/MkEmojiPickerDialog.vue index 4cff9f275..fec014e40 100644 --- a/packages/client/src/components/MkEmojiPickerDialog.vue +++ b/packages/client/src/components/MkEmojiPickerDialog.vue @@ -65,7 +65,7 @@ function chosen(emoji: any) { } function opening() { - picker.value?.reset(); + // picker.value?.reset(); picker.value?.focus(); } diff --git a/packages/client/src/components/MkMenu.vue b/packages/client/src/components/MkMenu.vue index dea14ef05..aa3a3a300 100644 --- a/packages/client/src/components/MkMenu.vue +++ b/packages/client/src/components/MkMenu.vue @@ -130,7 +130,7 @@ class="_button item parent" :class="{ childShowing: childShowingItem === item }" @mouseenter="showChildren(item, $event)" - @click="showChildren(item, $event)" + @click.stop="showChildren(item, $event)" > -