Skip to content

Commit

Permalink
Merge branch 'misskey-dev:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk authored Nov 16, 2024
2 parents db45ee4 + 9614f74 commit b9ce58f
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 142 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ misskey-assets
# Vite temporary files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
vite.config.local-dev.js.timestamp-*
vite.config.local-dev.ts.timestamp-*

# blender backups
*.blend1
Expand Down
16 changes: 12 additions & 4 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1554,10 +1554,6 @@ export interface Locale extends ILocale {
* 登録
*/
"registration": string;
/**
* 誰でも新規登録できるようにする
*/
"enableRegistration": string;
/**
* 招待
*/
Expand Down Expand Up @@ -5226,6 +5222,10 @@ export interface Locale extends ILocale {
* 利用可能なロール
*/
"availableRoles": string;
/**
* 注意事項を理解した上でオンにします。
*/
"acknowledgeNotesAndEnable": string;
"_accountSettings": {
/**
* コンテンツの表示にログインを必須にする
Expand Down Expand Up @@ -5802,6 +5802,14 @@ export interface Locale extends ILocale {
* サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。
*/
"inquiryUrlDescription": string;
/**
* アカウントの作成をオープンにする
*/
"openRegistration": string;
/**
* 登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。
*/
"openRegistrationWarning": string;
/**
* 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。
*/
Expand Down
4 changes: 3 additions & 1 deletion locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ enableLocalTimeline: "ローカルタイムラインを有効にする"
enableGlobalTimeline: "グローバルタイムラインを有効にする"
disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。"
registration: "登録"
enableRegistration: "誰でも新規登録できるようにする"
invite: "招待"
driveCapacityPerLocalAccount: "ローカルユーザーひとりあたりのドライブ容量"
driveCapacityPerRemoteAccount: "リモートユーザーひとりあたりのドライブ容量"
Expand Down Expand Up @@ -1302,6 +1301,7 @@ thisContentsAreMarkedAsSigninRequiredByAuthor: "投稿者により、表示に
lockdown: "ロックダウン"
pleaseSelectAccount: "アカウントを選択してください"
availableRoles: "利用可能なロール"
acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします。"

_accountSettings:
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
Expand Down Expand Up @@ -1468,6 +1468,8 @@ _serverSettings:
reactionsBufferingDescription: "有効にすると、リアクション作成時のパフォーマンスが大幅に向上し、データベースへの負荷を軽減することが可能です。ただし、Redisのメモリ使用量は増加します。"
inquiryUrl: "問い合わせ先URL"
inquiryUrlDescription: "サーバー運営者へのお問い合わせフォームのURLや、運営者の連絡先等が記載されたWebページのURLを指定します。"
openRegistration: "アカウントの作成をオープンにする"
openRegistrationWarning: "登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。"
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。"

_accountMigration:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"dependencies": {
"cssnano": "6.1.2",
"execa": "9.5.1",
"execa": "8.0.1",
"fast-glob": "3.3.2",
"ignore-walk": "6.0.5",
"js-yaml": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"aws-sdk-client-mock": "4.0.1",
"cross-env": "7.0.3",
"eslint-plugin-import": "2.30.0",
"execa": "9.5.1",
"execa": "8.0.1",
"fkill": "9.0.0",
"jest": "29.7.0",
"jest-mock": "29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class ApPersonService implements OnModuleInit {
usernameLower: person.preferredUsername?.toLowerCase(),
host,
inbox: person.inbox,
sharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox,
sharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox ?? null,
followersUri: person.followers ? getApId(person.followers) : undefined,
featured: person.featured ? getApId(person.featured) : undefined,
uri: person.id,
Expand Down Expand Up @@ -521,7 +521,7 @@ export class ApPersonService implements OnModuleInit {
const updates = {
lastFetchedAt: new Date(),
inbox: person.inbox,
sharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox,
sharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox ?? null,
followersUri: person.followers ? getApId(person.followers) : undefined,
featured: person.featured,
emojis: emojiNames,
Expand Down Expand Up @@ -593,7 +593,7 @@ export class ApPersonService implements OnModuleInit {
// 該当ユーザーが既にフォロワーになっていた場合はFollowingもアップデートする
await this.followingsRepository.update(
{ followerId: exist.id },
{ followerSharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox },
{ followerSharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox ?? null },
);

await this.updateFeatured(exist.id, resolver).catch(err => this.logger.error(err));
Expand Down
21 changes: 17 additions & 4 deletions packages/frontend/src/pages/admin/moderation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
<FormSuspense :p="init">
<div class="_gaps_m">
<MkSwitch v-model="enableRegistration" @change="onChange_enableRegistration">
<template #label>{{ i18n.ts.enableRegistration }}</template>
<template #caption>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</template>
<MkSwitch :modelValue="enableRegistration" @update:modelValue="onChange_enableRegistration">
<template #label>{{ i18n.ts._serverSettings.openRegistration }}</template>
<template #caption>
<div>{{ i18n.ts._serverSettings.thisSettingWillAutomaticallyOffWhenModeratorsInactive }}</div>
<div><i class="ti ti-alert-triangle" style="color: var(--MI_THEME-warn);"></i> {{ i18n.ts._serverSettings.openRegistrationWarning }}</div>
</template>
</MkSwitch>

<MkSwitch v-model="emailRequiredForSignup" @change="onChange_emailRequiredForSignup">
Expand Down Expand Up @@ -164,7 +167,17 @@ async function init() {
mediaSilencedHosts.value = meta.mediaSilencedHosts.join('\n');
}

function onChange_enableRegistration(value: boolean) {
async function onChange_enableRegistration(value: boolean) {
if (value) {
const { canceled } = await os.confirm({
type: 'warning',
text: i18n.ts.acknowledgeNotesAndEnable,
});
if (canceled) return;
}

enableRegistration.value = value;

os.apiWithDialog('admin/update-meta', {
disableRegistration: !value,
}).then(() => {
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/follow-requests.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</template>
<template #default="{items}">
<div class="mk-follow-requests">
<div class="mk-follow-requests _gaps">
<div v-for="req in items" :key="req.id" class="user _panel">
<MkAvatar class="avatar" :user="displayUser(req)" indicator link preview/>
<div class="body">
Expand Down Expand Up @@ -94,11 +94,11 @@ const headerTabs = computed(() => [
{
key: 'list',
title: i18n.ts._followRequest.recieved,
icon: 'ti ti-mail',
icon: 'ti ti-download',
}, {
key: 'sent',
title: i18n.ts._followRequest.sent,
icon: 'ti ti-send',
icon: 'ti ti-upload',
},
]);

Expand Down
16 changes: 15 additions & 1 deletion packages/frontend/src/pages/settings/privacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.lockdown }}<span class="_beta">{{ i18n.ts.beta }}</span></template>

<div class="_gaps_m">
<MkSwitch v-model="requireSigninToViewContents" @update:modelValue="save()">
<MkSwitch :modelValue="requireSigninToViewContents" @update:modelValue="update_requireSigninToViewContents">
{{ i18n.ts._accountSettings.requireSigninToViewContents }}
<template #caption>
<div>{{ i18n.ts._accountSettings.requireSigninToViewContentsDescription1 }}</div>
Expand Down Expand Up @@ -172,6 +172,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import FormSlot from '@/components/form/slot.vue';
import { formatDateTimeString } from '@/scripts/format-time-string.js';
import MkInput from '@/components/MkInput.vue';
import * as os from '@/os.js';

const $i = signinRequired();

Expand Down Expand Up @@ -217,6 +218,19 @@ watch([makeNotesFollowersOnlyBefore, makeNotesHiddenBefore], () => {
save();
});

async function update_requireSigninToViewContents(value: boolean) {
if (value) {
const { canceled } = await os.confirm({
type: 'warning',
text: i18n.ts.acknowledgeNotesAndEnable,
});
if (canceled) return;
}

requireSigninToViewContents.value = value;
save();
}

function save() {
misskeyApi('i/update', {
isLocked: !!isLocked.value,
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-bubble-game/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"nodemon": "3.1.7",
"execa": "9.5.1",
"execa": "8.0.1",
"typescript": "5.6.3",
"esbuild": "0.24.0",
"glob": "11.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"mock-socket": "9.3.1",
"ncp": "2.0.0",
"nodemon": "3.1.7",
"execa": "9.5.1",
"execa": "8.0.1",
"tsd": "0.31.2",
"typescript": "5.6.3",
"esbuild": "0.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/misskey-reversi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/node": "22.9.0",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"execa": "9.5.1",
"execa": "8.0.1",
"nodemon": "3.1.7",
"typescript": "5.6.3",
"esbuild": "0.24.0",
Expand Down
Loading

0 comments on commit b9ce58f

Please sign in to comment.