mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Update switcher icons, fix bug makeIconClass, add guid to new workspace name (#1444)
This commit is contained in:
parent
edab90aa55
commit
34b73b8bea
@ -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,12 @@ const WorkspaceSwitcher = () => {
|
||||
|
||||
const saveWorkspace = () => {
|
||||
setObjectValue(
|
||||
{ ...activeWorkspace, name: "New Workspace", icon: "circle", color: colors[0] },
|
||||
{
|
||||
...activeWorkspace,
|
||||
name: `New Workspace (${activeWorkspace.oid.slice(0, 5)})`,
|
||||
icon: icons[0],
|
||||
color: colors[0],
|
||||
},
|
||||
undefined,
|
||||
true
|
||||
);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user