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

@ -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);