Skip to content

Commit 37218d9

Browse files
authored
refactor: update styles and prompt selection logic (#103)
1 parent eb9820d commit 37218d9

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

webapp/_webapp/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ video, canvas, audio, iframe, embed, object {
459459
}
460460

461461
.pd-rnd.dragging {
462-
box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 32px; /* horizontal, vertical, blur, spread */
462+
box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px; /* horizontal, vertical, blur, spread */
463463
}
464464

465465
.pd-context-menu {

webapp/_webapp/src/views/chat/footer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function PromptInput() {
121121
return (
122122
<div className="pd-app-tab-content-footer chat-prompt-input noselect rnd-cancel relative">
123123
{/* Only show one popup at a time - priority: prompts > actions > model selection */}
124-
{prompts.length > 0 && <PromptSelection prompts={prompts} />}
124+
{prompt.startsWith("/") && <PromptSelection prompts={prompts} />}
125125
{prompts.length === 0 && actions.length > 0 && <ActionSelection actions={actions} />}
126126
{prompts.length === 0 && actions.length === 0 && showModelSelection && (
127127
<ModelSelection onSelectModel={handleModelSelect} />

webapp/_webapp/src/views/chat/footer/toolbar/prompt-selection.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,13 @@ export function PromptSelection({ prompts }: PromptSelectionProps) {
3535
inputRef.current?.focus();
3636
}, [setPrompt, inputRef]);
3737

38+
if (prompts.length === 0) {
39+
return (
40+
<div className="transition-all duration-100 absolute bottom-full left-0 right-0 mb-1 z-50 bg-white shadow-lg rounded-lg border border-gray-200 p-4">
41+
<div className="text-gray-500 text-sm text-center">No prompts found</div>
42+
</div>
43+
);
44+
}
45+
3846
return <Selection items={items} onSelect={onSelect} onClose={onClose} />;
3947
}

webapp/_webapp/src/views/settings/setting-item-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const SettingItemInput = ({
2121
}: SettingItemInputProps) => (
2222
<div className="flex flex-row gap-2 w-full bg-content2 rounded-medium p-2 items-center">
2323
<div className="flex flex-col gap-0 w-full pl-3 pt-1 pb-1">
24-
<p className="text-sm">{label}</p>
24+
<p className="text-xs">{label}</p>
2525
<div className="flex flex-row gap-2">
2626
<input
2727
className={cn(className, "w-full text-xs bg-transparent p-2 rnd-cancel border border-gray-200 rounded-md")}

webapp/_webapp/src/views/settings/setting-item-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const SettingItemSelect = ({
1919
}: SettingItemSelectProps) => (
2020
<div className="flex flex-row gap-2 w-full bg-content2 rounded-medium p-2 items-center">
2121
<div className="flex flex-col gap-0 w-full pl-3 pt-1 pb-1">
22-
<p className="text-sm">{label}</p>
22+
<p className="text-xs">{label}</p>
2323
<p className="text-xs text-gray-500">{description}</p>
2424
</div>
2525
<Select

0 commit comments

Comments
 (0)