Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vmimi relay timeline improvements v3 #177

Merged
merged 8 commits into from
Apr 18, 2024
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@

-->

## 2024.3.1-kinel.4

### General

### Client
- Feat: ぶいみみリレータイムラインの説明をtlの先頭に追加しました
- Chore: `ぶいみみリレーソーシャルタイムライン`を`ぶいみみソーシャルタイムライン`に名称を変更しました

### Server

## 2024.3.1-kinel.3

### General
Expand Down
14 changes: 13 additions & 1 deletion locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5335,6 +5335,14 @@ export interface Locale extends ILocale {
* グローバルタイムラインでは、接続している他のすべてのサーバーからの投稿を見られます。
*/
"global": string;
/**
* ぶいみみリレータイムラインでは、バーチャルケモミミリレーサーバーに参加しているサーバーのユーザー全員の投稿を見られます。
*/
"vmimi-relay": string;
/**
* ぶいみみソーシャルタイムラインには、ホームタイムラインとぶいみみリレータイムラインの投稿が両方表示されます。
*/
"vmimi-relay-social": string;
};
"_serverRules": {
/**
Expand Down Expand Up @@ -6458,6 +6466,10 @@ export interface Locale extends ILocale {
* ローカルタイムラインの閲覧
*/
"ltlAvailable": string;
/**
* ぶいみみリレータイムラインの閲覧
*/
"vrtlAvailable": string;
/**
* パブリック投稿の許可
*/
Expand Down Expand Up @@ -8602,7 +8614,7 @@ export interface Locale extends ILocale {
*/
"vmimiRelay": string;
/**
* ぶいみみリレーソーシャル
* ぶいみみソーシャル
*/
"vmimiRelaySocial": string;
};
Expand Down
5 changes: 4 additions & 1 deletion locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,8 @@ _timelineDescription:
local: "ローカルタイムラインでは、このサーバーにいるユーザー全員の投稿を見られます。"
social: "ソーシャルタイムラインには、ホームタイムラインとローカルタイムラインの投稿が両方表示されます。"
global: "グローバルタイムラインでは、接続している他のすべてのサーバーからの投稿を見られます。"
vmimi-relay: "ぶいみみリレータイムラインでは、バーチャルケモミミリレーサーバーに参加しているサーバーのユーザー全員の投稿を見られます。"
vmimi-relay-social: "ぶいみみソーシャルタイムラインには、ホームタイムラインとぶいみみリレータイムラインの投稿が両方表示されます。"

_serverRules:
description: "新規登録前に表示する、サーバーの簡潔なルールを設定します。内容は利用規約の要約とすることを推奨します。"
Expand Down Expand Up @@ -1669,6 +1671,7 @@ _role:
_options:
gtlAvailable: "グローバルタイムラインの閲覧"
ltlAvailable: "ローカルタイムラインの閲覧"
vrtlAvailable: "ぶいみみリレータイムラインの閲覧"
canPublicNote: "パブリック投稿の許可"
mentionMax: "ノート内の最大メンション数"
canInvite: "サーバー招待コードの発行"
Expand Down Expand Up @@ -2270,7 +2273,7 @@ _timelines:
social: "ソーシャル"
global: "グローバル"
vmimiRelay: "ぶいみみリレー"
vmimiRelaySocial: "ぶいみみリレーソーシャル"
vmimiRelaySocial: "ぶいみみソーシャル"

_play:
new: "Playの作成"
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
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer :contentMax="800">
<MkHorizontalSwipe v-model:tab="src" :tabs="$i ? headerTabs : headerTabsWhenNotLogin">
<div :key="src" ref="rootEl" v-hotkey.global="keymap">
<MkInfo v-if="['home', 'local', 'social', 'global'].includes(src) && !defaultStore.reactiveState.timelineTutorials.value[src]" style="margin-bottom: var(--margin);" closable @close="closeTutorial()">
<MkInfo v-if="['home', 'local', 'social', 'global', 'vmimi-relay', 'vmimi-relay-social'].includes(src) && !defaultStore.reactiveState.timelineTutorials.value[src]" style="margin-bottom: var(--margin);" closable @close="closeTutorial()">
{{ i18n.ts._timelineDescription[src] }}
</MkInfo>
<MkPostForm v-if="defaultStore.reactiveState.showFixedPostForm.value" :class="$style.postForm" class="post-form _panel" fixed style="margin-bottom: var(--margin);"/>
Expand Down Expand Up @@ -235,7 +235,7 @@ function focus(): void {
}

function closeTutorial(): void {
if (!['home', 'local', 'social', 'global'].includes(src.value)) return;
if (!['home', 'local', 'social', 'global', 'vmimi-relay', 'vmimi-relay-social'].includes(src.value)) return;
const before = defaultStore.state.timelineTutorials;
before[src.value] = true;
defaultStore.set('timelineTutorials', before);
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export const defaultStore = markRaw(new Storage('base', {
local: false,
social: false,
global: false,
'vmimi-relay': false,
'vmimi-relay-social': false,
},
},
keepCw: {
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
Loading