Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/release-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ENTITLEMENTS_PATH: ${{ github.workspace }}/apps/desktop/src-tauri/entitlements.plist
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
VITE_CAPSULE_URL: ${{ secrets.VITE_CAPSULE_URL }}
working-directory: apps/desktop
run: npm run tauri -- build --target aarch64-apple-darwin

Expand Down
Binary file added apps/client/public/font/Inter.ttf
Binary file not shown.
70 changes: 39 additions & 31 deletions apps/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ import {
DashboardSwipeLayout,
DashboardSwipeRoutePlaceholder,
} from "./features/dashboard-swipe/DashboardSwipeLayout";
import { ServersPage } from "./pages/servers";
import { KeyPage } from "./pages/key";
import { DevicePage } from "./pages/devices";
import { FlowPage } from "./pages/flow";
import { AuthInterceptor } from "./features/auth/AuthInterceptor";
import { NotFound } from "./pages/notfound";
import LandingPage from "./pages/landing";
import { UsersPage } from "./pages/users";
import { LogPage } from "./pages/log";
import { MapPage } from "./pages/map";
import { IntegrationPage } from "./pages/integration";
import { SetupPage } from "./pages/setup";
import { CodePage } from "./pages/code";
import { AuthenticatedLayout } from "./widgets/auth/AuthenticatedLayout";
import { TopBarWrapper } from "./widgets/auth/TopBarWrapper";
import { useDesktopSidecar } from "./hooks/useDesktopSidecar";
import { usePreventBackNavigation } from "./hooks/usePreventBackNavigation";
import { SettingsPage } from "./pages/settings";
import { NetworksPage } from "./pages/networks";
import { AccountSettingsPage } from "./pages/settings/account";
import { ServicesSettingsPage } from "./pages/settings/services";
import { UsersSettingsPage } from "./pages/settings/users";
import { NetworksSettingsPage } from "./pages/settings/networks";
import { IntegrationSettingsPage } from "./pages/settings/integration";
import { LogSettingsPage } from "./pages/settings/log";
import { ConfigSettingsPage } from "./pages/settings/config";
import { RecordingsPage } from "./pages/recordings";
import { DesktopSettingsPage } from "./pages/desktop-settings";

Expand Down Expand Up @@ -69,99 +70,106 @@ const router = createBrowserRouter([
],
},
{
path: "/servers",
path: "/devices",
element: (
<AuthInterceptor>
<ServersPage />
<DevicePage />
</AuthInterceptor>
),
},
{
path: "/key",
path: "/flow",
element: (
<AuthInterceptor>
<KeyPage />
<FlowPage />
</AuthInterceptor>
),
},
{
path: "/devices",
path: "/map",
element: (
<AuthInterceptor>
<DevicePage />
<MapPage />
</AuthInterceptor>
),
},
{
path: "/flow",
path: "/setup",
element: (
<AuthInterceptor>
<FlowPage />
<SetupPage />
</AuthInterceptor>
),
},
{
path: "/users",
path: "/settings",
element: (
<AuthInterceptor>
<UsersPage />
<SettingsPage />
</AuthInterceptor>
),
},
{
path: "/log",
path: "/settings/account",
element: (
<AuthInterceptor>
<LogPage />
<AccountSettingsPage />
</AuthInterceptor>
),
},
{
path: "/map",
path: "/settings/services",
element: (
<AuthInterceptor>
<MapPage />
<ServicesSettingsPage />
</AuthInterceptor>
),
},
{
path: "/integration",
path: "/settings/users",
element: (
<AuthInterceptor>
<IntegrationPage />
<UsersSettingsPage />
</AuthInterceptor>
),
},
{
path: "/setup",
path: "/settings/networks",
element: (
<AuthInterceptor>
<SetupPage />
<NetworksSettingsPage />
</AuthInterceptor>
),
},
{
path: "/settings",
path: "/settings/integration",
element: (
<AuthInterceptor>
<SettingsPage />
<IntegrationSettingsPage />
</AuthInterceptor>
),
},

{
path: "/code",
path: "/settings/log",
element: (
<AuthInterceptor>
<CodePage />
<LogSettingsPage />
</AuthInterceptor>
),
},
{
path: "/networks",
path: "/settings/config",
element: (
<AuthInterceptor>
<NetworksPage />
<ConfigSettingsPage />
</AuthInterceptor>
),
},
{
path: "/code",
element: (
<AuthInterceptor>
<CodePage />
</AuthInterceptor>
),
},
Expand Down
6 changes: 5 additions & 1 deletion apps/client/src/entities/entity/api.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { apiClient } from "@/shared/api";
import type { Entity, EntityAll, EntityPayload } from "./types";
import type { Entity, EntityAll, EntityPayload, State } from "./types";

export const getEntities = () => apiClient.get<Entity[]>("/entities");
export const getAllEntities = () => apiClient.get<EntityAll[]>("/entities/all");
export const getEntityHistory = (entityId: string) =>
apiClient.get<State[]>(
`/entities/${encodeURIComponent(entityId)}/history`,
);
export const getEntitiesFilter = (entityType?: string) => {
return apiClient.get<Entity[]>("/entities", {
params: {
Expand Down
51 changes: 32 additions & 19 deletions apps/client/src/features/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { useNavigate } from "react-router";
import { Loader2, Trash2 } from "lucide-react";
import { ArrowRight, Loader2, Trash2 } from "lucide-react";
import { DEMO_SERVER_URL, DEMO_TOKEN, isDemoMode } from "@/shared/demo";
import { DefaultAdminPasswordDialog } from "./DefaultAdminPasswordDialog";
import { authenticateWithPassword } from "./api";
Expand Down Expand Up @@ -291,15 +291,31 @@ export function LoginForm({
) : !showAuthFields ? (
<div className='grid gap-3'>
{/* <Label htmlFor='server-url'>Server</Label> */}
<Input
id='server-url'
type='text'
placeholder='https://your-server.com'
required
value={url}
onChange={(e) => setUrl(e.target.value)}
disabled={isLoading}
/>
<div className='flex w-full gap-2'>
<Input
id='server-url'
type='text'
placeholder='https://your-server.com'
required
value={url}
onChange={(e) => setUrl(e.target.value)}
disabled={isLoading}
className='flex-1'
/>
<Button
type='submit'
size='icon'
disabled={isLoading}
aria-label='Connect'
className='shrink-0'
>
{isLoading ? (
<Loader2 className='size-4 animate-spin' />
) : (
<ArrowRight className='size-4' />
)}
</Button>
</div>
</div>
) : (
<>
Expand Down Expand Up @@ -328,15 +344,12 @@ export function LoginForm({
</div>
</>
)}
{!(isTauriClient && (isResolvingDesktop || desktopError)) && (
<Button type='submit' className='w-full' disabled={isLoading}>
{isLoading
? "Processing..."
: showAuthFields
? "Auth"
: "Connect"}
</Button>
)}
{!(isTauriClient && (isResolvingDesktop || desktopError)) &&
showAuthFields && (
<Button type='submit' className='w-full' disabled={isLoading}>
{isLoading ? "Processing..." : "Auth"}
</Button>
)}
</div>

{!isTauriClient && recentUrls.length > 0 && !showAuthFields && (
Expand Down
Loading
Loading