enhance: Modify MkInstanceTicker (#9236)
* fix and enhance MkNoteDetailed * change instanceticker * 🎨 * fix * 🎨 * fix * 🎨 * revert MkNoteDetailed
This commit is contained in:
parent
285860f958
commit
707398b1d9
2 changed files with 24 additions and 21 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { query } from '@/scripts/url';
|
||||
import { url } from '@/config';
|
||||
|
||||
export function getProxiedImageUrl(imageUrl: string): string {
|
||||
export function getProxiedImageUrl(imageUrl: string, type?: 'preview'): string {
|
||||
return `${url}/proxy/image.webp?${query({
|
||||
url: imageUrl,
|
||||
...(type ? { [type]: "1" } : {}),
|
||||
})}`;
|
||||
}
|
||||
|
||||
export function getProxiedImageUrlNullable(imageUrl: string | null | undefined): string | null {
|
||||
export function getProxiedImageUrlNullable(imageUrl: string | null | undefined, type?: 'preview'): string | null {
|
||||
if (imageUrl == null) return null;
|
||||
return getProxiedImageUrl(imageUrl);
|
||||
return getProxiedImageUrl(imageUrl, type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue