From 8c30ca50a86043c9ed7f0ff8c8eef9e4a8587e8e Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 11 May 2023 16:20:03 +0900 Subject: [PATCH 01/27] =?UTF-8?q?fix(frontend):=20=E3=82=88=E3=82=8A?= =?UTF-8?q?=E6=98=8E=E7=A2=BA=E3=81=AA=E8=AA=AC=E6=98=8E=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=81=A8typo=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 4 ++-- packages/frontend/src/pages/settings/privacy.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 4f458dc4e..66ecae8e6 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1039,8 +1039,8 @@ thisChannelArchived: "このチャンネルはアーカイブされています displayOfNote: "ノートの表示" initialAccountSetting: "初期設定" youFollowing: "フォロー中" -preventAiLarning: "AIによる学習を拒否" -preventAiLarningDescription: "投稿したノートや画像などのコンテンツを学習の対象にしないようAIに要求します。これはnoaiフラグをHTMLレスポンスに含めることによって実現されます。この機能は実験的であり、AIによる学習を完全に防止するものではありません。" +preventAiLearning: "生成AIによる学習を拒否" +preventAiLearningDescription: "外部の文章生成AIや画像生成AIに対して、投稿したノートや画像などのコンテンツを学習の対象にしないように要求します。これはnoaiフラグをHTMLレスポンスに含めることによって実現されますが、この要求に従うかはそのAI次第であるため、学習を完全に防止するものではありません。" _initialAccountSetting: accountCreated: "アカウントの作成が完了しました!" diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue index 29a9efa2d..4743b8c1a 100644 --- a/packages/frontend/src/pages/settings/privacy.vue +++ b/packages/frontend/src/pages/settings/privacy.vue @@ -25,8 +25,8 @@ - {{ i18n.ts.preventAiLarning }}{{ i18n.ts.beta }} - + {{ i18n.ts.preventAiLearning }}{{ i18n.ts.beta }} + {{ i18n.ts.makeExplorable }} From b380dc53e13cd925eb94420863fe38f4779a6ab8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 11 May 2023 16:22:46 +0900 Subject: [PATCH 02/27] fix typo --- packages/backend/migration/1683789676867-fix-typo.js | 11 +++++++++++ .../backend/src/core/entities/UserEntityService.ts | 2 +- packages/backend/src/models/entities/UserProfile.ts | 2 +- packages/backend/src/models/json-schema/user.ts | 2 +- .../src/server/api/endpoints/admin/show-user.ts | 2 +- .../backend/src/server/api/endpoints/i/update.ts | 4 ++-- .../backend/src/server/web/ClientServerService.ts | 12 ++++++------ packages/backend/src/server/web/views/clip.pug | 2 +- packages/backend/src/server/web/views/flash.pug | 2 +- .../backend/src/server/web/views/gallery-post.pug | 2 +- packages/backend/src/server/web/views/note.pug | 2 +- packages/backend/src/server/web/views/page.pug | 2 +- packages/backend/src/server/web/views/user.pug | 2 +- packages/backend/test/e2e/users.ts | 8 ++++---- packages/frontend/src/pages/settings/privacy.vue | 6 +++--- 15 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 packages/backend/migration/1683789676867-fix-typo.js diff --git a/packages/backend/migration/1683789676867-fix-typo.js b/packages/backend/migration/1683789676867-fix-typo.js new file mode 100644 index 000000000..c0dbbf005 --- /dev/null +++ b/packages/backend/migration/1683789676867-fix-typo.js @@ -0,0 +1,11 @@ +export class FixTypo1683789676867 { + name = 'FixTypo1683789676867' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" RENAME COLUMN "preventAiLarning" TO "preventAiLearning"`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" RENAME COLUMN "preventAiLearning" TO "preventAiLarning"`); + } +} diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index cb0b15fac..7f61e1d6f 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -445,7 +445,7 @@ export class UserEntityService implements OnModuleInit { carefulBot: profile!.carefulBot, autoAcceptFollowed: profile!.autoAcceptFollowed, noCrawle: profile!.noCrawle, - preventAiLarning: profile!.preventAiLarning, + preventAiLearning: profile!.preventAiLearning, isExplorable: user.isExplorable, isDeleted: user.isDeleted, hideOnlineStatus: user.hideOnlineStatus, diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/entities/UserProfile.ts index 2cebc5609..236ee8f98 100644 --- a/packages/backend/src/models/entities/UserProfile.ts +++ b/packages/backend/src/models/entities/UserProfile.ts @@ -150,7 +150,7 @@ export class UserProfile { @Column('boolean', { default: true, }) - public preventAiLarning: boolean; + public preventAiLearning: boolean; @Column('boolean', { default: false, diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 9d630db4c..f9a20ac39 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -304,7 +304,7 @@ export const packedMeDetailedOnlySchema = { type: 'boolean', nullable: false, optional: false, }, - preventAiLarning: { + preventAiLearning: { type: 'boolean', nullable: false, optional: false, }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index 12e656a2f..f49d2a096 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -68,7 +68,7 @@ export default class extends Endpoint { emailVerified: profile.emailVerified, autoAcceptFollowed: profile.autoAcceptFollowed, noCrawle: profile.noCrawle, - preventAiLarning: profile.preventAiLarning, + preventAiLearning: profile.preventAiLearning, alwaysMarkNsfw: profile.alwaysMarkNsfw, autoSensitive: profile.autoSensitive, carefulBot: profile.carefulBot, diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 4cc173c2d..74be00a8b 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -138,7 +138,7 @@ export const paramDef = { carefulBot: { type: 'boolean' }, autoAcceptFollowed: { type: 'boolean' }, noCrawle: { type: 'boolean' }, - preventAiLarning: { type: 'boolean' }, + preventAiLearning: { type: 'boolean' }, isBot: { type: 'boolean' }, isCat: { type: 'boolean' }, showTimelineReplies: { type: 'boolean' }, @@ -243,7 +243,7 @@ export default class extends Endpoint { if (typeof ps.carefulBot === 'boolean') profileUpdates.carefulBot = ps.carefulBot; if (typeof ps.autoAcceptFollowed === 'boolean') profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed; if (typeof ps.noCrawle === 'boolean') profileUpdates.noCrawle = ps.noCrawle; - if (typeof ps.preventAiLarning === 'boolean') profileUpdates.preventAiLarning = ps.preventAiLarning; + if (typeof ps.preventAiLearning === 'boolean') profileUpdates.preventAiLearning = ps.preventAiLearning; if (typeof ps.isCat === 'boolean') updates.isCat = ps.isCat; if (typeof ps.injectFeaturedNote === 'boolean') profileUpdates.injectFeaturedNote = ps.injectFeaturedNote; if (typeof ps.receiveAnnouncementEmail === 'boolean') profileUpdates.receiveAnnouncementEmail = ps.receiveAnnouncementEmail; diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 12369c927..f780280c1 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -423,7 +423,7 @@ export class ClientServerService { : []; reply.header('Cache-Control', 'public, max-age=15'); - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } @@ -471,7 +471,7 @@ export class ClientServerService { const profile = await this.userProfilesRepository.findOneByOrFail({ userId: note.userId }); const meta = await this.metaService.fetch(); reply.header('Cache-Control', 'public, max-age=15'); - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } @@ -514,7 +514,7 @@ export class ClientServerService { } else { reply.header('Cache-Control', 'private, max-age=0, must-revalidate'); } - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } @@ -542,7 +542,7 @@ export class ClientServerService { const profile = await this.userProfilesRepository.findOneByOrFail({ userId: flash.userId }); const meta = await this.metaService.fetch(); reply.header('Cache-Control', 'public, max-age=15'); - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } @@ -570,7 +570,7 @@ export class ClientServerService { const profile = await this.userProfilesRepository.findOneByOrFail({ userId: clip.userId }); const meta = await this.metaService.fetch(); reply.header('Cache-Control', 'public, max-age=15'); - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } @@ -596,7 +596,7 @@ export class ClientServerService { const profile = await this.userProfilesRepository.findOneByOrFail({ userId: post.userId }); const meta = await this.metaService.fetch(); reply.header('Cache-Control', 'public, max-age=15'); - if (profile.preventAiLarning) { + if (profile.preventAiLearning) { reply.header('X-Robots-Tag', 'noimageai'); reply.header('X-Robots-Tag', 'noai'); } diff --git a/packages/backend/src/server/web/views/clip.pug b/packages/backend/src/server/web/views/clip.pug index 1491e0f74..74dc62f1e 100644 --- a/packages/backend/src/server/web/views/clip.pug +++ b/packages/backend/src/server/web/views/clip.pug @@ -21,7 +21,7 @@ block og block meta if profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/src/server/web/views/flash.pug b/packages/backend/src/server/web/views/flash.pug index 5005d2786..5594fcdfb 100644 --- a/packages/backend/src/server/web/views/flash.pug +++ b/packages/backend/src/server/web/views/flash.pug @@ -21,7 +21,7 @@ block og block meta if profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/src/server/web/views/gallery-post.pug b/packages/backend/src/server/web/views/gallery-post.pug index 2c1102ee7..10f2d269b 100644 --- a/packages/backend/src/server/web/views/gallery-post.pug +++ b/packages/backend/src/server/web/views/gallery-post.pug @@ -21,7 +21,7 @@ block og block meta if user.host || profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/src/server/web/views/note.pug b/packages/backend/src/server/web/views/note.pug index d768c4a46..badfcccd6 100644 --- a/packages/backend/src/server/web/views/note.pug +++ b/packages/backend/src/server/web/views/note.pug @@ -22,7 +22,7 @@ block og block meta if user.host || isRenote || profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/src/server/web/views/page.pug b/packages/backend/src/server/web/views/page.pug index 1dd95c52b..ddffc361c 100644 --- a/packages/backend/src/server/web/views/page.pug +++ b/packages/backend/src/server/web/views/page.pug @@ -21,7 +21,7 @@ block og block meta if profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/src/server/web/views/user.pug b/packages/backend/src/server/web/views/user.pug index a5427d2ce..f4c83aa89 100644 --- a/packages/backend/src/server/web/views/user.pug +++ b/packages/backend/src/server/web/views/user.pug @@ -20,7 +20,7 @@ block og block meta if user.host || profile.noCrawle meta(name='robots' content='noindex') - if profile.preventAiLarning + if profile.preventAiLearning meta(name='robots' content='noimageai') meta(name='robots' content='noai') diff --git a/packages/backend/test/e2e/users.ts b/packages/backend/test/e2e/users.ts index 640fa71a7..a7f8210c8 100644 --- a/packages/backend/test/e2e/users.ts +++ b/packages/backend/test/e2e/users.ts @@ -145,7 +145,7 @@ describe('ユーザー', () => { carefulBot: user.carefulBot, autoAcceptFollowed: user.autoAcceptFollowed, noCrawle: user.noCrawle, - preventAiLarning: user.preventAiLarning, + preventAiLearning: user.preventAiLearning, isExplorable: user.isExplorable, isDeleted: user.isDeleted, hideOnlineStatus: user.hideOnlineStatus, @@ -391,7 +391,7 @@ describe('ユーザー', () => { assert.strictEqual(response.carefulBot, false); assert.strictEqual(response.autoAcceptFollowed, true); assert.strictEqual(response.noCrawle, false); - assert.strictEqual(response.preventAiLarning, true); + assert.strictEqual(response.preventAiLearning, true); assert.strictEqual(response.isExplorable, true); assert.strictEqual(response.isDeleted, false); assert.strictEqual(response.hideOnlineStatus, false); @@ -464,8 +464,8 @@ describe('ユーザー', () => { { parameters: (): object => ({ autoAcceptFollowed: false }) }, { parameters: (): object => ({ noCrawle: true }) }, { parameters: (): object => ({ noCrawle: false }) }, - { parameters: (): object => ({ preventAiLarning: false }) }, - { parameters: (): object => ({ preventAiLarning: true }) }, + { parameters: (): object => ({ preventAiLearning: false }) }, + { parameters: (): object => ({ preventAiLearning: true }) }, { parameters: (): object => ({ isBot: true }) }, { parameters: (): object => ({ isBot: false }) }, { parameters: (): object => ({ isCat: true }) }, diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue index 4743b8c1a..a1af0ba80 100644 --- a/packages/frontend/src/pages/settings/privacy.vue +++ b/packages/frontend/src/pages/settings/privacy.vue @@ -24,7 +24,7 @@ {{ i18n.ts.noCrawle }} - + {{ i18n.ts.preventAiLearning }}{{ i18n.ts.beta }} @@ -75,7 +75,7 @@ import { definePageMetadata } from '@/scripts/page-metadata'; let isLocked = $ref($i.isLocked); let autoAcceptFollowed = $ref($i.autoAcceptFollowed); let noCrawle = $ref($i.noCrawle); -let preventAiLarning = $ref($i.preventAiLarning); +let preventAiLearning = $ref($i.preventAiLearning); let isExplorable = $ref($i.isExplorable); let hideOnlineStatus = $ref($i.hideOnlineStatus); let publicReactions = $ref($i.publicReactions); @@ -91,7 +91,7 @@ function save() { isLocked: !!isLocked, autoAcceptFollowed: !!autoAcceptFollowed, noCrawle: !!noCrawle, - preventAiLarning: !!preventAiLarning, + preventAiLearning: !!preventAiLearning, isExplorable: !!isExplorable, hideOnlineStatus: !!hideOnlineStatus, publicReactions: !!publicReactions, From 177359689e09732b6e839cd090872a17298310f3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 11 May 2023 16:26:35 +0900 Subject: [PATCH 03/27] =?UTF-8?q?fix(frontend):=20=E3=82=AB=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=90=E3=83=BC=E3=81=8C=E3=83=AA=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=81=AB=E3=81=AF=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/frontend/src/components/MkNoteSub.vue | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d680a6984..45fce4977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ ### Client - Fix: ブラーエフェクトを有効にしている状態で高負荷になる問題を修正 +- Fix: カラーバーがリプライには表示されないのを修正 ### Server - センシティブワードの登録にAnd、正規表現が使用できるようになりました。 diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue index c29364135..9ac0b7858 100644 --- a/packages/frontend/src/components/MkNoteSub.vue +++ b/packages/frontend/src/components/MkNoteSub.vue @@ -1,6 +1,7 @@ + -