added read-only mode + visual improvements
This commit is contained in:
@@ -81,12 +81,15 @@ const LinkListOptions = ({
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
response.ok &&
|
||||
if (response.ok) {
|
||||
toast.success(
|
||||
selectedLinks.length === 1
|
||||
? t("link_deleted")
|
||||
: t("links_deleted", { count: selectedLinks.length })
|
||||
);
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -55,8 +55,11 @@ export default function LinkActions({
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
response.ok &&
|
||||
if (response.ok) {
|
||||
toast.success(isAlreadyPinned ? t("link_unpinned") : t("link_unpinned"));
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
};
|
||||
|
||||
const deleteLink = async () => {
|
||||
@@ -66,7 +69,11 @@ export default function LinkActions({
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
response.ok && toast.success(t("deleted"));
|
||||
if (response.ok) {
|
||||
toast.success(t("deleted"));
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -157,7 +157,12 @@ export default function LinkCardCompact({
|
||||
// linkInfo={showInfo}
|
||||
/>
|
||||
</div>
|
||||
<div className="divider my-0 last:hidden h-[1px]"></div>
|
||||
<div
|
||||
className="last:hidden rounded-none"
|
||||
style={{
|
||||
borderTop: "1px solid var(--fallback-bc,oklch(var(--bc)/0.1))",
|
||||
}}
|
||||
></div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,11 @@ export default function DeleteLinkModal({ onClose, activeLink }: Props) {
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
response.ok && toast.success(t("deleted"));
|
||||
if (response.ok) {
|
||||
toast.success(t("deleted"));
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
|
||||
if (router.pathname.startsWith("/links/[id]")) {
|
||||
router.push("/dashboard");
|
||||
|
||||
@@ -20,7 +20,11 @@ export default function DeleteUserModal({ onClose, userId }: Props) {
|
||||
|
||||
toast.dismiss(load);
|
||||
|
||||
response.ok && toast.success(t("user_deleted"));
|
||||
if (response.ok) {
|
||||
toast.success(t("user_deleted"));
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
|
||||
onClose();
|
||||
};
|
||||
|
||||
@@ -30,6 +30,8 @@ export default function DeleteTokenModal({ onClose, activeToken }: Props) {
|
||||
|
||||
if (response.ok) {
|
||||
toast.success(t("token_revoked"));
|
||||
} else {
|
||||
toast.error(response.data as string);
|
||||
}
|
||||
|
||||
onClose();
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function PageHeader({
|
||||
return (
|
||||
<div className="flex items-center gap-3">
|
||||
<i
|
||||
className={`${icon} text-primary text-3xl sm:text-4xl drop-shadow`}
|
||||
className={`${icon} text-primary sm:text-3xl text-2xl drop-shadow`}
|
||||
></i>
|
||||
<div>
|
||||
<p className="text-3xl capitalize font-thin">{title}</p>
|
||||
|
||||
Reference in New Issue
Block a user