fix
This commit is contained in:
parent
d44cb14615
commit
dc0243b8ea
4 changed files with 12 additions and 9 deletions
|
@ -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,
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 > & {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue