mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Fix split layout placeholder
This commit is contained in:
@@ -27,7 +27,6 @@ export const EnvironmentActionsDropdown = memo(function EnvironmentActionsDropdo
|
||||
const showEnvironmentDialog = useCallback(() => {
|
||||
dialog.toggle({
|
||||
id: 'environment-editor',
|
||||
hideX: true,
|
||||
noPadding: true,
|
||||
size: 'lg',
|
||||
className: 'h-[80vh]',
|
||||
|
||||
@@ -73,9 +73,11 @@ export const EnvironmentEditDialog = function ({ initialEnvironment }: Props) {
|
||||
>
|
||||
Global Variables
|
||||
</SidebarButton>
|
||||
<div className="px-2">
|
||||
<Separator className="my-3"></Separator>
|
||||
</div>
|
||||
{environments.length > 0 && (
|
||||
<div className="px-2">
|
||||
<Separator className="my-3"></Separator>
|
||||
</div>
|
||||
)}
|
||||
{environments.map((e) => (
|
||||
<SidebarButton
|
||||
key={e.id}
|
||||
@@ -164,11 +166,6 @@ const EnvironmentEditor = function ({
|
||||
<HStack space={2} className="justify-between">
|
||||
<Heading className="w-full flex items-center">
|
||||
<div>{environment?.name ?? 'Global Variables'}</div>
|
||||
{environment == null && (
|
||||
<span className="pr-3 text-sm text-gray-600 pl-2 font-normal italic ml-auto">
|
||||
Always available no matter which environment is active
|
||||
</span>
|
||||
)}
|
||||
</Heading>
|
||||
</HStack>
|
||||
<PairEditor
|
||||
|
||||
@@ -3,11 +3,9 @@ import classNames from 'classnames';
|
||||
import type { CSSProperties, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import { useLocalStorage } from 'react-use';
|
||||
import { useActiveRequestId } from '../../hooks/useActiveRequestId';
|
||||
import { useActiveWorkspaceId } from '../../hooks/useActiveWorkspaceId';
|
||||
import { clamp } from '../../lib/clamp';
|
||||
import { ResizeHandle } from '../ResizeHandle';
|
||||
import { HotKeyList } from './HotKeyList';
|
||||
|
||||
interface SlotProps {
|
||||
orientation: 'horizontal' | 'vertical';
|
||||
@@ -142,11 +140,6 @@ export function SplitLayout({
|
||||
[width, height, vertical, minHeightPx, setHeight, minWidthPx, setWidth],
|
||||
);
|
||||
|
||||
const activeRequestId = useActiveRequestId();
|
||||
if (activeRequestId === null) {
|
||||
return <HotKeyList hotkeys={['http_request.create', 'sidebar.toggle']} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={containerRef} className={classNames(className, 'grid w-full h-full')} style={styles}>
|
||||
{firstSlot({ style: areaL, orientation: vertical ? 'vertical' : 'horizontal' })}
|
||||
|
||||
Reference in New Issue
Block a user