mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-10-29 12:15:14 +01:00
24 lines
665 B
TypeScript
24 lines
665 B
TypeScript
import type { ZAssetType } from "../types/bookmarks";
|
|
|
|
export function getAssetUrl(assetId: string) {
|
|
return `/api/assets/${assetId}`;
|
|
}
|
|
|
|
export function humanFriendlyNameForAssertType(type: ZAssetType) {
|
|
const map: Record<ZAssetType, string> = {
|
|
screenshot: "Screenshot",
|
|
pdf: "PDF",
|
|
assetScreenshot: "Asset Screenshot",
|
|
fullPageArchive: "Full Page Archive",
|
|
precrawledArchive: "Precrawled Archive",
|
|
bannerImage: "Banner Image",
|
|
video: "Video",
|
|
bookmarkAsset: "Bookmark Asset",
|
|
linkHtmlContent: "HTML Content",
|
|
userUploaded: "User Uploaded File",
|
|
avatar: "Avatar",
|
|
unknown: "Unknown",
|
|
};
|
|
return map[type];
|
|
}
|