diff --git a/next.config.mjs b/next.config.mjs index e71a530a..f7ee57a3 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -40,8 +40,12 @@ const nextConfig = { path: false, }; } - // Exclude logs, .next, gitbook subapp from watcher - config.watchOptions = { ...config.watchOptions, ignored: /[\\/](logs|\.next|gitbook|cli)[\\/]/ }; + // Exclude non-source dirs from watcher to reduce inotify load + config.watchOptions = { + ...config.watchOptions, + aggregateTimeout: 300, + ignored: /[\\/](node_modules|\.git|logs|\.next|\.next-cli-build|gitbook|cli|open-sse\.old|tests|docs)[\\/]/, + }; return config; }, async rewrites() { diff --git a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js index 096fd28d..0aadd536 100644 --- a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +++ b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js @@ -1093,6 +1093,119 @@ export default function APIPageClient({ machineId }) { )} + {/* API Keys */} + +
+

+ vpn_key + API Keys +

+ +
+ +
+
+

Require API key

+

+ Requests without a valid key will be rejected +

+
+ handleRequireApiKey(!requireApiKey)} + /> +
+ + {isRemoteHost && !requireApiKey && ( +
+ +
+ )} + + {keys.length === 0 ? ( +
+
+ vpn_key +
+

No API keys yet

+

Create your first API key to get started

+ +
+ ) : ( +
+ {keys.map((key) => ( +
+
+

{key.name}

+
+ + {visibleKeys.has(key.id) ? key.key : maskKey(key.key)} + + + +
+

+ Created {new Date(key.createdAt).toLocaleDateString()} +

+ {key.isActive === false && ( +

Paused

+ )} +
+
+ { + if (key.isActive && !checked) { + setConfirmState({ + title: "Pause API Key", + message: `Pause API key "${key.name}"?\n\nThis key will stop working immediately but can be resumed later.`, + onConfirm: async () => { + setConfirmState(null); + handleToggleKey(key.id, checked); + } + }); + } else { + handleToggleKey(key.id, checked); + } + }} + title={key.isActive ? "Pause key" : "Resume key"} + /> + +
+
+ ))} +
+ )} +
+ {/* Token Saver (RTK + Caveman) */}
@@ -1260,119 +1373,6 @@ export default function APIPageClient({ machineId }) {
- {/* API Keys */} - -
-

- vpn_key - API Keys -

- -
- -
-
-

Require API key

-

- Requests without a valid key will be rejected -

-
- handleRequireApiKey(!requireApiKey)} - /> -
- - {isRemoteHost && !requireApiKey && ( -
- -
- )} - - {keys.length === 0 ? ( -
-
- vpn_key -
-

No API keys yet

-

Create your first API key to get started

- -
- ) : ( -
- {keys.map((key) => ( -
-
-

{key.name}

-
- - {visibleKeys.has(key.id) ? key.key : maskKey(key.key)} - - - -
-

- Created {new Date(key.createdAt).toLocaleDateString()} -

- {key.isActive === false && ( -

Paused

- )} -
-
- { - if (key.isActive && !checked) { - setConfirmState({ - title: "Pause API Key", - message: `Pause API key "${key.name}"?\n\nThis key will stop working immediately but can be resumed later.`, - onConfirm: async () => { - setConfirmState(null); - handleToggleKey(key.id, checked); - } - }); - } else { - handleToggleKey(key.id, checked); - } - }} - title={key.isActive ? "Pause key" : "Resume key"} - /> - -
-
- ))} -
- )} -
- {/* Add Key Modal */}