mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 04:25:13 +00:00
parent
baa45859c1
commit
ae5a72a2df
16 changed files with 61 additions and 2 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -12,6 +12,17 @@
|
|||
|
||||
-->
|
||||
|
||||
## 13.x.x (unreleased)
|
||||
|
||||
### General
|
||||
- 投稿したコンテンツのAIによる学習を軽減するオプションを追加
|
||||
|
||||
### Client
|
||||
-
|
||||
|
||||
### Server
|
||||
-
|
||||
|
||||
## 13.12.1
|
||||
|
||||
### Client
|
||||
|
|
|
@ -1038,6 +1038,8 @@ thisChannelArchived: "このチャンネルはアーカイブされています
|
|||
displayOfNote: "ノートの表示"
|
||||
initialAccountSetting: "初期設定"
|
||||
youFollowing: "フォロー中"
|
||||
preventAiLarning: "AIによる学習を防止"
|
||||
preventAiLarningDescription: "投稿したノート、添付した画像などのコンテンツを学習の対象にしないようAIに要求します。これはnoaiフラグをHTMLレスポンスに含めることによって実現されます。"
|
||||
|
||||
_initialAccountSetting:
|
||||
accountCreated: "アカウントの作成が完了しました!"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
export class PreventAiLarning1683682889948 {
|
||||
name = 'PreventAiLarning1683682889948'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user_profile" ADD "preventAiLarning" boolean NOT NULL DEFAULT true`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "preventAiLarning"`);
|
||||
}
|
||||
}
|
|
@ -445,6 +445,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
carefulBot: profile!.carefulBot,
|
||||
autoAcceptFollowed: profile!.autoAcceptFollowed,
|
||||
noCrawle: profile!.noCrawle,
|
||||
preventAiLarning: profile!.preventAiLarning,
|
||||
isExplorable: user.isExplorable,
|
||||
isDeleted: user.isDeleted,
|
||||
hideOnlineStatus: user.hideOnlineStatus,
|
||||
|
|
|
@ -147,6 +147,11 @@ export class UserProfile {
|
|||
})
|
||||
public noCrawle: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
})
|
||||
public preventAiLarning: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
|
|
|
@ -302,7 +302,11 @@ export const packedMeDetailedOnlySchema = {
|
|||
},
|
||||
noCrawle: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
preventAiLarning: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
isExplorable: {
|
||||
type: 'boolean',
|
||||
|
|
|
@ -68,6 +68,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
emailVerified: profile.emailVerified,
|
||||
autoAcceptFollowed: profile.autoAcceptFollowed,
|
||||
noCrawle: profile.noCrawle,
|
||||
preventAiLarning: profile.preventAiLarning,
|
||||
alwaysMarkNsfw: profile.alwaysMarkNsfw,
|
||||
autoSensitive: profile.autoSensitive,
|
||||
carefulBot: profile.carefulBot,
|
||||
|
|
|
@ -98,7 +98,7 @@ export const meta = {
|
|||
message: 'This feature is restricted by your role.',
|
||||
code: 'RESTRICTED_BY_ROLE',
|
||||
id: '8feff0ba-5ab5-585b-31f4-4df816663fad',
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
|
@ -138,6 +138,7 @@ export const paramDef = {
|
|||
carefulBot: { type: 'boolean' },
|
||||
autoAcceptFollowed: { type: 'boolean' },
|
||||
noCrawle: { type: 'boolean' },
|
||||
preventAiLarning: { type: 'boolean' },
|
||||
isBot: { type: 'boolean' },
|
||||
isCat: { type: 'boolean' },
|
||||
showTimelineReplies: { type: 'boolean' },
|
||||
|
@ -242,6 +243,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
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.isCat === 'boolean') updates.isCat = ps.isCat;
|
||||
if (typeof ps.injectFeaturedNote === 'boolean') profileUpdates.injectFeaturedNote = ps.injectFeaturedNote;
|
||||
if (typeof ps.receiveAnnouncementEmail === 'boolean') profileUpdates.receiveAnnouncementEmail = ps.receiveAnnouncementEmail;
|
||||
|
|
|
@ -21,6 +21,8 @@ block og
|
|||
block meta
|
||||
if profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -21,6 +21,8 @@ block og
|
|||
block meta
|
||||
if profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -21,6 +21,8 @@ block og
|
|||
block meta
|
||||
if user.host || profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -22,6 +22,8 @@ block og
|
|||
block meta
|
||||
if user.host || isRenote || profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -21,6 +21,8 @@ block og
|
|||
block meta
|
||||
if profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -20,6 +20,8 @@ block og
|
|||
block meta
|
||||
if user.host || profile.noCrawle
|
||||
meta(name='robots' content='noindex')
|
||||
if profile.preventAiLarning
|
||||
meta(name='robots' content='noai')
|
||||
|
||||
meta(name='misskey:user-username' content=user.username)
|
||||
meta(name='misskey:user-id' content=user.id)
|
||||
|
|
|
@ -145,6 +145,7 @@ describe('ユーザー', () => {
|
|||
carefulBot: user.carefulBot,
|
||||
autoAcceptFollowed: user.autoAcceptFollowed,
|
||||
noCrawle: user.noCrawle,
|
||||
preventAiLarning: user.preventAiLarning,
|
||||
isExplorable: user.isExplorable,
|
||||
isDeleted: user.isDeleted,
|
||||
hideOnlineStatus: user.hideOnlineStatus,
|
||||
|
@ -390,6 +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.isExplorable, true);
|
||||
assert.strictEqual(response.isDeleted, false);
|
||||
assert.strictEqual(response.hideOnlineStatus, false);
|
||||
|
@ -462,6 +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 => ({ isBot: true }) },
|
||||
{ parameters: (): object => ({ isBot: false }) },
|
||||
{ parameters: (): object => ({ isCat: true }) },
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
{{ i18n.ts.noCrawle }}
|
||||
<template #caption>{{ i18n.ts.noCrawleDescription }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="preventAiLarning" @update:model-value="save()">
|
||||
{{ i18n.ts.preventAiLarning }}<span class="_beta">{{ i18n.ts.beta }}</span>
|
||||
<template #caption>{{ i18n.ts.preventAiLarningDescription }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="isExplorable" @update:model-value="save()">
|
||||
{{ i18n.ts.makeExplorable }}
|
||||
<template #caption>{{ i18n.ts.makeExplorableDescription }}</template>
|
||||
|
@ -71,6 +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 isExplorable = $ref($i.isExplorable);
|
||||
let hideOnlineStatus = $ref($i.hideOnlineStatus);
|
||||
let publicReactions = $ref($i.publicReactions);
|
||||
|
@ -86,6 +91,7 @@ function save() {
|
|||
isLocked: !!isLocked,
|
||||
autoAcceptFollowed: !!autoAcceptFollowed,
|
||||
noCrawle: !!noCrawle,
|
||||
preventAiLarning: !!preventAiLarning,
|
||||
isExplorable: !!isExplorable,
|
||||
hideOnlineStatus: !!hideOnlineStatus,
|
||||
publicReactions: !!publicReactions,
|
||||
|
|
Loading…
Reference in a new issue