Skip to content

Commit

Permalink
Merge branch 'EddieHubCommunity:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
foss2cyber authored Jul 2, 2023
2 parents 25145f8 + 655f1c4 commit 7fc6d0a
Show file tree
Hide file tree
Showing 169 changed files with 5,794 additions and 1,489 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ NEXTAUTH_URL="http://localhost:3000"

LINKFREE_API_SECRET="development"
GITHUB_API_TOKEN=""
RANDOM_USERS="eddiejaoude,sarajaoude"
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: 🐛 Bug
description: Report an issue to help improve the project.
title: "[BUG] <description>"
labels: ["🛠 goal: fix","🚦 status: awaiting triage"]
body:
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/config/reviewpad.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ workflows:
if:
- rule: $hasFilePattern("data/**")
then:
- '$addLabel("✍ chore: profile addition")'
- '$addLabel("✍ chore: profile")'

- name: chore-profile-addition
description: Automates profile addition
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/vercel-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to Vercel Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_dispatch:
push:
branches:
- revert-logger

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install Vercel CLI
run: npm install --global vercel@latest
- name: pull Vercel environment information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: build project artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: deploy preview + assign beta domain
run: |
du --inodes -d 5 .vercel/output
ls -l .vercel/output/functions
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > domain.txt
vercel alias --scope ${{ secrets.VERCEL_TEAM_ID }} --token ${{ secrets.VERCEL_TOKEN }} set `cat domain.txt` linkfree-preview.vercel.app
load-data:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: load json files
if: steps.changes.outputs.data == 'true'
run: curl -f https://linkfree-preview.vercel.app/api/system/reload?secret=${{ secrets.LINKFREE_API_SECRET_PREVIEW }}
30 changes: 20 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
## [1.144.13](https://github.com/EddieHubCommunity/LinkFree/compare/v1.144.12...v1.144.13) (2023-06-24)
## [1.149.3](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.2...v1.149.3) (2023-07-02)


### Bug Fixes

