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:
Faisal Amir 2024-10-21 09:57:04 +07:00 committed by GitHub
parent 3df98b87a3
commit d6891a5628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 17 deletions

View File

@ -35,6 +35,7 @@
flex: 1;
height: 38px;
display: flex;
white-space: nowrap;
color: hsla(var(--text-secondary));
align-items: center;
justify-content: center;

View File

@ -96,6 +96,7 @@ const HubScreen = () => {
{!filteredModels.length ? (
<BlankState title="No search results found" />
) : (
<>
<div className="mb-4 flex w-full justify-end">
<Select
value={sortSelected}
@ -105,8 +106,9 @@ const HubScreen = () => {
options={sortMenus}
/>
</div>
)}
<ModelList models={filteredModels} />
</>
)}
</div>
</ScrollArea>
</CenterPanelContainer>

View File

@ -127,9 +127,10 @@ const LocalServerLeftPanel = () => {
{serverEnabled ? 'Stop' : 'Start'} Server
</Button>
{serverEnabled && (
<Button variant="soft" asChild>
<Button variant="soft" asChild className="whitespace-nowrap">
<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>
</Button>
)}

View File

@ -211,9 +211,6 @@ const Advanced = () => {
saveSettings({ gpusInUse: updatedGpusInUse })
}
const gpuSelectionPlaceHolder =
gpuList.length > 0 ? 'Select GPU' : "You don't have any compatible GPU"
/**
* Handle click outside
*/
@ -240,7 +237,7 @@ const Advanced = () => {
</div>
{/* 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 items-start justify-between">
<div className="space-y-1">
@ -326,7 +323,7 @@ const Advanced = () => {
value={selectedGpu.join() || ''}
className="w-full cursor-pointer"
readOnly
placeholder={gpuSelectionPlaceHolder}
placeholder=""
suffixIcon={
<ChevronDownIcon
size={14}