From dd3d52e47d10c8256d7b2da7c7d2c35b5a41e7f0 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Sun, 28 Jan 2024 13:47:36 -0800 Subject: [PATCH] Add indicator to tabs and workspaces to show when commands are running (#254) * save * not working yet but close * logic is working, just need to do styling * save work * save * save work * ta da! * fix line height * format files * remove running commands on hangup. also don't allow numrunning to be less than 0 * remove < 0 check (safer without for concurrency) --- src/app/app.less | 8 ++-- src/app/assets/icons/spinner-indicator.svg | 6 +++ src/app/common/common.less | 2 +- src/app/common/common.tsx | 3 +- src/app/common/icons/icons.less | 32 ++++++++++--- src/app/common/icons/icons.tsx | 20 ++++---- src/app/sidebar/sidebar.less | 4 ++ src/app/sidebar/sidebar.tsx | 7 ++- src/app/workspace/cmdinput/cmdinput.less | 20 ++++---- src/app/workspace/screen/tab.tsx | 3 +- src/app/workspace/screen/tabs.less | 4 +- src/model/model.ts | 41 ++++++++++++++-- src/types/types.ts | 12 +++-- wavesrv/pkg/cmdrunner/cmdrunner.go | 5 +- wavesrv/pkg/remote/remote.go | 16 ++++++- wavesrv/pkg/sstore/dbops.go | 13 ++++- wavesrv/pkg/sstore/memops.go | 6 ++- wavesrv/pkg/sstore/sstore.go | 26 ++++++++-- wavesrv/pkg/sstore/updatebus.go | 56 ++++++++++++---------- 19 files changed, 202 insertions(+), 82 deletions(-) create mode 100644 src/app/assets/icons/spinner-indicator.svg diff --git a/src/app/app.less b/src/app/app.less index 0771aa40..9d9e8464 100644 --- a/src/app/app.less +++ b/src/app/app.less @@ -121,7 +121,7 @@ svg.icon { .hideScrollbarUntillHover { overflow: scroll; - + &::-webkit-scrollbar-thumb, &::-webkit-scrollbar-track { display: none; @@ -630,13 +630,13 @@ a.a-block { .spin { animation: infiniteRotate 2s linear infinite; - + @keyframes infiniteRotate { from { - transform:rotate(0deg); + transform: rotate(0deg); } to { - transform:rotate(360deg); + transform: rotate(360deg); } } } diff --git a/src/app/assets/icons/spinner-indicator.svg b/src/app/assets/icons/spinner-indicator.svg new file mode 100644 index 00000000..21a1378a --- /dev/null +++ b/src/app/assets/icons/spinner-indicator.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/app/common/common.less b/src/app/common/common.less index 4bfc892a..628694b9 100644 --- a/src/app/common/common.less +++ b/src/app/common/common.less @@ -405,7 +405,7 @@ padding: 6px 6px 6px 10px; border-radius: 4px; } - + pre.selected { outline: 2px solid @term-green; } diff --git a/src/app/common/common.tsx b/src/app/common/common.tsx index 752378e4..299fbd51 100644 --- a/src/app/common/common.tsx +++ b/src/app/common/common.tsx @@ -288,7 +288,8 @@ class Button extends React.Component { } render() { - const { leftIcon, rightIcon, theme, children, disabled, variant, color, style, autoFocus, className } = this.props; + const { leftIcon, rightIcon, theme, children, disabled, variant, color, style, autoFocus, className } = + this.props; return (