diff --git a/public/icon-192x192.png b/public/icon-192x192.png new file mode 100644 index 0000000..447bac4 Binary files /dev/null and b/public/icon-192x192.png differ diff --git a/public/icon-512x512.png b/public/icon-512x512.png new file mode 100644 index 0000000..41d06c8 Binary files /dev/null and b/public/icon-512x512.png differ diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/short.svg b/public/short.svg new file mode 100644 index 0000000..8abd480 --- /dev/null +++ b/public/short.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/favicon.ico b/src/app/favicon.ico index 718d6fe..16fa5b2 100644 Binary files a/src/app/favicon.ico and b/src/app/favicon.ico differ diff --git a/src/app/globals.css b/src/app/globals.css index 93da6e7..2972a57 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -19,11 +19,11 @@ h2 { } .form-field-error { - @apply border-red-500; + @apply common-red; } .form-label-error { - @apply text-red-500; + @apply common-red; } form { @@ -51,11 +51,11 @@ button { } .zebra { - @apply even:bg-slate-800 p-2 rounded; + @apply even:bg-slate-800 p-2 py-5 rounded; } .common-red { - @apply text-red-500; + @apply text-red-800; } @keyframes slide-in { diff --git a/src/app/manifest.ts b/src/app/manifest.ts new file mode 100644 index 0000000..f87ae17 --- /dev/null +++ b/src/app/manifest.ts @@ -0,0 +1,27 @@ +import type { MetadataRoute } from "next"; + +export default function manifest(): MetadataRoute.Manifest { + return { + name: "traberph/short", + short_name: "short", + description: "A URL shortener", + start_url: "/~/dash", + display: "standalone", + theme_color: "#111827", + background_color: "#111827", + icons: [ + { + src:'/icon-192x192.png', + sizes: '192x192', + type: 'image/png', + }, + { + src:'/icon-512x512.png', + sizes: '512x512', + type: 'image/png', + }, + ], + }; +} + + \ No newline at end of file diff --git a/src/app/~/dash/[uuid]/page.tsx b/src/app/~/dash/[uuid]/page.tsx index dfe57d9..b5fd2c0 100644 --- a/src/app/~/dash/[uuid]/page.tsx +++ b/src/app/~/dash/[uuid]/page.tsx @@ -7,7 +7,7 @@ import CustomPageDashboard from "@/components/CustomPageDashboard"; import LinkFavicon from "@/components/LinkFavicon"; import { hashToColor } from "@/utils"; import PinPageToRootForm from "@/components/forms/pinPageToRootForm"; -import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/solid"; +import { ArrowTopRightOnSquareIcon, BookmarkIcon } from "@heroicons/react/24/solid"; import QRCode from "@/components/QRCode"; interface PageProps { @@ -90,7 +90,7 @@ export default async function DetailedStats({ params }: PageProps) {

{page.redirectPage[0].dest}

: ""}
- {page.pinnedPage ?

Pinned to root

: ""} + {page.pinnedPage ? : ""}
diff --git a/src/app/~/dash/layout.tsx b/src/app/~/dash/layout.tsx index 630e58d..ab7a6d0 100644 --- a/src/app/~/dash/layout.tsx +++ b/src/app/~/dash/layout.tsx @@ -19,7 +19,7 @@ export default async function Dashboard({ children }: { children: ReactNode }) { } return ( -
+
diff --git a/src/app/~/page.tsx b/src/app/~/page.tsx index 4bbd194..ec2fed7 100644 --- a/src/app/~/page.tsx +++ b/src/app/~/page.tsx @@ -15,7 +15,7 @@ export default async function AdminRoot() { return (
-

traberph/short

+

traberph/short

or back to root
diff --git a/src/components/CustomPageDashboard.tsx b/src/components/CustomPageDashboard.tsx index b6fbc50..6a38be8 100644 --- a/src/components/CustomPageDashboard.tsx +++ b/src/components/CustomPageDashboard.tsx @@ -23,24 +23,22 @@ export default async function CustomPageDashboard(params: { customPage: CustomPa }); return (<> -

Links on Page

+

Links on Page

{linkBlocks.map((block) => ( -
-
order: {block.order}
-
title: {block.title}
-
connected link page: {block.redirectPage.page.shortcode}
-
+
+
+
order: {block.order}
+
title: {block.title}
+
link page: {block.redirectPage.page.shortcode}
+
+
-
-
- -
-
diff --git a/src/components/LinkFavicon.tsx b/src/components/LinkFavicon.tsx index d75a02c..66446dc 100644 --- a/src/components/LinkFavicon.tsx +++ b/src/components/LinkFavicon.tsx @@ -4,7 +4,7 @@ export default function LinkFavicon({ url }: { url: string }) { const hostname = new URL(url).hostname; - return (
+ return (  -
); } \ No newline at end of file diff --git a/src/components/PageListComponent.tsx b/src/components/PageListComponent.tsx index cc86cae..59e64e9 100644 --- a/src/components/PageListComponent.tsx +++ b/src/components/PageListComponent.tsx @@ -4,6 +4,7 @@ import Image from 'next/image'; import Link from 'next/link'; import LinkFavicon from './LinkFavicon'; import PinPageToRootForm from './forms/pinPageToRootForm'; +import { BookmarkIcon } from '@heroicons/react/24/solid'; type PageWithRelations = Prisma.PageGetPayload<{ include: { @@ -24,9 +25,11 @@ export default async function PageListComponent({ page }: { page: PageWithRelati return ( -
-
- {redirectPage ? : +
+
+
+ {redirectPage ? + : icon} +
+
+

{page.shortcode}

+

{redirectPage ? redirectPage.dest : customPage.title}

+
+
+ {page.pinnedPage ? : ""} +
-

{page.shortcode}

-

{redirectPage ? redirectPage.dest : customPage.title}

- -
-
- {page.pinnedPage ?

Pinned to root

: ""} -
-
- {page._count.stat ?

{page._count.stat} visits

: ""} - {// - } + {page._count.stat ?

{page._count.stat} visits

: ""}
diff --git a/src/components/QRCode.tsx b/src/components/QRCode.tsx index cf55826..a07baa2 100644 --- a/src/components/QRCode.tsx +++ b/src/components/QRCode.tsx @@ -24,7 +24,7 @@ export default function QRCode({ url }: { url: string }) { {values.map((value, index) => ( setErrorCorrectionLevel(index)}> {value} diff --git a/src/components/forms/createLinkBlockForm.tsx b/src/components/forms/createLinkBlockForm.tsx index 232faea..4eef7b5 100644 --- a/src/components/forms/createLinkBlockForm.tsx +++ b/src/components/forms/createLinkBlockForm.tsx @@ -18,7 +18,7 @@ export default function CreateLinkBlockForm({ customPage, shortcodes }: { custom useEffect(() => { handleToast(state); }, [state]); - return (
+ return (