⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
added prettier settings
daniel31x13ee6dcdcc5bbc
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex 6aff8043..a6c01534 100644--- a/.devcontainer/devcontainer.json+++ b/.devcontainer/devcontainer.json@@ -1,22 +1,22 @@// For format details, see https://aka.ms/devcontainer.json. For config options, see the// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node{- "name": "Node.js & TypeScript",- // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile- "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",+ "name": "Node.js & TypeScript",+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile+ "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",- // Features to add to the dev container. More info: https://containers.dev/features.- // "features": {},+ // Features to add to the dev container. More info: https://containers.dev/features.+ // "features": {},- // Use 'forwardPorts' to make a list of ports inside the container available locally.- // "forwardPorts": [],+ // Use 'forwardPorts' to make a list of ports inside the container available locally.+ // "forwardPorts": [],- // Use 'postCreateCommand' to run commands after the container is created.- // "postCreateCommand": "yarn install",+ // Use 'postCreateCommand' to run commands after the container is created.+ // "postCreateCommand": "yarn install",- // Configure tool-specific properties.- // "customizations": {},+ // Configure tool-specific properties.+ // "customizations": {},- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.- "remoteUser": "root"+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.+ "remoteUser": "root"}diff --git a/.prettierignore b/.prettierignorenew file mode 100644index 00000000..3742dae5--- /dev/null+++ b/.prettierignore@@ -0,0 +1,11 @@+node_modules+.next+public++*.lock+*.log++.github++data+pgdatadiff --git a/.prettierrc.json b/.prettierrc.jsonnew file mode 100644index 00000000..d7fe5a6b--- /dev/null+++ b/.prettierrc.json@@ -0,0 +1,4 @@+{+ "trailingComma": "es5",+ "tabWidth": 2+}diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsxindex 1fa26340..9ab2946c 100644--- a/components/FilterSearchDropdown.tsx+++ b/components/FilterSearchDropdown.tsx@@ -22,9 +22,7 @@ export default function FilterSearchDropdown({role="button"className="btn btn-sm btn-square btn-ghost">- <i- className="bi-funnel text-neutral text-2xl"- ></i>+ <i className="bi-funnel text-neutral text-2xl"></i></div><ul className="dropdown-content z-[30] menu shadow bg-base-200 border border-neutral-content rounded-box w-44 mt-1"><li>diff --git a/components/LinkViews/LinkComponents/LinkDate.tsx b/components/LinkViews/LinkComponents/LinkDate.tsxindex 04f1a0d3..e512dcb3 100644--- a/components/LinkViews/LinkComponents/LinkDate.tsx+++ b/components/LinkViews/LinkComponents/LinkDate.tsx@@ -1,7 +1,9 @@import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";import React from "react";-export default function LinkDate({ link }: {+export default function LinkDate({+ link,+}: {link: LinkIncludingShortenedCollectionAndTags;}) {const formattedDate = new Date(link.createdAt as string).toLocaleString(@@ -10,7 +12,7 @@ export default function LinkDate({ link }: {year: "numeric",month: "short",day: "numeric",- },+ });return (diff --git a/components/ModalContent/DeleteLinkModal.tsx b/components/ModalContent/DeleteLinkModal.tsxindex 370e61e2..a2b123ca 100644--- a/components/ModalContent/DeleteLinkModal.tsx+++ b/components/ModalContent/DeleteLinkModal.tsx@@ -49,7 +49,7 @@ export default function DeleteLinkModal({ onClose, activeLink }: Props) {<p>Are you sure you want to delete this Link?</p><div role="alert" className="alert alert-warning">- <i className="bi-exclamation-triangle text-xl"/>+ <i className="bi-exclamation-triangle text-xl" /><span><b>Warning:</b> This action is irreversible!</span>@@ -64,7 +64,7 @@ export default function DeleteLinkModal({ onClose, activeLink }: Props) {className={`ml-auto btn w-fit text-white flex items-center gap-2 duration-100 bg-red-500 hover:bg-red-400 hover:dark:bg-red-600 cursor-pointer`}onClick={deleteLink}>- <i className="bi-trash text-xl"/>+ <i className="bi-trash text-xl" />Delete</button></div>diff --git a/components/ModalContent/EditCollectionSharingModal.tsx b/components/ModalContent/EditCollectionSharingModal.tsxindex de769c0c..7de480fe 100644--- a/components/ModalContent/EditCollectionSharingModal.tsx+++ b/components/ModalContent/EditCollectionSharingModal.tsx@@ -227,10 +227,10 @@ export default function EditCollectionSharingModal({e.canCreate && e.canUpdate && e.canDelete? "Admin": e.canCreate && !e.canUpdate && !e.canDelete- ? "Contributor"- : !e.canCreate && !e.canUpdate && !e.canDelete- ? "Viewer"- : undefined;+ ? "Contributor"+ : !e.canCreate && !e.canUpdate && !e.canDelete+ ? "Viewer"+ : undefined;return (<>diff --git a/components/ModalContent/EditLinkModal.tsx b/components/ModalContent/EditLinkModal.tsxindex bb43efda..9878f4b7 100644--- a/components/ModalContent/EditLinkModal.tsx+++ b/components/ModalContent/EditLinkModal.tsx@@ -86,7 +86,7 @@ export default function EditLinkModal({ onClose, activeLink }: Props) {title={link.url}target="_blank">- <i className="bi-link-45deg text-xl"/>+ <i className="bi-link-45deg text-xl" /><p>{shortendURL}</p></Link>) : undefined}@@ -116,13 +116,13 @@ export default function EditLinkModal({ onClose, activeLink }: Props) {defaultValue={link.collection.id? {- value: link.collection.id,- label: link.collection.name,- }+ value: link.collection.id,+ label: link.collection.name,+ }: {- value: null as unknown as number,- label: "Unorganized",- }+ value: null as unknown as number,+ label: "Unorganized",+ }}/>) : null}diff --git a/components/PreserverdFormatRow.tsx b/components/PreserverdFormatRow.tsxindex d88ec90e..1d3df850 100644--- a/components/PreserverdFormatRow.tsx+++ b/components/PreserverdFormatRow.tsx@@ -102,9 +102,9 @@ export default function PreservedFormatRow({) : undefined}<Link- href={`${isPublic ? "/public" : ""}/preserved/${- link?.id- }?format=${format}`}+ href={`${+ isPublic ? "/public" : ""+ }/preserved/${link?.id}?format=${format}`}target="_blank"className="btn btn-sm btn-square">diff --git a/components/SearchBar.tsx b/components/SearchBar.tsxindex 99d14972..e5f9f3cd 100644--- a/components/SearchBar.tsx+++ b/components/SearchBar.tsx@@ -47,11 +47,11 @@ export default function SearchBar({ placeholder }: Props) {"/public/collections/" +router.query.id +"?q=" +- encodeURIComponent(searchQuery || ""),+ encodeURIComponent(searchQuery || ""));} else {return router.push(- "/search?q=" + encodeURIComponent(searchQuery),+ "/search?q=" + encodeURIComponent(searchQuery));}}diff --git a/hooks/useSort.tsx b/hooks/useSort.tsxindex 3328d4de..b0028880 100644--- a/hooks/useSort.tsx+++ b/hooks/useSort.tsx@@ -8,7 +8,7 @@ import { SetStateAction, useEffect } from "react";type Props<T extends| CollectionIncludingMembersAndLinkCount- | LinkIncludingShortenedCollectionAndTags+ | LinkIncludingShortenedCollectionAndTags,> = {sortBy: Sort;@@ -19,7 +19,7 @@ type Props<export default function useSort<T extends| CollectionIncludingMembersAndLinkCount- | LinkIncludingShortenedCollectionAndTags+ | LinkIncludingShortenedCollectionAndTags,>({ sortBy, data, setData }: Props<T>) {useEffect(() => {const dataArray = [...data];diff --git a/lib/api/controllers/links/postLink.ts b/lib/api/controllers/links/postLink.tsindex 9af69e17..80cf2ad8 100644--- a/lib/api/controllers/links/postLink.ts+++ b/lib/api/controllers/links/postLink.ts@@ -62,8 +62,8 @@ export default async function postLink(link.description && link.description !== ""? link.description: link.url- ? await getTitle(link.url)- : undefined;+ ? await getTitle(link.url)+ : undefined;const validatedUrl = link.url ? await validateUrlSize(link.url) : undefined;diff --git a/lib/api/storage/removeFolder.ts b/lib/api/storage/removeFolder.tsindex e9f7d3b3..3eb4a5bb 100644--- a/lib/api/storage/removeFolder.ts+++ b/lib/api/storage/removeFolder.ts@@ -40,7 +40,10 @@ async function emptyS3Directory(bucket: string, dir: string) {export default async function removeFolder({ filePath }: { filePath: string }) {if (s3Client) {try {- await emptyS3Directory(process.env.SPACES_BUCKET_NAME as string, filePath);+ await emptyS3Directory(+ process.env.SPACES_BUCKET_NAME as string,+ filePath+ );} catch (err) {console.log("Error", err);}diff --git a/lib/api/verifyUser.ts b/lib/api/verifyUser.tsindex 6f59e973..db59e6e8 100644--- a/lib/api/verifyUser.ts+++ b/lib/api/verifyUser.ts@@ -42,7 +42,8 @@ export default async function verifyUser({return null;}- if (!user.username && !ssoUser) { // SSO users don't need a username+ if (!user.username && !ssoUser) {+ // SSO users don't need a usernameres.status(401).json({response: "Username not found.",});diff --git a/package.json b/package.jsonindex dcb19aad..4917ee87 100644--- a/package.json+++ b/package.json@@ -15,7 +15,8 @@"worker:prod": "ts-node --transpile-only --skip-project scripts/worker.ts","start": "concurrently \"next start\" \"yarn worker:prod\"","build": "next build",- "lint": "next lint"+ "lint": "next lint",+ "format": "prettier --write \"**/*.{ts,tsx,js,json,md}\""},"dependencies": {"@auth/prisma-adapter": "^1.0.1",@@ -69,6 +70,7 @@"daisyui": "^4.4.2","nodemon": "^3.0.2","postcss": "^8.4.26",+ "prettier": "3.1.1","prisma": "^5.1.0","tailwindcss": "^3.3.3","ts-node": "^10.9.2",diff --git a/pages/_app.tsx b/pages/_app.tsxindex 17bc2584..60c15c38 100644--- a/pages/_app.tsx+++ b/pages/_app.tsx@@ -1,6 +1,6 @@import React from "react";import "@/styles/globals.css";-import 'bootstrap-icons/font/bootstrap-icons.css';+import "bootstrap-icons/font/bootstrap-icons.css";import { SessionProvider } from "next-auth/react";import type { AppProps } from "next/app";import Head from "next/head";diff --git a/pages/api/v1/logins/index.ts b/pages/api/v1/logins/index.tsindex ff58bc2c..34b3aaf3 100644--- a/pages/api/v1/logins/index.ts+++ b/pages/api/v1/logins/index.ts@@ -1,238 +1,408 @@-import type { NextApiRequest, NextApiResponse } from 'next';+import type { NextApiRequest, NextApiResponse } from "next";import * as process from "process";export type ResponseData = {- credentialsEnabled: string|undefined- emailEnabled: string|undefined- registrationDisabled: string|undefined- buttonAuths: {- method: string- name: string- }[]-}-export default function handler(req: NextApiRequest, res: NextApiResponse<ResponseData>) {- res.json(getLogins());+ credentialsEnabled: string | undefined;+ emailEnabled: string | undefined;+ registrationDisabled: string | undefined;+ buttonAuths: {+ method: string;+ name: string;+ }[];+};+export default function handler(+ req: NextApiRequest,+ res: NextApiResponse<ResponseData>+) {+ res.json(getLogins());}export function getLogins() {- const buttonAuths = []+ const buttonAuths = [];- // 42 School- if (process.env.NEXT_PUBLIC_FORTYTWO_ENABLED === 'true') {- buttonAuths.push({method: '42-school', name: process.env.FORTYTWO_CUSTOM_NAME ?? '42 School'});- }- // Apple- if (process.env.NEXT_PUBLIC_APPLE_ENABLED === 'true') {- buttonAuths.push({method: 'apple', name: process.env.APPLE_CUSTOM_NAME ?? 'Apple'});- }- // Atlassian- if (process.env.NEXT_PUBLIC_ATLASSIAN_ENABLED === 'true') {- buttonAuths.push({method: 'atlassian', name: process.env.ATLASSIAN_CUSTOM_NAME ?? 'Atlassian'});- }- // Auth0- if (process.env.NEXT_PUBLIC_AUTH0_ENABLED === 'true') {- buttonAuths.push({method: 'auth0', name: process.env.AUTH0_CUSTOM_NAME ?? 'Auth0'});- }- // Authentik- if (process.env.NEXT_PUBLIC_AUTHENTIK_ENABLED === 'true') {- buttonAuths.push({method: 'authentik', name: process.env.AUTHENTIK_CUSTOM_NAME ?? 'Authentik'});- }- // Battle.net- if (process.env.NEXT_PUBLIC_BATTLENET_ENABLED === 'true') {- buttonAuths.push({method: 'battlenet', name: process.env.BATTLENET_CUSTOM_NAME ?? 'Battle.net'});- }- // Box- if (process.env.NEXT_PUBLIC_BOX_ENABLED === 'true') {- buttonAuths.push({method: 'box', name: process.env.BOX_CUSTOM_NAME ?? 'Box'});- }- // Cognito- if (process.env.NEXT_PUBLIC_COGNITO_ENABLED === 'true') {- buttonAuths.push({method: 'cognito', name: process.env.COGNITO_CUSTOM_NAME ?? 'Cognito'});- }- // Coinbase- if (process.env.NEXT_PUBLIC_COINBASE_ENABLED === 'true') {- buttonAuths.push({method: 'coinbase', name: process.env.COINBASE_CUSTOM_NAME ?? 'Coinbase'});- }- // Discord- if (process.env.NEXT_PUBLIC_DISCORD_ENABLED === 'true') {- buttonAuths.push({method: 'discord', name: process.env.DISCORD_CUSTOM_NAME ?? 'Discord'});- }- // Dropbox- if (process.env.NEXT_PUBLIC_DROPBOX_ENABLED === 'true') {- buttonAuths.push({method: 'dropbox', name: process.env.DROPBOX_CUSTOM_NAME ?? 'Dropbox'});- }- // Duende IdentityServer6- if (process.env.NEXT_PUBLIC_DUENDE_IDS6_ENABLED === 'true') {- buttonAuths.push({method: 'duende-identityserver6', name: process.env.DUENDE_IDS6_CUSTOM_NAME ?? 'DuendeIdentityServer6'});- }- // EVE Online- if (process.env.NEXT_PUBLIC_EVEONLINE_ENABLED === 'true') {- buttonAuths.push({method: 'eveonline', name: process.env.EVEONLINE_CUSTOM_NAME ?? 'EVE Online'});- }- if (process.env.NEXT_PUBLIC_FACEBOOK_ENABLED === 'true') {- buttonAuths.push({method: 'facebook', name: process.env.FACEBOOK_CUSTOM_NAME ?? 'Facebook'});- }- // FACEIT- if (process.env.NEXT_PUBLIC_FACEIT_ENABLED === 'true') {- buttonAuths.push({method: 'faceit', name: process.env.FACEIT_CUSTOM_NAME ?? 'FACEIT'});- }- // Foursquare- if (process.env.NEXT_PUBLIC_FOURSQUARE_ENABLED === 'true') {- buttonAuths.push({method: 'foursquare', name: process.env.FOURSQUARE_CUSTOM_NAME ?? 'Foursquare'});- }- // Freshbooks- if (process.env.NEXT_PUBLIC_FRESHBOOKS_ENABLED === 'true') {- buttonAuths.push({method: 'freshbooks', name: process.env.FRESHBOOKS_CUSTOM_NAME ?? 'Freshbooks'});- }- // FusionAuth- if (process.env.NEXT_PUBLIC_FUSIONAUTH_ENABLED === 'true') {- buttonAuths.push({method: 'fusionauth', name: process.env.FUSIONAUTH_CUSTOM_NAME ?? 'FusionAuth'});- }- // GitHub- if (process.env.NEXT_PUBLIC_GITHUB_ENABLED === 'true') {- buttonAuths.push({method: 'github', name: process.env.GITHUB_CUSTOM_NAME ?? 'GitHub'});- }- // GitLab- if (process.env.NEXT_PUBLIC_GITLAB_ENABLED === 'true') {- buttonAuths.push({method: 'gitlab', name: process.env.GITLAB_CUSTOM_NAME ?? 'GitLab'});- }- if (process.env.NEXT_PUBLIC_GOOGLE_ENABLED === 'true') {- buttonAuths.push({method: 'google', name: process.env.GOOGLE_CUSTOM_NAME ?? 'Google'});- }- // HubSpot- if (process.env.NEXT_PUBLIC_HUBSPOT_ENABLED === 'true') {- buttonAuths.push({method: 'hubspot', name: process.env.HUBSPOT_CUSTOM_NAME ?? 'HubSpot'});- }- // IdentityServer4- if (process.env.NEXT_PUBLIC_IDS4_ENABLED === 'true') {- buttonAuths.push({method: 'identity-server4', name: process.env.IDS4_CUSTOM_NAME ?? 'IdentityServer4'});- }- // Kakao- if (process.env.NEXT_PUBLIC_KAKAO_ENABLED === 'true') {- buttonAuths.push({method: 'kakao', name: process.env.KAKAO_CUSTOM_NAME ?? 'Kakao'});- }- // Keycloak- if (process.env.NEXT_PUBLIC_KEYCLOAK_ENABLED === 'true') {- buttonAuths.push({method: 'keycloak', name: process.env.KEYCLOAK_CUSTOM_NAME ?? 'Keycloak'});- }- // LINE- if (process.env.NEXT_PUBLIC_LINE_ENABLED === 'true') {- buttonAuths.push({method: 'line', name: process.env.LINE_CUSTOM_NAME ?? 'LINE'});- }- if (process.env.NEXT_PUBLIC_LINKEDIN_ENABLED === 'true') {- buttonAuths.push({method: 'linkedin', name: process.env.LINKEDIN_CUSTOM_NAME ?? 'LinkedIn'});- }- // MailChimp- if (process.env.NEXT_PUBLIC_MAILCHIMP_ENABLED === 'true') {- buttonAuths.push({method: 'mailchimp', name: process.env.MAILCHIMP_CUSTOM_NAME ?? 'Mailchimp'});- }- // Mail.ru- if (process.env.NEXT_PUBLIC_MAILRU_ENABLED === 'true') {- buttonAuths.push({method: 'mailru', name: process.env.MAILRU_CUSTOM_NAME ?? 'Mail.ru'});- }- // Naver- if (process.env.NEXT_PUBLIC_NAVER_ENABLED === 'true') {- buttonAuths.push({method: 'naver', name: process.env.NAVER_CUSTOM_NAME ?? 'Naver'});- }- // Netlify- if (process.env.NEXT_PUBLIC_NETLIFY_ENABLED === 'true') {- buttonAuths.push({method: 'netlify', name: process.env.NETLIFY_CUSTOM_NAME ?? 'Netlify'});- }- // Okta- if (process.env.NEXT_PUBLIC_OKTA_ENABLED === 'true') {- buttonAuths.push({method: 'okta', name: process.env.OKTA_CUSTOM_NAME ?? 'Okta'});- }- // OneLogin- if (process.env.NEXT_PUBLIC_ONELOGIN_ENABLED === 'true') {- buttonAuths.push({method: 'onelogin', name: process.env.ONELOGIN_CUSTOM_NAME ?? 'OneLogin'});- }- // Osso- if (process.env.NEXT_PUBLIC_OSSO_ENABLED === 'true') {- buttonAuths.push({method: 'osso', name: process.env.OSSO_CUSTOM_NAME ?? 'Osso'});- }- // osu!- if (process.env.NEXT_PUBLIC_OSU_ENABLED === 'true') {- buttonAuths.push({method: 'osu', name: process.env.OSU_CUSTOM_NAME ?? 'Osu!'});- }- // Patreon- if (process.env.NEXT_PUBLIC_PATREON_ENABLED === 'true') {- buttonAuths.push({method: 'patreon', name: process.env.PATREON_CUSTOM_NAME ?? 'Patreon'});- }- if (process.env.NEXT_PUBLIC_PINTEREST_ENABLED === 'true') {- buttonAuths.push({method: 'pinterest', name: process.env.PINTEREST_CUSTOM_NAME ?? 'Pinterest'});- }- // Pipedrive- if (process.env.NEXT_PUBLIC_PIPEDRIVE_ENABLED === 'true') {- buttonAuths.push({method: 'pipedrive', name: process.env.PIPEDRIVE_CUSTOM_NAME ?? 'Pipedrive'});- }- if (process.env.NEXT_PUBLIC_REDDIT_ENABLED === 'true') {- buttonAuths.push({method: 'reddit', name: process.env.REDDIT_CUSTOM_NAME ?? 'Reddit'});- }- // Salesforce- if (process.env.NEXT_PUBLIC_SALESFORCE_ENABLED === 'true') {- buttonAuths.push({method: 'salesforce', name: process.env.SALESFORCE_CUSTOM_NAME ?? 'Salesforce'});- }- // Slack- if (process.env.NEXT_PUBLIC_SLACK_ENABLED === 'true') {- buttonAuths.push({method: 'slack', name: process.env.SLACK_CUSTOM_NAME ?? 'Slack'});- }- // Spotify- if (process.env.NEXT_PUBLIC_SPOTIFY_ENABLED === 'true') {- buttonAuths.push({method: 'spotify', name: process.env.SPOTIFY_CUSTOM_NAME ?? 'Spotify'});- }- // Strava- if (process.env.NEXT_PUBLIC_STRAVA_ENABLED === 'true') {- buttonAuths.push({method: 'strava', name: process.env.STRAVA_CUSTOM_NAME ?? 'Strava'});- }- // Todoist- if (process.env.NEXT_PUBLIC_TODOIST_ENABLED === 'true') {- buttonAuths.push({method: 'todoist', name: process.env.TODOIST_CUSTOM_NAME ?? 'Todoist'});- }- // Twitch- if (process.env.NEXT_PUBLIC_TWITCH_ENABLED === 'true') {- buttonAuths.push({method: 'twitch', name: process.env.TWITCH_CUSTOM_NAME ?? 'Twitch'});- }- // United Effects- if (process.env.NEXT_PUBLIC_UNITED_EFFECTS_ENABLED === 'true') {- buttonAuths.push({method: 'united-effects', name: process.env.UNITED_EFFECTS_CUSTOM_NAME ?? 'United Effects'});- }- // VK- if (process.env.NEXT_PUBLIC_VK_ENABLED === 'true') {- buttonAuths.push({method: 'vk', name: process.env.VK_CUSTOM_NAME ?? 'VK'});- }- // Wikimedia- if (process.env.NEXT_PUBLIC_WIKIMEDIA_ENABLED === 'true') {- buttonAuths.push({method: 'wikimedia', name: process.env.WIKIMEDIA_CUSTOM_NAME ?? 'Wikimedia'});- }- // Wordpress.com- if (process.env.NEXT_PUBLIC_WORDPRESS_ENABLED === 'true') {- buttonAuths.push({method: 'wordpress', name: process.env.WORDPRESS_CUSTOM_NAME ?? 'WordPress.com'});- }- // Yandex- if (process.env.NEXT_PUBLIC_YANDEX_ENABLED === 'true') {- buttonAuths.push({method: 'yandex', name: process.env.YANDEX_CUSTOM_NAME ?? 'Yandex'});- }- // Zitadel- if (process.env.NEXT_PUBLIC_ZITADEL_ENABLED === 'true') {- buttonAuths.push({method: 'zitadel', name: process.env.ZITADEL_CUSTOM_NAME ?? 'ZITADEL'});- }- // Zoho- if (process.env.NEXT_PUBLIC_ZOHO_ENABLED === 'true') {- buttonAuths.push({method: 'zoho', name: process.env.ZOHO_CUSTOM_NAME ?? 'Zoho'});- }- // Zoom- if (process.env.NEXT_PUBLIC_ZOOM_ENABLED === 'true') {- buttonAuths.push({method: 'zoom', name: process.env.ZOOM_CUSTOM_NAME ?? 'Zoom'});- }- return {- credentialsEnabled: (process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === 'true' || process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === undefined) ? "true" : "false",- emailEnabled: (process.env.NEXT_PUBLIC_EMAIL_PROVIDER === 'true' ? 'true' : 'false'),- registrationDisabled: (process.env.NEXT_PUBLIC_DISABLE_REGISTRATION === 'true' ? 'true' : 'false'),- buttonAuths: buttonAuths- };-}\ No newline at end of file+ // 42 School+ if (process.env.NEXT_PUBLIC_FORTYTWO_ENABLED === "true") {+ buttonAuths.push({+ method: "42-school",+ name: process.env.FORTYTWO_CUSTOM_NAME ?? "42 School",+ });+ }+ // Apple+ if (process.env.NEXT_PUBLIC_APPLE_ENABLED === "true") {+ buttonAuths.push({+ method: "apple",+ name: process.env.APPLE_CUSTOM_NAME ?? "Apple",+ });+ }+ // Atlassian+ if (process.env.NEXT_PUBLIC_ATLASSIAN_ENABLED === "true") {+ buttonAuths.push({+ method: "atlassian",+ name: process.env.ATLASSIAN_CUSTOM_NAME ?? "Atlassian",+ });+ }+ // Auth0+ if (process.env.NEXT_PUBLIC_AUTH0_ENABLED === "true") {+ buttonAuths.push({+ method: "auth0",+ name: process.env.AUTH0_CUSTOM_NAME ?? "Auth0",+ });+ }+ // Authentik+ if (process.env.NEXT_PUBLIC_AUTHENTIK_ENABLED === "true") {+ buttonAuths.push({+ method: "authentik",+ name: process.env.AUTHENTIK_CUSTOM_NAME ?? "Authentik",+ });+ }+ // Battle.net+ if (process.env.NEXT_PUBLIC_BATTLENET_ENABLED === "true") {+ buttonAuths.push({+ method: "battlenet",+ name: process.env.BATTLENET_CUSTOM_NAME ?? "Battle.net",+ });+ }+ // Box+ if (process.env.NEXT_PUBLIC_BOX_ENABLED === "true") {+ buttonAuths.push({+ method: "box",+ name: process.env.BOX_CUSTOM_NAME ?? "Box",+ });+ }+ // Cognito+ if (process.env.NEXT_PUBLIC_COGNITO_ENABLED === "true") {+ buttonAuths.push({+ method: "cognito",+ name: process.env.COGNITO_CUSTOM_NAME ?? "Cognito",+ });+ }+ // Coinbase+ if (process.env.NEXT_PUBLIC_COINBASE_ENABLED === "true") {+ buttonAuths.push({+ method: "coinbase",+ name: process.env.COINBASE_CUSTOM_NAME ?? "Coinbase",+ });+ }+ // Discord+ if (process.env.NEXT_PUBLIC_DISCORD_ENABLED === "true") {+ buttonAuths.push({+ method: "discord",+ name: process.env.DISCORD_CUSTOM_NAME ?? "Discord",+ });+ }+ // Dropbox+ if (process.env.NEXT_PUBLIC_DROPBOX_ENABLED === "true") {+ buttonAuths.push({+ method: "dropbox",+ name: process.env.DROPBOX_CUSTOM_NAME ?? "Dropbox",+ });+ }+ // Duende IdentityServer6+ if (process.env.NEXT_PUBLIC_DUENDE_IDS6_ENABLED === "true") {+ buttonAuths.push({+ method: "duende-identityserver6",+ name: process.env.DUENDE_IDS6_CUSTOM_NAME ?? "DuendeIdentityServer6",+ });+ }+ // EVE Online+ if (process.env.NEXT_PUBLIC_EVEONLINE_ENABLED === "true") {+ buttonAuths.push({+ method: "eveonline",+ name: process.env.EVEONLINE_CUSTOM_NAME ?? "EVE Online",+ });+ }+ if (process.env.NEXT_PUBLIC_FACEBOOK_ENABLED === "true") {+ buttonAuths.push({+ method: "facebook",+ name: process.env.FACEBOOK_CUSTOM_NAME ?? "Facebook",+ });+ }+ // FACEIT+ if (process.env.NEXT_PUBLIC_FACEIT_ENABLED === "true") {+ buttonAuths.push({+ method: "faceit",+ name: process.env.FACEIT_CUSTOM_NAME ?? "FACEIT",+ });+ }+ // Foursquare+ if (process.env.NEXT_PUBLIC_FOURSQUARE_ENABLED === "true") {+ buttonAuths.push({+ method: "foursquare",+ name: process.env.FOURSQUARE_CUSTOM_NAME ?? "Foursquare",+ });+ }+ // Freshbooks+ if (process.env.NEXT_PUBLIC_FRESHBOOKS_ENABLED === "true") {+ buttonAuths.push({+ method: "freshbooks",+ name: process.env.FRESHBOOKS_CUSTOM_NAME ?? "Freshbooks",+ });+ }+ // FusionAuth+ if (process.env.NEXT_PUBLIC_FUSIONAUTH_ENABLED === "true") {+ buttonAuths.push({+ method: "fusionauth",+ name: process.env.FUSIONAUTH_CUSTOM_NAME ?? "FusionAuth",+ });+ }+ // GitHub+ if (process.env.NEXT_PUBLIC_GITHUB_ENABLED === "true") {+ buttonAuths.push({+ method: "github",+ name: process.env.GITHUB_CUSTOM_NAME ?? "GitHub",+ });+ }+ // GitLab+ if (process.env.NEXT_PUBLIC_GITLAB_ENABLED === "true") {+ buttonAuths.push({+ method: "gitlab",+ name: process.env.GITLAB_CUSTOM_NAME ?? "GitLab",+ });+ }+ if (process.env.NEXT_PUBLIC_GOOGLE_ENABLED === "true") {+ buttonAuths.push({+ method: "google",+ name: process.env.GOOGLE_CUSTOM_NAME ?? "Google",+ });+ }+ // HubSpot+ if (process.env.NEXT_PUBLIC_HUBSPOT_ENABLED === "true") {+ buttonAuths.push({+ method: "hubspot",+ name: process.env.HUBSPOT_CUSTOM_NAME ?? "HubSpot",+ });+ }+ // IdentityServer4+ if (process.env.NEXT_PUBLIC_IDS4_ENABLED === "true") {+ buttonAuths.push({+ method: "identity-server4",+ name: process.env.IDS4_CUSTOM_NAME ?? "IdentityServer4",+ });+ }+ // Kakao+ if (process.env.NEXT_PUBLIC_KAKAO_ENABLED === "true") {+ buttonAuths.push({+ method: "kakao",+ name: process.env.KAKAO_CUSTOM_NAME ?? "Kakao",+ });+ }+ // Keycloak+ if (process.env.NEXT_PUBLIC_KEYCLOAK_ENABLED === "true") {+ buttonAuths.push({+ method: "keycloak",+ name: process.env.KEYCLOAK_CUSTOM_NAME ?? "Keycloak",+ });+ }+ // LINE+ if (process.env.NEXT_PUBLIC_LINE_ENABLED === "true") {+ buttonAuths.push({+ method: "line",+ name: process.env.LINE_CUSTOM_NAME ?? "LINE",+ });+ }+ if (process.env.NEXT_PUBLIC_LINKEDIN_ENABLED === "true") {+ buttonAuths.push({+ method: "linkedin",+ name: process.env.LINKEDIN_CUSTOM_NAME ?? "LinkedIn",+ });+ }+ // MailChimp+ if (process.env.NEXT_PUBLIC_MAILCHIMP_ENABLED === "true") {+ buttonAuths.push({+ method: "mailchimp",+ name: process.env.MAILCHIMP_CUSTOM_NAME ?? "Mailchimp",+ });+ }+ // Mail.ru+ if (process.env.NEXT_PUBLIC_MAILRU_ENABLED === "true") {+ buttonAuths.push({+ method: "mailru",+ name: process.env.MAILRU_CUSTOM_NAME ?? "Mail.ru",+ });+ }+ // Naver+ if (process.env.NEXT_PUBLIC_NAVER_ENABLED === "true") {+ buttonAuths.push({+ method: "naver",+ name: process.env.NAVER_CUSTOM_NAME ?? "Naver",+ });+ }+ // Netlify+ if (process.env.NEXT_PUBLIC_NETLIFY_ENABLED === "true") {+ buttonAuths.push({+ method: "netlify",+ name: process.env.NETLIFY_CUSTOM_NAME ?? "Netlify",+ });+ }+ // Okta+ if (process.env.NEXT_PUBLIC_OKTA_ENABLED === "true") {+ buttonAuths.push({+ method: "okta",+ name: process.env.OKTA_CUSTOM_NAME ?? "Okta",+ });+ }+ // OneLogin+ if (process.env.NEXT_PUBLIC_ONELOGIN_ENABLED === "true") {+ buttonAuths.push({+ method: "onelogin",+ name: process.env.ONELOGIN_CUSTOM_NAME ?? "OneLogin",+ });+ }+ // Osso+ if (process.env.NEXT_PUBLIC_OSSO_ENABLED === "true") {+ buttonAuths.push({+ method: "osso",+ name: process.env.OSSO_CUSTOM_NAME ?? "Osso",+ });+ }+ // osu!+ if (process.env.NEXT_PUBLIC_OSU_ENABLED === "true") {+ buttonAuths.push({+ method: "osu",+ name: process.env.OSU_CUSTOM_NAME ?? "Osu!",+ });+ }+ // Patreon+ if (process.env.NEXT_PUBLIC_PATREON_ENABLED === "true") {+ buttonAuths.push({+ method: "patreon",+ name: process.env.PATREON_CUSTOM_NAME ?? "Patreon",+ });+ }+ if (process.env.NEXT_PUBLIC_PINTEREST_ENABLED === "true") {+ buttonAuths.push({+ method: "pinterest",+ name: process.env.PINTEREST_CUSTOM_NAME ?? "Pinterest",+ });+ }+ // Pipedrive+ if (process.env.NEXT_PUBLIC_PIPEDRIVE_ENABLED === "true") {+ buttonAuths.push({+ method: "pipedrive",+ name: process.env.PIPEDRIVE_CUSTOM_NAME ?? "Pipedrive",+ });+ }+ if (process.env.NEXT_PUBLIC_REDDIT_ENABLED === "true") {+ buttonAuths.push({+ method: "reddit",+ name: process.env.REDDIT_CUSTOM_NAME ?? "Reddit",+ });+ }+ // Salesforce+ if (process.env.NEXT_PUBLIC_SALESFORCE_ENABLED === "true") {+ buttonAuths.push({+ method: "salesforce",+ name: process.env.SALESFORCE_CUSTOM_NAME ?? "Salesforce",+ });+ }+ // Slack+ if (process.env.NEXT_PUBLIC_SLACK_ENABLED === "true") {+ buttonAuths.push({+ method: "slack",+ name: process.env.SLACK_CUSTOM_NAME ?? "Slack",+ });+ }+ // Spotify+ if (process.env.NEXT_PUBLIC_SPOTIFY_ENABLED === "true") {+ buttonAuths.push({+ method: "spotify",+ name: process.env.SPOTIFY_CUSTOM_NAME ?? "Spotify",+ });+ }+ // Strava+ if (process.env.NEXT_PUBLIC_STRAVA_ENABLED === "true") {+ buttonAuths.push({+ method: "strava",+ name: process.env.STRAVA_CUSTOM_NAME ?? "Strava",+ });+ }+ // Todoist+ if (process.env.NEXT_PUBLIC_TODOIST_ENABLED === "true") {+ buttonAuths.push({+ method: "todoist",+ name: process.env.TODOIST_CUSTOM_NAME ?? "Todoist",+ });+ }+ // Twitch+ if (process.env.NEXT_PUBLIC_TWITCH_ENABLED === "true") {+ buttonAuths.push({+ method: "twitch",+ name: process.env.TWITCH_CUSTOM_NAME ?? "Twitch",+ });+ }+ // United Effects+ if (process.env.NEXT_PUBLIC_UNITED_EFFECTS_ENABLED === "true") {+ buttonAuths.push({+ method: "united-effects",+ name: process.env.UNITED_EFFECTS_CUSTOM_NAME ?? "United Effects",+ });+ }+ // VK+ if (process.env.NEXT_PUBLIC_VK_ENABLED === "true") {+ buttonAuths.push({+ method: "vk",+ name: process.env.VK_CUSTOM_NAME ?? "VK",+ });+ }+ // Wikimedia+ if (process.env.NEXT_PUBLIC_WIKIMEDIA_ENABLED === "true") {+ buttonAuths.push({+ method: "wikimedia",+ name: process.env.WIKIMEDIA_CUSTOM_NAME ?? "Wikimedia",+ });+ }+ // Wordpress.com+ if (process.env.NEXT_PUBLIC_WORDPRESS_ENABLED === "true") {+ buttonAuths.push({+ method: "wordpress",+ name: process.env.WORDPRESS_CUSTOM_NAME ?? "WordPress.com",+ });+ }+ // Yandex+ if (process.env.NEXT_PUBLIC_YANDEX_ENABLED === "true") {+ buttonAuths.push({+ method: "yandex",+ name: process.env.YANDEX_CUSTOM_NAME ?? "Yandex",+ });+ }+ // Zitadel+ if (process.env.NEXT_PUBLIC_ZITADEL_ENABLED === "true") {+ buttonAuths.push({+ method: "zitadel",+ name: process.env.ZITADEL_CUSTOM_NAME ?? "ZITADEL",+ });+ }+ // Zoho+ if (process.env.NEXT_PUBLIC_ZOHO_ENABLED === "true") {+ buttonAuths.push({+ method: "zoho",+ name: process.env.ZOHO_CUSTOM_NAME ?? "Zoho",+ });+ }+ // Zoom+ if (process.env.NEXT_PUBLIC_ZOOM_ENABLED === "true") {+ buttonAuths.push({+ method: "zoom",+ name: process.env.ZOOM_CUSTOM_NAME ?? "Zoom",+ });+ }+ return {+ credentialsEnabled:+ process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === "true" ||+ process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === undefined+ ? "true"+ : "false",+ emailEnabled:+ process.env.NEXT_PUBLIC_EMAIL_PROVIDER === "true" ? "true" : "false",+ registrationDisabled:+ process.env.NEXT_PUBLIC_DISABLE_REGISTRATION === "true"+ ? "true"+ : "false",+ buttonAuths: buttonAuths,+ };+}diff --git a/pages/settings/delete.tsx b/pages/settings/delete.tsxindex 2b7eec71..d7b111fc 100644--- a/pages/settings/delete.tsx+++ b/pages/settings/delete.tsx@@ -57,9 +57,7 @@ export default function Delete() {href="/settings/account"className="absolute top-4 left-4 btn btn-ghost btn-square btn-sm">- <i- className="bi-chevron-left text-neutral text-xl"- ></i>+ <i className="bi-chevron-left text-neutral text-xl"></i></Link><div className="flex items-center gap-2 w-full rounded-md h-8"><p className="text-red-500 dark:text-red-500 truncate w-full text-3xl text-center">diff --git a/playwright.config.ts b/playwright.config.tsindex bfe3e830..a2811c03 100644--- a/playwright.config.ts+++ b/playwright.config.ts@@ -1,4 +1,4 @@-import { defineConfig, devices } from '@playwright/test';+import { defineConfig, devices } from "@playwright/test";/*** Read environment variables from file.@@ -10,7 +10,7 @@ import { defineConfig, devices } from '@playwright/test';* See https://playwright.dev/docs/test-configuration.*/export default defineConfig({- testDir: './e2e',+ testDir: "./e2e",/* Run tests in files in parallel */fullyParallel: true,/* Fail the build on CI if you accidentally left test.only in the source code. */@@ -20,31 +20,31 @@ export default defineConfig({/* Opt out of parallel tests on CI. */workers: process.env.CI ? 1 : undefined,/* Reporter to use. See https://playwright.dev/docs/test-reporters */- reporter: 'html',+ reporter: "html",/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */use: {/* Base URL to use in actions like `await page.goto('/')`. */// baseURL: 'http://127.0.0.1:3000',/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */- trace: 'on-first-retry',+ trace: "on-first-retry",},/* Configure projects for major browsers */projects: [{- name: 'chromium',- use: { ...devices['Desktop Chrome'] },+ name: "chromium",+ use: { ...devices["Desktop Chrome"] },},{- name: 'firefox',- use: { ...devices['Desktop Firefox'] },+ name: "firefox",+ use: { ...devices["Desktop Firefox"] },},{- name: 'webkit',- use: { ...devices['Desktop Safari'] },+ name: "webkit",+ use: { ...devices["Desktop Safari"] },},/* Test against mobile viewports. */diff --git a/postcss.config.js b/postcss.config.jsindex 33ad091d..12a703d9 100644--- a/postcss.config.js+++ b/postcss.config.js@@ -3,4 +3,4 @@ module.exports = {tailwindcss: {},autoprefixer: {},},-}+};diff --git a/store/localSettings.ts b/store/localSettings.tsindex 9ef126d7..e38bae8d 100644--- a/store/localSettings.ts+++ b/store/localSettings.ts@@ -1,9 +1,9 @@import { create } from "zustand";-import {ViewMode} from "@/types/global";+import { ViewMode } from "@/types/global";type LocalSettings = {theme?: string;- viewMode?: string+ viewMode?: string;};type LocalSettingsStore = {