outsideprismisskey

This commit is contained in:
mattyatea 2024-05-04 23:21:05 +09:00
parent 1a8d91355d
commit 206d7c9a18
6 changed files with 83 additions and 6 deletions

View file

@ -69,6 +69,10 @@ export class MetaEntityService {
privacyPolicyUrl: instance.privacyPolicyUrl,
disableRegistration: instance.disableRegistration,
emailRequiredForSignup: instance.emailRequiredForSignup,
bannerDark: instance.bannerDark,
bannerLight: instance.bannerLight,
iconDark: instance.iconDark,
iconLight: instance.iconLight,
enableHcaptcha: instance.enableHcaptcha,
hcaptchaSiteKey: instance.hcaptchaSiteKey,
enableMcaptcha: instance.enableMcaptcha,

View file

@ -433,6 +433,30 @@ export class MiMeta {
})
public objectStorageBaseUrl: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public bannerDark: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public bannerLight: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public iconDark: string | null;
@Column('varchar', {
length: 1024,
nullable: true,
})
public iconLight: string | null;
@Column('varchar', {
length: 1024,
nullable: true,

View file

@ -496,6 +496,10 @@ export const meta = {
type: 'string',
optional: false, nullable: true,
},
iconLight: { type: 'string', nullable: true },
iconDark: { type: 'string', nullable: true },
bannerLight: { type: 'string', nullable: true },
bannerDark: { type: 'string', nullable: true },
},
},
} as const;
@ -636,6 +640,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
urlPreviewRequireContentLength: instance.urlPreviewRequireContentLength,
urlPreviewUserAgent: instance.urlPreviewUserAgent,
urlPreviewSummaryProxyUrl: instance.urlPreviewSummaryProxyUrl,
iconLight: instance.iconLight,
iconDark: instance.iconDark,
bannerLight: instance.bannerLight,
bannerDark: instance.bannerDark,
};
});
}

View file

@ -172,6 +172,10 @@ export const paramDef = {
proxyCheckioApiKey: {
type: 'string', nullable: true,
},
iconLight: { type: 'string', nullable: true },
iconDark: { type: 'string', nullable: true },
bannerLight: { type: 'string', nullable: true },
bannerDark: { type: 'string', nullable: true },
},
required: [],
} as const;
@ -650,7 +654,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const value = ((ps.urlPreviewSummaryProxyUrl ?? ps.summalyProxy) ?? '').trim();
set.urlPreviewSummaryProxyUrl = value === '' ? null : value;
}
if (ps.bannerDark !== undefined) {
set.bannerDark = ps.bannerDark;
}
if (ps.bannerLight !== undefined) {
set.bannerLight = ps.bannerLight;
}
if (ps.iconDark !== undefined) {
set.iconDark = ps.iconDark;
}
if (ps.iconLight !== undefined) {
set.iconLight = ps.iconLight;
}
const before = await this.metaService.fetch(true);
await this.metaService.update(set);