Skip to content

Commit

Permalink
Merge branch 'refs/heads/vmimi-relay-timeline' into vmimi-relay-timel…
Browse files Browse the repository at this point in the history
…ine-nirila
  • Loading branch information
anatawa12 committed Apr 17, 2024
2 parents c6db4ce + 3c1d39f commit 9f99e4b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6466,6 +6466,10 @@ export interface Locale extends ILocale {
* ローカルタイムラインの閲覧
*/
"ltlAvailable": string;
/**
* ぶいみみリレータイムラインの閲覧
*/
"vrtlAvailable": string;
/**
* パブリック投稿の許可
*/
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,7 @@ _role:
_options:
gtlAvailable: "グローバルタイムラインの閲覧"
ltlAvailable: "ローカルタイムラインの閲覧"
vrtlAvailable: "ぶいみみリレータイムラインの閲覧"
canPublicNote: "パブリック投稿の許可"
mentionMax: "ノート内の最大メンション数"
canInvite: "サーバー招待コードの発行"
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/core/entities/MetaEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export class MetaEntityService {
features: {
localTimeline: instance.policies.ltlAvailable,
globalTimeline: instance.policies.gtlAvailable,
vrtlAvailable: instance.policies.vrtlAvailable,
registration: !instance.disableRegistration,
emailRequiredForSignup: instance.emailRequiredForSignup,
hcaptcha: instance.enableHcaptcha,
Expand Down
4 changes: 4 additions & 0 deletions packages/backend/src/models/json-schema/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ export const packedMetaDetailedOnlySchema = {
type: 'boolean',
optional: false, nullable: false,
},
vrtlAvailable: {
type: 'boolean',
optional: false, nullable: false,
},
hcaptcha: {
type: 'boolean',
optional: false, nullable: false,
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const obsoleteNotificationTypes = ['pollVote', 'groupInvited'] as const;
export const ROLE_POLICIES = [
'gtlAvailable',
'ltlAvailable',
'vrtlAvailable',
'canPublicNote',
'mentionLimit',
'canInvite',
Expand Down
20 changes: 20 additions & 0 deletions packages/frontend/src/pages/admin/roles.editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,26 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</MkFolder>

<MkFolder v-if="matchQuery([i18n.ts._role._options.vrtlAvailable, 'vrtlAvailable'])">
<template #label>{{ i18n.ts._role._options.vrtlAvailable }}</template>
<template #suffix>
<span v-if="role.policies.vrtlAvailable.useDefault" :class="$style.useDefaultLabel">{{ i18n.ts._role.useBaseValue }}</span>
<span v-else>{{ role.policies.vrtlAvailable.value ? i18n.ts.yes : i18n.ts.no }}</span>
<span :class="$style.priorityIndicator"><i :class="getPriorityIcon(role.policies.vrtlAvailable)"></i></span>
</template>
<div class="_gaps">
<MkSwitch v-model="role.policies.vrtlAvailable.useDefault" :readonly="readonly">
<template #label>{{ i18n.ts._role.useBaseValue }}</template>
</MkSwitch>
<MkSwitch v-model="role.policies.vrtlAvailable.value" :disabled="role.policies.vrtlAvailable.useDefault" :readonly="readonly">
<template #label>{{ i18n.ts.enable }}</template>
</MkSwitch>
<MkRange v-model="role.policies.vrtlAvailable.priority" :min="0" :max="2" :step="1" easing :textConverter="(v) => v === 0 ? i18n.ts._role._priority.low : v === 1 ? i18n.ts._role._priority.middle : v === 2 ? i18n.ts._role._priority.high : ''">
<template #label>{{ i18n.ts._role.priority }}</template>
</MkRange>
</div>
</MkFolder>

<MkFolder v-if="matchQuery([i18n.ts._role._options.canPublicNote, 'canPublicNote'])">
<template #label>{{ i18n.ts._role._options.canPublicNote }}</template>
<template #suffix>
Expand Down
8 changes: 8 additions & 0 deletions packages/frontend/src/pages/admin/roles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch>
</MkFolder>

<MkFolder v-if="matchQuery([i18n.ts._role._options.vrtlAvailable, 'vrtlAvailable'])">
<template #label>{{ i18n.ts._role._options.vrtlAvailable }}</template>
<template #suffix>{{ policies.vrtlAvailable ? i18n.ts.yes : i18n.ts.no }}</template>
<MkSwitch v-model="policies.vrtlAvailable">
<template #label>{{ i18n.ts.enable }}</template>
</MkSwitch>
</MkFolder>

<MkFolder v-if="matchQuery([i18n.ts._role._options.canPublicNote, 'canPublicNote'])">
<template #label>{{ i18n.ts._role._options.canPublicNote }}</template>
<template #suffix>{{ policies.canPublicNote ? i18n.ts.yes : i18n.ts.no }}</template>
Expand Down
1 change: 1 addition & 0 deletions packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4858,6 +4858,7 @@ export type components = {
emailRequiredForSignup: boolean;
localTimeline: boolean;
globalTimeline: boolean;
vrtlAvailable: boolean;
hcaptcha: boolean;
turnstile: boolean;
recaptcha: boolean;
Expand Down

0 comments on commit 9f99e4b

Please sign in to comment.