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,
quality: number = 85,
): Promise<IImage> {
const data = await sharp
const data = await sharp
.resize(width, height, {
fit: "inside",
withoutEnlargement: true,

View File

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

View File

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

View File

@ -1,15 +1,18 @@
import { query } from '@/scripts/url';
import { url } from '@/config';
import { query } from "@/scripts/url";
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({
url: imageUrl,
fallback: '1',
...(type ? { [type]: '1' } : {}),
fallback: "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;
return getProxiedImageUrl(imageUrl, type);
}