Skip to content

Commit

Permalink
add network page
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Feb 24, 2024
1 parent 7ef57d7 commit df3f53d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
13 changes: 13 additions & 0 deletions web/app/network/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IpMode } from "@/components/ip-mode";

export default function Network() {
return (
<main className="flex min-h-screen flex-col items-center justify-between pt-10 max-w-screen-xl">
<div className="p-10">
<div className="flex flex-col max-w-screen-lg">
<IpMode />
</div>
</div>
</main>
);
}
30 changes: 30 additions & 0 deletions web/components/ip-mode.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { SettingsIcon } from "@/components/icons";

export const IpMode = () => {
return (
<div className="stats shadow bg-primary-content stats-vertical lg:stats-horizontal">
<div className="stat">
<div className="stat-figure text-secondary mt-3">
<SettingsIcon />
</div>
<div className="stat-title">IP Mode</div>
<div className="stat-value text-primary">IPV4</div>
<div className="stat-desc">The current IP mode</div>
<div className="flex flex-row items-center gap-2 stat-actions">
<span className="label-text text-slate-500 ">Enable IPv6</span>
<input type="checkbox" className="toggle toggle-primary" checked={false} />
</div>
</div>

<div className="stat gap-2">
<div className="stat-title">URLs</div>
<div className="flex flex-col gap-2">
<textarea className="textarea textarea-primary w-80" placeholder="Bio"></textarea>
<div className="flex justify-end">
<button className="flex justify-end btn btn-sm btn-primary">Save</button>
</div>
</div>
</div>
</div>
)
}
2 changes: 1 addition & 1 deletion web/components/stat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const Stat = () => {
</div>
<div className="stat-title">IP Mode</div>
<div className="stat-value text-info">{info ? info.ip_mode : 'N/A'}</div>
<div className="stat-desc"></div>
<div className="stat-desc">The IP mode</div>
</div>

<div className="stat">
Expand Down
6 changes: 5 additions & 1 deletion web/config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export const siteConfig = {
{
label: "Domains",
href: "/domains",
}
},
{
label: "Network",
href: "/network",
},
],
links: {
github: "https://github.com/TimothyYe/godns",
Expand Down

0 comments on commit df3f53d

Please sign in to comment.