Update 4 files

- /packages/frontend/src/pages/admin/branding.vue
- /packages/backend/src/models/Meta.ts
- /packages/backend/src/server/api/endpoints/admin/meta.ts
- /packages/backend/src/server/api/endpoints/admin/update-meta.ts
This commit is contained in:
piuvas silly 2024-09-23 16:34:29 +00:00
parent 3ebef6ac47
commit 41edc4cfbd
4 changed files with 25 additions and 25 deletions

View File

@ -127,12 +127,6 @@ 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,
@ -145,6 +139,12 @@ export class MiMeta {
}) })
public app512IconUrl: string | null; public app512IconUrl: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public sidebarLogoUrl: string | null;
@Column('varchar', { @Column('varchar', {
length: 1024, length: 1024,
nullable: true, nullable: true,

View File

@ -102,10 +102,6 @@ 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,
@ -114,6 +110,10 @@ export const meta = {
type: 'string', type: 'string',
optional: false, nullable: true, optional: false, nullable: true,
}, },
sidebarLogoUrl: {
type: 'string',
optional: false, nullable: true,
},
enableEmail: { enableEmail: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false, optional: false, nullable: false,
@ -584,9 +584,9 @@ 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,
sidebarLogoUrl: instance.sidebarLogoUrl,
backgroundImageUrl: instance.backgroundImageUrl, backgroundImageUrl: instance.backgroundImageUrl,
logoImageUrl: instance.logoImageUrl, logoImageUrl: instance.logoImageUrl,
defaultLightTheme: instance.defaultLightTheme, defaultLightTheme: instance.defaultLightTheme,

View File

@ -53,9 +53,9 @@ 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 },
sidebarLogoUrl: { type: 'string', nullable: true },
backgroundImageUrl: { type: 'string', nullable: true }, backgroundImageUrl: { type: 'string', nullable: true },
logoImageUrl: { type: 'string', nullable: true }, logoImageUrl: { type: 'string', nullable: true },
name: { type: 'string', nullable: true }, name: { type: 'string', nullable: true },
@ -243,10 +243,6 @@ 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;
} }
@ -255,6 +251,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.app512IconUrl = ps.app512IconUrl; set.app512IconUrl = ps.app512IconUrl;
} }
if (ps.sidebarLogoUrl !== undefined) {
set.sidebarLogoUrl = ps.sidebarLogoUrl;
}
if (ps.serverErrorImageUrl !== undefined) { if (ps.serverErrorImageUrl !== undefined) {
set.serverErrorImageUrl = ps.serverErrorImageUrl; set.serverErrorImageUrl = ps.serverErrorImageUrl;
} }

View File

@ -15,15 +15,6 @@ 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 }} ({{ i18n.ts._serverSettings.sidebarLogoHint }})</template>
<template #caption>
<div>{{ i18n.ts._serverSettings.sidebarLogoDescription }}</div>
<div>({{ i18n.ts._serverSettings.sidebarLogoUsageExample }})</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>
@ -46,6 +37,15 @@ SPDX-License-Identifier: AGPL-3.0-only
</template> </template>
</MkInput> </MkInput>
<MkInput v-model="sidebarLogoUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts._serverSettings.iconUrl }} ({{ i18n.ts._serverSettings.sidebarLogoHint }})</template>
<template #caption>
<div>{{ i18n.ts._serverSettings.sidebarLogoDescription }}</div>
<div>({{ i18n.ts._serverSettings.sidebarLogoUsageExample }})</div>
</template>
</MkInput>
<MkInput v-model="bannerUrl" type="url"> <MkInput v-model="bannerUrl" type="url">
<template #prefix><i class="ti ti-link"></i></template> <template #prefix><i class="ti ti-link"></i></template>
<template #label>{{ i18n.ts.bannerUrl }}</template> <template #label>{{ i18n.ts.bannerUrl }}</template>