format
This commit is contained in:
parent
b73e845299
commit
63678b7f1e
|
@ -158,9 +158,11 @@ export default function CollectionCard({
|
||||||
<Link
|
<Link
|
||||||
href={`/collections/${collection.id}`}
|
href={`/collections/${collection.id}`}
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `linear-gradient(45deg, ${collection.color}30 10%, ${settings.theme === "dark" ? "oklch(var(--b2))" : "oklch(var(--b2))"
|
backgroundImage: `linear-gradient(45deg, ${collection.color}30 10%, ${
|
||||||
} 50%, ${settings.theme === "dark" ? "oklch(var(--b2))" : "oklch(var(--b2))"
|
settings.theme === "dark" ? "oklch(var(--b2))" : "oklch(var(--b2))"
|
||||||
} 100%)`,
|
} 50%, ${
|
||||||
|
settings.theme === "dark" ? "oklch(var(--b2))" : "oklch(var(--b2))"
|
||||||
|
} 100%)`,
|
||||||
}}
|
}}
|
||||||
className="card card-compact shadow-md hover:shadow-none duration-200 border border-neutral-content"
|
className="card card-compact shadow-md hover:shadow-none duration-200 border border-neutral-content"
|
||||||
>
|
>
|
||||||
|
|
|
@ -135,9 +135,9 @@ export default function PreservedFormatsModal({ onClose, link }: Props) {
|
||||||
<p className="text-xl font-thin">{t("preserved_formats")}</p>
|
<p className="text-xl font-thin">{t("preserved_formats")}</p>
|
||||||
<div className="divider mb-2 mt-1"></div>
|
<div className="divider mb-2 mt-1"></div>
|
||||||
{screenshotAvailable(link) ||
|
{screenshotAvailable(link) ||
|
||||||
pdfAvailable(link) ||
|
pdfAvailable(link) ||
|
||||||
readabilityAvailable(link) ||
|
readabilityAvailable(link) ||
|
||||||
monolithAvailable(link) ? (
|
monolithAvailable(link) ? (
|
||||||
<p className="mb-3">{t("available_formats")}</p>
|
<p className="mb-3">{t("available_formats")}</p>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
|
@ -214,8 +214,9 @@ export default function PreservedFormatsModal({ onClose, link }: Props) {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={`flex flex-col sm:flex-row gap-3 items-center justify-center ${isReady() ? "sm:mt " : ""
|
className={`flex flex-col sm:flex-row gap-3 items-center justify-center ${
|
||||||
}`}
|
isReady() ? "sm:mt " : ""
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`https://web.archive.org/web/${link?.url?.replace(
|
href={`https://web.archive.org/web/${link?.url?.replace(
|
||||||
|
|
|
@ -68,8 +68,9 @@ export default function PreservedFormatRow({
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
href={`${isPublic ? "/public" : ""
|
href={`${
|
||||||
}/preserved/${link?.id}?format=${format}`}
|
isPublic ? "/public" : ""
|
||||||
|
}/preserved/${link?.id}?format=${format}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="btn btn-sm btn-square"
|
className="btn btn-sm btn-square"
|
||||||
>
|
>
|
||||||
|
|
|
@ -102,8 +102,9 @@ export default function Index() {
|
||||||
<div
|
<div
|
||||||
className="h-[60rem] p-5 flex gap-3 flex-col"
|
className="h-[60rem] p-5 flex gap-3 flex-col"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `linear-gradient(${activeCollection?.color}20 10%, ${settings.theme === "dark" ? "#262626" : "#f3f4f6"
|
backgroundImage: `linear-gradient(${activeCollection?.color}20 10%, ${
|
||||||
} 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,
|
settings.theme === "dark" ? "#262626" : "#f3f4f6"
|
||||||
|
} 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{activeCollection && (
|
{activeCollection && (
|
||||||
|
@ -231,20 +232,20 @@ export default function Index() {
|
||||||
|
|
||||||
<p className="text-neutral text-sm">
|
<p className="text-neutral text-sm">
|
||||||
{activeCollection.members.length > 0 &&
|
{activeCollection.members.length > 0 &&
|
||||||
activeCollection.members.length === 1
|
activeCollection.members.length === 1
|
||||||
? t("by_author_and_other", {
|
? t("by_author_and_other", {
|
||||||
author: collectionOwner.name,
|
|
||||||
count: activeCollection.members.length,
|
|
||||||
})
|
|
||||||
: activeCollection.members.length > 0 &&
|
|
||||||
activeCollection.members.length !== 1
|
|
||||||
? t("by_author_and_others", {
|
|
||||||
author: collectionOwner.name,
|
author: collectionOwner.name,
|
||||||
count: activeCollection.members.length,
|
count: activeCollection.members.length,
|
||||||
})
|
})
|
||||||
|
: activeCollection.members.length > 0 &&
|
||||||
|
activeCollection.members.length !== 1
|
||||||
|
? t("by_author_and_others", {
|
||||||
|
author: collectionOwner.name,
|
||||||
|
count: activeCollection.members.length,
|
||||||
|
})
|
||||||
: t("by_author", {
|
: t("by_author", {
|
||||||
author: collectionOwner.name,
|
author: collectionOwner.name,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,15 +290,15 @@ export default function Index() {
|
||||||
setSortBy={setSortBy}
|
setSortBy={setSortBy}
|
||||||
editMode={
|
editMode={
|
||||||
permissions === true ||
|
permissions === true ||
|
||||||
permissions?.canUpdate ||
|
permissions?.canUpdate ||
|
||||||
permissions?.canDelete
|
permissions?.canDelete
|
||||||
? editMode
|
? editMode
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
setEditMode={
|
setEditMode={
|
||||||
permissions === true ||
|
permissions === true ||
|
||||||
permissions?.canUpdate ||
|
permissions?.canUpdate ||
|
||||||
permissions?.canDelete
|
permissions?.canDelete
|
||||||
? setEditMode
|
? setEditMode
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
@ -305,11 +306,11 @@ export default function Index() {
|
||||||
<p>
|
<p>
|
||||||
{activeCollection?._count?.links === 1
|
{activeCollection?._count?.links === 1
|
||||||
? t("showing_count_result", {
|
? t("showing_count_result", {
|
||||||
count: activeCollection?._count?.links,
|
count: activeCollection?._count?.links,
|
||||||
})
|
})
|
||||||
: t("showing_count_results", {
|
: t("showing_count_results", {
|
||||||
count: activeCollection?._count?.links,
|
count: activeCollection?._count?.links,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</LinkListOptions>
|
</LinkListOptions>
|
||||||
|
|
||||||
|
|
|
@ -100,8 +100,9 @@ export default function PublicCollections() {
|
||||||
<div
|
<div
|
||||||
className="h-96"
|
className="h-96"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `linear-gradient(${collection?.color}30 10%, ${settings.theme === "dark" ? "#262626" : "#f3f4f6"
|
backgroundImage: `linear-gradient(${collection?.color}30 10%, ${
|
||||||
} 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,
|
settings.theme === "dark" ? "#262626" : "#f3f4f6"
|
||||||
|
} 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{collection && (
|
{collection && (
|
||||||
|
@ -172,20 +173,20 @@ export default function PublicCollections() {
|
||||||
|
|
||||||
<p className="text-neutral text-sm">
|
<p className="text-neutral text-sm">
|
||||||
{collection.members.length > 0 &&
|
{collection.members.length > 0 &&
|
||||||
collection.members.length === 1
|
collection.members.length === 1
|
||||||
? t("by_author_and_other", {
|
? t("by_author_and_other", {
|
||||||
author: collectionOwner.name,
|
|
||||||
count: collection.members.length,
|
|
||||||
})
|
|
||||||
: collection.members.length > 0 &&
|
|
||||||
collection.members.length !== 1
|
|
||||||
? t("by_author_and_others", {
|
|
||||||
author: collectionOwner.name,
|
author: collectionOwner.name,
|
||||||
count: collection.members.length,
|
count: collection.members.length,
|
||||||
})
|
})
|
||||||
|
: collection.members.length > 0 &&
|
||||||
|
collection.members.length !== 1
|
||||||
|
? t("by_author_and_others", {
|
||||||
|
author: collectionOwner.name,
|
||||||
|
count: collection.members.length,
|
||||||
|
})
|
||||||
: t("by_author", {
|
: t("by_author", {
|
||||||
author: collectionOwner.name,
|
author: collectionOwner.name,
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,11 +210,11 @@ export default function PublicCollections() {
|
||||||
placeholder={
|
placeholder={
|
||||||
collection._count?.links === 1
|
collection._count?.links === 1
|
||||||
? t("search_count_link", {
|
? t("search_count_link", {
|
||||||
count: collection._count?.links,
|
count: collection._count?.links,
|
||||||
})
|
})
|
||||||
: t("search_count_links", {
|
: t("search_count_links", {
|
||||||
count: collection._count?.links,
|
count: collection._count?.links,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</LinkListOptions>
|
</LinkListOptions>
|
||||||
|
|
|
@ -30,19 +30,19 @@ export default function Account() {
|
||||||
!objectIsEmpty(account)
|
!objectIsEmpty(account)
|
||||||
? account
|
? account
|
||||||
: ({
|
: ({
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
id: null,
|
id: null,
|
||||||
name: "",
|
name: "",
|
||||||
username: "",
|
username: "",
|
||||||
email: "",
|
email: "",
|
||||||
emailVerified: null,
|
emailVerified: null,
|
||||||
password: undefined,
|
password: undefined,
|
||||||
image: "",
|
image: "",
|
||||||
isPrivate: true,
|
isPrivate: true,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
createdAt: null,
|
createdAt: null,
|
||||||
whitelistedUsers: [],
|
whitelistedUsers: [],
|
||||||
} as unknown as AccountSettings)
|
} as unknown as AccountSettings)
|
||||||
);
|
);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
Ŝarĝante…
Reference in New Issue