chore icon codes
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import { useState, useTransition } from "react";
|
||||
import Link from "next/link";
|
||||
import { User } from "@prisma/client";
|
||||
import { PenLine, RefreshCwIcon } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { toast } from "sonner";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
@@ -172,9 +171,9 @@ export default function DomainList({ user, action }: DomainListProps) {
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { User } from "@prisma/client";
|
||||
import { PenLine, RefreshCwIcon } from "lucide-react";
|
||||
import { PenLine } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
|
||||
@@ -111,9 +111,9 @@ export default function PlanList({ user, action }: PlanListProps) {
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -191,7 +191,7 @@ export default function S3Configs({}: {}) {
|
||||
</div>
|
||||
{r2Credentials.buckets.map((bucket, index) => (
|
||||
<motion.div
|
||||
className="relative grid grid-cols-1 gap-4 rounded-lg border border-dashed border-muted-foreground px-3 pb-3 pt-10 text-neutral-600 dark:text-neutral-400 sm:grid-cols-3"
|
||||
className="relative grid grid-cols-1 gap-4 rounded-lg border border-dashed border-muted-foreground px-3 pb-3 pt-10 text-neutral-600 dark:text-neutral-400 sm:grid-cols-4"
|
||||
key={`bucket-${index}`}
|
||||
layout
|
||||
initial={{ opacity: 0, scale: 0.9 }}
|
||||
@@ -289,7 +289,7 @@ export default function S3Configs({}: {}) {
|
||||
</div>
|
||||
|
||||
<div className="space-y-1">
|
||||
<Label>{t("Bucket Name")}</Label>
|
||||
<Label>{t("Bucket Name")}*</Label>
|
||||
<Input
|
||||
value={bucket.bucket}
|
||||
placeholder="bucket name"
|
||||
@@ -307,7 +307,7 @@ export default function S3Configs({}: {}) {
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label>{t("Public Domain")}</Label>
|
||||
<Label>{t("Public Domain")}*</Label>
|
||||
<Input
|
||||
value={bucket.custom_domain}
|
||||
placeholder="https://endpoint or custom domain"
|
||||
@@ -388,7 +388,7 @@ export default function S3Configs({}: {}) {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
{/* <div className="space-y-1">
|
||||
<Label>
|
||||
{t("Allowed File Types")} ({t("Optional")})
|
||||
</Label>
|
||||
@@ -408,7 +408,7 @@ export default function S3Configs({}: {}) {
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
</motion.div>
|
||||
))}
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { User } from "@prisma/client";
|
||||
import { PenLine, RefreshCwIcon } from "lucide-react";
|
||||
import { PenLine } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
|
||||
@@ -117,9 +117,9 @@ export default function UsersList({ user }: UrlListProps) {
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { User } from "@prisma/client";
|
||||
import { PenLine, RefreshCwIcon } from "lucide-react";
|
||||
import { PenLine } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { toast } from "sonner";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
@@ -181,9 +181,9 @@ export default function UserRecordsList({ user, action }: RecordListProps) {
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { RefreshCwIcon } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
|
||||
@@ -17,6 +16,7 @@ import {
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { Icons } from "@/components/shared/icons";
|
||||
import { PaginationWrapper } from "@/components/shared/pagination";
|
||||
|
||||
export interface LogsTableData {
|
||||
@@ -132,9 +132,9 @@ const LogsTable = ({ userId, target }) => {
|
||||
className="ml-2 h-8 px-2 py-0"
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className={`size-4 animate-spin`} />
|
||||
<Icons.refreshCw className={`size-4 animate-spin`} />
|
||||
) : (
|
||||
<RefreshCwIcon className={`size-4`} />
|
||||
<Icons.refreshCw className={`size-4`} />
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -180,9 +180,9 @@ export default function LiveLog({ admin = false }: { admin?: boolean }) {
|
||||
disabled={!isLive}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useState, useTransition } from "react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { User } from "@prisma/client";
|
||||
import { PenLine, RefreshCwIcon } from "lucide-react";
|
||||
import { PenLine } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { toast } from "sonner";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
@@ -702,9 +702,9 @@ export default function UserUrlsList({ user, action }: UrlListProps) {
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
{action.indexOf("admin") === -1 && (
|
||||
|
||||
@@ -200,7 +200,7 @@ export default function UserFileList({
|
||||
handleGetFileShortLinkByIds();
|
||||
}, [files]);
|
||||
|
||||
if (files?.total === 0) {
|
||||
if (files && files.total === 0) {
|
||||
return (
|
||||
<EmptyPlaceholder className="col-span-full shadow-none">
|
||||
<EmptyPlaceholder.Icon name="fileText" />
|
||||
@@ -525,6 +525,9 @@ export default function UserFileList({
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
<strong>Type:</strong> {file.mimeType || "-"}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
<strong>User:</strong> {file.user.name || file.user.email}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
<strong>Modified:</strong>{" "}
|
||||
{formatDate(file.lastModified?.toString() || "")}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import { useEffect, useState, useTransition } from "react";
|
||||
import { User } from "@prisma/client";
|
||||
import { RefreshCwIcon } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { toast } from "sonner";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
@@ -295,15 +294,15 @@ export default function UserFileManager({ user, action }: FileListProps) {
|
||||
|
||||
<Button
|
||||
className="h-9"
|
||||
size={"icon"}
|
||||
variant={"outline"}
|
||||
size="icon"
|
||||
variant="outline"
|
||||
onClick={() => handleRefresh()}
|
||||
disabled={isLoading}
|
||||
disabled={isLoadingFiles}
|
||||
>
|
||||
{isLoading ? (
|
||||
<RefreshCwIcon className="size-4 animate-spin" />
|
||||
{isLoadingFiles ? (
|
||||
<Icons.refreshCw className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
<Icons.refreshCw className="size-4" />
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user