2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2021-04-22 22:29:33 +09:00
|
|
|
<template>
|
2022-06-20 17:38:49 +09:00
|
|
|
<MkStickyContainer>
|
|
|
|
<template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
2023-05-19 13:35:46 +09:00
|
|
|
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
|
2022-06-20 17:38:49 +09:00
|
|
|
<FormSuspense :p="init">
|
2023-07-08 08:46:42 +09:00
|
|
|
<div class="_gaps">
|
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableServerMachineStats">
|
|
|
|
<template #label>{{ i18n.ts.enableServerMachineStats }}</template>
|
|
|
|
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
2023-07-02 16:02:32 +09:00
|
|
|
|
2023-09-29 07:57:38 +09:00
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableAchievements">
|
|
|
|
<template #label>Enable Achievements</template>
|
|
|
|
<template #caption>Turning this off will disable the achievement system</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
|
|
|
|
2023-10-18 14:29:16 +09:00
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableBotTrending">
|
|
|
|
<template #label>Populate Hashtags with Bots</template>
|
|
|
|
<template #caption>Turning this off will stop Bots from populating Hashtags</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
|
|
|
|
2023-07-08 08:46:42 +09:00
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableIdenticonGeneration">
|
|
|
|
<template #label>{{ i18n.ts.enableIdenticonGeneration }}</template>
|
|
|
|
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
2023-07-02 16:02:32 +09:00
|
|
|
|
2023-07-08 08:46:42 +09:00
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableChartsForRemoteUser">
|
|
|
|
<template #label>{{ i18n.ts.enableChartsForRemoteUser }}</template>
|
|
|
|
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
2023-05-19 13:35:46 +09:00
|
|
|
|
2023-07-08 08:46:42 +09:00
|
|
|
<div class="_panel" style="padding: 16px;">
|
|
|
|
<MkSwitch v-model="enableChartsForFederatedInstances">
|
|
|
|
<template #label>{{ i18n.ts.enableChartsForFederatedInstances }}</template>
|
|
|
|
<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
|
|
|
|
</MkSwitch>
|
|
|
|
</div>
|
2023-05-19 13:35:46 +09:00
|
|
|
</div>
|
2022-06-20 17:38:49 +09:00
|
|
|
</FormSuspense>
|
|
|
|
</MkSpacer>
|
|
|
|
</MkStickyContainer>
|
2021-04-22 22:29:33 +09:00
|
|
|
</template>
|
|
|
|
|
2022-05-25 16:38:18 +09:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2022-06-20 17:38:49 +09:00
|
|
|
import XHeader from './_header_.vue';
|
2022-01-04 21:16:41 +09:00
|
|
|
import FormSuspense from '@/components/form/suspense.vue';
|
2023-09-19 16:37:43 +09:00
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { fetchInstance } from '@/instance.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
2023-05-19 13:35:46 +09:00
|
|
|
import MkSwitch from '@/components/MkSwitch.vue';
|
|
|
|
|
2023-07-02 16:02:32 +09:00
|
|
|
let enableServerMachineStats: boolean = $ref(false);
|
2023-09-29 07:57:38 +09:00
|
|
|
let enableAchievements: boolean = $ref(false);
|
2023-10-18 14:29:16 +09:00
|
|
|
let enableBotTrending: boolean = $ref(false);
|
2023-07-02 16:02:32 +09:00
|
|
|
let enableIdenticonGeneration: boolean = $ref(false);
|
2023-05-19 13:35:46 +09:00
|
|
|
let enableChartsForRemoteUser: boolean = $ref(false);
|
|
|
|
let enableChartsForFederatedInstances: boolean = $ref(false);
|
2021-04-22 22:29:33 +09:00
|
|
|
|
2022-05-25 16:38:18 +09:00
|
|
|
async function init() {
|
2023-05-19 13:35:46 +09:00
|
|
|
const meta = await os.api('admin/meta');
|
2023-07-02 16:02:32 +09:00
|
|
|
enableServerMachineStats = meta.enableServerMachineStats;
|
2023-09-29 07:57:38 +09:00
|
|
|
enableAchievements = meta.enableAchievements;
|
2023-10-18 14:29:16 +09:00
|
|
|
enableBotTrending = meta.enableBotTrending;
|
2023-07-02 16:02:32 +09:00
|
|
|
enableIdenticonGeneration = meta.enableIdenticonGeneration;
|
2023-05-19 13:35:46 +09:00
|
|
|
enableChartsForRemoteUser = meta.enableChartsForRemoteUser;
|
|
|
|
enableChartsForFederatedInstances = meta.enableChartsForFederatedInstances;
|
2022-05-25 16:38:18 +09:00
|
|
|
}
|
2021-04-22 22:29:33 +09:00
|
|
|
|
2022-05-25 16:38:18 +09:00
|
|
|
function save() {
|
2023-05-19 13:35:46 +09:00
|
|
|
os.apiWithDialog('admin/update-meta', {
|
2023-07-02 16:02:32 +09:00
|
|
|
enableServerMachineStats,
|
2023-09-29 07:57:38 +09:00
|
|
|
enableAchievements,
|
2023-10-18 14:29:16 +09:00
|
|
|
enableBotTrending,
|
2023-07-02 16:02:32 +09:00
|
|
|
enableIdenticonGeneration,
|
2023-05-19 13:35:46 +09:00
|
|
|
enableChartsForRemoteUser,
|
|
|
|
enableChartsForFederatedInstances,
|
|
|
|
}).then(() => {
|
2022-05-25 16:38:18 +09:00
|
|
|
fetchInstance();
|
|
|
|
});
|
|
|
|
}
|
2021-04-22 22:29:33 +09:00
|
|
|
|
2022-06-20 17:38:49 +09:00
|
|
|
const headerActions = $computed(() => [{
|
|
|
|
asFullButton: true,
|
2023-10-01 04:53:52 +09:00
|
|
|
icon: 'ph-check ph-bold ph-lg',
|
2022-06-20 17:38:49 +09:00
|
|
|
text: i18n.ts.save,
|
|
|
|
handler: save,
|
|
|
|
}]);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.other,
|
2023-10-01 04:53:52 +09:00
|
|
|
icon: 'ph-faders ph-bold ph-lg',
|
2021-04-22 22:29:33 +09:00
|
|
|
});
|
|
|
|
</script>
|