diff --git a/src/pages/[serverId]/index.tsx b/src/pages/[serverId]/index.tsx
index 87c9d2d..9b34ce2 100644
--- a/src/pages/[serverId]/index.tsx
+++ b/src/pages/[serverId]/index.tsx
@@ -9,10 +9,10 @@ import useSWRMutation from "swr/mutation";
import { useRouter } from "next/router";
import { MiddleEllipsis } from "@ui/MiddleEllipsis";
import StatusBadge from "@ui/StatusBadge";
-import { SmartModalRef } from "@ui/Modal/SmartModal";
-import CreateClientModal from "@ui/Modal/CreateClientModal";
+import { SmartModalRef } from "@ui/modal/SmartModal";
+import CreateClientModal from "@ui/modal/CreateClientModal";
import { twMerge } from "tailwind-merge";
-import QRCodeModal from "@ui/Modal/QRCodeModal";
+import QRCodeModal from "@ui/modal/QRCodeModal";
import { getPeerConf } from "@lib/wireguard-utils";
import EditableText from "@ui/EditableText";
import { RLS_NAME_INPUT } from "@lib/form-rules";
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index dde964e..9a0b7d5 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -3,19 +3,18 @@ import { Button, Card, List } from "antd";
import BasePage from "@ui/pages/BasePage";
import { APIResponse, WgServer } from "@lib/typings";
import { PlusOutlined } from "@ant-design/icons";
-import Image, { ImageProps } from "next/image";
import Link from "next/link";
import PageRouter from "@ui/pages/PageRouter";
import useSWR from "swr";
-import { SmartModalRef } from "@ui/Modal/SmartModal";
-import { twMerge } from "tailwind-merge";
-import CreateServerModal from "@ui/Modal/CreateServerModal";
+import { SmartModalRef } from "@ui/modal/SmartModal";
+import CreateServerModal from "@ui/modal/CreateServerModal";
import StatusBadge from "@ui/StatusBadge";
import EditableText from "@ui/EditableText";
import useSWRMutation from "swr/mutation";
import { UPDATE_SERVER } from "@lib/swr-fetch";
import { RLS_NAME_INPUT } from "@lib/form-rules";
import CopiableWrapper from "@ui/CopiableWrapper";
+import ServerIcon from "@ui/icons/ServerIcon";
export default function Home() {
const { data, error, isLoading, mutate } = useSWR(
@@ -133,47 +132,3 @@ function ServerListItem(props: ServerListItemProps) {
)
}
-type ServerIconProps = {
- type: WgServer['type']
- className?: string
-}
-
-function ServerIcon(props: ServerIconProps) {
- return (
-
-
-
- {props.type !== 'direct' && (
-
- {props.type === 'tor' && (
-
- )}
-
- )}
-
-
- )
-}
-
-export function TorOnion(props: Omit) {
- return (
-
- )
-}
diff --git a/src/ui/icons/ServerIcon.tsx b/src/ui/icons/ServerIcon.tsx
new file mode 100644
index 0000000..a9fb931
--- /dev/null
+++ b/src/ui/icons/ServerIcon.tsx
@@ -0,0 +1,36 @@
+import { WgServer } from "@lib/typings";
+import { twMerge } from "tailwind-merge";
+import Image from "next/image";
+import React from "react";
+
+export interface ServerIconProps {
+ type: WgServer['type']
+ className?: string
+}
+
+export default function ServerIcon(props: ServerIconProps) {
+ return (
+
+
+
+ {props.type !== 'direct' && (
+
+ {props.type === 'tor' && (
+
+ )}
+
+ )}
+
+
+ )
+}
diff --git a/src/ui/icons/TorOnionIcon.tsx b/src/ui/icons/TorOnionIcon.tsx
new file mode 100644
index 0000000..91d6932
--- /dev/null
+++ b/src/ui/icons/TorOnionIcon.tsx
@@ -0,0 +1,16 @@
+import Image, { ImageProps } from "next/image";
+import { twMerge } from "tailwind-merge";
+import React from "react";
+
+export default function TorOnion(props: Omit) {
+ return (
+
+ )
+}
diff --git a/src/ui/Modal/CreateClientModal.tsx b/src/ui/modal/CreateClientModal.tsx
similarity index 94%
rename from src/ui/Modal/CreateClientModal.tsx
rename to src/ui/modal/CreateClientModal.tsx
index 1ccd89c..81c0de2 100644
--- a/src/ui/Modal/CreateClientModal.tsx
+++ b/src/ui/modal/CreateClientModal.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import SmartModal, { SmartModalRef } from "@ui/Modal/SmartModal";
+import SmartModal, { SmartModalRef } from "@ui/modal/SmartModal";
import { Button, Form, Input, notification } from "antd";
import { z } from "zod";
import { APIResponse } from "@lib/typings";
@@ -50,11 +50,7 @@ const CreateClientModal = React.forwardRef<
props.refreshTrigger()
notificationApi.success({
message: 'Success',
- description: (
-
- hi
-
- )
+ description: 'Client has been created!'
})
innerRef.current?.close()
form?.resetFields()
diff --git a/src/ui/Modal/CreateServerModal.tsx b/src/ui/modal/CreateServerModal.tsx
similarity index 96%
rename from src/ui/Modal/CreateServerModal.tsx
rename to src/ui/modal/CreateServerModal.tsx
index bfa254d..4d876b5 100644
--- a/src/ui/Modal/CreateServerModal.tsx
+++ b/src/ui/modal/CreateServerModal.tsx
@@ -1,13 +1,13 @@
import React from "react";
-import SmartModal, { SmartModalRef } from "@ui/Modal/SmartModal";
+import SmartModal, { SmartModalRef } from "@ui/modal/SmartModal";
import { Button, Form, Input, notification, Segmented } from "antd";
-import { TorOnion } from "@/pages";
import { z } from "zod";
import { APIResponse } from "@lib/typings";
import useSWRMutation from "swr/mutation";
import { isPrivateIP } from "@lib/utils";
import { AddressSchema, DnsSchema, MtuSchema, NameSchema, PortSchema, TypeSchema } from "@lib/schemas/WireGuard";
import { zodErrorMessage } from "@lib/zod";
+import TorOnion from "@ui/icons/TorOnionIcon";
type CreateServerModalProps = {
refreshTrigger: () => void
@@ -51,11 +51,7 @@ const CreateServerModal = React.forwardRef<
onSuccess: () => {
notificationApi.success({
message: 'Success',
- description: (
-
- hi
-
- )
+ description: 'Server has been created!'
})
innerRef.current?.close()
form?.resetFields()
diff --git a/src/ui/Modal/QRCodeModal.tsx b/src/ui/modal/QRCodeModal.tsx
similarity index 93%
rename from src/ui/Modal/QRCodeModal.tsx
rename to src/ui/modal/QRCodeModal.tsx
index e37699d..59d1901 100644
--- a/src/ui/Modal/QRCodeModal.tsx
+++ b/src/ui/modal/QRCodeModal.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import SmartModal, { SmartModalRef } from "@ui/Modal/SmartModal";
+import SmartModal, { SmartModalRef } from "@ui/modal/SmartModal";
import { QRCodeCanvas } from "qrcode.react";
import { SHA1 } from "crypto-js";
diff --git a/src/ui/Modal/SmartModal.tsx b/src/ui/modal/SmartModal.tsx
similarity index 100%
rename from src/ui/Modal/SmartModal.tsx
rename to src/ui/modal/SmartModal.tsx
diff --git a/src/ui/pages/PageHeader.tsx b/src/ui/pages/PageHeader.tsx
index aa23b98..7c1cee0 100644
--- a/src/ui/pages/PageHeader.tsx
+++ b/src/ui/pages/PageHeader.tsx
@@ -24,7 +24,7 @@ export default function PageHeader(props: PageHeaderProps) {
title={'Giv me a star on Github'}
>