diff --git a/js/desktop/forge.config.ts b/js/desktop/forge.config.ts index e2381bd..d0af626 100644 --- a/js/desktop/forge.config.ts +++ b/js/desktop/forge.config.ts @@ -6,6 +6,7 @@ import { MakerRpm } from '@electron-forge/maker-rpm'; import { VitePlugin } from '@electron-forge/plugin-vite'; import { FusesPlugin } from '@electron-forge/plugin-fuses'; import { FuseV1Options, FuseVersion } from '@electron/fuses'; +import type { SignToolOptions } from '@electron/windows-sign'; // Windows code signing via Azure Trusted Signing. Dormant unless the workflow // provisions the dlib + metadata file and exports these env vars, so local @@ -16,7 +17,7 @@ import { FuseV1Options, FuseVersion } from '@electron/fuses'; const windowsSign = process.env.AZURE_METADATA_JSON_PATH ? { debug: true, signToolPath: process.env.SIGNTOOL_PATH, - hashes: ['sha256' as any], + hashes: ['sha256'] as SignToolOptions['hashes'], timestampServer: 'http://timestamp.acs.microsoft.com', signWithParams: [ '/v', diff --git a/js/desktop/src/api/types.ts b/js/desktop/src/api/types.ts index 1ab02d1..8ac6a69 100644 --- a/js/desktop/src/api/types.ts +++ b/js/desktop/src/api/types.ts @@ -25,12 +25,12 @@ export type ListNetworksResponse = z.infer; // --- Network request/response types --- -const CreateNetworkRequestSchema = z.object({ +export const CreateNetworkRequestSchema = z.object({ name: z.string(), }); export type CreateNetworkRequest = z.infer; -const AddMembersRequestSchema = z.object({ +export const AddMembersRequestSchema = z.object({ email_addresses: z.array(z.string().email()), }); export type AddMembersRequest = z.infer; @@ -52,7 +52,7 @@ export type RevokeInvitationRequest = { email: string }; // --- Depot types --- -const PrepareUploadRequestSchema = z.object({ +export const PrepareUploadRequestSchema = z.object({ network_id: z.string(), name: z.string(), content_type: z.string(), @@ -251,12 +251,12 @@ export type GetLivekitTokenResponse = z.infer; -const SignInRequestSchema = z.object({ +export const SignInRequestSchema = z.object({ email: z.string().email(), code: z.string(), }); diff --git a/js/desktop/src/components/link-preview-card.tsx b/js/desktop/src/components/link-preview-card.tsx index ed042fe..3738604 100644 --- a/js/desktop/src/components/link-preview-card.tsx +++ b/js/desktop/src/components/link-preview-card.tsx @@ -2,7 +2,6 @@ import { Copy, ExternalLink, Globe } from "lucide-react"; import type { LinkMetadata } from "@/lib/link-metadata"; import { Skeleton } from "@/components/ui/skeleton"; import { Button } from "@/components/ui/button"; -import { cn } from "@/lib/utils"; import { platform } from "@/lib/platform"; interface LinkPreviewCardProps { diff --git a/js/desktop/src/features/compose/configure-stream-step.tsx b/js/desktop/src/features/compose/configure-stream-step.tsx index cf5b363..d9c7f39 100644 --- a/js/desktop/src/features/compose/configure-stream-step.tsx +++ b/js/desktop/src/features/compose/configure-stream-step.tsx @@ -117,7 +117,7 @@ export function ConfigureStreamStep({ {!everyone && members.length > 0 && (
- {members.map((member, index) => { + {members.map((member) => { const isSelected = selectedIds.has(member.id); const initials = member.email_prefix .slice(0, 2) diff --git a/js/desktop/src/features/particles/folder-view.tsx b/js/desktop/src/features/particles/folder-view.tsx index 34bcaed..af6b718 100644 --- a/js/desktop/src/features/particles/folder-view.tsx +++ b/js/desktop/src/features/particles/folder-view.tsx @@ -1,5 +1,4 @@ import { Particle } from "@/api/types"; -import { useLiveParticleChildren } from "@/hooks/use-particle"; import { parseParticlePath, type ParticlePath } from "@/lib/particle-path"; import { ComposeOverlay } from "@/features/compose/compose-overlay"; @@ -9,7 +8,6 @@ interface FolderViewProps { } export function FolderView({ path, folderParticle }: FolderViewProps) { - const { children, error, isLoading } = useLiveParticleChildren(path); const { networkId } = parseParticlePath(path); return ( diff --git a/js/desktop/src/features/particles/particle-list-view.tsx b/js/desktop/src/features/particles/particle-list-view.tsx index 9b06cce..3aa9a58 100644 --- a/js/desktop/src/features/particles/particle-list-view.tsx +++ b/js/desktop/src/features/particles/particle-list-view.tsx @@ -13,11 +13,10 @@ import { Trash2, type LucideIcon, } from "lucide-react"; -import { cn } from "@/lib/utils"; +import { cn, getInitials } from "@/lib/utils"; import { useLiveLatestChild } from "@/hooks/use-particle"; import { useAuthStore } from "@/stores/auth-store"; import { particlePath } from "@/lib/particle-path"; -import { getInitials } from "@/lib/utils"; import { resolveHumanDisplay } from "@/lib/humans"; import { RelativeTimestamp } from "@/components/relative-timestamp"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; diff --git a/js/desktop/src/features/particles/reaction-bar.tsx b/js/desktop/src/features/particles/reaction-bar.tsx index 2991488..4cf8fd3 100644 --- a/js/desktop/src/features/particles/reaction-bar.tsx +++ b/js/desktop/src/features/particles/reaction-bar.tsx @@ -2,10 +2,9 @@ import { useState } from "react"; import { Plus, Type, X } from "lucide-react"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; -import { REACTION_EMOJIS, type Reactions } from "@/api/types"; +import { REACTION_EMOJIS, type Reactions, type Human } from "@/api/types"; import { cn } from "@/lib/utils"; import { resolveHumanDisplay } from "@/lib/humans"; -import type { Human } from "@/api/types"; interface ReactionBarProps { reactions: Reactions; diff --git a/js/desktop/src/features/particles/stream-presence-context.tsx b/js/desktop/src/features/particles/stream-presence-context.tsx index ae8c5f3..0bafe0a 100644 --- a/js/desktop/src/features/particles/stream-presence-context.tsx +++ b/js/desktop/src/features/particles/stream-presence-context.tsx @@ -10,7 +10,6 @@ import { } from "react"; import { useChannel } from "@/hooks/use-channel"; import { useAuthStore } from "@/stores/auth-store"; -import type { ChannelMessage } from "@/lib/pusher-client"; // --------------------------------------------------------------------------- // Types diff --git a/js/desktop/src/features/settings-page.tsx b/js/desktop/src/features/settings-page.tsx index bcacacb..81e9b2c 100644 --- a/js/desktop/src/features/settings-page.tsx +++ b/js/desktop/src/features/settings-page.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; -import { ChevronRight, LogOut, User, Info, Shield, Mail, Mic, LifeBuoy, FileText, Volume2 } from "lucide-react"; +import { ChevronRight, LogOut, Info, Shield, Mail, Mic, LifeBuoy, FileText, Volume2, ArrowLeft } from "lucide-react"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Separator } from "@/components/ui/separator"; import { Switch } from "@/components/ui/switch"; @@ -15,7 +15,6 @@ import { apiClient } from "@/api/client"; import { logError, toUserMessage } from "@/lib/errors"; import { toast } from "sonner"; import { PRIVACY_URL, SUPPORT_EMAIL, TERMS_URL } from "@/lib/constants"; -import { ArrowLeft } from "lucide-react"; import { platform } from "@/lib/platform"; interface SettingsRowProps { diff --git a/js/desktop/src/hooks/use-channel.ts b/js/desktop/src/hooks/use-channel.ts index 2ebb3c8..0641647 100644 --- a/js/desktop/src/hooks/use-channel.ts +++ b/js/desktop/src/hooks/use-channel.ts @@ -1,4 +1,4 @@ -import { useEffect, useState, useCallback, useRef } from "react"; +import { useEffect, useState, useCallback } from "react"; import { usePusherClient } from "@/lib/pusher-provider"; import type { ChannelMessage } from "@/lib/pusher-client"; diff --git a/js/desktop/src/hooks/use-playback-keys.ts b/js/desktop/src/hooks/use-playback-keys.ts index 2bce87a..86b29ac 100644 --- a/js/desktop/src/hooks/use-playback-keys.ts +++ b/js/desktop/src/hooks/use-playback-keys.ts @@ -3,7 +3,6 @@ import type { MediaParticleHandle } from "@/features/particles/media-particle-vi import { useSuspendPlayback } from "@/hooks/use-suspend-playback"; import { selectIsPaused, usePlaybackPauseStore } from "@/stores/playback-pause-store"; import { isTypingTarget } from "@/lib/keyboard"; -import { set } from "zod"; const SPACE_TAP_THRESHOLD_MS = 250;