wip
This commit is contained in:
parent
f3d26722bb
commit
9dc4762fe0
|
|
@ -1778,6 +1778,12 @@ _serverSettings:
|
||||||
entrancePageStyle: "エントランスページのスタイル"
|
entrancePageStyle: "エントランスページのスタイル"
|
||||||
showTimelineForVisitor: "タイムラインを表示する"
|
showTimelineForVisitor: "タイムラインを表示する"
|
||||||
showActivitiesForVisitor: "アクティビティを表示する"
|
showActivitiesForVisitor: "アクティビティを表示する"
|
||||||
|
features: "機能"
|
||||||
|
|
||||||
|
_spReactions:
|
||||||
|
enable: "スペシャルリアクションを有効にする"
|
||||||
|
description1: "通常のリアクションより目立つ「スペシャルリアクション」をノートに送れる機能です。"
|
||||||
|
description2: "有効にする場合、ロールポリシーで、毎月送ることのできる最大数を設定してください。"
|
||||||
|
|
||||||
_userGeneratedContentsVisibilityForVisitor:
|
_userGeneratedContentsVisibilityForVisitor:
|
||||||
all: "全て公開"
|
all: "全て公開"
|
||||||
|
|
|
||||||
|
|
@ -722,6 +722,11 @@ export class MiMeta {
|
||||||
})
|
})
|
||||||
public showRoleBadgesOfRemoteUsers: boolean;
|
public showRoleBadgesOfRemoteUsers: boolean;
|
||||||
|
|
||||||
|
@Column('boolean', {
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
public enableSpReaction: boolean;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column('jsonb', {
|
||||||
default: { },
|
default: { },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -596,6 +596,10 @@ export const meta = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
},
|
},
|
||||||
|
enableSpReaction: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
@ -752,6 +756,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
remoteNotesCleaningExpiryDaysForEachNotes: instance.remoteNotesCleaningExpiryDaysForEachNotes,
|
remoteNotesCleaningExpiryDaysForEachNotes: instance.remoteNotesCleaningExpiryDaysForEachNotes,
|
||||||
remoteNotesCleaningMaxProcessingDurationInMinutes: instance.remoteNotesCleaningMaxProcessingDurationInMinutes,
|
remoteNotesCleaningMaxProcessingDurationInMinutes: instance.remoteNotesCleaningMaxProcessingDurationInMinutes,
|
||||||
showRoleBadgesOfRemoteUsers: instance.showRoleBadgesOfRemoteUsers,
|
showRoleBadgesOfRemoteUsers: instance.showRoleBadgesOfRemoteUsers,
|
||||||
|
enableSpReaction: instance.enableSpReaction,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,7 @@ export const paramDef = {
|
||||||
remoteNotesCleaningExpiryDaysForEachNotes: { type: 'number' },
|
remoteNotesCleaningExpiryDaysForEachNotes: { type: 'number' },
|
||||||
remoteNotesCleaningMaxProcessingDurationInMinutes: { type: 'number' },
|
remoteNotesCleaningMaxProcessingDurationInMinutes: { type: 'number' },
|
||||||
showRoleBadgesOfRemoteUsers: { type: 'boolean' },
|
showRoleBadgesOfRemoteUsers: { type: 'boolean' },
|
||||||
|
enableSpReaction: { type: 'boolean' },
|
||||||
},
|
},
|
||||||
required: [],
|
required: [],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
@ -762,6 +763,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
set.showRoleBadgesOfRemoteUsers = ps.showRoleBadgesOfRemoteUsers;
|
set.showRoleBadgesOfRemoteUsers = ps.showRoleBadgesOfRemoteUsers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ps.enableSpReaction !== undefined) {
|
||||||
|
set.enableSpReaction = ps.enableSpReaction;
|
||||||
|
}
|
||||||
|
|
||||||
const before = await this.metaService.fetch(true);
|
const before = await this.metaService.fetch(true);
|
||||||
|
|
||||||
await this.metaService.update(set);
|
await this.metaService.update(set);
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,28 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
</SearchMarker>
|
</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']">
|
<SearchMarker v-slot="slotProps" :keywords="['pinned', 'users']">
|
||||||
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
<MkFolder :defaultOpen="slotProps.isParentOfTarget">
|
||||||
<template #icon><SearchIcon><i class="ti ti-user-star"></i></SearchIcon></template>
|
<template #icon><SearchIcon><i class="ti ti-user-star"></i></SearchIcon></template>
|
||||||
|
|
@ -426,6 +448,15 @@ const infoForm = useForm({
|
||||||
fetchInstance(true);
|
fetchInstance(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const featuresForm = useForm({
|
||||||
|
enableSpReaction: meta.enableSpReaction,
|
||||||
|
}, async (state) => {
|
||||||
|
await os.apiWithDialog('admin/update-meta', {
|
||||||
|
enableSpReaction: state.enableSpReaction,
|
||||||
|
});
|
||||||
|
fetchInstance(true);
|
||||||
|
});
|
||||||
|
|
||||||
const pinnedUsersForm = useForm({
|
const pinnedUsersForm = useForm({
|
||||||
pinnedUsers: meta.pinnedUsers.join('\n'),
|
pinnedUsers: meta.pinnedUsers.join('\n'),
|
||||||
}, async (state) => {
|
}, async (state) => {
|
||||||
|
|
|
||||||
|
|
@ -6972,6 +6972,24 @@ export interface Locale extends ILocale {
|
||||||
* アクティビティを表示する
|
* アクティビティを表示する
|
||||||
*/
|
*/
|
||||||
"showActivitiesForVisitor": string;
|
"showActivitiesForVisitor": string;
|
||||||
|
/**
|
||||||
|
* 機能
|
||||||
|
*/
|
||||||
|
"features": string;
|
||||||
|
"_spReactions": {
|
||||||
|
/**
|
||||||
|
* スペシャルリアクションを有効にする
|
||||||
|
*/
|
||||||
|
"enable": string;
|
||||||
|
/**
|
||||||
|
* 通常のリアクションより目立つ「スペシャルリアクション」をノートに送れる機能です。
|
||||||
|
*/
|
||||||
|
"description1": string;
|
||||||
|
/**
|
||||||
|
* 有効にする場合、ロールポリシーで、毎月送ることのできる最大数を設定してください。
|
||||||
|
*/
|
||||||
|
"description2": string;
|
||||||
|
};
|
||||||
"_userGeneratedContentsVisibilityForVisitor": {
|
"_userGeneratedContentsVisibilityForVisitor": {
|
||||||
/**
|
/**
|
||||||
* 全て公開
|
* 全て公開
|
||||||
|
|
|
||||||
|
|
@ -3466,7 +3466,7 @@ type RoleLite = components['schemas']['RoleLite'];
|
||||||
type RolePolicies = components['schemas']['RolePolicies'];
|
type RolePolicies = components['schemas']['RolePolicies'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @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)
|
// @public (undocumented)
|
||||||
type RolesListResponse = operations['roles___list']['responses']['200']['content']['application/json'];
|
type RolesListResponse = operations['roles___list']['responses']['200']['content']['application/json'];
|
||||||
|
|
|
||||||
|
|
@ -9520,6 +9520,7 @@ export interface operations {
|
||||||
remoteNotesCleaningExpiryDaysForEachNotes: number;
|
remoteNotesCleaningExpiryDaysForEachNotes: number;
|
||||||
remoteNotesCleaningMaxProcessingDurationInMinutes: number;
|
remoteNotesCleaningMaxProcessingDurationInMinutes: number;
|
||||||
showRoleBadgesOfRemoteUsers: boolean;
|
showRoleBadgesOfRemoteUsers: boolean;
|
||||||
|
enableSpReaction: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -12846,6 +12847,7 @@ export interface operations {
|
||||||
remoteNotesCleaningExpiryDaysForEachNotes?: number;
|
remoteNotesCleaningExpiryDaysForEachNotes?: number;
|
||||||
remoteNotesCleaningMaxProcessingDurationInMinutes?: number;
|
remoteNotesCleaningMaxProcessingDurationInMinutes?: number;
|
||||||
showRoleBadgesOfRemoteUsers?: boolean;
|
showRoleBadgesOfRemoteUsers?: boolean;
|
||||||
|
enableSpReaction?: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue