chore lint code
This commit is contained in:
+3
-1
@@ -12,7 +12,9 @@
|
||||
"react/jsx-key": "off",
|
||||
"tailwindcss/no-custom-classname": "off",
|
||||
"tailwindcss/classnames-order": "off",
|
||||
"react/no-unescaped-entities": "off"
|
||||
"tailwindcss/enforces-shorthand": "off",
|
||||
"react/no-unescaped-entities": "off",
|
||||
"@next/next/no-img-element": "off"
|
||||
},
|
||||
"settings": {
|
||||
"tailwindcss": {
|
||||
|
||||
@@ -359,7 +359,7 @@ export default function UserUrlsList({ user, action }: UrlListProps) {
|
||||
>
|
||||
<TableCell className="col-span-1 flex items-center gap-1 sm:col-span-2">
|
||||
<Link
|
||||
className="overflow-hidden overflow-ellipsis whitespace-normal text-slate-600 hover:text-blue-400 hover:underline dark:text-slate-400"
|
||||
className="overflow-hidden text-ellipsis whitespace-normal text-slate-600 hover:text-blue-400 hover:underline dark:text-slate-400"
|
||||
href={`https://${short.prefix}/s/${short.url}${short.password ? `?password=${short.password}` : ""}`}
|
||||
target="_blank"
|
||||
prefetch={false}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { env } from "@/env.mjs";
|
||||
import { getUserShortUrls } from "@/lib/dto/short-urls";
|
||||
import { checkUserStatus } from "@/lib/dto/user";
|
||||
import { getCurrentUser } from "@/lib/session";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
try {
|
||||
const user = checkUserStatus(await getCurrentUser());
|
||||
|
||||
@@ -3,9 +3,10 @@ import TurndownService from "turndown";
|
||||
|
||||
import { checkApiKey } from "@/lib/dto/api-key";
|
||||
import { createScrapeMeta } from "@/lib/dto/scrape";
|
||||
import { getIpInfo, isLink, removeUrlSuffix } from "@/lib/utils";
|
||||
import { getIpInfo, isLink } from "@/lib/utils";
|
||||
|
||||
export const revalidate = 600;
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const turndownService = new TurndownService();
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { geolocation } from "@vercel/functions";
|
||||
import cheerio from "cheerio";
|
||||
|
||||
import { checkApiKey } from "@/lib/dto/api-key";
|
||||
@@ -6,6 +5,7 @@ import { createScrapeMeta } from "@/lib/dto/scrape";
|
||||
import { getIpInfo, isLink, removeUrlSuffix } from "@/lib/utils";
|
||||
|
||||
export const revalidate = 600;
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
try {
|
||||
|
||||
@@ -2,9 +2,10 @@ import cheerio from "cheerio";
|
||||
|
||||
import { checkApiKey } from "@/lib/dto/api-key";
|
||||
import { createScrapeMeta } from "@/lib/dto/scrape";
|
||||
import { getIpInfo, isLink, removeUrlSuffix } from "@/lib/utils";
|
||||
import { getIpInfo, isLink } from "@/lib/utils";
|
||||
|
||||
export const revalidate = 600;
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
try {
|
||||
|
||||
+1
-2
@@ -50,8 +50,7 @@ export default {
|
||||
from: "wrdo <support@wr.do>",
|
||||
async sendVerificationRequest({ identifier: email, url, provider }) {
|
||||
try {
|
||||
// 使用 Resend 发送自定义验证邮件
|
||||
const { data, error } = await resend.emails.send({
|
||||
const { error } = await resend.emails.send({
|
||||
from: provider.from || "no-reply@wr.do",
|
||||
to: [email],
|
||||
subject: "Verify your email address",
|
||||
|
||||
@@ -673,7 +673,7 @@ export default function ChatRoom() {
|
||||
className={`${
|
||||
isMobile
|
||||
? "fixed inset-0 z-50 w-full"
|
||||
: "w-[300px] flex-shrink-0 border-r dark:border-neutral-600"
|
||||
: "w-[300px] shrink-0 border-r dark:border-neutral-600"
|
||||
} flex animate-fade-in-left flex-col bg-white p-4 transition-all duration-300 dark:bg-neutral-800`}
|
||||
>
|
||||
<div className="mb-3 flex items-center justify-between">
|
||||
@@ -816,7 +816,7 @@ export default function ChatRoom() {
|
||||
placeholder="You are the room owner"
|
||||
readOnly
|
||||
disabled
|
||||
className="flex-1 rounded border bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder-neutral-400"
|
||||
className="flex-1 rounded border bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
||||
/>
|
||||
) : (
|
||||
<Input
|
||||
@@ -826,7 +826,7 @@ export default function ChatRoom() {
|
||||
placeholder="Enter a room id"
|
||||
readOnly={isConnected}
|
||||
disabled={isConnected}
|
||||
className="flex-1 rounded border bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder-neutral-400"
|
||||
className="flex-1 rounded border bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
@@ -860,7 +860,7 @@ export default function ChatRoom() {
|
||||
<>
|
||||
{!msg.isSelf && (
|
||||
<div
|
||||
className={`flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full text-white ${generateGradientClasses(
|
||||
className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-white ${generateGradientClasses(
|
||||
msg.username,
|
||||
)}`}
|
||||
>
|
||||
@@ -905,7 +905,7 @@ export default function ChatRoom() {
|
||||
</div>
|
||||
{msg.isSelf && (
|
||||
<div
|
||||
className={`mt-1 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full text-white ${avatarClasses}`}
|
||||
className={`mt-1 flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-white ${avatarClasses}`}
|
||||
>
|
||||
{username?.slice(0, 1).toUpperCase()}
|
||||
</div>
|
||||
@@ -926,7 +926,7 @@ export default function ChatRoom() {
|
||||
value={message}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
placeholder={`Hi ${username || "Loading..."}, send a message to start...`}
|
||||
className="min-h-20 flex-1 rounded-md rounded-t-none border border-t-0 bg-neutral-50 p-2 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-600 dark:text-neutral-200 dark:placeholder-neutral-400"
|
||||
className="min-h-20 flex-1 rounded-md rounded-t-none border border-t-0 bg-neutral-50 p-2 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-600 dark:text-neutral-200 dark:placeholder:text-neutral-400"
|
||||
onKeyPress={(e) =>
|
||||
e.key === "Enter" && !e.shiftKey && sendMessage()
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ export default function EmailDetail({
|
||||
email.fromName?.[0].toUpperCase() ||
|
||||
"U"}
|
||||
</div>
|
||||
<div className="max-w-[80%] flex-grow text-neutral-600 dark:text-neutral-300">
|
||||
<div className="max-w-[80%] grow text-neutral-600 dark:text-neutral-300">
|
||||
<p className="text-sm">
|
||||
<strong>{email.subject}</strong>
|
||||
</p>
|
||||
@@ -209,7 +209,7 @@ export default function EmailDetail({
|
||||
)}
|
||||
</div>
|
||||
<Button
|
||||
className="ml-auto size-8 flex-grow-0 px-1 py-1"
|
||||
className="ml-auto size-8 grow-0 px-1 py-1"
|
||||
size={"sm"}
|
||||
onClick={onClose}
|
||||
variant={"outline"}
|
||||
@@ -270,7 +270,7 @@ export default function EmailDetail({
|
||||
</div>
|
||||
<Button
|
||||
onClick={() => handleDownload(attachment)}
|
||||
className="absolute right-0 top-0 hidden transform animate-fade-in px-2 group-hover:block"
|
||||
className="absolute right-0 top-0 hidden animate-fade-in px-2 group-hover:block"
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
|
||||
@@ -252,7 +252,7 @@ export default function EmailSidebar({
|
||||
}
|
||||
/>
|
||||
</Button>
|
||||
<div className="relative w-full flex-grow">
|
||||
<div className="relative w-full grow">
|
||||
<Input
|
||||
type="text"
|
||||
value={searchQuery}
|
||||
|
||||
@@ -123,7 +123,11 @@ export function UserAuthForm({ className, type, ...props }: UserAuthFormProps) {
|
||||
{isLinuxDoLoading ? (
|
||||
<Icons.spinner className="mr-2 size-4 animate-spin" />
|
||||
) : (
|
||||
<img src="/_static/images/linuxdo.webp" className="mr-2 size-4" />
|
||||
<img
|
||||
src="/_static/images/linuxdo.webp"
|
||||
alt="linuxdo"
|
||||
className="mr-2 size-4"
|
||||
/>
|
||||
)}{" "}
|
||||
LinuxDo
|
||||
</button>
|
||||
|
||||
@@ -78,7 +78,7 @@ export default function EmailManagerInnovate() {
|
||||
<input
|
||||
type="text"
|
||||
placeholder={`Search ${viewMode === "inbox" ? "received" : "sent"} emails...`}
|
||||
className="w-full rounded-full border border-gray-200 bg-white/80 px-4 py-2.5 text-sm text-gray-700 shadow-sm transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:border-gray-600 dark:bg-gray-800/80 dark:text-gray-200 dark:placeholder-gray-400 dark:focus:ring-blue-500"
|
||||
className="w-full rounded-full border border-gray-200 bg-white/80 px-4 py-2.5 text-sm text-gray-700 shadow-sm transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:border-gray-600 dark:bg-gray-800/80 dark:text-gray-200 dark:placeholder:text-gray-400 dark:focus:ring-blue-500"
|
||||
/>
|
||||
<Link
|
||||
href={`/emails`}
|
||||
|
||||
+1
-101
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user