Skip to content

Commit

Permalink
fix: rename workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed Nov 26, 2024
1 parent 1b39234 commit 19d1d13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/insomnia/src/ui/components/tabs/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const InsomniaTab = ({ tab }: { tab: BaseTab }) => {
className="outline-none aria-selected:text-[--color-font] aria-selected:bg-[--hl-sm] hover:bg-[--hl-xs]"
>
{({ isSelected, isHovered }) => (
<Tooltip message={`${tab.projectName} / ${tab.workspaceName}`} className='h-full'>
<Tooltip delay={1000} message={`${tab.projectName} / ${tab.workspaceName}`} className='h-full'>
<div onContextMenu={handleContextMenu} className={`relative flex items-center h-full px-[10px] flex-nowrap border-solid border-r border-[--hl-sm] hover:text-[--color-font] outline-none max-w-[200px] cursor-pointer ${(!isSelected && !isHovered) && 'opacity-[0.7]'}`}>
{renderTabIcon(tab.type)}
<span className='mx-[8px] text-nowrap overflow-hidden text-ellipsis'>{tab.name}</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/insomnia/src/ui/components/tabs/tabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = ''
// update project name(for tooltip)
updateProjectName?.(doc._id, doc.name);
} else if (doc.type === models.workspace.type) {
// update workspace name(for tooltip)
// update workspace name(for tooltip) & update name for workspace tab
updateWorkspaceName?.(doc._id, doc.name);
} else {
updateTabById?.(doc._id, doc.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export const InsomniaTabProvider: FC<PropsWithChildren> = ({ children }) => {
return {
...tab,
workspaceName: name,
name: tab.id === workspaceId ? name : tab.name,
};
}
return tab;
Expand Down

0 comments on commit 19d1d13

Please sign in to comment.