feat: can turn off timeline any time
This commit is contained in:
parent
449cbebe16
commit
180b4762ac
|
@ -1215,6 +1215,8 @@ doYouAgree: "Agree?"
|
|||
beSureToReadThisAsItIsImportant: "Please read this important information."
|
||||
iHaveReadXCarefullyAndAgree: "I have read the text \"{x}\" and agree."
|
||||
doNotSendNotificationEmailsForAbuseReport: "Do not send out notification emails for reporting"
|
||||
disableTimelinePreview: "Hide timeline preview in landing page"
|
||||
disableTimelinePreviewWarning: "By turning on, '{explore}' in landing page will be replaced to '{letsLookAtTimeline}'"
|
||||
emailToReceiveAbuseReport: "Email address to receive notification of the report"
|
||||
emailToReceiveAbuseReportCaption: "Specify the email address to receive notification of the report. If this field is left blank, the mail server's email address will be used."
|
||||
dialog: "Dialog"
|
||||
|
|
2
locales/index.d.ts
vendored
2
locales/index.d.ts
vendored
|
@ -1224,6 +1224,8 @@ export interface Locale {
|
|||
"beSureToReadThisAsItIsImportant": string;
|
||||
"iHaveReadXCarefullyAndAgree": string;
|
||||
"doNotSendNotificationEmailsForAbuseReport": string;
|
||||
"disableTimelinePreview": string;
|
||||
"disableTimelinePreviewWarning": string;
|
||||
"emailToReceiveAbuseReport": string;
|
||||
"emailToReceiveAbuseReportCaption": string;
|
||||
"dialog": string;
|
||||
|
|
|
@ -1221,6 +1221,8 @@ doYouAgree: "同意しますか?"
|
|||
beSureToReadThisAsItIsImportant: "重要ですので必ずお読みください。"
|
||||
iHaveReadXCarefullyAndAgree: "「{x}」の内容をよく読み、同意します。"
|
||||
doNotSendNotificationEmailsForAbuseReport: "通報の通知メールを発送しないようにする"
|
||||
disableTimelinePreview: "非ログインのメインページにTLを表示しない"
|
||||
disableTimelinePreviewWarning: "このオプションを使用すると、「{explore}」ボタンが「{letsLookAtTimeline}」に変わります。"
|
||||
emailToReceiveAbuseReport: "通報通知を受け取るためのメールアドレス"
|
||||
emailToReceiveAbuseReportCaption: "通報通知を受け取るためのメールアドレスを指定します。ここの入力欄を空にするとメールサーバーのメールアドレスが使用されます。"
|
||||
dialog: "ダイアログ"
|
||||
|
|
|
@ -1213,6 +1213,8 @@ doYouAgree: "동의하십니까?"
|
|||
beSureToReadThisAsItIsImportant: "중요하므로 반드시 읽어주세요."
|
||||
iHaveReadXCarefullyAndAgree: "\"{x}\"의 내용을 읽고 동의할게요."
|
||||
doNotSendNotificationEmailsForAbuseReport: "신고 알림 메일을 발송하지 않기"
|
||||
disableTimelinePreview: "비로그인 페이지에 타임라인 미리보기를 표시하지 않기"
|
||||
disableTimelinePreviewWarning: "이 옵션을 사용하면 '{explore}' 버튼이 '{letsLookAtTimeline}'로 변경됩니다."
|
||||
emailToReceiveAbuseReport: "신고 알림을 받을 수 있는 이메일 주소"
|
||||
emailToReceiveAbuseReportCaption: "신고 알림을 받을 이메일 주소를 지정해 주세요. 이곳의 입력란을 비워두면 메일 서버의 이메일 주소가 사용돼요."
|
||||
dialog: "다이얼로그"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class disableTimelinePreview170140178956 {
|
||||
name = 'disableTimelinePreview170140178956'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "disableTimelinePreveiw" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disableTimelinePreview"`);
|
||||
}
|
||||
}
|
|
@ -668,4 +668,9 @@ export class MiMeta {
|
|||
nullable: true,
|
||||
})
|
||||
public skipCherryPickVersion: string | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
public disableTimelinePreview: boolean;
|
||||
}
|
||||
|
|
|
@ -399,6 +399,10 @@ export const meta = {
|
|||
type: 'string',
|
||||
optional: true, nullable: true,
|
||||
},
|
||||
disableTimelinePreview: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@ -544,6 +548,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
enableReceivePrerelease: instance.enableReceivePrerelease,
|
||||
skipVersion: instance.skipVersion,
|
||||
skipCherryPickVersion: instance.skipCherryPickVersion,
|
||||
disableTimelinePreview: instance.disableTimelinePreview,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -162,6 +162,7 @@ export const paramDef = {
|
|||
enableReceivePrerelease: { type: 'boolean' },
|
||||
skipVersion: { type: 'boolean' },
|
||||
skipCherryPickVersion: { type: 'string', nullable: true },
|
||||
disableTimelinePreview: { type: 'boolean' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
@ -651,6 +652,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.skipCherryPickVersion = ps.skipCherryPickVersion;
|
||||
}
|
||||
|
||||
if (ps.disableTimelinePreview !== undefined) {
|
||||
set.disableTimelinePreview = ps.disableTimelinePreview;
|
||||
}
|
||||
|
||||
const before = await this.metaService.fetch(true);
|
||||
|
||||
await this.metaService.update(set);
|
||||
|
|
|
@ -24,7 +24,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div class="_gaps_s" :class="$style.mainActions">
|
||||
<MkButton :class="$style.mainAction" full rounded gradate data-cy-signup style="margin-right: 12px;" @click="signup()">{{ i18n.ts.joinThisServer }}</MkButton>
|
||||
<!-- <MkButton :class="$style.mainAction" full rounded @click="exploreOtherServers()">{{ i18n.ts.exploreOtherServers }}</MkButton> -->
|
||||
<MkButton :class="$style.mainAction" full rounded @click="mainRouter.push('/timeline')">{{ i18n.ts.letsLookAtTimeline }}</MkButton>
|
||||
<MkButton v-if="!instance.disablePreviewTimeline" :class="$style.mainAction" full rounded @click="mainRouter.push('/explore')">{{ i18n.ts.explore }}</MkButton>
|
||||
<MkButton v-if="instance.disablePreviewTimeline" :class="$style.mainAction" full rounded @click="mainRouter.push('/timeline')">{{ i18n.ts.letsLookAtTimeline }}</MkButton>
|
||||
<MkButton :class="$style.mainAction" full rounded data-cy-signin @click="signin()">{{ i18n.ts.login }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -39,12 +40,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div :class="$style.statsItemCount"><MkNumber :value="stats.originalNotesCount"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div v-if="instance.policies.ltlAvailable" :class="[$style.tl, $style.panel]">
|
||||
<div v-if="!instance.disablePreviewTimeline" :class="[$style.tl, $style.panel]">
|
||||
<div :class="$style.tlHeader">{{ i18n.ts.letsLookAtTimeline }}</div>
|
||||
<div :class="$style.tlBody">
|
||||
<MkTimeline src="local"/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div :class="$style.panel">
|
||||
<XActiveUsersChart/>
|
||||
</div>
|
||||
|
|
|
@ -44,6 +44,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>{{ i18n.ts.doNotSendNotificationEmailsForAbuseReport }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
|
||||
<div class="_panel" style="padding: 16px;">
|
||||
<MkSwitch v-model="disableTimelinePreview">
|
||||
<template #label>{{ i18n.ts.disableTimelinePreview }}</template>
|
||||
<template #caption>{{ i18n.ts.disableTimelinePreviewWarning }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
|
@ -66,6 +73,7 @@ let enableIdenticonGeneration: boolean = $ref(false);
|
|||
let enableChartsForRemoteUser: boolean = $ref(false);
|
||||
let enableChartsForFederatedInstances: boolean = $ref(false);
|
||||
let doNotSendNotificationEmailsForAbuseReport: boolean = $ref(false);
|
||||
let disableTimelinePreview: boolean = $ref(false);
|
||||
|
||||
async function init() {
|
||||
const meta = await os.api('admin/meta');
|
||||
|
@ -74,6 +82,7 @@ async function init() {
|
|||
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
||||
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
||||
doNotSendNotificationEmailsForAbuseReport = meta.doNotSendNotificationEmailsForAbuseReport;
|
||||
disableTimelinePreview = meta.disableTimelinePreview;
|
||||
}
|
||||
|
||||
function save() {
|
||||
|
@ -83,6 +92,7 @@ function save() {
|
|||
enableChartsForRemoteUser,
|
||||
enableChartsForFederatedInstances,
|
||||
doNotSendNotificationEmailsForAbuseReport,
|
||||
disableTimelinePreview,
|
||||
}).then(() => {
|
||||
fetchInstance();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue