Skip to content

Commit 0a63112

Browse files
authored
Merge pull request #303 from ln-dev7/develop
UI update
2 parents 96b2fe3 + c5a6d8b commit 0a63112

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+544
-1160
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
custom: ["https://sharuco.lndev.me/donation", "https://www.buymeacoffee.com/lndev]
1+
custom: ["https://store.lndev.me/buy/3a21351e-5fe2-4664-9a94-a4bcde619e2d", "https://www.buymeacoffee.com/lndev"]

.github/workflows/ci.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,43 @@ Share your code. Manage Form & Link.
1111
## Requirements
1212

1313
- Node (>=18.18.0 recommended) + npm
14-
- docker + docker-compose
15-
- make (for Makefile targets)
1614

1715
## How to Install
1816

1917
```bash
2018
# clone the repository and cd into it:
2119
git clone https://github.com/ln-dev7/sharuco && cd sharuco
2220

23-
# Tips : make help to see all make target
24-
25-
## --- WITH DOCKER ---
26-
# build and up the whole stack and start it with one command:
27-
# note, all env are available in the example
28-
make docker-build-up
29-
30-
# to build the app container only:
31-
make docker-build
32-
33-
# to run the app container:
34-
make docker-run
35-
36-
## --- NO DOCKER ---
3721
# copy the .env.example to .env and fill all env variables
3822
cp .env.example .env
3923

40-
# - `NEXT_PUBLIC_FIREBASE_API_KEY`: Your Firebase API Key.
41-
# - `NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN`: Your Firebase Auth Domain.
42-
# - `NEXT_PUBLIC_FIREBASE_PROJECT_ID`: Your Firebase Project ID.
43-
# - `NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET`: Your Firebase Storage Bucket.
44-
# - `NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID`: Your Firebase Messaging Sender ID.
45-
# - `NEXT_PUBLIC_FIREBASE_APP_ID`: Your Firebase App ID.
46-
# - `NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID`: Your Firebase Measurement ID.
24+
# - `NEXT_PUBLIC_FIREBASE_API_KEY` : Firebase API Key
25+
# - `NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN` : Firebase Auth Domain
26+
# - `NEXT_PUBLIC_FIREBASE_PROJECT_ID` : Firebase Project ID
27+
# - `NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET` : Firebase Storage Bucket
28+
# - `NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID` : Firebase Messaging Sender ID
29+
# - `NEXT_PUBLIC_FIREBASE_APP_ID` : Firebase App ID
30+
# - `NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID` : Firebase Measurement ID
31+
# - `NEXT_PUBLIC_NOTCH_PAY_API_URL` : Notch Pay API URL
32+
# - `NEXT_PUBLIC_NOTCH_PAY_PUBLIC_KEY` : Notch Pay Public Key
33+
# - `NEXT_PUBLIC_NOTCH_PAY_PRIVATE_KEY` : Notch Pay Private Key
34+
# - `NEXT_PUBLIC_NOTCH_PAY_PUBLIC_KEY_TEST` : Notch Pay Public Key Test
35+
# - `NEXT_PUBLIC_ALGOLIA_APP_ID` : Algolia App ID
36+
# - `NEXT_PUBLIC_ALGOLIA_SEARCH_KEY` : Algolia Search Key
37+
# - `NEXT_PUBLIC_ALGOLIA_ADMIN_KEY` : Algolia Admin Key
38+
# - `NEXT_PUBLIC_ALGOLIA_USAGE_KEY` : Algolia Usage Key
39+
# - `NEXT_PUBLIC_LINK_PREVIEW_KEY` : Link Preview Key
40+
# - `NEXT_PUBLIC_RECAPTCHA_SITE_KEY` : Recaptcha Site Key
41+
# - `NEXT_PUBLIC_RECAPTCHA_SECRET_KEY` : Recaptcha Secret Key
4742

4843
# Install dependencies:
49-
make install
44+
npm install
5045

5146
# build and start
52-
make build && make start
47+
npm run build
5348

5449
# or on dev mode
55-
make dev
50+
npm run dev
5651
```
5752

5853
## Usage
@@ -78,4 +73,4 @@ This project is licensed under the MIT License.
7873
2. DataBase / Auth: [Firebase](https://firebase.google.com/)
7974
3. Hosting: [Vercel](https://vercel.com/)
8075
4. UI : [UI Shadcn](https://ui.shadcn.com/) ( Tailwind CSS + Radix UI )
81-
5. Tools: [React Query](https://tanstack.com/query/v3/), [React Hook Form](https://react-hook-form.com/)
76+
5. Tools: [React Query](https://tanstack.com/query/v3/), [React Hook Form](https://react-hook-form.com/)

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"tailwind": {
77
"config": "tailwind.config.js",
88
"css": "styles/globals.css",
9-
"baseColor": "slate",
9+
"baseColor": "zinc",
1010
"cssVariables": true
1111
},
1212
"aliases": {

components/algolia/algolia-search-code.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function AlgoliaSearchCode() {
3131
root: "w-full mt-0 mb-3 rounded-none",
3232
form: "w-full relative rounded-none",
3333
input:
34-
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-slate-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
34+
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
3535
submit: "absolute left-[14px] top-[19px]",
3636
reset: "hidden",
3737
}}
@@ -44,9 +44,9 @@ export default function AlgoliaSearchCode() {
4444
function Hit({ hit }) {
4545
return (
4646
<a href={`/code-preview/${hit.objectID}`}>
47-
<div className="mb-4 w-full overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-slate-300 dark:hover:border-sky-500">
47+
<div className="mb-4 w-full overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-zinc-300 dark:hover:border-sky-500">
4848
<div className="flex flex-col items-start">
49-
<h3 className="mb-2 text-lg font-semibold leading-none tracking-tight text-slate-700 dark:text-slate-300 ">
49+
<h3 className="mb-2 text-lg font-semibold leading-none tracking-tight text-zinc-700 dark:text-zinc-300 ">
5050
{hit.idAuthor}
5151
</h3>
5252
<Badge variant="outline">{hit.language}</Badge>
@@ -56,7 +56,7 @@ function Hit({ hit }) {
5656
<Highlight
5757
attribute="description"
5858
classNames={{
59-
root: "text-sm text-muted-foreground text-slate-700 dark:text-slate-300 ",
59+
root: "text-sm text-muted-foreground text-zinc-700 dark:text-zinc-300 ",
6060
highlighted: "bg-sky-500 text-white",
6161
}}
6262
hit={hit}

components/algolia/algolia-search-form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function AlgoliaSearchForm() {
3535
root: "w-full mt-0 mb-3 rounded-none",
3636
form: "w-full relative rounded-none",
3737
input:
38-
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-slate-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
38+
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
3939
submit: "absolute left-[14px] top-[19px]",
4040
reset: "hidden",
4141
}}
@@ -53,12 +53,12 @@ export default function AlgoliaSearchForm() {
5353
function Hit({ hit }) {
5454
return (
5555
<a href={`/form/${hit.objectID}`}>
56-
<div className="mb-4 flex w-full flex-col items-start gap-2 overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-slate-300 dark:hover:border-sky-500">
56+
<div className="mb-4 flex w-full flex-col items-start gap-2 overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-zinc-300 dark:hover:border-sky-500">
5757
<h2 className="text-lg font-semibold">{hit.name}</h2>
5858
<Highlight
5959
attribute="description"
6060
classNames={{
61-
root: "line-clamp-4 text-sm text-medium text-slate-700 dark:text-slate-300 ",
61+
root: "line-clamp-4 text-sm text-medium text-zinc-700 dark:text-zinc-300 ",
6262
highlighted: "bg-sky-500 text-white",
6363
}}
6464
hit={hit}

components/algolia/algolia-search-link.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function AlgoliaSearchLink() {
4949
root: "w-full mt-0 mb-3 rounded-none",
5050
form: "w-full relative rounded-none",
5151
input:
52-
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-slate-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
52+
"outline-none w-full rounded-none p-4 pl-12 text-sm text-gray-900 border border-x-0 border-gray-300 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-800 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
5353
submit: "absolute left-[14px] top-[19px]",
5454
reset: "hidden",
5555
}}
@@ -67,12 +67,12 @@ export default function AlgoliaSearchLink() {
6767
function Hit({ hit }) {
6868
return (
6969
<a href={`${hit.link}`} target="_blank">
70-
<div className="mb-4 flex w-full flex-col items-start gap-2 overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-slate-300 dark:hover:border-sky-500">
70+
<div className="mb-4 flex w-full flex-col items-start gap-2 overflow-hidden rounded-lg border p-4 hover:border-sky-500 dark:border-zinc-300 dark:hover:border-sky-500">
7171
<div>
7272
<Highlight
7373
attribute="description"
7474
classNames={{
75-
root: "line-clamp-4 text-sm text-medium text-slate-700 dark:text-slate-300 ",
75+
root: "line-clamp-4 text-sm text-medium text-zinc-700 dark:text-zinc-300 ",
7676
highlighted: "bg-sky-500 text-white",
7777
}}
7878
hit={hit}

components/avatar-user.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
Sheet,
1717
SheetContent,
1818
SheetDescription,
19-
SheetFooter,
2019
SheetHeader,
2120
SheetTitle,
2221
SheetTrigger,
@@ -50,7 +49,7 @@ export function AvatarUser() {
5049
<SheetTrigger asChild>
5150
<div className="relative">
5251
{data && data.exists && data.data.premium && (
53-
<div className="absolute -bottom-1 -right-1 z-10 flex items-center justify-center rounded-full border-2 border-yellow-500 bg-white dark:bg-slate-800">
52+
<div className="absolute -bottom-1 -right-1 z-10 flex items-center justify-center rounded-full border-2 border-yellow-500 bg-white dark:bg-zinc-800">
5453
<Verified className="h-5 w-5 shrink-0 p-1 text-yellow-500" />
5554
</div>
5655
)}
@@ -125,7 +124,7 @@ export function AvatarUser() {
125124
{user && (
126125
<>
127126
<Separator className="mb-4 mt-8" />
128-
<p className="mb-1 text-sm text-slate-500 dark:text-slate-400">
127+
<p className="mb-1 text-sm text-zinc-500 dark:text-zinc-400">
129128
Follow Sharuco on{" "}
130129
</p>
131130
<Link
@@ -137,7 +136,7 @@ export function AvatarUser() {
137136
className={buttonVariants({
138137
size: "sm",
139138
variant: "ghost",
140-
className: "text-slate-700 dark:text-slate-400",
139+
className: "text-zinc-700 dark:text-zinc-400",
141140
})}
142141
>
143142
<Icons.gitHub className="h-5 w-5" />
@@ -153,7 +152,7 @@ export function AvatarUser() {
153152
className={buttonVariants({
154153
size: "sm",
155154
variant: "ghost",
156-
className: "text-slate-700 dark:text-slate-400",
155+
className: "text-zinc-700 dark:text-zinc-400",
157156
})}
158157
>
159158
<Icons.twitter className="h-5 w-5 fill-current" />

0 commit comments

Comments
 (0)