+ {collection.name} +
+ ++ + {formattedDate} +
+{collection.name}
+ + {collection.isPublic ? ( + + ) : undefined} +{name}
+{value}
+{e.name}
++ {unescapeString(link.name || link.description) || link.url} +
+ + { + e.stopPropagation(); + }} + className="flex gap-1 item-center select-none text-neutral mt-1 hover:opacity-70 duration-100" + > + +{shortendURL}
+ +Description
+ ++ {link.description ? ( + unescapeString(link.description) + ) : ( + + No description provided. + + )} +
+ {link.tags[0] && ( + <> +Tags
+ +{collection?.name}
+ + ); +} diff --git a/Linkwarden/components/LinkViews/LinkComponents/LinkDate.tsx b/Linkwarden/components/LinkViews/LinkComponents/LinkDate.tsx new file mode 100644 index 00000000..7bed676a --- /dev/null +++ b/Linkwarden/components/LinkViews/LinkComponents/LinkDate.tsx @@ -0,0 +1,23 @@ +import { LinkIncludingShortenedCollectionAndTags } from "@/types/global"; +import React from "react"; + +export default function LinkDate({ + link, +}: { + link: LinkIncludingShortenedCollectionAndTags; +}) { + const formattedDate = new Date( + (link.importDate || link.createdAt) as string + ).toLocaleString("en-US", { + year: "numeric", + month: "short", + day: "numeric", + }); + + return ( +{formattedDate}
++
{shortendURL}
+ ++ {unescapeString(link.name || link.description) || link.url} +
+ +{shortendURL}
+{unescapeString(link.description)}
+ {link.tags[0] ? ( ++ {unescapeString(link.name || link.description) || link.url} +
+ +{shortendURL}
+ + ) : ( +Loading...
++ Delete {selectedLinks.length} Link{selectedLinks.length > 1 ? "s" : ""} +
+ + + +Are you sure you want to delete {selectedLinks.length} links?
+ ) : ( +Are you sure you want to delete this link?
+ )} + ++ Hold the Shift key while clicking + 'Delete' to bypass this confirmation in the future. +
+ + ++ Edit {selectedLinks.length} Link{selectedLinks.length > 1 ? "s" : ""} +
+ +Move to Collection
+Add Tags
++ {permissions === true ? "Delete" : "Leave"} Collection +
+ + + ++ To confirm, type " + {collection.name} + " in the box below: +
+ +Click the button below to leave the current collection.
+ )} + + +Delete Link
+ + + +Are you sure you want to delete this Link?
+ ++ Hold the Shift key while clicking + 'Delete' to bypass this confirmation in the future. +
+ + +Edit Collection Info
+ + + +Name
+Color
+Description
++ {permissions === true ? "Share and Collaborate" : "Team"} +
+ + + +Make Public
+ + + ++ This will let Anyone to view this collection and it's + users. +
+Sharable Link (Click to copy)
+Members
+ ++ {collectionOwner.name} +
++ @{collectionOwner.username} +
+Owner
++ {e.user.name} +
++ @{e.user.username} +
++ {roleLabel} +
+ )} + + {permissions === true && ( + { + const updatedMembers = + collection.members.filter((member) => { + return ( + member.user.username !== e.user.username + ); + }); + setCollection({ + ...collection, + members: updatedMembers, + }); + }} + /> + )} +Edit Link
+ + + + {link.url ? ( + + +{shortendURL}
+ + ) : undefined} + +Name
+Collection
+ {link.collection.name ? ( +Tags
+Description
+New Sub-Collection
+For {parent.name}
+ > + ) : ( +Create a New Collection
+ )} + + + +Name
+Color
+Description
+Create a New Link
+ + + +Link
+Collection
+ {link.collection.name ? ( +Name
+Tags
+Description
++ {optionsExpanded ? "Hide" : "More"} Options +
+ +Access Token Created
++ Your new token has been created. Please copy it and store it + somewhere safe. You will not be able to see it again. +
+Create an Access Token
+ + + +Name
+ +Expires in
+ +Preserved Formats
+ + + + {isReady() && + (screenshotAvailable(link) || + pdfAvailable(link) || + readabilityAvailable(link)) ? ( ++ The following formats are available for this link: +
+ ) : ( + "" + )} + ++ Link preservation is in the queue +
++ Please check back later to see the result +
++ View latest snapshot on archive.org +
+ + + {link?.collection.ownerId === session.data?.user.id ? ( +Refresh Preserved Formats
++ This deletes the current preservations +
+Revoke Token
+ + + ++ Are you sure you want to revoke this Access Token? Any apps or + services using this token will no longer be able to access Linkwarden + using it. +
+ + +Upload File
+File
+ ++ PDF, PNG, JPG (Up to {process.env.NEXT_PUBLIC_MAX_FILE_SIZE || 30} + MB) +
+Collection
+ {link.collection.name ? ( +Name
+Tags
+Description
+{optionsExpanded ? "Hide" : "More"} Options
++ {text || "You haven't created any Links Here"} +
++ Start your journey by creating a new Link! +
+{title}
+{description}
+{name}
++ The Link preservation is currently in the queue +
++ Please check back later to see the result +
+Account
+Preference
+Access Tokens
+Password
+Billing
+Help
+GitHub
+Mastodon
+{title}
++ {text} +
+ ) : undefined} + {children} ++ © {new Date().getFullYear()}{" "} + + Linkwarden + + . All rights reserved. +
++ Sign in to ${escapedHost} + | +|
+
|
+ |
+ If you did not request this email you can safely ignore it. + | +
+ {activeCollection?.name} +
++ By {collectionOwner.name} + {activeCollection.members.length > 0 && + ` and ${activeCollection.members.length} others`} + . +
+{activeCollection?.description}
+ )} + + {/* {collections.some((e) => e.parentId === activeCollection.id) ? ( + + ) : undefined} */} + + + +Showing {activeCollection?._count?.links} results
+New Collection
+ ++ Please check your Email +
+ + + +A sign in link has been sent to your email address.
+ ++ Didn't see the email? Check your spam folder or visit the{" "} + + Password Recovery + {" "} + page to resend the link. +
++ View Your Recently Added Links Here! +
++ This section will view your latest added Links across every + Collections you have access to. +
+ +Import From
++ Pin Your Favorite Links Here! +
++ You can Pin your favorite Links by clicking on the three dots on + each Link and clicking{" "} + Pin to Dashboard. +
++ Pin Your Favorite Links Here! +
++ You can Pin your favorite Links by clicking on the three dots on + each Link and clicking{" "} + Pin to Dashboard. +
++ Enter your credentials +
++ Username + {availableLogins.emailEnabled === "true" + ? " or Email" + : undefined} +
+ ++ Password +
+ +New here?
+ + Sign Up + ++ {collection.name} +
++ By {collectionOwner.name} + {collection.members.length > 0 + ? ` and ${collection.members.length} others` + : undefined} + . +
+{collection.description}
+ + + +This collection is empty...
+ )} + + {/*+ List created with Linkwarden. +
*/} ++ Registration is disabled for this instance, please contact the admin + in case of any issues. +
++ Nothing found.{" "} + + ¯\_(ツ)_/¯ + +
+ ) : links[0] ? ( +Access Tokens
+ + + ++ Access Tokens can be used to access Linkwarden from other apps and + services without giving away your Username and Password. +
+ + + + {tokens.length > 0 ? ( + <> + + ++ | Name | +Created | +Expires | ++ |
---|---|---|---|---|
{i + 1} | +{token.name} | ++ {new Date(token.createdAt || "").toLocaleDateString()} + | ++ {new Date(token.expires || "").toLocaleDateString()} + | ++ + | +
Account Settings
+ + + +Display Name
+Username
++ Updating this field will change your billing email as well +
+ ) : undefined} +Profile Photo
++ Import & Export +
+Import your data from other platforms.
+Import From
+Download your data instantly.
+ +Export Data
++ Profile Visibility +
++ This will limit who can find and add you to new Collections. +
+ + {user.isPrivate && ( +Whitelisted Users
++ Please provide the Username of the users you wish to grant + visibility to your profile. Separated by comma. +
++ Delete Account +
++ This will permanently delete ALL the Links, Collections, Tags, and + archived data you own.{" "} + {process.env.NEXT_PUBLIC_STRIPE + ? "It will also cancel your subscription. " + : undefined}{" "} + You will be prompted to enter your password before the deletion + process. +
+Delete Your Account
+ +Billing Settings
+ + + ++ To manage/cancel your subscription, visit the{" "} + + Billing Portal + + . +
+ ++ If you still need help or encountered any issues, feel free to reach + out to us at:{" "} + + support@linkwarden.app + +
++ Delete Account +
++ This will permanently delete all the Links, Collections, Tags, and + archived data you own. It will also log you out + {process.env.NEXT_PUBLIC_STRIPE + ? " and cancel your subscription" + : undefined} + . This action is irreversible! +
+ + {process.env.NEXT_PUBLIC_KEYCLOAK_ENABLED !== "true" ? ( +Confirm Your Password
+ +Change Password
+ + + ++ To change your password, please fill out the following. Your password + should be at least 8 characters. +
+New Password
+ +Confirm New Password
+ +Preference
+ + + +Select Theme
+Dark
+ + {/*Light
+ {/*+ Archive Settings +
+ + + +Formats to Archive/Preserve webpages:
+Link Settings
+ + +Clicking on Links should:
++ Subscribe to Linkwarden! +
+ + + ++ You will be redirected to Stripe, feel free to reach out to us at{" "} + + support@linkwarden.app + {" "} + in case of any issue. +
++ ${plan === Plan.monthly ? "4" : "3"} + /mo +
++ Billed {plan === Plan.monthly ? "Monthly" : "Yearly"} +
+ ++ {activeTag?.name} +
+