backend configuring

This commit is contained in:
piuvas 2024-09-22 13:27:41 -03:00
parent 7aa956aca9
commit 1af6f8c5da
No known key found for this signature in database
GPG key ID: 82743F52454C621D
8 changed files with 36 additions and 0 deletions

View file

@ -14,6 +14,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts._serverSettings.iconUrl }}</template>
</MkInput>
<MkInput v-model="sidebarLogoUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts._serverSettings.iconUrl }} (Sidebar/Logo)</template>
<template #caption>
<div>{{ i18n.tsx._serverSettings.sidebarLogoIconDescriptionhost }}</div>
</template>
</MkInput>
<MkInput v-model="app192IconUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template>
@ -128,6 +136,7 @@ import MkColorInput from '@/components/MkColorInput.vue';
import { host } from '@/config.js';
const iconUrl = ref<string | null>(null);
const sidebarLogoUrl = ref<string | null>(null);
const app192IconUrl = ref<string | null>(null);
const app512IconUrl = ref<string | null>(null);
const bannerUrl = ref<string | null>(null);
@ -146,6 +155,7 @@ const manifestJsonOverride = ref<string>('{}');
async function init() {
const meta = await misskeyApi('admin/meta');
iconUrl.value = meta.iconUrl;
sidebarLogoUrl.value = meta.sidebarLogoUrl;
app192IconUrl.value = meta.app192IconUrl;
app512IconUrl.value = meta.app512IconUrl;
bannerUrl.value = meta.bannerUrl;
@ -165,6 +175,7 @@ async function init() {
function save() {
os.apiWithDialog('admin/update-meta', {
iconUrl: iconUrl.value,
sidebarLogoUrl: sidebarLogoUrl.value,
app192IconUrl: app192IconUrl.value,
app512IconUrl: app512IconUrl.value,
bannerUrl: bannerUrl.value,