@elice/material-runbox 1.260908.0 → 1.260910.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +16 -0
- package/cjs/assets/runbox-loading.svg.js +7 -0
- package/cjs/components/material-runbox/MaterialRunbox.js +16 -11
- package/cjs/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
- package/cjs/components/material-runbox/MaterialRunboxContent.js +93 -65
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +55 -69
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +29 -2
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +90 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +26 -7
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
- package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
- package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.js +56 -0
- package/cjs/components/material-runbox/contexts/index.d.ts +2 -0
- package/cjs/components/material-runbox/contexts/index.js +4 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +71 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +98 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +151 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +98 -0
- package/cjs/components/material-runbox/disk/index.d.ts +8 -1
- package/cjs/components/material-runbox/disk/index.js +8 -2
- package/cjs/components/material-runbox/hooks/index.d.ts +3 -0
- package/cjs/components/material-runbox/hooks/index.js +14 -0
- package/cjs/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +43 -14
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.js +50 -0
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.js +65 -0
- package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
- package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.js +67 -0
- package/cjs/components/material-runbox/locales/en.json.js +1 -1
- package/cjs/components/material-runbox/locales/ja.json.js +1 -1
- package/cjs/components/material-runbox/locales/ko.json.js +1 -1
- package/cjs/components/material-runbox/locales/th.json.js +1 -1
- package/cjs/components/material-runbox/runtime/Runtime.js +21 -18
- package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
- package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +6 -54
- package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
- package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.js +68 -64
- package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.js +283 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +6 -64
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +92 -70
- package/cjs/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
- package/cjs/components/material-runbox/runtime/runtime-loading-tips.js +148 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +117 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +35 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +161 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +41 -0
- package/cjs/components/material-runbox/status/index.d.ts +4 -0
- package/cjs/components/material-runbox/status/index.js +9 -0
- package/cjs/components/material-runbox/theme.d.ts +2 -0
- package/cjs/components/material-runbox/theme.js +15 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +125 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +56 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +126 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +50 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
- package/cjs/components/material-runbox/timer/MaterialRunboxTimer.js +26 -18
- package/cjs/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +21 -81
- package/cjs/components/shared/hooks/index.d.ts +1 -0
- package/cjs/components/shared/hooks/index.js +7 -0
- package/cjs/components/shared/hooks/useBreakpoint.d.ts +4 -0
- package/cjs/components/shared/hooks/useBreakpoint.js +12 -0
- package/es/_virtual/_rollupPluginBabelHelpers.js +13 -1
- package/es/assets/runbox-loading.svg.js +3 -0
- package/es/components/material-runbox/MaterialRunbox.js +16 -11
- package/es/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
- package/es/components/material-runbox/MaterialRunboxContent.js +94 -66
- package/es/components/material-runbox/MaterialRunboxHeader.js +56 -70
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +30 -3
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +82 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -9
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
- package/es/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
- package/es/components/material-runbox/contexts/MaterialRunboxControlContext.js +46 -0
- package/es/components/material-runbox/contexts/index.d.ts +2 -0
- package/es/components/material-runbox/contexts/index.js +1 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +67 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +94 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +143 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +90 -0
- package/es/components/material-runbox/disk/index.d.ts +8 -1
- package/es/components/material-runbox/disk/index.js +4 -1
- package/es/components/material-runbox/hooks/index.d.ts +3 -0
- package/es/components/material-runbox/hooks/index.js +3 -0
- package/es/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
- package/es/components/material-runbox/hooks/useRunboxControl.js +43 -14
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.js +42 -0
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.js +59 -0
- package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
- package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.js +63 -0
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ja.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/locales/th.json.js +1 -1
- package/es/components/material-runbox/runtime/Runtime.js +22 -19
- package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
- package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +7 -55
- package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
- package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.js +69 -65
- package/es/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayLoading.js +275 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +7 -65
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +82 -60
- package/es/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
- package/es/components/material-runbox/runtime/runtime-loading-tips.js +146 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +109 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +31 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +157 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +37 -0
- package/es/components/material-runbox/status/index.d.ts +4 -0
- package/es/components/material-runbox/status/index.js +2 -0
- package/es/components/material-runbox/theme.d.ts +2 -0
- package/es/components/material-runbox/theme.js +12 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +121 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +52 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +122 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +46 -0
- package/es/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
- package/es/components/material-runbox/timer/MaterialRunboxTimer.js +25 -17
- package/es/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +18 -78
- package/es/components/shared/hooks/index.d.ts +1 -0
- package/es/components/shared/hooks/index.js +1 -0
- package/es/components/shared/hooks/useBreakpoint.d.ts +4 -0
- package/es/components/shared/hooks/useBreakpoint.js +10 -0
- package/package.json +7 -7
- package/cjs/assets/queue.gif.js +0 -7
- package/cjs/assets/runbox_logo.png.js +0 -7
- package/cjs/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
- package/cjs/components/material-runbox/MaterialRunboxFooter.js +0 -64
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -98
- package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
- package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.js +0 -90
- package/es/assets/queue.gif.js +0 -3
- package/es/assets/runbox_logo.png.js +0 -3
- package/es/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
- package/es/components/material-runbox/MaterialRunboxFooter.js +0 -56
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -94
- package/es/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
- package/es/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.js +0 -86
|
@@ -6,16 +6,19 @@ import { SnackbarProvider } from '@elice/mui-x-snackbar';
|
|
|
6
6
|
import { RunboxStarterGetResponseStatusEnum } from '@elice/openapi-client-material-runbox';
|
|
7
7
|
import { EliceRunboxProvider } from '@elice/runbox-client';
|
|
8
8
|
import { Refresh } from '@mui/icons-material';
|
|
9
|
-
import { styled, CircularProgress, Stack, Typography, Button } from '@mui/material';
|
|
9
|
+
import { styled, ThemeProvider, CircularProgress, Stack, Typography, Button } from '@mui/material';
|
|
10
10
|
import { useQuery } from '@tanstack/react-query';
|
|
11
11
|
import MaterialAdminRunboxConfirmDialog from './MaterialAdminRunboxConfirmDialog.js';
|
|
12
12
|
import MaterialRunboxAlert from './MaterialRunboxAlert.js';
|
|
13
13
|
import MaterialRunboxBody from './MaterialRunboxBody.js';
|
|
14
|
-
import MaterialRunboxFooter from './MaterialRunboxFooter.js';
|
|
15
14
|
import MaterialRunboxHeader from './MaterialRunboxHeader.js';
|
|
15
|
+
import { runboxLightTheme } from './theme.js';
|
|
16
16
|
import { useMaterialRunboxContext } from './contexts/MaterialRunboxContext.js';
|
|
17
17
|
import { useMaterialRunboxApiContext } from './contexts/MaterialRunboxApiContext.js';
|
|
18
18
|
import MaterialRunboxCommandContextProvider from './contexts/MaterialRunboxCommandContext.js';
|
|
19
|
+
import MaterialRunboxControlContextProvider from './contexts/MaterialRunboxControlContext.js';
|
|
20
|
+
import MaterialRunboxDiskUsageAlert from './disk/MaterialRunboxDiskUsageAlert.js';
|
|
21
|
+
import MaterialRunboxDiskUsageDialog from './disk/MaterialRunboxDiskUsageDialog.js';
|
|
19
22
|
import { useMaterialRunboxRunboxIdStarterGet } from './hooks/useMaterialRunboxRunboxIdStarterGet.js';
|
|
20
23
|
|
|
21
24
|
var _templateObject;
|
|
@@ -41,7 +44,8 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
|
|
|
41
44
|
isTutoring = _ref$isTutoring === void 0 ? false : _ref$isTutoring,
|
|
42
45
|
_ref$hideTimerPopover = _ref.hideTimerPopover,
|
|
43
46
|
hideTimerPopover = _ref$hideTimerPopover === void 0 ? false : _ref$hideTimerPopover,
|
|
44
|
-
getAchievementColor = _ref.getAchievementColor
|
|
47
|
+
getAchievementColor = _ref.getAchievementColor,
|
|
48
|
+
onRunboxRunningIdChange = _ref.onRunboxRunningIdChange;
|
|
45
49
|
var _a;
|
|
46
50
|
var intl = useRawEliceIntl();
|
|
47
51
|
var _useMaterialRunboxCon = useMaterialRunboxContext(),
|
|
@@ -150,66 +154,81 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
|
|
|
150
154
|
//
|
|
151
155
|
//
|
|
152
156
|
if (isInitialLoading || starterEnabled && isLoading) {
|
|
153
|
-
return jsx(
|
|
154
|
-
|
|
157
|
+
return jsx(ThemeProvider, {
|
|
158
|
+
theme: runboxLightTheme,
|
|
159
|
+
children: jsx(StyledRunboxContainer, {
|
|
160
|
+
sx: {
|
|
161
|
+
backgroundColor: 'background.paper'
|
|
162
|
+
},
|
|
163
|
+
children: jsx(CircularProgress, {})
|
|
164
|
+
})
|
|
155
165
|
});
|
|
156
166
|
}
|
|
157
167
|
if (isError) {
|
|
158
|
-
return jsx(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
startIcon: jsx(Refresh, {}),
|
|
170
|
-
onClick: function onClick() {
|
|
171
|
-
return refetch();
|
|
172
|
-
},
|
|
173
|
-
children: intl.formatMessage({
|
|
174
|
-
id: 'runbox.common.retry'
|
|
175
|
-
})
|
|
176
|
-
}), typeof showMessenger === 'function' ? jsx(Button, {
|
|
177
|
-
variant: "outlined",
|
|
178
|
-
onClick: function onClick() {
|
|
179
|
-
return showMessenger();
|
|
180
|
-
},
|
|
168
|
+
return jsx(ThemeProvider, {
|
|
169
|
+
theme: runboxLightTheme,
|
|
170
|
+
children: jsx(StyledRunboxContainer, {
|
|
171
|
+
sx: {
|
|
172
|
+
backgroundColor: 'background.paper',
|
|
173
|
+
color: 'text.primary'
|
|
174
|
+
},
|
|
175
|
+
children: jsxs(Stack, {
|
|
176
|
+
gap: "1.5rem",
|
|
177
|
+
children: [jsx(Typography, {
|
|
178
|
+
variant: "h6",
|
|
181
179
|
children: intl.formatMessage({
|
|
182
|
-
id: 'runbox.
|
|
180
|
+
id: 'runbox.runtime.message.startError'
|
|
183
181
|
})
|
|
184
|
-
})
|
|
185
|
-
|
|
182
|
+
}), jsxs(Stack, {
|
|
183
|
+
gap: "0.5rem",
|
|
184
|
+
children: [jsx(Button, {
|
|
185
|
+
startIcon: jsx(Refresh, {}),
|
|
186
|
+
onClick: function onClick() {
|
|
187
|
+
return refetch();
|
|
188
|
+
},
|
|
189
|
+
children: intl.formatMessage({
|
|
190
|
+
id: 'runbox.common.retry'
|
|
191
|
+
})
|
|
192
|
+
}), typeof showMessenger === 'function' ? jsx(Button, {
|
|
193
|
+
variant: "outlined",
|
|
194
|
+
onClick: function onClick() {
|
|
195
|
+
return showMessenger();
|
|
196
|
+
},
|
|
197
|
+
children: intl.formatMessage({
|
|
198
|
+
id: 'runbox.common.support'
|
|
199
|
+
})
|
|
200
|
+
}) : null]
|
|
201
|
+
})]
|
|
202
|
+
})
|
|
186
203
|
})
|
|
187
204
|
});
|
|
188
205
|
}
|
|
189
206
|
if (!enabledLxpPlan) {
|
|
190
|
-
return jsx(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
return jsx(ThemeProvider, {
|
|
208
|
+
theme: runboxLightTheme,
|
|
209
|
+
children: jsx(StyledRunboxContainer, {
|
|
210
|
+
sx: {
|
|
211
|
+
backgroundColor: 'background.paper',
|
|
212
|
+
color: 'text.primary'
|
|
213
|
+
},
|
|
214
|
+
children: jsxs(Stack, {
|
|
215
|
+
gap: "0.5rem",
|
|
216
|
+
textAlign: "center",
|
|
217
|
+
children: [jsx(Typography, {
|
|
218
|
+
variant: "h6",
|
|
219
|
+
color: "text.secondary",
|
|
220
|
+
children: intl.formatMessage({
|
|
221
|
+
id: 'runbox.runtime.message.runbox_unavailable'
|
|
222
|
+
})
|
|
223
|
+
}), jsx(Typography, {
|
|
224
|
+
variant: "body1",
|
|
225
|
+
whiteSpace: "pre-line",
|
|
226
|
+
color: "text.tertiary",
|
|
227
|
+
children: intl.formatMessage({
|
|
228
|
+
id: 'runbox.runtime.message.lxp_plan_required'
|
|
229
|
+
})
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
213
232
|
})
|
|
214
233
|
});
|
|
215
234
|
}
|
|
@@ -267,23 +286,32 @@ var MaterialRunboxContent = function MaterialRunboxContent(_ref) {
|
|
|
267
286
|
});
|
|
268
287
|
},
|
|
269
288
|
onRunboxRefetchRequest: refetch,
|
|
289
|
+
onRunboxRunningIdChange: onRunboxRunningIdChange,
|
|
270
290
|
children: jsx(StyledRunboxContainer, {
|
|
271
|
-
children:
|
|
291
|
+
children: jsx(SnackbarProvider, {
|
|
272
292
|
domRoot: snackbarRoot !== null && snackbarRoot !== void 0 ? snackbarRoot : document.body,
|
|
273
293
|
classes: {
|
|
274
294
|
containerRoot: SNACKBAR_CONTAINER_CLASS
|
|
275
295
|
},
|
|
276
|
-
children:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
296
|
+
children: jsxs(MaterialRunboxControlContextProvider, Object.assign({}, props, {
|
|
297
|
+
children: [jsx(MaterialRunboxHeader, Object.assign({}, props, {
|
|
298
|
+
hideTimerPopover: hideTimerPopover
|
|
299
|
+
})), jsx(MaterialRunboxAlert, {
|
|
300
|
+
runbox: runbox,
|
|
301
|
+
courseId: courseId,
|
|
302
|
+
studentUserId: studentUserId,
|
|
303
|
+
userId: userId,
|
|
304
|
+
isTutoring: isTutoring
|
|
305
|
+
}), jsx(MaterialRunboxDiskUsageAlert, {
|
|
306
|
+
runtimeTemplateId: runtimeTemplate.id,
|
|
307
|
+
courseId: courseId,
|
|
308
|
+
userId: studentUserId
|
|
309
|
+
}), jsx(MaterialRunboxDiskUsageDialog, {
|
|
310
|
+
runboxId: runbox.id
|
|
311
|
+
}), jsx(MaterialRunboxBody, Object.assign({
|
|
312
|
+
setSnackbarRoot: setSnackbarRoot
|
|
313
|
+
}, props))]
|
|
314
|
+
}))
|
|
287
315
|
})
|
|
288
316
|
})
|
|
289
317
|
})
|
|
@@ -9,43 +9,44 @@ import { Tag, EliceIcon } from '@elice/mui-elements';
|
|
|
9
9
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
10
10
|
import { enums } from '@elice/types';
|
|
11
11
|
import { faEllipsisVertical } from '@fortawesome/pro-solid-svg-icons';
|
|
12
|
-
import {
|
|
12
|
+
import { Stack, IconButton, Button } from '@mui/material';
|
|
13
13
|
import { useQuery } from '@tanstack/react-query';
|
|
14
|
-
import MaterialRunboxActionAutoShutdown from './actions/MaterialRunboxActionAutoShutdown.js';
|
|
15
14
|
import MaterialRunboxActionDisconnect from './actions/MaterialRunboxActionDisconnect.js';
|
|
16
15
|
import MaterialRunboxActionGrade from './actions/MaterialRunboxActionGrade.js';
|
|
17
16
|
import MaterialRunboxActionMenu from './actions/MaterialRunboxActionMenu.js';
|
|
18
|
-
import img from '../../assets/runbox_logo.png.js';
|
|
19
17
|
import { useMaterialRunboxContext } from './contexts/MaterialRunboxContext.js';
|
|
20
18
|
import { useMaterialRunboxApiContext } from './contexts/MaterialRunboxApiContext.js';
|
|
21
19
|
import MaterialRunboxTimer from './timer/MaterialRunboxTimer.js';
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
20
|
+
import MaterialRunboxStatusButton from './status/MaterialRunboxStatusButton.js';
|
|
21
|
+
import { useBreakpoint } from '../shared/hooks/useBreakpoint.js';
|
|
24
22
|
|
|
25
23
|
var StyledHeader = /*#__PURE__*/_styled("div", {
|
|
26
24
|
target: "e110d0bp0"
|
|
27
25
|
})("position:relative;flex:0 0 3rem;display:flex;justify-content:flex-start;align-items:center;gap:1rem;padding:0 1rem;width:100%;border-bottom:1px solid ", function (_ref) {
|
|
28
26
|
var theme = _ref.theme;
|
|
29
27
|
return theme.palette.divider;
|
|
30
|
-
}, ";overflow:hidden;
|
|
28
|
+
}, ";overflow:hidden;color:", function (_ref2) {
|
|
31
29
|
var theme = _ref2.theme;
|
|
30
|
+
return theme.palette.text.primary;
|
|
31
|
+
}, ";background-color:", function (_ref3) {
|
|
32
|
+
var theme = _ref3.theme;
|
|
32
33
|
return theme.palette.background.paper;
|
|
33
34
|
}, ";");
|
|
34
35
|
//
|
|
35
36
|
//
|
|
36
37
|
//
|
|
37
|
-
var MaterialRunboxHeader = function MaterialRunboxHeader(
|
|
38
|
-
var runbox =
|
|
39
|
-
runtime =
|
|
40
|
-
runtimeTemplate =
|
|
41
|
-
courseId =
|
|
42
|
-
userId =
|
|
43
|
-
studentUserId =
|
|
44
|
-
isTutoring =
|
|
45
|
-
refetch =
|
|
46
|
-
getAchievementColor =
|
|
47
|
-
|
|
48
|
-
hideTimerPopover =
|
|
38
|
+
var MaterialRunboxHeader = function MaterialRunboxHeader(_ref4) {
|
|
39
|
+
var runbox = _ref4.runbox,
|
|
40
|
+
runtime = _ref4.runtime,
|
|
41
|
+
runtimeTemplate = _ref4.runtimeTemplate,
|
|
42
|
+
courseId = _ref4.courseId,
|
|
43
|
+
userId = _ref4.userId,
|
|
44
|
+
studentUserId = _ref4.studentUserId,
|
|
45
|
+
isTutoring = _ref4.isTutoring,
|
|
46
|
+
refetch = _ref4.refetch,
|
|
47
|
+
getAchievementColor = _ref4.getAchievementColor,
|
|
48
|
+
_ref4$hideTimerPopove = _ref4.hideTimerPopover,
|
|
49
|
+
hideTimerPopover = _ref4$hideTimerPopove === void 0 ? false : _ref4$hideTimerPopove;
|
|
49
50
|
var intl = useRawEliceIntl();
|
|
50
51
|
var _useMaterialRunboxCon = useMaterialRunboxContext(),
|
|
51
52
|
enableAutoShutdownToggle = _useMaterialRunboxCon.enableAutoShutdownToggle;
|
|
@@ -56,19 +57,10 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
56
57
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
57
58
|
menuAnchorEl = _React$useState2[0],
|
|
58
59
|
setMenuAnchorEl = _React$useState2[1];
|
|
60
|
+
var isSmallTabletOrSmaller = useBreakpoint('md', 'down');
|
|
59
61
|
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
60
62
|
status = _useEliceRunboxRunnin.status;
|
|
61
63
|
var isRunboxRunning = status === 'running';
|
|
62
|
-
var _useRunboxControl = useRunboxControl({
|
|
63
|
-
runbox: runbox,
|
|
64
|
-
runtime: runtime,
|
|
65
|
-
courseId: courseId,
|
|
66
|
-
refetch: refetch,
|
|
67
|
-
userId: userId,
|
|
68
|
-
studentUserId: studentUserId,
|
|
69
|
-
isTutoring: isTutoring
|
|
70
|
-
}),
|
|
71
|
-
stopRuntime = _useRunboxControl.stop;
|
|
72
64
|
//
|
|
73
65
|
var _useQuery = useQuery({
|
|
74
66
|
queryKey: ['getGlobalOrganizationGet', orgNameShort],
|
|
@@ -96,8 +88,8 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
96
88
|
courseId: courseId,
|
|
97
89
|
runtime: runtime
|
|
98
90
|
}],
|
|
99
|
-
queryFn: function queryFn(
|
|
100
|
-
var signal =
|
|
91
|
+
queryFn: function queryFn(_ref5) {
|
|
92
|
+
var signal = _ref5.signal;
|
|
101
93
|
return materialRunboxApi.runbox.runboxRunboxIdSubmitInfoGet({
|
|
102
94
|
eliceCourseId: courseId,
|
|
103
95
|
runboxId: runtime === null || runtime === void 0 ? void 0 : runtime.runboxId
|
|
@@ -138,20 +130,11 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
138
130
|
});
|
|
139
131
|
};
|
|
140
132
|
/**
|
|
141
|
-
*
|
|
133
|
+
* Whether the auto-shutdown toggle is available.
|
|
134
|
+
* The toggle itself lives in the option menu. (PLAT-4181)
|
|
142
135
|
*/
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
if (!enableAutoShutdownToggle || isTutoring || isAidtOrg) {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
return jsx(MaterialRunboxActionAutoShutdown, {
|
|
149
|
-
runtime: runtime,
|
|
150
|
-
runtimeTemplate: runtimeTemplate,
|
|
151
|
-
courseId: courseId,
|
|
152
|
-
refetch: refetch
|
|
153
|
-
});
|
|
154
|
-
};
|
|
136
|
+
var isAidtOrg = (organization === null || organization === void 0 ? void 0 : organization.organizationType) === enums.OrganizationType.Aidt;
|
|
137
|
+
var enableAutoShutdown = Boolean(enableAutoShutdownToggle) && !isTutoring && !isAidtOrg;
|
|
155
138
|
/**
|
|
156
139
|
*
|
|
157
140
|
*/
|
|
@@ -164,12 +147,29 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
164
147
|
courseId: courseId
|
|
165
148
|
});
|
|
166
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
var handleMenuButtonClick = function handleMenuButtonClick(e) {
|
|
154
|
+
if (menuAnchorEl) {
|
|
155
|
+
setMenuAnchorEl(null);
|
|
156
|
+
} else {
|
|
157
|
+
setMenuAnchorEl(e.currentTarget);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
167
160
|
/**
|
|
168
161
|
*
|
|
169
162
|
*/
|
|
170
163
|
var renderOptionMenu = function renderOptionMenu() {
|
|
171
164
|
return jsxs(Fragment, {
|
|
172
|
-
children: [jsx(
|
|
165
|
+
children: [isSmallTabletOrSmaller ? jsx(IconButton, {
|
|
166
|
+
size: "small",
|
|
167
|
+
disabled: !isRunboxRunning,
|
|
168
|
+
onClick: handleMenuButtonClick,
|
|
169
|
+
children: jsx(EliceIcon, {
|
|
170
|
+
icon: faEllipsisVertical
|
|
171
|
+
})
|
|
172
|
+
}) : jsx(Button, {
|
|
173
173
|
disabled: !isRunboxRunning,
|
|
174
174
|
startIcon: jsx(EliceIcon, {
|
|
175
175
|
icon: faEllipsisVertical
|
|
@@ -179,22 +179,18 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
179
179
|
sx: {
|
|
180
180
|
color: 'text.primary'
|
|
181
181
|
},
|
|
182
|
-
onClick:
|
|
183
|
-
if (menuAnchorEl) {
|
|
184
|
-
setMenuAnchorEl(null);
|
|
185
|
-
} else {
|
|
186
|
-
setMenuAnchorEl(e.currentTarget);
|
|
187
|
-
}
|
|
188
|
-
},
|
|
182
|
+
onClick: handleMenuButtonClick,
|
|
189
183
|
children: intl.formatMessage({
|
|
190
184
|
id: 'runbox.action.menu.title'
|
|
191
185
|
})
|
|
192
186
|
}), jsx(MaterialRunboxActionMenu, {
|
|
193
187
|
runbox: runbox,
|
|
194
188
|
runtime: runtime,
|
|
189
|
+
runtimeTemplate: runtimeTemplate,
|
|
195
190
|
courseId: courseId,
|
|
196
191
|
studentUserId: studentUserId,
|
|
197
192
|
isTutoring: isTutoring,
|
|
193
|
+
enableAutoShutdown: enableAutoShutdown,
|
|
198
194
|
menuAnchorEl: menuAnchorEl,
|
|
199
195
|
refetch: refetch,
|
|
200
196
|
handleMenuClose: handleMenuClose,
|
|
@@ -209,39 +205,29 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref3) {
|
|
|
209
205
|
if (isTutoring) {
|
|
210
206
|
return null;
|
|
211
207
|
}
|
|
212
|
-
return jsx(MaterialRunboxActionDisconnect, {
|
|
213
|
-
stopRuntime: stopRuntime
|
|
214
|
-
});
|
|
208
|
+
return jsx(MaterialRunboxActionDisconnect, {});
|
|
215
209
|
};
|
|
216
210
|
//
|
|
217
211
|
//
|
|
218
212
|
//
|
|
219
213
|
return jsxs(StyledHeader, {
|
|
220
214
|
ref: headerRef,
|
|
221
|
-
children: [jsx(
|
|
222
|
-
component: "img",
|
|
223
|
-
src: img,
|
|
224
|
-
alt: "elice runbox",
|
|
225
|
-
sx: {
|
|
226
|
-
width: 'auto',
|
|
227
|
-
height: '100%',
|
|
228
|
-
imageRendering: 'auto',
|
|
229
|
-
padding: '0.465rem 0'
|
|
230
|
-
}
|
|
231
|
-
}), runtime ? jsx(MaterialRunboxTimer, {
|
|
215
|
+
children: [runtime ? jsx(MaterialRunboxTimer, {
|
|
232
216
|
runboxId: runbox.id,
|
|
233
217
|
userId: userId,
|
|
234
218
|
headerElement: headerRef.current,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}) : null, jsx(
|
|
238
|
-
|
|
219
|
+
hideTimerPopover: hideTimerPopover,
|
|
220
|
+
isTutoring: isTutoring
|
|
221
|
+
}) : null, jsx(MaterialRunboxStatusButton, {
|
|
222
|
+
runtimeTemplateId: runtimeTemplate.id,
|
|
223
|
+
courseId: courseId,
|
|
224
|
+
userId: studentUserId
|
|
239
225
|
}), jsxs(Stack, {
|
|
240
226
|
direction: "row",
|
|
241
227
|
alignItems: "center",
|
|
242
228
|
gap: "0.5rem",
|
|
243
229
|
marginLeft: "auto",
|
|
244
|
-
children: [renderHeaderSubmitInfo(),
|
|
230
|
+
children: [renderHeaderSubmitInfo(), renderOptionMenu(), renderHeaderActionDisconnect(), renderHeaderActionGrade()]
|
|
245
231
|
})]
|
|
246
232
|
});
|
|
247
233
|
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
stopRuntime: () => Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
declare const MaterialRunboxActionDisconnect: React.FC<MaterialRunboxActionDisconnectProps>;
|
|
2
|
+
declare const MaterialRunboxActionDisconnect: React.FC;
|
|
6
3
|
export default MaterialRunboxActionDisconnect;
|
|
@@ -2,19 +2,26 @@ import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPlugin
|
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
|
+
import { EliceIcon } from '@elice/mui-elements';
|
|
5
6
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
6
|
-
import {
|
|
7
|
+
import { faLinkSlash } from '@fortawesome/pro-solid-svg-icons';
|
|
8
|
+
import { Tooltip, IconButton, Button } from '@mui/material';
|
|
7
9
|
import MaterialRunboxActionDisconnectDialog from './MaterialRunboxActionDisconnectDialog.js';
|
|
10
|
+
import { useBreakpoint } from '../../shared/hooks/useBreakpoint.js';
|
|
11
|
+
import { useMaterialRunboxControlContext } from '../contexts/MaterialRunboxControlContext.js';
|
|
8
12
|
|
|
9
13
|
//
|
|
10
14
|
//
|
|
11
15
|
//
|
|
12
|
-
var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(
|
|
13
|
-
var stopRuntime = _ref.stopRuntime;
|
|
16
|
+
var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect() {
|
|
14
17
|
var intl = useRawEliceIntl();
|
|
18
|
+
var isSmallTabletOrSmaller = useBreakpoint('md', 'down');
|
|
19
|
+
var isMobileOrSmaller = useBreakpoint('sm', 'down');
|
|
15
20
|
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
16
21
|
status = _useEliceRunboxRunnin.status;
|
|
17
22
|
var isRunboxTerminated = status === 'terminated';
|
|
23
|
+
var _useMaterialRunboxCon = useMaterialRunboxControlContext(),
|
|
24
|
+
stopRuntime = _useMaterialRunboxCon.stop;
|
|
18
25
|
var _React$useState = React.useState(false),
|
|
19
26
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20
27
|
isDisconnectDialogOpen = _React$useState2[0],
|
|
@@ -36,6 +43,23 @@ var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_re
|
|
|
36
43
|
*
|
|
37
44
|
*/
|
|
38
45
|
var renderActionButton = function renderActionButton() {
|
|
46
|
+
if (isSmallTabletOrSmaller) {
|
|
47
|
+
return jsx(Tooltip, {
|
|
48
|
+
title: intl.formatMessage({
|
|
49
|
+
id: 'runbox.action.disconnect.title'
|
|
50
|
+
}),
|
|
51
|
+
children: jsx("span", {
|
|
52
|
+
children: jsx(IconButton, {
|
|
53
|
+
size: "small",
|
|
54
|
+
disabled: isRunboxTerminated,
|
|
55
|
+
onClick: handleClickAction,
|
|
56
|
+
children: jsx(EliceIcon, {
|
|
57
|
+
icon: faLinkSlash
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
39
63
|
return jsx(Button, {
|
|
40
64
|
disabled: isRunboxTerminated,
|
|
41
65
|
variant: "contained",
|
|
@@ -65,6 +89,9 @@ var MaterialRunboxActionDisconnect = function MaterialRunboxActionDisconnect(_re
|
|
|
65
89
|
//
|
|
66
90
|
//
|
|
67
91
|
//
|
|
92
|
+
if (isMobileOrSmaller) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
68
95
|
return jsxs(Fragment, {
|
|
69
96
|
children: [renderActionButton(), renderDisconnectDialog()]
|
|
70
97
|
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
|
+
import { EliceIcon } from '@elice/mui-elements';
|
|
6
|
+
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
7
|
+
import { faLinkSlash } from '@fortawesome/pro-solid-svg-icons';
|
|
8
|
+
import { LoadingButton } from '@mui/lab';
|
|
9
|
+
import { MenuItem, ListItemIcon, ListItemText } from '@mui/material';
|
|
10
|
+
import MaterialRunboxActionDisconnectDialog from './MaterialRunboxActionDisconnectDialog.js';
|
|
11
|
+
import { useMaterialRunboxControlContext } from '../contexts/MaterialRunboxControlContext.js';
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
var MaterialRunboxActionDisconnectMenuItem = function MaterialRunboxActionDisconnectMenuItem() {
|
|
17
|
+
var intl = useRawEliceIntl();
|
|
18
|
+
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
19
|
+
status = _useEliceRunboxRunnin.status;
|
|
20
|
+
var isRunboxTerminated = status === 'terminated';
|
|
21
|
+
var _useMaterialRunboxCon = useMaterialRunboxControlContext(),
|
|
22
|
+
stopRuntime = _useMaterialRunboxCon.stop,
|
|
23
|
+
isStopping = _useMaterialRunboxCon.isStopping;
|
|
24
|
+
var _React$useState = React.useState(false),
|
|
25
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
26
|
+
isDisconnectDialogOpen = _React$useState2[0],
|
|
27
|
+
setDisconnectDialogOpen = _React$useState2[1];
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
var handleConfirmDisconnect = /*#__PURE__*/function () {
|
|
32
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
33
|
+
return _regenerator().w(function (_context) {
|
|
34
|
+
while (1) switch (_context.n) {
|
|
35
|
+
case 0:
|
|
36
|
+
setDisconnectDialogOpen(false);
|
|
37
|
+
_context.n = 1;
|
|
38
|
+
return stopRuntime();
|
|
39
|
+
case 1:
|
|
40
|
+
return _context.a(2);
|
|
41
|
+
}
|
|
42
|
+
}, _callee);
|
|
43
|
+
}));
|
|
44
|
+
return function handleConfirmDisconnect() {
|
|
45
|
+
return _ref.apply(this, arguments);
|
|
46
|
+
};
|
|
47
|
+
}();
|
|
48
|
+
//
|
|
49
|
+
//
|
|
50
|
+
//
|
|
51
|
+
return jsxs(Fragment, {
|
|
52
|
+
children: [jsxs(MenuItem, {
|
|
53
|
+
fullWidth: true,
|
|
54
|
+
component: LoadingButton,
|
|
55
|
+
color: "inherit",
|
|
56
|
+
loading: isStopping,
|
|
57
|
+
disabled: isRunboxTerminated,
|
|
58
|
+
onClick: function onClick() {
|
|
59
|
+
return setDisconnectDialogOpen(true);
|
|
60
|
+
},
|
|
61
|
+
children: [jsx(ListItemIcon, {
|
|
62
|
+
children: jsx(EliceIcon, {
|
|
63
|
+
icon: faLinkSlash
|
|
64
|
+
})
|
|
65
|
+
}), jsx(ListItemText, {
|
|
66
|
+
children: intl.formatMessage({
|
|
67
|
+
id: 'runbox.action.disconnect.title'
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
}), jsx(MaterialRunboxActionDisconnectDialog, {
|
|
71
|
+
open: isDisconnectDialogOpen,
|
|
72
|
+
onClose: function onClose() {
|
|
73
|
+
return setDisconnectDialogOpen(false);
|
|
74
|
+
},
|
|
75
|
+
onConfirm: function onConfirm() {
|
|
76
|
+
return void handleConfirmDisconnect();
|
|
77
|
+
}
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { MaterialRunboxActionDisconnectMenuItem as default };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RuntimeProps } from '../runtime/Runtime';
|
|
3
|
-
type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'courseId' | 'refetch' | 'studentUserId' | 'isTutoring' | 'getAchievementColor'> & {
|
|
3
|
+
type MaterialRunboxActionMenuProps = Pick<RuntimeProps, 'runbox' | 'runtime' | 'runtimeTemplate' | 'courseId' | 'refetch' | 'studentUserId' | 'isTutoring' | 'getAchievementColor'> & {
|
|
4
4
|
menuAnchorEl: null | HTMLButtonElement;
|
|
5
|
+
/** Whether the auto-shutdown toggle is available. Decided by the header. */
|
|
6
|
+
enableAutoShutdown?: boolean;
|
|
5
7
|
handleMenuClose: () => void;
|
|
6
8
|
};
|
|
7
9
|
declare const MaterialRunboxActionMenu: React.FC<MaterialRunboxActionMenuProps>;
|