@elice/material-runbox 1.230426.0 → 1.230504.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/components/material-runbox/MaterialRunbox.js +4 -1
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +66 -6
- package/cjs/components/material-runbox/context.d.ts +2 -0
- package/cjs/components/material-runbox/locales/en.json.js +1 -1
- package/cjs/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/MaterialRunbox.js +4 -1
- package/es/components/material-runbox/MaterialRunboxHeader.js +68 -8
- package/es/components/material-runbox/context.d.ts +2 -0
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/package.json +4 -4
|
@@ -23,11 +23,13 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
23
23
|
var MaterialRunbox = function MaterialRunbox(_a) {
|
|
24
24
|
var _a$enableAutoShutdown = _a.enableAutoShutdownToggle,
|
|
25
25
|
enableAutoShutdownToggle = _a$enableAutoShutdown === void 0 ? false : _a$enableAutoShutdown,
|
|
26
|
+
_a$enableUrlShare = _a.enableUrlShare,
|
|
27
|
+
enableUrlShare = _a$enableUrlShare === void 0 ? false : _a$enableUrlShare,
|
|
26
28
|
_a$locale = _a.locale,
|
|
27
29
|
locale = _a$locale === void 0 ? 'ko' : _a$locale,
|
|
28
30
|
showMessenger = _a.showMessenger,
|
|
29
31
|
eliceMaterialRunboxApiConfiguration = _a.eliceMaterialRunboxApiConfiguration,
|
|
30
|
-
materialRunboxProps = tslib.__rest(_a, ["enableAutoShutdownToggle", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
32
|
+
materialRunboxProps = tslib.__rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
31
33
|
var apis = useMaterialRunboxApi.useMaterialRunboxApi({
|
|
32
34
|
eliceMaterialRunboxApiConfiguration: eliceMaterialRunboxApiConfiguration
|
|
33
35
|
});
|
|
@@ -37,6 +39,7 @@ var MaterialRunbox = function MaterialRunbox(_a) {
|
|
|
37
39
|
return React__default["default"].createElement(context.MaterialRunboxContext.Provider, {
|
|
38
40
|
value: Object.assign({
|
|
39
41
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
42
|
+
enableUrlShare: enableUrlShare,
|
|
40
43
|
locale: locale,
|
|
41
44
|
showMessenger: showMessenger
|
|
42
45
|
}, apis)
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactIntl = require('react-intl');
|
|
8
|
+
var reactUse = require('react-use');
|
|
8
9
|
var runboxClient = require('@elice/runbox-client');
|
|
9
10
|
var styled = require('@emotion/styled');
|
|
10
11
|
var iconsMaterial = require('@mui/icons-material');
|
|
@@ -39,15 +40,25 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
39
40
|
var intl = reactIntl.useIntl();
|
|
40
41
|
var _React$useContext = React__default["default"].useContext(context.MaterialRunboxContext),
|
|
41
42
|
materialRunboxApi = _React$useContext.materialRunboxApi,
|
|
42
|
-
enableAutoShutdownToggle = _React$useContext.enableAutoShutdownToggle
|
|
43
|
+
enableAutoShutdownToggle = _React$useContext.enableAutoShutdownToggle,
|
|
44
|
+
enableUrlShare = _React$useContext.enableUrlShare;
|
|
43
45
|
var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
|
|
44
|
-
status = _useEliceRunboxRunnin.status
|
|
46
|
+
status = _useEliceRunboxRunnin.status,
|
|
47
|
+
url = _useEliceRunboxRunnin.url;
|
|
45
48
|
var _useRunboxControl = useRunboxControl.useRunboxControl({
|
|
46
49
|
runbox: runbox,
|
|
47
50
|
courseId: courseId,
|
|
48
51
|
refetch: refetch
|
|
49
52
|
}),
|
|
50
53
|
start = _useRunboxControl.start;
|
|
54
|
+
var _React$useState = React__default["default"].useState(false),
|
|
55
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
56
|
+
isClipboardCopied = _React$useState2[0],
|
|
57
|
+
setClipboardCopied = _React$useState2[1];
|
|
58
|
+
var _useCopyToClipboard = reactUse.useCopyToClipboard(),
|
|
59
|
+
_useCopyToClipboard2 = _rollupPluginBabelHelpers.slicedToArray(_useCopyToClipboard, 2),
|
|
60
|
+
clipboardValue = _useCopyToClipboard2[0].value,
|
|
61
|
+
copy = _useCopyToClipboard2[1];
|
|
51
62
|
var isRunboxRunning = status === 'running';
|
|
52
63
|
/**
|
|
53
64
|
*
|
|
@@ -66,6 +77,34 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
66
77
|
//
|
|
67
78
|
});
|
|
68
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
var handleRestartButtonClick = function handleRestartButtonClick() {
|
|
84
|
+
start(true).catch(function () {
|
|
85
|
+
return void 0;
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
var handleUrlShareButtonClick = function handleUrlShareButtonClick() {
|
|
92
|
+
if (url) {
|
|
93
|
+
copy(url);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
//
|
|
97
|
+
//
|
|
98
|
+
//
|
|
99
|
+
React__default["default"].useEffect(function () {
|
|
100
|
+
setClipboardCopied(Boolean(clipboardValue));
|
|
101
|
+
var timeoutId = setTimeout(function () {
|
|
102
|
+
return setClipboardCopied(false);
|
|
103
|
+
}, 2000);
|
|
104
|
+
return function () {
|
|
105
|
+
clearTimeout(timeoutId);
|
|
106
|
+
};
|
|
107
|
+
}, [clipboardValue]);
|
|
69
108
|
/**
|
|
70
109
|
*
|
|
71
110
|
*/
|
|
@@ -100,6 +139,28 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
100
139
|
}
|
|
101
140
|
}));
|
|
102
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
var renderHeaderUrlShareButton = function renderHeaderUrlShareButton() {
|
|
146
|
+
if (!enableUrlShare) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return React__default["default"].createElement(material.Tooltip, {
|
|
150
|
+
title: isClipboardCopied ? intl.formatMessage({
|
|
151
|
+
id: 'runbox.header.share.copied'
|
|
152
|
+
}) : intl.formatMessage({
|
|
153
|
+
id: 'runbox.header.share'
|
|
154
|
+
})
|
|
155
|
+
}, React__default["default"].createElement(material.IconButton, {
|
|
156
|
+
disabled: !isRunboxRunning || !url,
|
|
157
|
+
size: "small",
|
|
158
|
+
sx: {
|
|
159
|
+
width: '38px'
|
|
160
|
+
},
|
|
161
|
+
onClick: handleUrlShareButtonClick
|
|
162
|
+
}, isClipboardCopied ? React__default["default"].createElement(iconsMaterial.Check, null) : React__default["default"].createElement(iconsMaterial.Link, null)));
|
|
163
|
+
};
|
|
103
164
|
/**
|
|
104
165
|
*
|
|
105
166
|
*/
|
|
@@ -110,12 +171,11 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
110
171
|
})
|
|
111
172
|
}, React__default["default"].createElement(material.IconButton, {
|
|
112
173
|
disabled: !isRunboxRunning,
|
|
174
|
+
size: "small",
|
|
113
175
|
sx: {
|
|
114
176
|
width: '38px'
|
|
115
177
|
},
|
|
116
|
-
onClick:
|
|
117
|
-
return start(true);
|
|
118
|
-
}
|
|
178
|
+
onClick: handleRestartButtonClick
|
|
119
179
|
}, React__default["default"].createElement(iconsMaterial.RestartAlt, null)));
|
|
120
180
|
};
|
|
121
181
|
//
|
|
@@ -137,7 +197,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
137
197
|
}
|
|
138
198
|
})), React__default["default"].createElement(material.Stack, {
|
|
139
199
|
direction: "row"
|
|
140
|
-
}, renderHeaderAutoShutdownSwitch(), renderHeaderRestartButton()));
|
|
200
|
+
}, renderHeaderAutoShutdownSwitch(), renderHeaderUrlShareButton(), renderHeaderRestartButton()));
|
|
141
201
|
};
|
|
142
202
|
|
|
143
203
|
exports["default"] = MaterialRunboxHeader;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var en = {"runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.header.autoShutdown":"Always on","runbox.header.autoShutdownDisabledTooltip":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.header.autoShutdownTooltip":"If set to always on, the runtime will not shut down even if you leave the learning material. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.header.restart":"Restart runbox","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"Runbox is running.\nPlease wait!","runbox.runtime.overlay.queued.description":"Currently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"Runbox will run soon","runbox.runtime.overlay.terminated.description.default":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected"};
|
|
5
|
+
var en = {"runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.header.autoShutdown":"Always on","runbox.header.autoShutdownDisabledTooltip":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.header.autoShutdownTooltip":"If set to always on, the runtime will not shut down even if you leave the learning material. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.header.restart":"Restart runbox","runbox.header.share":"Share runbox URL","runbox.header.share.copied":"Runbox URL copied to clipboard.","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"Runbox is running.\nPlease wait!","runbox.runtime.overlay.queued.description":"Currently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"Runbox will run soon","runbox.runtime.overlay.terminated.description.default":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected"};
|
|
6
6
|
|
|
7
7
|
exports["default"] = en;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ko = {"runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.header.autoShutdown":"항상 켜두기","runbox.header.autoShutdownDisabledTooltip":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.autoShutdownTooltip":"항상 켜두기를 설정하면 학습 자료 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.restart":"런박스 재시작","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.queued.description":"현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"곧 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
|
|
5
|
+
var ko = {"runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.header.autoShutdown":"항상 켜두기","runbox.header.autoShutdownDisabledTooltip":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.autoShutdownTooltip":"항상 켜두기를 설정하면 학습 자료 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.restart":"런박스 재시작","runbox.header.share":"런박스 URL 복사","runbox.header.share.copied":"런박스 URL을 복사하였습니다.","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.queued.description":"현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"곧 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
|
|
6
6
|
|
|
7
7
|
exports["default"] = ko;
|
|
@@ -15,11 +15,13 @@ import en from './locales/en.json.js';
|
|
|
15
15
|
var MaterialRunbox = function MaterialRunbox(_a) {
|
|
16
16
|
var _a$enableAutoShutdown = _a.enableAutoShutdownToggle,
|
|
17
17
|
enableAutoShutdownToggle = _a$enableAutoShutdown === void 0 ? false : _a$enableAutoShutdown,
|
|
18
|
+
_a$enableUrlShare = _a.enableUrlShare,
|
|
19
|
+
enableUrlShare = _a$enableUrlShare === void 0 ? false : _a$enableUrlShare,
|
|
18
20
|
_a$locale = _a.locale,
|
|
19
21
|
locale = _a$locale === void 0 ? 'ko' : _a$locale,
|
|
20
22
|
showMessenger = _a.showMessenger,
|
|
21
23
|
eliceMaterialRunboxApiConfiguration = _a.eliceMaterialRunboxApiConfiguration,
|
|
22
|
-
materialRunboxProps = __rest(_a, ["enableAutoShutdownToggle", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
24
|
+
materialRunboxProps = __rest(_a, ["enableAutoShutdownToggle", "enableUrlShare", "locale", "showMessenger", "eliceMaterialRunboxApiConfiguration"]);
|
|
23
25
|
var apis = useMaterialRunboxApi({
|
|
24
26
|
eliceMaterialRunboxApiConfiguration: eliceMaterialRunboxApiConfiguration
|
|
25
27
|
});
|
|
@@ -29,6 +31,7 @@ var MaterialRunbox = function MaterialRunbox(_a) {
|
|
|
29
31
|
return React.createElement(MaterialRunboxContext.Provider, {
|
|
30
32
|
value: Object.assign({
|
|
31
33
|
enableAutoShutdownToggle: enableAutoShutdownToggle,
|
|
34
|
+
enableUrlShare: enableUrlShare,
|
|
32
35
|
locale: locale,
|
|
33
36
|
showMessenger: showMessenger
|
|
34
37
|
}, apis)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
|
+
import { taggedTemplateLiteral as _taggedTemplateLiteral, slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import { useCopyToClipboard } from 'react-use';
|
|
4
5
|
import { useEliceRunboxRunning } from '@elice/runbox-client';
|
|
5
6
|
import styled from '@emotion/styled';
|
|
6
|
-
import { RestartAlt } from '@mui/icons-material';
|
|
7
|
+
import { RestartAlt, Check, Link } from '@mui/icons-material';
|
|
7
8
|
import { Stack, Box, Tooltip, IconButton, FormControlLabel, Switch } from '@mui/material';
|
|
8
9
|
import { MaterialRunboxContext } from './context.js';
|
|
9
10
|
import '@elice/openapi-client-material-runbox';
|
|
@@ -30,15 +31,25 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
30
31
|
var intl = useIntl();
|
|
31
32
|
var _React$useContext = React.useContext(MaterialRunboxContext),
|
|
32
33
|
materialRunboxApi = _React$useContext.materialRunboxApi,
|
|
33
|
-
enableAutoShutdownToggle = _React$useContext.enableAutoShutdownToggle
|
|
34
|
+
enableAutoShutdownToggle = _React$useContext.enableAutoShutdownToggle,
|
|
35
|
+
enableUrlShare = _React$useContext.enableUrlShare;
|
|
34
36
|
var _useEliceRunboxRunnin = useEliceRunboxRunning(),
|
|
35
|
-
status = _useEliceRunboxRunnin.status
|
|
37
|
+
status = _useEliceRunboxRunnin.status,
|
|
38
|
+
url = _useEliceRunboxRunnin.url;
|
|
36
39
|
var _useRunboxControl = useRunboxControl({
|
|
37
40
|
runbox: runbox,
|
|
38
41
|
courseId: courseId,
|
|
39
42
|
refetch: refetch
|
|
40
43
|
}),
|
|
41
44
|
start = _useRunboxControl.start;
|
|
45
|
+
var _React$useState = React.useState(false),
|
|
46
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
47
|
+
isClipboardCopied = _React$useState2[0],
|
|
48
|
+
setClipboardCopied = _React$useState2[1];
|
|
49
|
+
var _useCopyToClipboard = useCopyToClipboard(),
|
|
50
|
+
_useCopyToClipboard2 = _slicedToArray(_useCopyToClipboard, 2),
|
|
51
|
+
clipboardValue = _useCopyToClipboard2[0].value,
|
|
52
|
+
copy = _useCopyToClipboard2[1];
|
|
42
53
|
var isRunboxRunning = status === 'running';
|
|
43
54
|
/**
|
|
44
55
|
*
|
|
@@ -57,6 +68,34 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
57
68
|
//
|
|
58
69
|
});
|
|
59
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
var handleRestartButtonClick = function handleRestartButtonClick() {
|
|
75
|
+
start(true).catch(function () {
|
|
76
|
+
return void 0;
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
var handleUrlShareButtonClick = function handleUrlShareButtonClick() {
|
|
83
|
+
if (url) {
|
|
84
|
+
copy(url);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//
|
|
88
|
+
//
|
|
89
|
+
//
|
|
90
|
+
React.useEffect(function () {
|
|
91
|
+
setClipboardCopied(Boolean(clipboardValue));
|
|
92
|
+
var timeoutId = setTimeout(function () {
|
|
93
|
+
return setClipboardCopied(false);
|
|
94
|
+
}, 2000);
|
|
95
|
+
return function () {
|
|
96
|
+
clearTimeout(timeoutId);
|
|
97
|
+
};
|
|
98
|
+
}, [clipboardValue]);
|
|
60
99
|
/**
|
|
61
100
|
*
|
|
62
101
|
*/
|
|
@@ -91,6 +130,28 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
91
130
|
}
|
|
92
131
|
}));
|
|
93
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
var renderHeaderUrlShareButton = function renderHeaderUrlShareButton() {
|
|
137
|
+
if (!enableUrlShare) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
return React.createElement(Tooltip, {
|
|
141
|
+
title: isClipboardCopied ? intl.formatMessage({
|
|
142
|
+
id: 'runbox.header.share.copied'
|
|
143
|
+
}) : intl.formatMessage({
|
|
144
|
+
id: 'runbox.header.share'
|
|
145
|
+
})
|
|
146
|
+
}, React.createElement(IconButton, {
|
|
147
|
+
disabled: !isRunboxRunning || !url,
|
|
148
|
+
size: "small",
|
|
149
|
+
sx: {
|
|
150
|
+
width: '38px'
|
|
151
|
+
},
|
|
152
|
+
onClick: handleUrlShareButtonClick
|
|
153
|
+
}, isClipboardCopied ? React.createElement(Check, null) : React.createElement(Link, null)));
|
|
154
|
+
};
|
|
94
155
|
/**
|
|
95
156
|
*
|
|
96
157
|
*/
|
|
@@ -101,12 +162,11 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
101
162
|
})
|
|
102
163
|
}, React.createElement(IconButton, {
|
|
103
164
|
disabled: !isRunboxRunning,
|
|
165
|
+
size: "small",
|
|
104
166
|
sx: {
|
|
105
167
|
width: '38px'
|
|
106
168
|
},
|
|
107
|
-
onClick:
|
|
108
|
-
return start(true);
|
|
109
|
-
}
|
|
169
|
+
onClick: handleRestartButtonClick
|
|
110
170
|
}, React.createElement(RestartAlt, null)));
|
|
111
171
|
};
|
|
112
172
|
//
|
|
@@ -128,7 +188,7 @@ var MaterialRunboxHeader = function MaterialRunboxHeader(_ref2) {
|
|
|
128
188
|
}
|
|
129
189
|
})), React.createElement(Stack, {
|
|
130
190
|
direction: "row"
|
|
131
|
-
}, renderHeaderAutoShutdownSwitch(), renderHeaderRestartButton()));
|
|
191
|
+
}, renderHeaderAutoShutdownSwitch(), renderHeaderUrlShareButton(), renderHeaderRestartButton()));
|
|
132
192
|
};
|
|
133
193
|
|
|
134
194
|
export { MaterialRunboxHeader as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var en = {"runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.header.autoShutdown":"Always on","runbox.header.autoShutdownDisabledTooltip":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.header.autoShutdownTooltip":"If set to always on, the runtime will not shut down even if you leave the learning material. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.header.restart":"Restart runbox","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"Runbox is running.\nPlease wait!","runbox.runtime.overlay.queued.description":"Currently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"Runbox will run soon","runbox.runtime.overlay.terminated.description.default":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected"};
|
|
1
|
+
var en = {"runbox.common.retry":"Retry","runbox.common.support":"Support","runbox.header.autoShutdown":"Always on","runbox.header.autoShutdownDisabledTooltip":"This runtime automatically shuts down after {time}, which is set as the per-session usage time.","runbox.header.autoShutdownTooltip":"If set to always on, the runtime will not shut down even if you leave the learning material. However, it will automatically shut down after {time}, which is set as the session-specific usage time of the runtime.","runbox.header.restart":"Restart runbox","runbox.header.share":"Share runbox URL","runbox.header.share.copied":"Runbox URL copied to clipboard.","runbox.runtime.message.startError":"There was an error starting the runbox.","runbox.runtime.overlay.assigned.description":"Runbox is running.\nPlease wait!","runbox.runtime.overlay.queued.description":"Currently queued {waiters} times...","runbox.runtime.overlay.queued.description_zero":"Runbox will run soon","runbox.runtime.overlay.terminated.description.default":"The runtime terminated due to an unexpected problem.\nClick the button below to reconnect to the runbox.","runbox.runtime.overlay.terminated.description.general":"The runtime connected to the runbox has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"Runtime has ended because the disk is full.\nIf you have recently deleted a runbox, it may take some time to reflect.","runbox.runtime.overlay.terminated.description.quota_exceeded":"The runtime has ended because the runtime has expired.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"Runbox has been running for 24 hours and the runtime has ended.\nTo reconnect to the runbox, click the button below.","runbox.runtime.overlay.terminated.description.unexpected":"If the problem persists, please contact customer service.","runbox.runtime.overlay.terminated.restart":"Reconnect","runbox.runtime.overlay.terminated.title":"Runtime disconnected"};
|
|
2
2
|
|
|
3
3
|
export { en as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ko = {"runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.header.autoShutdown":"항상 켜두기","runbox.header.autoShutdownDisabledTooltip":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.autoShutdownTooltip":"항상 켜두기를 설정하면 학습 자료 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.restart":"런박스 재시작","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.queued.description":"현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"곧 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
|
|
1
|
+
var ko = {"runbox.common.retry":"재시도","runbox.common.support":"고객센터","runbox.header.autoShutdown":"항상 켜두기","runbox.header.autoShutdownDisabledTooltip":"해당 런타임은 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.autoShutdownTooltip":"항상 켜두기를 설정하면 학습 자료 밖으로 나가도 런타임이 종료되지 않습니다. 다만, 해당 런타임의 세션별 사용 시간으로 설정된 {time}이 지나면 자동으로 종료됩니다.","runbox.header.restart":"런박스 재시작","runbox.header.share":"런박스 URL 복사","runbox.header.share.copied":"런박스 URL을 복사하였습니다.","runbox.runtime.message.startError":"런박스를 시작하는 중에 오류가 발생했습니다.","runbox.runtime.overlay.assigned.description":"런박스가 실행 중입니다.\n잠시만 기다려주세요!","runbox.runtime.overlay.queued.description":"현재 {waiters}번째 대기 중입니다...","runbox.runtime.overlay.queued.description_zero":"곧 런박스가 실행됩니다","runbox.runtime.overlay.terminated.description.default":"예상치 못한 문제로 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.general":"런박스에 연결된 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.os_disk_is_full":"디스크가 가득 차서 런타임이 종료되었습니다.\n최근 런박스를 삭제하셨다면 반영까지 시간이 소요될 수 있습니다.","runbox.runtime.overlay.terminated.description.quota_exceeded":"런타임 사용시간이 만료되어 런타임이 종료되었습니다.","runbox.runtime.overlay.terminated.description.quota_per_session_exceeded":"런박스를 실행한지 24시간이 경과하여 런타임이 종료되었습니다.\n런박스를 재접속하려면 아래 버튼을 눌러주세요.","runbox.runtime.overlay.terminated.description.unexpected":"문제가 지속되면 고객센터에 문의해주세요.","runbox.runtime.overlay.terminated.restart":"재접속","runbox.runtime.overlay.terminated.title":"런타임 연결 해제됨"};
|
|
2
2
|
|
|
3
3
|
export { ko as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-runbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230504.0",
|
|
4
4
|
"description": "User view and editing components of Elice material runbox",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"tslib": "^2.3.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@elice/material-shared-types": "1.
|
|
53
|
-
"@elice/material-shared-utils": "1.
|
|
52
|
+
"@elice/material-shared-types": "1.230504.0",
|
|
53
|
+
"@elice/material-shared-utils": "1.230504.0",
|
|
54
54
|
"@elice/openapi-client-material-runbox": "^1.230417.0",
|
|
55
55
|
"@elice/runbox-client": "^1.230412.0",
|
|
56
56
|
"@emotion/react": "^11.10.5",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-intl": "^5.20.10",
|
|
67
67
|
"react-use": "^17.2.4"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "d12a51842a8221b073e8ebfa5c937f4abea45422"
|
|
70
70
|
}
|