wip
This commit is contained in:
parent
f3d26722bb
commit
9dc4762fe0
|
|
@ -1778,6 +1778,12 @@ _serverSettings:
|
|||
entrancePageStyle: "エントランスページのスタイル"
|
||||
showTimelineForVisitor: "タイムラインを表示する"
|
||||
showActivitiesForVisitor: "アクティビティを表示する"
|
||||
features: "機能"
|
||||
|
||||
_spReactions:
|
||||
enable: "スペシャルリアクションを有効にする"
|
||||
description1: "通常のリアクションより目立つ「スペシャルリアクション」をノートに送れる機能です。"
|
||||
description2: "有効にする場合、ロールポリシーで、毎月送ることのできる最大数を設定してください。"
|
||||
|
||||
_userGeneratedContentsVisibilityForVisitor:
|
||||
all: "全て公開"
|
||||
|
|
|
|||
|
|
@ -722,6 +722,11 @@ export class MiMeta {
|
|||
})
|
||||
public showRoleBadgesOfRemoteUsers: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
public enableSpReaction: boolean;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: { },
|
||||
})
|
||||
|
|
|
|||
|
|
@ -596,6 +596,10 @@ export const meta = {
|
|||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
enableSpReaction: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
|
@ -752,6 +756,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
remoteNotesCleaningExpiryDaysForEachNotes: instance.remoteNotesCleaningExpiryDaysForEachNotes,
|
||||
remoteNotesCleaningMaxProcessingDurationInMinutes: instance.remoteNotesCleaningMaxProcessingDurationInMinutes,
|
||||
showRoleBadgesOfRemoteUsers: instance.showRoleBadgesOfRemoteUsers,
|
||||
enableSpReaction: instance.enableSpReaction,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ export const paramDef = {
|
|||
remoteNotesCleaningExpiryDaysForEachNotes: { type: 'number' },
|
||||
remoteNotesCleaningMaxProcessingDurationInMinutes: { type: 'number' },
|
||||
showRoleBadgesOfRemoteUsers: { type: 'boolean' },
|
||||
enableSpReaction: { type: 'boolean' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
|
@ -762,6 +763,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.showRoleBadgesOfRemoteUsers = ps.showRoleBadgesOfRemoteUsers;
|
||||
}
|
||||
|
||||
if (ps.enableSpReaction !== undefined) {
|
||||
set.enableSpReaction = ps.enableSpReaction;
|
||||
}
|
||||
|
||||
const before = await this.metaService.fetch(true);
|
||||
|
||||
await this.metaService.update(set);
|
||||
|
|
|
|||
|
|
@ -96,6 +96,28 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker v-slot="slotProps" :keywords="['features']">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><SearchIcon><i class="ti ti-puzzle"></i></SearchIcon></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts._serverSettings.features }}</SearchLabel></template>
|
||||
<template v-if="featuresForm.modified.value" #footer>
|
||||
<MkFormFooter :form="featuresForm"/>
|
||||
</template>
|
||||
|
||||
<div class="_gaps">
|
||||
<SearchMarker>
|
||||
<MkSwitch v-model="featuresForm.state.enableSpReaction">
|
||||
<template #label><SearchLabel>{{ i18n.ts._serverSettings._spReactions.enable }}</SearchLabel><span v-if="featuresForm.modifiedStates.enableSpReaction" class="_modified">{{ i18n.ts.modified }}</span></template>
|
||||
<template #caption>
|
||||
<SearchText>{{ i18n.ts._serverSettings._spReactions.description1 }}</SearchText>
|
||||
<div>{{ i18n.ts._serverSettings._spReactions.description2 }}</div>
|
||||
</template>
|
||||
</MkSwitch>
|
||||
</SearchMarker>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker v-slot="slotProps" :keywords="['pinned', 'users']">
|
||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||
<template #icon><SearchIcon><i class="ti ti-user-star"></i></SearchIcon></template>
|
||||
|
|
@ -426,6 +448,15 @@ const infoForm = useForm({
|
|||
fetchInstance(true);
|
||||
});
|
||||
|
||||
const featuresForm = useForm({
|
||||
enableSpReaction: meta.enableSpReaction,
|
||||
}, async (state) => {
|
||||
await os.apiWithDialog('admin/update-meta', {
|
||||
enableSpReaction: state.enableSpReaction,
|
||||
});
|
||||
fetchInstance(true);
|
||||
});
|
||||
|
||||
const pinnedUsersForm = useForm({
|
||||
pinnedUsers: meta.pinnedUsers.join('\n'),
|
||||
}, async (state) => {
|
||||
|
|
|
|||
|
|
@ -6972,6 +6972,24 @@ export interface Locale extends ILocale {
|
|||
* アクティビティを表示する
|
||||
*/
|
||||
"showActivitiesForVisitor": string;
|
||||
/**
|
||||
* 機能
|
||||
*/
|
||||
"features": string;
|
||||
"_spReactions": {
|
||||
/**
|
||||
* スペシャルリアクションを有効にする
|
||||
*/
|
||||
"enable": string;
|
||||
/**
|
||||
* 通常のリアクションより目立つ「スペシャルリアクション」をノートに送れる機能です。
|
||||
*/
|
||||
"description1": string;
|
||||
/**
|
||||
* 有効にする場合、ロールポリシーで、毎月送ることのできる最大数を設定してください。
|
||||
*/
|
||||
"description2": string;
|
||||
};
|
||||
"_userGeneratedContentsVisibilityForVisitor": {
|
||||
/**
|
||||
* 全て公開
|
||||
|
|
|
|||
|
|
@ -3466,7 +3466,7 @@ type RoleLite = components['schemas']['RoleLite'];
|
|||
type RolePolicies = components['schemas']['RolePolicies'];
|
||||
|
||||
// @public (undocumented)
|
||||
export const rolePolicies: readonly ["gtlAvailable", "ltlAvailable", "canPublicNote", "mentionLimit", "canInvite", "inviteLimit", "inviteLimitCycle", "inviteExpirationTime", "canManageCustomEmojis", "canManageAvatarDecorations", "canSearchNotes", "canSearchUsers", "canUseTranslator", "canHideAds", "driveCapacityMb", "maxFileSizeMb", "alwaysMarkNsfw", "canUpdateBioMedia", "pinLimit", "antennaLimit", "wordMuteLimit", "webhookLimit", "clipLimit", "noteEachClipsLimit", "userListLimit", "userEachUserListsLimit", "rateLimitFactor", "avatarDecorationLimit", "canImportAntennas", "canImportBlocking", "canImportFollowing", "canImportMuting", "canImportUserLists", "chatAvailability", "uploadableFileTypes", "noteDraftLimit", "scheduledNoteLimit", "watermarkAvailable"];
|
||||
export const rolePolicies: readonly ["gtlAvailable", "ltlAvailable", "canPublicNote", "mentionLimit", "canInvite", "inviteLimit", "inviteLimitCycle", "inviteExpirationTime", "canManageCustomEmojis", "canManageAvatarDecorations", "canSearchNotes", "canSearchUsers", "canUseTranslator", "canHideAds", "driveCapacityMb", "maxFileSizeMb", "alwaysMarkNsfw", "canUpdateBioMedia", "pinLimit", "antennaLimit", "wordMuteLimit", "webhookLimit", "clipLimit", "noteEachClipsLimit", "userListLimit", "userEachUserListsLimit", "rateLimitFactor", "avatarDecorationLimit", "canImportAntennas", "canImportBlocking", "canImportFollowing", "canImportMuting", "canImportUserLists", "chatAvailability", "uploadableFileTypes", "noteDraftLimit", "scheduledNoteLimit", "watermarkAvailable", "spReactionsMonthlyLimit"];
|
||||
|
||||
// @public (undocumented)
|
||||
type RolesListResponse = operations['roles___list']['responses']['200']['content']['application/json'];
|
||||
|
|
|
|||
|
|
@ -9520,6 +9520,7 @@ export interface operations {
|
|||
remoteNotesCleaningExpiryDaysForEachNotes: number;
|
||||
remoteNotesCleaningMaxProcessingDurationInMinutes: number;
|
||||
showRoleBadgesOfRemoteUsers: boolean;
|
||||
enableSpReaction: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -12846,6 +12847,7 @@ export interface operations {
|
|||
remoteNotesCleaningExpiryDaysForEachNotes?: number;
|
||||
remoteNotesCleaningMaxProcessingDurationInMinutes?: number;
|
||||
showRoleBadgesOfRemoteUsers?: boolean;
|
||||
enableSpReaction?: boolean;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue