This commit is contained in:
mattyatea 2023-12-14 21:06:50 +09:00
parent 8c4a08c383
commit 5623960efa
16 changed files with 183 additions and 49 deletions

View file

@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import {computed, onActivated, onMounted, onUnmounted, provide, ref, watch, ref, computed } from 'vue';
import {computed, onActivated, onMounted, onUnmounted, provide, ref, watch } from 'vue';
import { i18n } from '@/i18n.js';
import MkSuperMenu from '@/components/MkSuperMenu.vue';
import MkInfo from '@/components/MkInfo.vue';

View file

@ -69,18 +69,18 @@ const enableServerMachineStats = ref<boolean>(false);
const enableIdenticonGeneration = ref<boolean>(false);
const enableChartsForRemoteUser = ref<boolean>(false);
const enableChartsForFederatedInstances = ref<boolean>(false);
let DiscordWebhookUrl: string | null = $ref(null);
let EmojiBotToken: string | null = $ref(null);
let ApiBase:string | null = $ref(null)
let DiscordWebhookUrl = ref(null);
let EmojiBotToken= ref(null);
let ApiBase= ref(null)
async function init() {
const meta = await os.api('admin/meta');
enableServerMachineStats.value = meta.enableServerMachineStats;
enableIdenticonGeneration.value = meta.enableIdenticonGeneration;
enableChartsForRemoteUser.value = meta.enableChartsForRemoteUser;
enableChartsForFederatedInstances.value = meta.enableChartsForFederatedInstances;
DiscordWebhookUrl = meta.DiscordWebhookUrl;
EmojiBotToken = meta.EmojiBotToken;
ApiBase = meta.ApiBase;
DiscordWebhookUrl.value = meta.DiscordWebhookUrl;
EmojiBotToken.value = meta.EmojiBotToken;
ApiBase.value = meta.ApiBase;
}
function save() {
@ -89,9 +89,9 @@ function save() {
enableIdenticonGeneration: enableIdenticonGeneration.value,
enableChartsForRemoteUser: enableChartsForRemoteUser.value,
enableChartsForFederatedInstances: enableChartsForFederatedInstances.value,
DiscordWebhookUrl,
EmojiBotToken,
ApiBase
DiscordWebhookUrl:DiscordWebhookUrl.value,
EmojiBotToken:EmojiBotToken.value,
ApiBase:ApiBase.value
}).then(() => {
fetchInstance();
});