Chg: 初期設定時にiconの代替値を設定せず、アイコンがない場合はフロントエンドに任せるように
This commit is contained in:
@@ -23,7 +23,7 @@ export default async function ServerInfo(fastify: FastifyInstance) {
|
|||||||
success: true,
|
success: true,
|
||||||
name: serverName?.value ?? null,
|
name: serverName?.value ?? null,
|
||||||
description: serverDescription?.value ?? null,
|
description: serverDescription?.value ?? null,
|
||||||
icon: serverIcon?.value ?? `${config.server.origin}/assets/lynqchat.svg`,
|
icon: serverIcon?.value ?? null,
|
||||||
isInitialized: configCount > 0,
|
isInitialized: configCount > 0,
|
||||||
isFirstAdminExists: userCount > 0,
|
isFirstAdminExists: userCount > 0,
|
||||||
userCount,
|
userCount,
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export default function SetupInitialization(fastify: FastifyInstance) {
|
|||||||
try {
|
try {
|
||||||
const entries = Object.entries(result.data).filter(([key]) => key !== "force");
|
const entries = Object.entries(result.data).filter(([key]) => key !== "force");
|
||||||
|
|
||||||
entries.push(["icon", `${config.server.origin}/assets/lynqchat.svg`]);
|
|
||||||
const vapid = webpush.generateVAPIDKeys();
|
const vapid = webpush.generateVAPIDKeys();
|
||||||
entries.push(["VAPID_PUBLIC", vapid.publicKey]);
|
entries.push(["VAPID_PUBLIC", vapid.publicKey]);
|
||||||
entries.push(["VAPID_PRIVATE", vapid.privateKey]);
|
entries.push(["VAPID_PRIVATE", vapid.privateKey]);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
: ""'
|
: ""'
|
||||||
title="ホーム"
|
title="ホーム"
|
||||||
>
|
>
|
||||||
<img :src='"icon" in serverInfo
|
<img :src='"icon" in serverInfo && serverInfo.icon
|
||||||
? serverInfo.icon
|
? serverInfo.icon
|
||||||
: "/assets/lynqchat.svg"'
|
: "/assets/lynqchat.svg"'
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default interface ServerInfo {
|
|||||||
response: (Success & {
|
response: (Success & {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
icon: string;
|
icon: string | null;
|
||||||
isInitialized: boolean;
|
isInitialized: boolean;
|
||||||
isFirstAdminExists: boolean;
|
isFirstAdminExists: boolean;
|
||||||
userCount: number;
|
userCount: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user