mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	backend configuring
This commit is contained in:
		
							parent
							
								
									7aa956aca9
								
							
						
					
					
						commit
						1af6f8c5da
					
				
					 8 changed files with 36 additions and 0 deletions
				
			
		| 
						 | 
					@ -52,6 +52,7 @@ export class InstanceEntityService {
 | 
				
			||||||
			isSilenced: this.utilityService.isSilencedHost(meta.silencedHosts, instance.host),
 | 
								isSilenced: this.utilityService.isSilencedHost(meta.silencedHosts, instance.host),
 | 
				
			||||||
			isMediaSilenced: this.utilityService.isMediaSilencedHost(meta.mediaSilencedHosts, instance.host),
 | 
								isMediaSilenced: this.utilityService.isMediaSilencedHost(meta.mediaSilencedHosts, instance.host),
 | 
				
			||||||
			iconUrl: instance.iconUrl,
 | 
								iconUrl: instance.iconUrl,
 | 
				
			||||||
 | 
								sidebarLogoUrl: instance.sidebarLogoUrl,
 | 
				
			||||||
			faviconUrl: instance.faviconUrl,
 | 
								faviconUrl: instance.faviconUrl,
 | 
				
			||||||
			themeColor: instance.themeColor,
 | 
								themeColor: instance.themeColor,
 | 
				
			||||||
			infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null,
 | 
								infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -105,6 +105,7 @@ export class MetaEntityService {
 | 
				
			||||||
			serverErrorImageUrl: instance.serverErrorImageUrl,
 | 
								serverErrorImageUrl: instance.serverErrorImageUrl,
 | 
				
			||||||
			notFoundImageUrl: instance.notFoundImageUrl,
 | 
								notFoundImageUrl: instance.notFoundImageUrl,
 | 
				
			||||||
			iconUrl: instance.iconUrl,
 | 
								iconUrl: instance.iconUrl,
 | 
				
			||||||
 | 
								sidebarLogoUrl: instance.sidebarLogoUrl,
 | 
				
			||||||
			backgroundImageUrl: instance.backgroundImageUrl,
 | 
								backgroundImageUrl: instance.backgroundImageUrl,
 | 
				
			||||||
			logoImageUrl: instance.logoImageUrl,
 | 
								logoImageUrl: instance.logoImageUrl,
 | 
				
			||||||
			maxNoteTextLength: this.config.maxNoteLength,
 | 
								maxNoteTextLength: this.config.maxNoteLength,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,6 +139,11 @@ export class MiInstance {
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	public iconUrl: string | null;
 | 
						public iconUrl: string | null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column('varchar', {
 | 
				
			||||||
 | 
							length: 256, nullable: true,
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						public sidebarLogoUrl: string | null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Column('varchar', {
 | 
						@Column('varchar', {
 | 
				
			||||||
		length: 256, nullable: true,
 | 
							length: 256, nullable: true,
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -127,6 +127,12 @@ export class MiMeta {
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	public iconUrl: string | null;
 | 
						public iconUrl: string | null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						@Column('varchar', {
 | 
				
			||||||
 | 
							length: 1024,
 | 
				
			||||||
 | 
							nullable: true,
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						public sidebarLogoUrl: string | null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Column('varchar', {
 | 
						@Column('varchar', {
 | 
				
			||||||
		length: 1024,
 | 
							length: 1024,
 | 
				
			||||||
		nullable: true,
 | 
							nullable: true,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,6 +102,10 @@ export const meta = {
 | 
				
			||||||
				type: 'string',
 | 
									type: 'string',
 | 
				
			||||||
				optional: false, nullable: true,
 | 
									optional: false, nullable: true,
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								sidebarLogoUrl: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									optional: false, nullable: true,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
			app192IconUrl: {
 | 
								app192IconUrl: {
 | 
				
			||||||
				type: 'string',
 | 
									type: 'string',
 | 
				
			||||||
				optional: false, nullable: true,
 | 
									optional: false, nullable: true,
 | 
				
			||||||
| 
						 | 
					@ -580,6 +584,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
				
			||||||
				notFoundImageUrl: instance.notFoundImageUrl,
 | 
									notFoundImageUrl: instance.notFoundImageUrl,
 | 
				
			||||||
				infoImageUrl: instance.infoImageUrl,
 | 
									infoImageUrl: instance.infoImageUrl,
 | 
				
			||||||
				iconUrl: instance.iconUrl,
 | 
									iconUrl: instance.iconUrl,
 | 
				
			||||||
 | 
									sidebarLogoUrl: instance.sidebarLogoUrl,
 | 
				
			||||||
				app192IconUrl: instance.app192IconUrl,
 | 
									app192IconUrl: instance.app192IconUrl,
 | 
				
			||||||
				app512IconUrl: instance.app512IconUrl,
 | 
									app512IconUrl: instance.app512IconUrl,
 | 
				
			||||||
				backgroundImageUrl: instance.backgroundImageUrl,
 | 
									backgroundImageUrl: instance.backgroundImageUrl,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,6 +53,7 @@ export const paramDef = {
 | 
				
			||||||
		infoImageUrl: { type: 'string', nullable: true },
 | 
							infoImageUrl: { type: 'string', nullable: true },
 | 
				
			||||||
		notFoundImageUrl: { type: 'string', nullable: true },
 | 
							notFoundImageUrl: { type: 'string', nullable: true },
 | 
				
			||||||
		iconUrl: { type: 'string', nullable: true },
 | 
							iconUrl: { type: 'string', nullable: true },
 | 
				
			||||||
 | 
							sidebarLogoUrl: { type: 'string', nullable: true },
 | 
				
			||||||
		app192IconUrl: { type: 'string', nullable: true },
 | 
							app192IconUrl: { type: 'string', nullable: true },
 | 
				
			||||||
		app512IconUrl: { type: 'string', nullable: true },
 | 
							app512IconUrl: { type: 'string', nullable: true },
 | 
				
			||||||
		backgroundImageUrl: { type: 'string', nullable: true },
 | 
							backgroundImageUrl: { type: 'string', nullable: true },
 | 
				
			||||||
| 
						 | 
					@ -242,6 +243,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
				
			||||||
				set.iconUrl = ps.iconUrl;
 | 
									set.iconUrl = ps.iconUrl;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (ps.sidebarLogoUrl !== undefined) {
 | 
				
			||||||
 | 
									set.sidebarLogoUrl = ps.sidebarLogoUrl;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (ps.app192IconUrl !== undefined) {
 | 
								if (ps.app192IconUrl !== undefined) {
 | 
				
			||||||
				set.app192IconUrl = ps.app192IconUrl;
 | 
									set.app192IconUrl = ps.app192IconUrl;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,14 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
						<template #label>{{ i18n.ts._serverSettings.iconUrl }}</template>
 | 
											<template #label>{{ i18n.ts._serverSettings.iconUrl }}</template>
 | 
				
			||||||
					</MkInput>
 | 
										</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">
 | 
										<MkInput v-model="app192IconUrl" type="url">
 | 
				
			||||||
						<template #prefix><i class="ti ti-link"></i></template>
 | 
											<template #prefix><i class="ti ti-link"></i></template>
 | 
				
			||||||
						<template #label>{{ i18n.ts._serverSettings.iconUrl }} (App/192px)</template>
 | 
											<template #label>{{ i18n.ts._serverSettings.iconUrl }} (App/192px)</template>
 | 
				
			||||||
| 
						 | 
					@ -128,6 +136,7 @@ import MkColorInput from '@/components/MkColorInput.vue';
 | 
				
			||||||
import { host } from '@/config.js';
 | 
					import { host } from '@/config.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const iconUrl = ref<string | null>(null);
 | 
					const iconUrl = ref<string | null>(null);
 | 
				
			||||||
 | 
					const sidebarLogoUrl = ref<string | null>(null);
 | 
				
			||||||
const app192IconUrl = ref<string | null>(null);
 | 
					const app192IconUrl = ref<string | null>(null);
 | 
				
			||||||
const app512IconUrl = ref<string | null>(null);
 | 
					const app512IconUrl = ref<string | null>(null);
 | 
				
			||||||
const bannerUrl = ref<string | null>(null);
 | 
					const bannerUrl = ref<string | null>(null);
 | 
				
			||||||
| 
						 | 
					@ -146,6 +155,7 @@ const manifestJsonOverride = ref<string>('{}');
 | 
				
			||||||
async function init() {
 | 
					async function init() {
 | 
				
			||||||
	const meta = await misskeyApi('admin/meta');
 | 
						const meta = await misskeyApi('admin/meta');
 | 
				
			||||||
	iconUrl.value = meta.iconUrl;
 | 
						iconUrl.value = meta.iconUrl;
 | 
				
			||||||
 | 
						sidebarLogoUrl.value = meta.sidebarLogoUrl;
 | 
				
			||||||
	app192IconUrl.value = meta.app192IconUrl;
 | 
						app192IconUrl.value = meta.app192IconUrl;
 | 
				
			||||||
	app512IconUrl.value = meta.app512IconUrl;
 | 
						app512IconUrl.value = meta.app512IconUrl;
 | 
				
			||||||
	bannerUrl.value = meta.bannerUrl;
 | 
						bannerUrl.value = meta.bannerUrl;
 | 
				
			||||||
| 
						 | 
					@ -165,6 +175,7 @@ async function init() {
 | 
				
			||||||
function save() {
 | 
					function save() {
 | 
				
			||||||
	os.apiWithDialog('admin/update-meta', {
 | 
						os.apiWithDialog('admin/update-meta', {
 | 
				
			||||||
		iconUrl: iconUrl.value,
 | 
							iconUrl: iconUrl.value,
 | 
				
			||||||
 | 
							sidebarLogoUrl: sidebarLogoUrl.value,
 | 
				
			||||||
		app192IconUrl: app192IconUrl.value,
 | 
							app192IconUrl: app192IconUrl.value,
 | 
				
			||||||
		app512IconUrl: app512IconUrl.value,
 | 
							app512IconUrl: app512IconUrl.value,
 | 
				
			||||||
		bannerUrl: bannerUrl.value,
 | 
							bannerUrl: bannerUrl.value,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5191,6 +5191,7 @@ export type operations = {
 | 
				
			||||||
            infoImageUrl: string | null;
 | 
					            infoImageUrl: string | null;
 | 
				
			||||||
            notFoundImageUrl: string | null;
 | 
					            notFoundImageUrl: string | null;
 | 
				
			||||||
            iconUrl: string | null;
 | 
					            iconUrl: string | null;
 | 
				
			||||||
 | 
					            sidebarLogoUrl: string | null;
 | 
				
			||||||
            app192IconUrl: string | null;
 | 
					            app192IconUrl: string | null;
 | 
				
			||||||
            app512IconUrl: string | null;
 | 
					            app512IconUrl: string | null;
 | 
				
			||||||
            enableEmail: boolean;
 | 
					            enableEmail: boolean;
 | 
				
			||||||
| 
						 | 
					@ -9704,6 +9705,7 @@ export type operations = {
 | 
				
			||||||
          infoImageUrl?: string | null;
 | 
					          infoImageUrl?: string | null;
 | 
				
			||||||
          notFoundImageUrl?: string | null;
 | 
					          notFoundImageUrl?: string | null;
 | 
				
			||||||
          iconUrl?: string | null;
 | 
					          iconUrl?: string | null;
 | 
				
			||||||
 | 
					          sidebarLogoUrl?: string | null;
 | 
				
			||||||
          app192IconUrl?: string | null;
 | 
					          app192IconUrl?: string | null;
 | 
				
			||||||
          app512IconUrl?: string | null;
 | 
					          app512IconUrl?: string | null;
 | 
				
			||||||
          backgroundImageUrl?: string | null;
 | 
					          backgroundImageUrl?: string | null;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue