This commit is contained in:
ThatOneCalculator 2023-02-01 11:55:45 -08:00
parent d44cb14615
commit dc0243b8ea
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
4 changed files with 12 additions and 9 deletions

View File

@ -25,7 +25,7 @@ export async function convertSharpToWebp(
height: number, height: number,
quality: number = 85, quality: number = 85,
): Promise<IImage> { ): Promise<IImage> {
const data = await sharp const data = await sharp
.resize(width, height, { .resize(width, height, {
fit: "inside", fit: "inside",
withoutEnlargement: true, withoutEnlargement: true,

View File

@ -352,7 +352,7 @@ function readPromo() {
content: ""; content: "";
display: block; display: block;
margin-bottom: -10px; margin-bottom: -10px;
width: 0.5px; width: 1px;
background-color: var(--divider); background-color: var(--divider);
margin-inline: auto; margin-inline: auto;
} }

View File

@ -153,7 +153,7 @@ const replies: misskey.entities.Note[] = props.conversation?.filter(item => item
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 0.5px; width: 1px;
background-color: var(--divider); background-color: var(--divider);
margin-inline: auto; margin-inline: auto;
.note > & { .note > & {

View File

@ -1,15 +1,18 @@
import { query } from '@/scripts/url'; import { query } from "@/scripts/url";
import { url } from '@/config'; import { url } from "@/config";
export function getProxiedImageUrl(imageUrl: string, type?: 'preview'): string { export function getProxiedImageUrl(imageUrl: string, type?: "preview"): string {
return `${url}/proxy/image.webp?${query({ return `${url}/proxy/image.webp?${query({
url: imageUrl, url: imageUrl,
fallback: '1', fallback: "1",
...(type ? { [type]: '1' } : {}), ...(type ? { [type]: "1" } : {}),
})}`; })}`;
} }
export function getProxiedImageUrlNullable(imageUrl: string | null | undefined, type?: 'preview'): string | null { export function getProxiedImageUrlNullable(
imageUrl: string | null | undefined,
type?: "preview",
): string | null {
if (imageUrl == null) return null; if (imageUrl == null) return null;
return getProxiedImageUrl(imageUrl, type); return getProxiedImageUrl(imageUrl, type);
} }