From 48923634d900a010992102765e81f8fe52f6e0b6 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 16 Nov 2023 18:53:34 -0800 Subject: [PATCH] Mostly move some stuff around --- src-tauri/macos/entitlements.plist | 2 +- src-tauri/tauri.conf.json | 2 +- src-web/components/GlobalHooks.tsx | 3 ++- src-web/components/Overlay.tsx | 2 +- src-web/components/RequestResponse.tsx | 2 +- src-web/components/Workspace.tsx | 13 +++++++------ src-web/components/core/PairEditor.tsx | 4 ++-- src-web/lib/constants.ts | 2 -- 8 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 src-web/lib/constants.ts diff --git a/src-tauri/macos/entitlements.plist b/src-tauri/macos/entitlements.plist index 7b677ae2..13cb114c 100644 --- a/src-tauri/macos/entitlements.plist +++ b/src-tauri/macos/entitlements.plist @@ -2,7 +2,7 @@ - com.apple.security.cs.allow-unsigned-executable-memory + com.apple.security.app-sandbox diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index fbc187ab..c682783b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Yaak", - "version": "2023.2.0-beta.0" + "version": "2023.3.0-beta.3" }, "tauri": { "windows": [], diff --git a/src-web/components/GlobalHooks.tsx b/src-web/components/GlobalHooks.tsx index 3c1c7f37..424b559c 100644 --- a/src-web/components/GlobalHooks.tsx +++ b/src-web/components/GlobalHooks.tsx @@ -14,12 +14,13 @@ import { responsesQueryKey } from '../hooks/useResponses'; import { useSyncWindowTitle } from '../hooks/useSyncWindowTitle'; import { workspacesQueryKey } from '../hooks/useWorkspaces'; import { trackPage } from '../lib/analytics'; -import { DEFAULT_FONT_SIZE } from '../lib/constants'; import { NAMESPACE_NO_SYNC } from '../lib/keyValueStore'; import type { HttpRequest, HttpResponse, Model, Workspace } from '../lib/models'; import { modelsEq } from '../lib/models'; import { setPathname } from '../lib/persistPathname'; +const DEFAULT_FONT_SIZE = 16; + export function GlobalHooks() { // Include here so they always update, even // if no component references them diff --git a/src-web/components/Overlay.tsx b/src-web/components/Overlay.tsx index b764dbcf..8b904858 100644 --- a/src-web/components/Overlay.tsx +++ b/src-web/components/Overlay.tsx @@ -32,7 +32,7 @@ export function Overlay({ return ( {open && ( - + (null); diff --git a/src-web/components/Workspace.tsx b/src-web/components/Workspace.tsx index 3b591ea6..8970d688 100644 --- a/src-web/components/Workspace.tsx +++ b/src-web/components/Workspace.tsx @@ -8,11 +8,10 @@ import type { } from 'react'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useWindowSize } from 'react-use'; +import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent'; import { useOsInfo } from '../hooks/useOsInfo'; import { useSidebarHidden } from '../hooks/useSidebarHidden'; import { useSidebarWidth } from '../hooks/useSidebarWidth'; -import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent'; -import { WINDOW_FLOATING_SIDEBAR_WIDTH } from '../lib/constants'; import { Button } from './core/Button'; import { HStack } from './core/Stacks'; import { Overlay } from './Overlay'; @@ -27,6 +26,8 @@ const head = { gridArea: 'head' }; const body = { gridArea: 'body' }; const drag = { gridArea: 'drag' }; +const WINDOW_FLOATING_SIDEBAR_WIDTH = 600; + export default function Workspace() { const { setWidth, width, resetWidth } = useSidebarWidth(); const { hide, show, hidden, toggle } = useSidebarHidden(); @@ -66,9 +67,9 @@ export default function Workspace() { e.preventDefault(); // Prevent text selection and things const newWidth = startWidth + (e.clientX - mouseStartX); if (newWidth < 100) { - hide(); + hide(); resetWidth(); - } else { + } else { show(); setWidth(newWidth); } @@ -121,9 +122,9 @@ export default function Workspace() { )} > {floating ? ( - +