Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Dashboard & Home Page improvements #22

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import BetaWarning from "@/components/beta-warning";

export default async function Home() {
return (
<>
<main className="relative h-[calc(100vh-4rem)]">
<BetaWarning />
<div className="absolute inset-0 -z-10 h-full w-full bg-white bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] dark:bg-neutral-900"></div>
<section
Expand All @@ -23,7 +23,7 @@ export default async function Home() {
Slug is an open-source platform that allows you to create, manage, and
share short links with ease. It's fast, secure, and easy to use.
</TypographyP>
<div className="mt-8 items-center justify-center gap-x-3 space-y-3 sm:flex sm:space-y-0 animate-in fade-in-30 duration-700">
<div className="mt-8 items-center justify-center gap-x-3 space-y-3 duration-700 animate-in fade-in-30 sm:flex sm:space-y-0">
<Link
href="/dashboard"
className={buttonVariants({
Expand Down Expand Up @@ -56,6 +56,6 @@ export default async function Home() {
</div>
</section>
<Footer className="fixed bottom-0 mt-4 py-4" />
</>
</main>
);
}
21 changes: 14 additions & 7 deletions src/components/links/create-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
FormMessage,
} from "@/ui/form";
import { Input, Textarea } from "@/ui/input";
import { LoaderIcon, RocketIcon, ShuffleIcon } from "lucide-react";
import { LoaderIcon, RocketIcon, ShuffleIcon, TagsIcon } from "lucide-react";
import { insertTagToLink } from "@/server/actions/tags";
import SelectTagsLink from "./select-tags-link";

Expand Down Expand Up @@ -222,12 +222,19 @@ export function CreateLink(props: CreateLinkProps) {
)}
/>
{isError && <Alert variant="error">{message}</Alert>}
<SelectTagsLink
selectedTags={selectedTags}
onSelectTag={handleAddTags}
onDeleteTag={handleDeleteTag}
tags={props.tags}
/>
{props.tags.length > 0 ? (
<SelectTagsLink
selectedTags={selectedTags}
onSelectTag={handleAddTags}
onDeleteTag={handleDeleteTag}
tags={props.tags}
/>
) : (
<div className="flex items-center justify-center space-x-2 rounded-md border border-neutral-200 py-3 text-sm dark:border-neutral-800">
<TagsIcon size={16} />
<p className="font-medium">You don't have any tag created.</p>
</div>
)}
</div>
<DialogFooter>
<DialogClose asChild>
Expand Down
5 changes: 1 addition & 4 deletions src/components/links/edit-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ const EditLink = (props: EditLinkProps) => {
<PopoverTrigger className="absolute bottom-0 right-0 top-0 flex items-center px-3">
<LockIcon size={16} />
</PopoverTrigger>
<PopoverContent
sideOffset={0.2}
className="text-sm"
>
<PopoverContent className="max-w-72 text-sm">
<p className="mb-2">
Editing the custom link will remove access from
the previous link and it will be available to
Expand Down
4 changes: 2 additions & 2 deletions src/components/links/links-limit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TooltipTrigger,
} from "@/ui/tooltip";
import { cn } from "@/utils";
import { CircleDashedIcon, TriangleAlertIcon } from "lucide-react";
import { PackageIcon, TriangleAlertIcon } from "lucide-react";

interface LinksLimitProps {
userLinks: number;
Expand Down Expand Up @@ -36,7 +36,7 @@ const LinksLimit = ({ userLinks, maxLinks }: LinksLimitProps) => {
{max ? (
<TriangleAlertIcon size={14} />
) : (
<CircleDashedIcon size={14} />
<PackageIcon size={14} />
)}
<span>
{userLinks < 10 ? `0${userLinks}` : userLinks}
Expand Down
2 changes: 1 addition & 1 deletion src/components/tags/search-tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const SearchTag = (props: SearchTagProps) => {
</Button>
</PopoverTrigger>
<PopoverContent>
<p className="my-2 text-center font-medium">
<p className="my-2 text-center text-sm font-medium">
My Tags ({props.tags.length})
</p>
<div className="mb-2 flex w-full flex-col space-y-1">
Expand Down
Loading