Skip to content

Commit 8e71ecf

Browse files
adjust da panel
1 parent f6bbcd8 commit 8e71ecf

3 files changed

Lines changed: 58 additions & 31 deletions

File tree

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
33
"productName": "posty",
4-
"version": "0.2.6",
4+
"version": "0.2.7",
55
"identifier": "com.tkattkat.posty",
66
"build": {
77
"frontendDist": "../dist",

src/components/RequestPanel/RequestPanel.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ export function RequestPanel() {
437437

438438
{/* URL Bar */}
439439
<div className="px-4 py-3 flex-shrink-0 border-b border-border">
440-
<div className="flex gap-2">
440+
<div className="flex gap-2 items-center">
441441
{httpRequest && (
442442
<div className="relative">
443443
<button
@@ -487,18 +487,18 @@ export function RequestPanel() {
487487
<div className="relative flex items-center">
488488
<button
489489
onClick={() => setShowEnvDropdown(!showEnvDropdown)}
490-
className={`h-[44px] flex items-center gap-1.5 px-3 rounded-lg text-[12px] font-medium transition-colors ${
490+
className={`h-[32px] flex items-center gap-1.5 px-2.5 rounded-md text-[13px] font-medium border transition-all duration-100 ${
491491
activeEnvironment
492-
? 'bg-green-500/10 text-green-500 hover:bg-green-500/20'
493-
: 'bg-bg-secondary hover:bg-bg-tertiary text-text-muted'
492+
? 'bg-transparent text-green-500 border-green-500/30 hover:border-green-500/50'
493+
: 'bg-transparent border-border text-text-secondary hover:border-border-hover hover:text-text-primary'
494494
}`}
495495
title={activeEnvironment ? `Environment: ${activeEnvironment.name}` : 'No environment'}
496496
>
497-
<Globe className="w-4 h-4 flex-shrink-0" />
498-
<span className="max-w-[70px] truncate">
499-
{activeEnvironment?.name || 'No Env'}
497+
<Globe className="w-3.5 h-3.5 flex-shrink-0" />
498+
<span className="max-w-[60px] truncate">
499+
{activeEnvironment?.name || 'Env'}
500500
</span>
501-
<ChevronDown className="w-3 h-3 flex-shrink-0 opacity-60" />
501+
<ChevronDown className="w-3 h-3 flex-shrink-0 opacity-50" />
502502
</button>
503503
{showEnvDropdown && (
504504
<div className="absolute top-full right-0 mt-1 py-1 bg-surface-raised border border-border rounded-lg shadow-lg z-50 min-w-[180px] animate-fade-in">
@@ -565,11 +565,11 @@ export function RequestPanel() {
565565
</div>
566566

567567
{/* Split View: Request Config + Response */}
568-
<div ref={requestSplitRef} className="request-split-shell flex-1 flex min-h-0">
568+
<div ref={requestSplitRef} className="request-split-shell">
569569
{/* Request Config */}
570-
<div className="request-pane flex flex-col min-h-0">
570+
<div className="request-pane">
571571
{/* Sub Tabs */}
572-
<div className="flex gap-1 px-4 py-2 border-b border-border flex-shrink-0">
572+
<div className="request-subtabs">
573573
{(['params', 'headers', 'cookies', 'body', 'auth', 'tests'] as const).map((tab) => (
574574
<button
575575
key={tab}
@@ -602,7 +602,7 @@ export function RequestPanel() {
602602
</div>
603603

604604
{/* Content */}
605-
<div className="flex-1 overflow-auto p-4">
605+
<div className="request-content">
606606
{httpRequest && activeSubTab === 'params' && (
607607
<KeyValueEditor
608608
items={httpRequest.params}
@@ -746,7 +746,7 @@ export function RequestPanel() {
746746
/>
747747

748748
{/* Response Panel */}
749-
<div className="response-pane min-h-0">
749+
<div className="response-pane">
750750
<ResponsePanel />
751751
</div>
752752
</div>

src/index.css

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,44 @@ body {
295295

296296
.request-split-shell {
297297
--request-pane-width: 50%;
298+
display: flex;
299+
flex: 1;
300+
min-height: 0;
301+
overflow: hidden;
298302
}
299303

300304
.request-pane {
301305
width: var(--request-pane-width);
306+
display: flex;
307+
flex-direction: column;
308+
min-height: 0;
309+
min-width: 0;
302310
border-right: 1px solid var(--border);
311+
overflow: hidden;
303312
}
304313

305314
.response-pane {
315+
flex: 1;
316+
display: flex;
317+
flex-direction: column;
318+
min-height: 0;
306319
min-width: 0;
320+
overflow: hidden;
321+
}
322+
323+
.request-subtabs {
324+
display: flex;
325+
gap: 4px;
326+
padding: 8px 16px;
327+
border-bottom: 1px solid var(--border);
328+
flex-shrink: 0;
329+
overflow-x: auto;
330+
}
331+
332+
.request-content {
307333
flex: 1;
334+
overflow: auto;
335+
padding: 16px;
308336
}
309337

310338
body.is-resizing {
@@ -632,6 +660,8 @@ body.is-resizing {
632660
transition: all 0.15s ease;
633661
border: none;
634662
background: transparent;
663+
flex-shrink: 0;
664+
white-space: nowrap;
635665
}
636666

637667
.tab:hover {
@@ -725,35 +755,32 @@ body.is-resizing {
725755
border-color: rgba(255, 255, 255, 0.1);
726756
}
727757

728-
/* Send button */
758+
/* Send button - Clerk style */
729759
.send-button {
730760
display: flex;
731761
align-items: center;
732762
justify-content: center;
733-
gap: 6px;
734-
min-width: 92px;
735-
height: 44px;
736-
padding: 0 16px;
737-
background: var(--accent);
738-
color: white;
739-
font-weight: 600;
763+
gap: 5px;
764+
height: 32px;
765+
padding: 0 12px;
766+
background: transparent;
767+
color: var(--text-secondary);
768+
font-weight: 500;
740769
font-size: 13px;
741-
letter-spacing: -0.01em;
742-
border: 1px solid transparent;
743-
border-radius: 10px;
770+
border: 1px solid var(--border);
771+
border-radius: 6px;
744772
cursor: pointer;
745-
transition: all 0.15s ease;
746-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
773+
transition: all 0.12s ease;
747774
}
748775

749776
.send-button:hover {
750-
background: var(--accent-light);
751-
box-shadow: 0 3px 10px var(--accent-subtle);
777+
background: var(--bg-hover);
778+
border-color: var(--border-hover);
779+
color: var(--text-primary);
752780
}
753781

754782
.send-button:active {
755-
transform: scale(0.98);
756-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
783+
background: var(--bg-tertiary);
757784
}
758785

759786
/* Tab bar */

0 commit comments

Comments
 (0)