Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9e5648

Browse files
committed
fix: remove connected button (#13625)
It didn't make a lot of sense in current form. It will when we improve autostop.(cherry picked from commit3ef12ac)
1 parent3fbfb53 commita9e5648

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

‎site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
importtype{Template,Workspace}from"api/typesGenerated";
1919
import{TopbarData,TopbarIcon}from"components/FullPageLayout/Topbar";
2020
import{displayError,displaySuccess}from"components/GlobalSnackbar/utils";
21-
import{Pill}from"components/Pill/Pill";
2221
import{useTime}from"hooks/useTime";
2322
import{getWorkspaceActivityStatus}from"modules/workspaces/activity";
2423
import{
@@ -170,11 +169,9 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
170169

171170
const[showControlsAnyway,setShowControlsAnyway]=useState(false);
172171
letonClickScheduleIcon:(()=>void)|undefined;
173-
letactivity:ReactNode=null;
174172

175173
if(activityStatus==="connected"){
176174
onClickScheduleIcon=()=>setShowControlsAnyway((it)=>!it);
177-
activity=<Pilltype="active">Connected</Pill>;
178175

179176
constnow=dayjs();
180177
constnoRequiredStopSoon=
@@ -183,12 +180,7 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
183180

184181
// User has shown controls manually, or we should warn about a nearby required stop
185182
if(!showControlsAnyway&&noRequiredStopSoon){
186-
return(
187-
<>
188-
{activity}
189-
<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}/>
190-
</>
191-
);
183+
return<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}/>;
192184
}
193185
}
194186

@@ -239,24 +231,18 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
239231

240232
if(tooltip){
241233
return(
242-
<>
243-
{activity}
244-
<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}>
245-
<Tooltiptitle={tooltip}>{display}</Tooltip>
246-
{controls}
247-
</WorkspaceScheduleContainer>
248-
</>
234+
<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}>
235+
<Tooltiptitle={tooltip}>{display}</Tooltip>
236+
{controls}
237+
</WorkspaceScheduleContainer>
249238
);
250239
}
251240

252241
return(
253-
<>
254-
{activity}
255-
<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}>
256-
{display}
257-
{controls}
258-
</WorkspaceScheduleContainer>
259-
</>
242+
<WorkspaceScheduleContaineronClickIcon={onClickScheduleIcon}>
243+
{display}
244+
{controls}
245+
</WorkspaceScheduleContainer>
260246
);
261247
};
262248

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp