mirror of
https://example.com
synced 2024-11-24 21:16:44 +09:00
refactor: 🍱 use webp for error images instead of avif
Ended up having better compression and wider compatibility
This commit is contained in:
parent
18c599d19e
commit
cd7c10b7eb
32 changed files with 25 additions and 25 deletions
Binary file not shown.
BIN
custom/assets/badges/error.webp
Normal file
BIN
custom/assets/badges/error.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
BIN
custom/assets/badges/info.webp
Normal file
BIN
custom/assets/badges/info.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
BIN
custom/assets/badges/not-found.webp
Normal file
BIN
custom/assets/badges/not-found.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
BIN
packages/backend/assets/badges/error.webp
Normal file
BIN
packages/backend/assets/badges/error.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
BIN
packages/backend/assets/badges/info.webp
Normal file
BIN
packages/backend/assets/badges/info.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
BIN
packages/backend/assets/badges/not-found.webp
Normal file
BIN
packages/backend/assets/badges/not-found.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -220,7 +220,7 @@ export class Init1000000000000 {
|
|||
`CREATE INDEX "IDX_3c601b70a1066d2c8b517094cb" ON "notification" ("notifieeId") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/static-assets/badges/info.avif', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT '/static-assets/badges/error.avif', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT false, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`,
|
||||
`CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/static-assets/badges/info.webp', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT '/static-assets/badges/error.webp', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT false, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_c76c6e044bdf76ecf8bfb82a645" PRIMARY KEY ("id"))`,
|
||||
|
|
|
@ -162,7 +162,7 @@ export class Meta {
|
|||
@Column("varchar", {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: "/static-assets/badges/info.avif",
|
||||
default: "/static-assets/badges/info.webp",
|
||||
})
|
||||
public mascotImageUrl: string | null;
|
||||
|
||||
|
@ -187,7 +187,7 @@ export class Meta {
|
|||
@Column("varchar", {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: "/static-assets/badges/error.avif",
|
||||
default: "/static-assets/badges/error.webp",
|
||||
})
|
||||
public errorImageUrl: string | null;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ export const meta = {
|
|||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
default: "/static-assets/badges/info.avif",
|
||||
default: "/static-assets/badges/info.webp",
|
||||
},
|
||||
bannerUrl: {
|
||||
type: "string",
|
||||
|
@ -75,7 +75,7 @@ export const meta = {
|
|||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
default: "/static-assets/badges/error.avif",
|
||||
default: "/static-assets/badges/error.webp",
|
||||
},
|
||||
iconUrl: {
|
||||
type: "string",
|
||||
|
|
|
@ -49,7 +49,7 @@ export default define(meta, paramDef, async (ps) => {
|
|||
createNotification(user.id, "app", {
|
||||
customBody: ps.comment,
|
||||
customHeader: "Moderation Notice",
|
||||
customIcon: "/static-assets/badges/info.avif",
|
||||
customIcon: "/static-assets/badges/info.webp",
|
||||
});
|
||||
|
||||
setImmediate(async () => {
|
||||
|
|
|
@ -155,7 +155,7 @@ export const meta = {
|
|||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
default: "/static-assets/badges/info.avif",
|
||||
default: "/static-assets/badges/info.webp",
|
||||
},
|
||||
bannerUrl: {
|
||||
type: "string",
|
||||
|
@ -166,7 +166,7 @@ export const meta = {
|
|||
type: "string",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
default: "/static-assets/badges/error.avif",
|
||||
default: "/static-assets/badges/error.webp",
|
||||
},
|
||||
iconUrl: {
|
||||
type: "string",
|
||||
|
|
|
@ -36,9 +36,9 @@ html
|
|||
link(rel='icon' href= icon || `/favicon.ico?${ timestamp }`)
|
||||
link(rel='apple-touch-icon' href= icon || `/apple-touch-icon.png?${ timestamp }`)
|
||||
link(rel='manifest' href='/manifest.json')
|
||||
link(rel='prefetch' href=`/static-assets/badges/info.avif?${ timestamp }`)
|
||||
link(rel='prefetch' href=`/static-assets/badges/not-found.avif?${ timestamp }`)
|
||||
link(rel='prefetch' href=`/static-assets/badges/error.avif?${ timestamp }`)
|
||||
link(rel='prefetch' href=`/static-assets/badges/info.webp?${ timestamp }`)
|
||||
link(rel='prefetch' href=`/static-assets/badges/not-found.webp?${ timestamp }`)
|
||||
link(rel='prefetch' href=`/static-assets/badges/error.webp?${ timestamp }`)
|
||||
link(rel='stylesheet' href=`/static-assets/instance.css?${ timestamp }`)
|
||||
link(rel='modulepreload' href=`/assets/${clientEntry.file}`)
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ async function save(
|
|||
if (type === "image/png") ext = ".png";
|
||||
if (type === "image/webp") ext = ".webp";
|
||||
if (type === "image/apng") ext = ".apng";
|
||||
if (type === "image/avif") ext = ".avif";
|
||||
if (type === "image/avif") ext = ".webp";
|
||||
if (type === "image/vnd.mozilla.apng") ext = ".apng";
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/not-found.avif"
|
||||
src="/static-assets/badges/not-found.webp"
|
||||
class="_ghost"
|
||||
:alt="i18n.ts.notFound"
|
||||
/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<slot name="empty">
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Error"
|
||||
/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||
<div class="mjndxjcg">
|
||||
<img
|
||||
src="/static-assets/badges/error.avif"
|
||||
src="/static-assets/badges/error.webp"
|
||||
class="_ghost"
|
||||
alt="Error"
|
||||
/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||
<div v-show="loaded" class="mjndxjch">
|
||||
<img
|
||||
src="/static-assets/badges/error.avif"
|
||||
src="/static-assets/badges/error.webp"
|
||||
class="_ghost"
|
||||
alt="Error"
|
||||
/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
aria-label="none"
|
||||
class="_ghost"
|
||||
/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||
<div :class="$style.root">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Error"
|
||||
/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="ipledcug">
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/not-found.avif"
|
||||
src="/static-assets/badges/not-found.webp"
|
||||
class="_ghost"
|
||||
alt="Not found"
|
||||
/>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<template #empty>
|
||||
<div class="_fullinfo">
|
||||
<img
|
||||
src="/static-assets/badges/info.avif"
|
||||
src="/static-assets/badges/info.webp"
|
||||
class="_ghost"
|
||||
alt="Info"
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue