fix: api playground text overlap button and search hub model (#3833)
* fix: button api playground overlap button and search hub model * fix: update overlap text responsive tab and conditional render GPU menu
This commit is contained in:
parent
3df98b87a3
commit
d6891a5628
@ -35,6 +35,7 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
white-space: nowrap;
|
||||||
color: hsla(var(--text-secondary));
|
color: hsla(var(--text-secondary));
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -96,17 +96,19 @@ const HubScreen = () => {
|
|||||||
{!filteredModels.length ? (
|
{!filteredModels.length ? (
|
||||||
<BlankState title="No search results found" />
|
<BlankState title="No search results found" />
|
||||||
) : (
|
) : (
|
||||||
<div className="mb-4 flex w-full justify-end">
|
<>
|
||||||
<Select
|
<div className="mb-4 flex w-full justify-end">
|
||||||
value={sortSelected}
|
<Select
|
||||||
onValueChange={(value) => {
|
value={sortSelected}
|
||||||
setSortSelected(value)
|
onValueChange={(value) => {
|
||||||
}}
|
setSortSelected(value)
|
||||||
options={sortMenus}
|
}}
|
||||||
/>
|
options={sortMenus}
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
<ModelList models={filteredModels} />
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<ModelList models={filteredModels} />
|
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</CenterPanelContainer>
|
</CenterPanelContainer>
|
||||||
|
|||||||
@ -127,9 +127,10 @@ const LocalServerLeftPanel = () => {
|
|||||||
{serverEnabled ? 'Stop' : 'Start'} Server
|
{serverEnabled ? 'Stop' : 'Start'} Server
|
||||||
</Button>
|
</Button>
|
||||||
{serverEnabled && (
|
{serverEnabled && (
|
||||||
<Button variant="soft" asChild>
|
<Button variant="soft" asChild className="whitespace-nowrap">
|
||||||
<a href={`http://localhost:${port}`} target="_blank">
|
<a href={`http://localhost:${port}`} target="_blank">
|
||||||
API Playground <ExternalLinkIcon size={20} className="ml-2" />
|
<span>API Playground</span>{' '}
|
||||||
|
<ExternalLinkIcon size={20} className="ml-2" />
|
||||||
</a>
|
</a>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -211,9 +211,6 @@ const Advanced = () => {
|
|||||||
saveSettings({ gpusInUse: updatedGpusInUse })
|
saveSettings({ gpusInUse: updatedGpusInUse })
|
||||||
}
|
}
|
||||||
|
|
||||||
const gpuSelectionPlaceHolder =
|
|
||||||
gpuList.length > 0 ? 'Select GPU' : "You don't have any compatible GPU"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle click outside
|
* Handle click outside
|
||||||
*/
|
*/
|
||||||
@ -240,7 +237,7 @@ const Advanced = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* CPU / GPU switching */}
|
{/* CPU / GPU switching */}
|
||||||
{!isMac && (
|
{!isMac && gpuList.length > 0 && (
|
||||||
<div className="flex w-full flex-col items-start justify-between border-b border-[hsla(var(--app-border))] py-4 first:pt-0 last:border-none">
|
<div className="flex w-full flex-col items-start justify-between border-b border-[hsla(var(--app-border))] py-4 first:pt-0 last:border-none">
|
||||||
<div className="flex w-full items-start justify-between">
|
<div className="flex w-full items-start justify-between">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
@ -326,7 +323,7 @@ const Advanced = () => {
|
|||||||
value={selectedGpu.join() || ''}
|
value={selectedGpu.join() || ''}
|
||||||
className="w-full cursor-pointer"
|
className="w-full cursor-pointer"
|
||||||
readOnly
|
readOnly
|
||||||
placeholder={gpuSelectionPlaceHolder}
|
placeholder=""
|
||||||
suffixIcon={
|
suffixIcon={
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
size={14}
|
size={14}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user