mirror of
https://github.com/Kong/insomnia.git
synced 2026-08-04 11:52:33 -04:00
fix: tooltip and icon for env picker (#9905)
This commit is contained in:
@@ -17,6 +17,7 @@ import { useNavigate, useParams } from 'react-router';
|
||||
import { models } from '~/insomnia-data';
|
||||
import { useSetActiveEnvironmentFetcher } from '~/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.environment.set-active';
|
||||
import { useEnvironmentSetActiveGlobalActionFetcher } from '~/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.environment.set-active-global';
|
||||
import { Tooltip } from '~/ui/components/tooltip';
|
||||
|
||||
import { fuzzyMatch } from '../../common/misc';
|
||||
import { useWorkspaceLoaderData } from '../../routes/organization.$organizationId.project.$projectId.workspace.$workspaceId';
|
||||
@@ -111,28 +112,24 @@ export const EnvironmentPicker = ({
|
||||
style={{ color: activeGlobalEnvironment.color || '' }}
|
||||
className="w-5 shrink-0"
|
||||
/>
|
||||
<span className="truncate">{activeGlobalEnvironment.name}</span>
|
||||
<Tooltip position="top" message="active global environment">
|
||||
<span className="truncate">{activeGlobalEnvironment.name}</span>
|
||||
</Tooltip>
|
||||
<Icon icon="plus" className="w-3 shrink-0 text-(--hl)" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex w-full flex-1 items-center gap-2">
|
||||
<Icon
|
||||
icon={
|
||||
activeEnvironment.isPrivate
|
||||
? 'lock'
|
||||
: isUsingGitSync
|
||||
? ['fab', 'git-alt']
|
||||
: isUsingInsomniaCloudSync
|
||||
? 'globe-americas'
|
||||
: 'file-arrow-down'
|
||||
}
|
||||
icon={activeEnvironment.isPrivate ? 'lock' : 'code'}
|
||||
style={{ color: activeEnvironment.color || '' }}
|
||||
className="w-5 shrink-0"
|
||||
/>
|
||||
<span className="truncate">
|
||||
{activeSubEnvironment ? activeSubEnvironment.name : activeBaseEnvironment.name}
|
||||
</span>
|
||||
<Tooltip position="top" message="active collection environment">
|
||||
<span className="truncate">
|
||||
{activeSubEnvironment ? activeSubEnvironment.name : activeBaseEnvironment.name}
|
||||
</span>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</Button>
|
||||
<Popover className="z-10! flex max-h-[90vh] min-w-max flex-col" placement="bottom start" offset={8}>
|
||||
|
||||
Reference in New Issue
Block a user