From 66714961f76a722941d770d0c6ba2d1fc95e57b8 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Mon, 9 Dec 2024 16:47:52 -0800 Subject: [PATCH 1/2] Update switcher icons, fix bug in makeIconClass --- frontend/app/tab/workspaceswitcher.tsx | 18 +++++++++--------- frontend/util/util.ts | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/app/tab/workspaceswitcher.tsx b/frontend/app/tab/workspaceswitcher.tsx index 4c81ee4b40..4201050cbf 100644 --- a/frontend/app/tab/workspaceswitcher.tsx +++ b/frontend/app/tab/workspaceswitcher.tsx @@ -43,20 +43,20 @@ const colors = [ ]; const icons = [ + "circle", "triangle", "star", - "cube", - "gem", - "chess-knight", "heart", - "plane", + "bolt", + "solid@cloud", + "moon", + "layer-group", "rocket", - "shield-cat", - "paw-simple", - "umbrella", + "flask", + "paperclip", + "chart-line", "graduation-cap", "mug-hot", - "circle", ]; const ColorSelector = memo(({ colors, selectedColor, onSelect, className }: ColorSelectorProps) => { @@ -209,7 +209,7 @@ const WorkspaceSwitcher = () => { const saveWorkspace = () => { setObjectValue( - { ...activeWorkspace, name: "New Workspace", icon: "circle", color: colors[0] }, + { ...activeWorkspace, name: "New Workspace", icon: icons[0], color: colors[0] }, undefined, true ); diff --git a/frontend/util/util.ts b/frontend/util/util.ts index 6657624947..795343017c 100644 --- a/frontend/util/util.ts +++ b/frontend/util/util.ts @@ -91,7 +91,7 @@ function makeIconClass(icon: string, fw: boolean, opts?: { spin?: boolean; defau if (icon.match(/^(solid@)?[a-z0-9-]+$/)) { // strip off "solid@" prefix if it exists icon = icon.replace(/^solid@/, ""); - return clsx(`fa fa-sharp fa-solid fa-${icon}`, fw ? "fa-fw" : null, opts?.spin ? "fa-spin" : null); + return clsx(`fa fa-solid fa-${icon}`, fw ? "fa-fw" : null, opts?.spin ? "fa-spin" : null); } if (icon.match(/^regular@[a-z0-9-]+$/)) { // strip off the "regular@" prefix if it exists From 5502a847e7e6f7951c37620e6eb522becd6e4738 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Mon, 9 Dec 2024 16:51:03 -0800 Subject: [PATCH 2/2] add guid to new workspace name --- frontend/app/tab/workspaceswitcher.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/app/tab/workspaceswitcher.tsx b/frontend/app/tab/workspaceswitcher.tsx index 4201050cbf..eb883daf7a 100644 --- a/frontend/app/tab/workspaceswitcher.tsx +++ b/frontend/app/tab/workspaceswitcher.tsx @@ -209,7 +209,12 @@ const WorkspaceSwitcher = () => { const saveWorkspace = () => { setObjectValue( - { ...activeWorkspace, name: "New Workspace", icon: icons[0], color: colors[0] }, + { + ...activeWorkspace, + name: `New Workspace (${activeWorkspace.oid.slice(0, 5)})`, + icon: icons[0], + color: colors[0], + }, undefined, true );