* switch to useRouter from next/router ([#7757](https://github.com/EddieHubCommunity/LinkFree/issues/7757)) ([daa37fa](https://github.com/EddieHubCommunity/LinkFree/commit/daa37fa74a99c29fda5fa87784104f8a2c356d56))
* link and linkstats relationship ([#7913](https://github.com/EddieHubCommunity/LinkFree/issues/7913)) ([1d33148](https://github.com/EddieHubCommunity/LinkFree/commit/1d33148c7626df7f0ed70de0dbd2c93fb7ef21bc))



## [1.144.12](https://github.com/EddieHubCommunity/LinkFree/compare/v1.144.11...v1.144.12) (2023-06-24)
## [1.149.2](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.1...v1.149.2) (2023-07-01)


### Bug Fixes

* profiles with no events ([#7906](https://github.com/EddieHubCommunity/LinkFree/issues/7906)) ([4a289b8](https://github.com/EddieHubCommunity/LinkFree/commit/4a289b8cf8b58af8aecf8ff76af6d24e68da4b03))



## [1.144.11](https://github.com/EddieHubCommunity/LinkFree/compare/v1.144.10...v1.144.11) (2023-06-24)
## [1.149.1](https://github.com/EddieHubCommunity/LinkFree/compare/v1.149.0...v1.149.1) (2023-07-01)


### Bug Fixes

* update dependencies ([#7755](https://github.com/EddieHubCommunity/LinkFree/issues/7755)) ([c664a27](https://github.com/EddieHubCommunity/LinkFree/commit/c664a27ab88ce800ad84f46ddb2b940376d0f3fc))
* random profile text ([#7905](https://github.com/EddieHubCommunity/LinkFree/issues/7905)) ([dd9b971](https://github.com/EddieHubCommunity/LinkFree/commit/dd9b9716788c301d6eaff4629b31aa8edf73d51e))



## [1.144.10](https://github.com/EddieHubCommunity/LinkFree/compare/v1.144.9...v1.144.10) (2023-06-24)
# [1.149.0](https://github.com/EddieHubCommunity/LinkFree/compare/v1.148.0...v1.149.0) (2023-07-01)


### Bug Fixes
### Features

* move newsletter to own page ([#7758](https://github.com/EddieHubCommunity/LinkFree/issues/7758)) ([0a5676f](https://github.com/EddieHubCommunity/LinkFree/commit/0a5676fcb8188f7e49bf299224a71c860f45b046))
* testimonial ordering ([#7884](https://github.com/EddieHubCommunity/LinkFree/issues/7884)) ([d65ba48](https://github.com/EddieHubCommunity/LinkFree/commit/d65ba48937b542927cb9b46ea6a75a4244168c3e))



## [1.144.9](https://github.com/EddieHubCommunity/LinkFree/compare/v1.144.8...v1.144.9) (2023-06-23)
# [1.148.0](https://github.com/EddieHubCommunity/LinkFree/compare/v1.147.10...v1.148.0) (2023-07-01)


### Bug Fixes

* deploy file count ([#7738](https://github.com/EddieHubCommunity/LinkFree/issues/7738)) ([6ab09bf](https://github.com/EddieHubCommunity/LinkFree/commit/6ab09bfe29a3d6377b3bddad54456e04f0bd833a))
* docs links ([#7902](https://github.com/EddieHubCommunity/LinkFree/issues/7902)) ([1b9a529](https://github.com/EddieHubCommunity/LinkFree/commit/1b9a529f0117d92682c5c2a3780c42ff815d9154))


### Features

* random profile ([#7900](https://github.com/EddieHubCommunity/LinkFree/issues/7900)) ([f2aed8d](https://github.com/EddieHubCommunity/LinkFree/commit/f2aed8dccba992e3bb889149854ded52b0283bb5)), closes [#7617](https://github.com/EddieHubCommunity/LinkFree/issues/7617) [#7558](https://github.com/EddieHubCommunity/LinkFree/issues/7558)



8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ Brief documentation is below, but full documentation can be found here https://l

This is great if you only want to add your Profile or make changes to it.

Here is the **QuickStart** guide to add your profile - https://linkfree.io/docs/quickstart
Here is the **QuickStart** guide to add your profile
- With JSON https://linkfree.io/docs/quickstart-json
- With Forms https://linkfree.io/docs/quickstart-forms

> **Note**: give extra attention to JSON formatting and the GitHub Action after you create the Pull Request
Expand Down Expand Up @@ -90,7 +92,9 @@ Read more in the official documentation - https://linkfree.io/docs/environments/

### How to add YOUR Profile

Step by step quickstart guide can be found in the full docs here - https://linkfree.io/docs/quickstart
Step by step quickstart guide can be found in the full docs here
- With JSON https://linkfree.io/docs/quickstart-json
- With Forms https://linkfree.io/docs/quickstart-forms

<!-- Testimonials STARTs Here -->

Expand Down
94 changes: 94 additions & 0 deletions components/ConfirmDialog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import { Fragment, useRef } from "react";
import { Dialog, Transition } from "@headlessui/react";
import ExclamationTriangleIcon from "@heroicons/react/24/outline/ExclamationTriangleIcon";

export default function ConfirmDialog({
setOpen,
open,
title,
description,
action,
}) {
const cancelButtonRef = useRef(null);

return (
<Transition.Root show={open} as={Fragment}>
<Dialog
as="div"
className="relative z-10"
initialFocus={cancelButtonRef}
onClose={setOpen}
>
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="ease-in duration-200"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" />
</Transition.Child>

<div className="fixed inset-0 z-10 overflow-y-auto">
<div className="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
enterTo="opacity-100 translate-y-0 sm:scale-100"
leave="ease-in duration-200"
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
>
<Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-primary-low dark:bg-primary-high px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6">
<div className="sm:flex sm:items-start">
<div className="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
<ExclamationTriangleIcon
className="h-6 w-6 text-red-600"
aria-hidden="true"
/>
</div>
<div className="mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left">
<Dialog.Title
as="h3"
className="text-base font-semibold leading-6 text-primary-high dark:text-primary-low"
>
{title}
</Dialog.Title>
<div className="mt-2">
<p className="text-sm text-primary-medium-low">
{description}
</p>
</div>
</div>
</div>
<div className="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
<button
type="button"
className="inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-primary-low dark:text-primary-high shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto"
onClick={() => {
action();
setOpen(false);
}}
>
Delete
</button>
<button
type="button"
className="mt-3 inline-flex w-full justify-center rounded-md bg-primary-low dark:bg-primary-high px-3 py-2 text-sm font-semibold text-primary-high dark:text-primary-low shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-primary-medium-low sm:mt-0 sm:w-auto"
onClick={() => setOpen(false)}
ref={cancelButtonRef}
>
Cancel
</button>
</div>
</Dialog.Panel>
</Transition.Child>
</div>
</div>
</Dialog>
</Transition.Root>
);
}
20 changes: 12 additions & 8 deletions components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import CurrencyDollarIcon from "@heroicons/react/24/outline/CurrencyDollarIcon";
import RocketLaunchIcon from "@heroicons/react/20/solid/RocketLaunchIcon";
import Button from "./Button";
import Link from "@components/Link";
import app from "@config/app.json";

export default function Footer() {
const navigation = {
Expand All @@ -19,10 +20,15 @@ export default function Footer() {
{ name: "Login", href: "/auth/signin", external: false },
],
support: [
{ name: "QuickStart", href: "/docs/quickstart", external: false },
{ name: "Documentation", href: "/docs", external: false },
{
name: "Updating your profile",
href: "/docs/how-to-guides/editing",
name: "Create Profile with JSON",
href: "/docs/quickstart-json",
external: false,
},
{
name: "Create Profile with Forms",
href: "/docs/quickstart-forms",
external: false,
},
{ name: "Json Playground", href: "/playground", external: false },
Expand Down Expand Up @@ -50,6 +56,7 @@ export default function Footer() {
href: "https://github.com/EddieHubCommunity/LinkFree/graphs/contributors",
external: true,
},
{ name: `v${app.version}`, href: "/roadmap", external: false },
],
legal: [
{
Expand Down Expand Up @@ -82,7 +89,7 @@ export default function Footer() {
};

return (
<footer className="bg-gray-900" aria-labelledby="footer-heading">
<footer className="bg-primary-high" aria-labelledby="footer-heading">
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
Expand Down Expand Up @@ -182,10 +189,7 @@ export default function Footer() {
LinkFree will always be 100% Open Source and have a free tier.
</p>
</div>
<Button
primary={true}
href="/premium"
>
<Button primary={true} href="/premium">
<span className="mr-2">
<CurrencyDollarIcon className="h-6 w-6" />
</span>
Expand Down
4 changes: 2 additions & 2 deletions components/GitHubAccelerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function GitHubAccelerator() {
<div className="mt-6 flex flex-col justify-stretch space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0">
<Link
href="http://accelerator.github.com"
className="inline-flex justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-primary-high dark:text-primary-high shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:hover:bg-slate-200 cursor-pointer"
className="inline-flex justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-primary-high dark:text-primary-high shadow-sm ring-1 ring-inset ring-primary-low-medium hover:bg-primary-low dark:hover:bg-slate-200 cursor-pointer"
target="_blank"
>
<FaGithub
Expand All @@ -46,7 +46,7 @@ export default function GitHubAccelerator() {
</Link>
<Link
href="https://github.com/sponsors/eddiejaoude"
className="inline-flex justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold dark:text-primary-high shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:hover:bg-slate-200 cursor-pointer"
className="inline-flex justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold dark:text-primary-high shadow-sm ring-1 ring-inset ring-primary-low-medium hover:bg-primary-low dark:hover:bg-slate-200 cursor-pointer"
target="_blank"
>
<FaMoneyBillAlt
Expand Down
6 changes: 3 additions & 3 deletions components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Modal({ show = false, setShow, title, children }) {
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" />
<div className="fixed inset-0 bg-primary-low-medium bg-opacity-75 transition-opacity" />
</Transition.Child>

<div className="fixed inset-0 z-10 overflow-y-auto">
Expand All @@ -33,7 +33,7 @@ export default function Modal({ show = false, setShow, title, children }) {
<div className="absolute right-0 top-0 hidden pr-4 pt-4 sm:block">
<button
type="button"
className="rounded-md bg-white dark:bg-primary-high text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
className="rounded-md bg-white dark:bg-primary-high text-primary-low-medium hover:text-primary-low-medium focus:outline-none focus:ring-2 focus:ring-secondary-medium-low focus:ring-offset-2"
onClick={() => setShow(false)}
>
<span className="sr-only">Close</span>
Expand All @@ -42,7 +42,7 @@ export default function Modal({ show = false, setShow, title, children }) {
</div>
<div className="m-4">{children}</div>

<div className=" px-4 py-3 mt-8 sm:flex sm:flex-row-reverse sm:px-6 justify-center bg-gray-50 dark:bg-primary-high">
<div className=" px-4 py-3 mt-8 sm:flex sm:flex-row-reverse sm:px-6 justify-center bg-primary-low dark:bg-primary-high">
{title}
</div>
</Dialog.Panel>
Expand Down
2 changes: 1 addition & 1 deletion components/user/UserTabs.js → components/Tabs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "@components/Link";

export default function UserTabs({ tabs, setTabs }) {
export default function Tabs({ tabs, setTabs }) {
const classNames = (...classes) => classes.filter(Boolean).join(" ");
const changeTab = (e, value) => {
e.preventDefault();
Expand Down
15 changes: 15 additions & 0 deletions components/account/manage/edit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import PencilIcon from "@heroicons/react/24/outline/PencilIcon";

export default function Edit({ href, children }) {
return (
<div className="relative w-full">
<a
href={href}
className="rounded-full bg-secondary-medium p-2 text-white shadow-sm hover:bg-secondary-medium-low focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-secondary-medium absolute top-0 left-0 pointer z-50"
>
<PencilIcon className="h-5 w-5" aria-hidden="true" />
</a>
{children}
</div>
);
}
Loading

0 comments on commit 7fc6d0a

Please sign in to comment.