@djangocfg/centrifugo 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/centrifugo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "WebSocket RPC client for Django-CFG + Centrifugo integration",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"centrifuge": "^5.2.2"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@djangocfg/ui": "^1.2.
|
|
23
|
-
"@djangocfg/layouts": "^1.2.
|
|
22
|
+
"@djangocfg/ui": "^1.2.28",
|
|
23
|
+
"@djangocfg/layouts": "^1.2.28",
|
|
24
24
|
"consola": "^3.4.2",
|
|
25
25
|
"lucide-react": "^0.468.0",
|
|
26
26
|
"moment": "^2.30.1",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-dom": "^19.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@djangocfg/typescript-config": "^1.2.
|
|
31
|
+
"@djangocfg/typescript-config": "^1.2.28",
|
|
32
32
|
"@types/react": "^19.0.6",
|
|
33
33
|
"@types/react-dom": "^19.0.2",
|
|
34
34
|
"moment": "^2.30.1",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Debug Panel
|
|
3
3
|
*
|
|
4
4
|
* Main debug UI with FAB button + Sheet modal + Tabs.
|
|
5
|
-
*
|
|
5
|
+
* Visibility controlled by CentrifugoProvider (dev mode OR admin users).
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
'use client';
|
|
@@ -24,15 +24,6 @@ import { ConnectionTab } from '../ConnectionTab';
|
|
|
24
24
|
import { LogsTab } from '../LogsTab';
|
|
25
25
|
import { SubscriptionsTab } from '../SubscriptionsTab';
|
|
26
26
|
|
|
27
|
-
// ─────────────────────────────────────────────────────────────────────────
|
|
28
|
-
// Config
|
|
29
|
-
// ─────────────────────────────────────────────────────────────────────────
|
|
30
|
-
|
|
31
|
-
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
32
|
-
const isStaticBuild = process.env.NEXT_PHASE === 'phase-production-build';
|
|
33
|
-
|
|
34
|
-
const showDebugPanel = isDevelopment && !isStaticBuild;
|
|
35
|
-
|
|
36
27
|
// ─────────────────────────────────────────────────────────────────────────
|
|
37
28
|
// Component
|
|
38
29
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -41,11 +32,6 @@ export function DebugPanel() {
|
|
|
41
32
|
const [isOpen, setIsOpen] = useState(false);
|
|
42
33
|
const [activeTab, setActiveTab] = useState('connection');
|
|
43
34
|
|
|
44
|
-
// Don't render in production
|
|
45
|
-
if (!showDebugPanel) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
35
|
return (
|
|
50
36
|
<>
|
|
51
37
|
{/* FAB Button (fixed bottom-left) */}
|
|
@@ -335,11 +335,10 @@ function CentrifugoProviderInner({
|
|
|
335
335
|
};
|
|
336
336
|
|
|
337
337
|
// Smart DebugPanel visibility:
|
|
338
|
-
// - Show in development mode
|
|
339
|
-
// -
|
|
338
|
+
// - Show in development mode
|
|
339
|
+
// - Show for admin users
|
|
340
340
|
const showDebugPanel = useMemo(() => {
|
|
341
|
-
|
|
342
|
-
return devMode || isAdminUser;
|
|
341
|
+
return isDevelopment || isAdminUser;
|
|
343
342
|
}, [isAdminUser]);
|
|
344
343
|
|
|
345
344
|
return (
|