vzcode 1.17.0 → 1.18.0
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/dist/assets/index-eifYAxsF.js +181 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/client/VZLeft.tsx +2 -1
- package/src/client/VZSidebar/index.tsx +41 -27
- package/src/client/featureFlags.ts +2 -0
- package/src/server/livekit.js +1 -1
- package/src/vite-env.d.ts +10 -0
- package/dist/assets/index-BQgRA0SD.js +0 -181
package/dist/index.html
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
21
21
|
rel="stylesheet"
|
|
22
22
|
/>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-eifYAxsF.js"></script>
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/index-zzK6rRiK.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
package/package.json
CHANGED
package/src/client/VZLeft.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { enableLiveKit } from './featureFlags';
|
|
1
2
|
import { VZKeyboardShortcutsDoc } from './VZKeyboardShortcutsDoc';
|
|
2
3
|
import { VZSettings } from './VZSettings';
|
|
3
4
|
import { VZSidebar } from './VZSidebar';
|
|
@@ -21,7 +22,7 @@ export const VZLeft = ({ enableUsernameField = true }) => {
|
|
|
21
22
|
/>
|
|
22
23
|
<CreateFileModal />
|
|
23
24
|
<CreateDirModal />
|
|
24
|
-
<VoiceChatModal />
|
|
25
|
+
{enableLiveKit && <VoiceChatModal />}
|
|
25
26
|
</div>
|
|
26
27
|
);
|
|
27
28
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useEffect,
|
|
5
5
|
useMemo,
|
|
6
6
|
useState,
|
|
7
|
-
useRef
|
|
7
|
+
useRef,
|
|
8
8
|
} from 'react';
|
|
9
9
|
import {
|
|
10
10
|
FileId,
|
|
@@ -34,6 +34,7 @@ import { Listing } from './Listing';
|
|
|
34
34
|
import { Search } from './Search';
|
|
35
35
|
import './styles.scss';
|
|
36
36
|
import { useDragAndDrop } from './useDragAndDrop';
|
|
37
|
+
import { enableLiveKit } from '../featureFlags';
|
|
37
38
|
|
|
38
39
|
// TODO turn this UI back on when we are actually detecting
|
|
39
40
|
// the connection status.
|
|
@@ -231,7 +232,12 @@ export const VZSidebar = ({
|
|
|
231
232
|
// Handle 'saved' state based on 'pending' transition
|
|
232
233
|
useEffect(() => {
|
|
233
234
|
// Check if 'pending' transitioned from true to false
|
|
234
|
-
if (
|
|
235
|
+
if (
|
|
236
|
+
previousPendingRef.current &&
|
|
237
|
+
!pending &&
|
|
238
|
+
connected &&
|
|
239
|
+
!isConnecting
|
|
240
|
+
) {
|
|
235
241
|
setSaved(true);
|
|
236
242
|
const timer = setTimeout(() => {
|
|
237
243
|
setSaved(false);
|
|
@@ -242,7 +248,6 @@ export const VZSidebar = ({
|
|
|
242
248
|
previousPendingRef.current = pending;
|
|
243
249
|
}, [pending, connected, isConnecting]);
|
|
244
250
|
|
|
245
|
-
|
|
246
251
|
return (
|
|
247
252
|
<div
|
|
248
253
|
className="vz-sidebar"
|
|
@@ -408,25 +413,30 @@ export const VZSidebar = ({
|
|
|
408
413
|
</i>
|
|
409
414
|
</OverlayTrigger>
|
|
410
415
|
{/* Start Voice Chat */}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
<i
|
|
420
|
-
id="mic-icon"
|
|
421
|
-
className="icon-button icon-button-dark"
|
|
422
|
-
onClick={() => {
|
|
423
|
-
console.log('clicking', liveKitConnection);
|
|
424
|
-
setVoiceChatModalOpen(true);
|
|
425
|
-
}}
|
|
416
|
+
{enableLiveKit && (
|
|
417
|
+
<OverlayTrigger
|
|
418
|
+
placement="right"
|
|
419
|
+
overlay={
|
|
420
|
+
<Tooltip id="voice-chat">
|
|
421
|
+
{voiceChatToolTipText}
|
|
422
|
+
</Tooltip>
|
|
423
|
+
}
|
|
426
424
|
>
|
|
427
|
-
<
|
|
428
|
-
|
|
429
|
-
|
|
425
|
+
<i
|
|
426
|
+
id="mic-icon"
|
|
427
|
+
className="icon-button icon-button-dark"
|
|
428
|
+
onClick={() => {
|
|
429
|
+
console.log(
|
|
430
|
+
'clicking',
|
|
431
|
+
liveKitConnection,
|
|
432
|
+
);
|
|
433
|
+
setVoiceChatModalOpen(true);
|
|
434
|
+
}}
|
|
435
|
+
>
|
|
436
|
+
<MicSVG />
|
|
437
|
+
</i>
|
|
438
|
+
</OverlayTrigger>
|
|
439
|
+
)}
|
|
430
440
|
</div>
|
|
431
441
|
<div className="files" id="sidebar-view-container">
|
|
432
442
|
{!isSearchOpen ? (
|
|
@@ -472,11 +482,15 @@ export const VZSidebar = ({
|
|
|
472
482
|
</div>
|
|
473
483
|
{enableConnectionStatus && (
|
|
474
484
|
<div className="connection-status">
|
|
475
|
-
{isConnecting
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
485
|
+
{isConnecting
|
|
486
|
+
? 'Connecting...'
|
|
487
|
+
: !connected
|
|
488
|
+
? 'Connection Lost'
|
|
489
|
+
: pending
|
|
490
|
+
? 'Saving...'
|
|
491
|
+
: saved
|
|
492
|
+
? 'Saved.'
|
|
493
|
+
: 'Connected'}
|
|
480
494
|
<div className="connection">
|
|
481
495
|
<div
|
|
482
496
|
className={`connection-status-indicator ${
|
|
@@ -487,7 +501,7 @@ export const VZSidebar = ({
|
|
|
487
501
|
: pending
|
|
488
502
|
? 'pending'
|
|
489
503
|
: 'connected'
|
|
490
|
-
|
|
504
|
+
}`}
|
|
491
505
|
/>
|
|
492
506
|
</div>
|
|
493
507
|
</div>
|
package/src/server/livekit.js
CHANGED
|
@@ -7,7 +7,7 @@ export const createToken = async (roomName, username) => {
|
|
|
7
7
|
// client joins
|
|
8
8
|
// Identifier to be used for participant.
|
|
9
9
|
// It's available as LocalParticipant.identity with livekit-client SDK
|
|
10
|
-
console.log(username);
|
|
10
|
+
// console.log(username);
|
|
11
11
|
const participantName = `${username}`;
|
|
12
12
|
|
|
13
13
|
const at = new AccessToken(
|