@eliceio/cdk-cli 1.7.1 → 1.7.2-sharedqa.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/es/dev/learner-files.d.ts +1 -1
- package/es/dev/learner-files.js +7 -4
- package/es/dev/learner-shares.d.ts +90 -0
- package/es/dev/learner-shares.js +282 -0
- package/es/dev/mock-api.d.ts +28 -0
- package/es/dev/mock-api.js +32 -1
- package/es/dev/server.d.ts +3 -0
- package/es/dev/server.js +22 -1
- package/package.json +2 -2
- package/skills/_shared/references/05-screen-code.md +1 -0
- package/templates/_shared/lib/cdk-mock.d.ts +16 -0
- package/templates/_shared/lib/cdk-mock.js +49 -0
- package/templates/board/README.md +15 -7
- package/templates/board/core/board.d.ts +13 -0
- package/templates/board/core/board.js +11 -1
- package/templates/board/core/files.d.ts +40 -0
- package/templates/board/core/files.js +176 -0
- package/templates/board/core/model.d.ts +5 -0
- package/templates/board/core/model.js +24 -7
- package/templates/board/core/settings.d.ts +2 -0
- package/templates/board/core/settings.js +12 -1
- package/templates/board/screens/board.js +58 -0
- package/templates/board/screens/edit.js +36 -1
- package/templates/board/template.json +1 -1
- package/templates/board/ui/board.css +173 -0
- package/templates/board/ui/card.js +74 -1
- package/templates/board/ui/composer.js +169 -20
- package/templates/board/ui/icons.js +2 -0
- package/templates/board/ui/texts.js +28 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
// 카드 추가 창 (학생 · 교육자 · 편집 화면). 섹션 · 제목(선택, 여러 줄) · 내용(목록 이어쓰기) · 색 ·
|
|
1
|
+
// 카드 추가 창 (학생 · 교육자 · 편집 화면). 섹션 · 제목(선택, 여러 줄) · 내용(목록 이어쓰기) · 색 · 링크 · 파일(그림 · PDF).
|
|
2
|
+
// 파일은 고르기 · 붙여넣기 · 끌어다 놓기로 담고(미리보기), '올리기'를 누르면 먼저 올린 뒤 카드를 올린다 (진행 표시).
|
|
3
|
+
// 카드 올리기가 실패하면 올린 파일은 지운다 (upload.discard).
|
|
2
4
|
// 폼 제출은 샌드박스(allow-forms 없음)에서 막히므로 form · submit 이벤트를 쓰지 않고 버튼 · 키로 보낸다.
|
|
3
5
|
import { html, part } from '../core/dom.js';
|
|
4
6
|
import {
|
|
@@ -9,7 +11,9 @@ import {
|
|
|
9
11
|
DEFAULT_COLOR,
|
|
10
12
|
TEXT_MAX,
|
|
11
13
|
} from '../core/model.js';
|
|
14
|
+
import { checkFile, FILE_ACCEPT, isImageType } from '../core/files.js';
|
|
12
15
|
import { closeAllDropdowns, dropdown } from './dropdown.js';
|
|
16
|
+
import { icon } from './icons.js';
|
|
13
17
|
import { texts } from './texts.js';
|
|
14
18
|
|
|
15
19
|
const t = texts.composer;
|
|
@@ -20,11 +24,19 @@ const t = texts.composer;
|
|
|
20
24
|
* placeholder: () => string,
|
|
21
25
|
* preview?: boolean | ((column: string) => string),
|
|
22
26
|
* onSubmit: (value: { text: string, data: Record<string, unknown> }) => Promise<string | void>,
|
|
23
|
-
*
|
|
27
|
+
* upload?: {
|
|
28
|
+
* enabled: () => boolean,
|
|
29
|
+
* send: (file: File, onProgress: (p: { loaded: number, total: number }) => void) => Promise<object>,
|
|
30
|
+
* discard: (file: object) => void,
|
|
31
|
+
* errorText: (err: unknown) => string,
|
|
32
|
+
* },
|
|
33
|
+
* }} options upload: 파일 올리기 (없거나 enabled()가 false면 파일 칸을 숨김). send는 올린 파일의 카드 값(core/files.js
|
|
34
|
+
* fileValue)을 돌려주고, 실패하면 errorText 문구를 창에 보인다. discard는 카드를 올리지 못했을 때 올린 파일을 지운다.
|
|
35
|
+
* preview: 편집 화면(카드는 바로 보드에 저장된다는 안내를 보임). 함수면 고른 섹션에 맞는 안내 문구를
|
|
24
36
|
* 돌려준다 (섹션을 바꿀 때마다 다시 물음).
|
|
25
37
|
* onSubmit은 실패 문구를 돌려주면 창에 보이고 창이 열린 채로 남는다
|
|
26
38
|
*/
|
|
27
|
-
export function createComposer({ columns, placeholder, preview = false, onSubmit }) {
|
|
39
|
+
export function createComposer({ columns, placeholder, preview = false, onSubmit, upload }) {
|
|
28
40
|
const modal = html`<div class="bw-modal" data-role="modal" inert>
|
|
29
41
|
<div class="bw-scrim" data-role="scrim"></div>
|
|
30
42
|
<div class="bw-dlg" role="dialog" aria-modal="true" aria-labelledby="bw-dlg-t" data-role="dlg">
|
|
@@ -66,6 +78,21 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
66
78
|
data-role="link"
|
|
67
79
|
/>
|
|
68
80
|
</div>
|
|
81
|
+
<div class="bw-drop" data-role="drop" hidden>
|
|
82
|
+
<button type="button" class="bw-drop-btn" data-role="pick">
|
|
83
|
+
${icon('upload', 16)}<span>${t.pickFile}</span>
|
|
84
|
+
</button>
|
|
85
|
+
<div class="bw-drop-file">
|
|
86
|
+
<img class="bw-drop-img" data-role="file-prev" alt="" hidden />
|
|
87
|
+
<span class="bw-drop-icon" data-role="file-icon" hidden>${icon('file', 18)}</span>
|
|
88
|
+
<span class="bw-filename" data-role="file-name"></span>
|
|
89
|
+
<button type="button" class="bw-icon" data-role="file-clear" aria-label="${t.clearFile}">
|
|
90
|
+
${icon('x', 14)}
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<input type="file" accept="${FILE_ACCEPT}" data-role="file" hidden />
|
|
95
|
+
<p class="bw-filehint" data-role="file-hint" hidden>${t.fileHint}</p>
|
|
69
96
|
<p class="bw-err" data-role="err" role="alert" hidden></p>
|
|
70
97
|
${preview ? html`<p class="bw-help" data-role="preview">${t.preview}</p>` : null}
|
|
71
98
|
<div class="bw-acts">
|
|
@@ -99,6 +126,96 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
99
126
|
errEl.hidden = !text;
|
|
100
127
|
};
|
|
101
128
|
|
|
129
|
+
// ---------- 파일 ----------
|
|
130
|
+
const dropEl = part(modal, 'drop');
|
|
131
|
+
const fileEl = part(modal, 'file');
|
|
132
|
+
const pickBtn = part(modal, 'pick');
|
|
133
|
+
const hintEl = part(modal, 'file-hint');
|
|
134
|
+
const prevEl = part(modal, 'file-prev');
|
|
135
|
+
const fileIconEl = part(modal, 'file-icon');
|
|
136
|
+
const fileNameEl = part(modal, 'file-name');
|
|
137
|
+
/** 고른 파일 (올리기 전) */
|
|
138
|
+
let picked = null;
|
|
139
|
+
let prevUrl = '';
|
|
140
|
+
const uploadsOn = () => Boolean(upload?.enabled());
|
|
141
|
+
function setFile(file) {
|
|
142
|
+
picked = file;
|
|
143
|
+
dropEl.classList.toggle('has-file', !!file);
|
|
144
|
+
fileNameEl.textContent = file?.name ?? '';
|
|
145
|
+
if (prevUrl) URL.revokeObjectURL(prevUrl);
|
|
146
|
+
prevUrl = file && isImageType(file.type) ? URL.createObjectURL(file) : '';
|
|
147
|
+
prevEl.hidden = !prevUrl;
|
|
148
|
+
if (prevUrl) prevEl.src = prevUrl;
|
|
149
|
+
else prevEl.removeAttribute('src');
|
|
150
|
+
fileIconEl.hidden = !file || !!prevUrl;
|
|
151
|
+
hintEl.hidden = !uploadsOn() || !!file;
|
|
152
|
+
fileEl.value = '';
|
|
153
|
+
}
|
|
154
|
+
/** 담을 수 있으면 담고 true, 종류 · 크기가 틀리면 안내 */
|
|
155
|
+
function takeFile(file) {
|
|
156
|
+
if (!file || !uploadsOn()) return false;
|
|
157
|
+
const bad = checkFile(file);
|
|
158
|
+
if (bad) {
|
|
159
|
+
showErr(t.fileErrors[bad]);
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
showErr('');
|
|
163
|
+
setFile(file);
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
function syncUploads() {
|
|
167
|
+
const on = uploadsOn();
|
|
168
|
+
dropEl.hidden = !on;
|
|
169
|
+
if (!on && picked) setFile(null);
|
|
170
|
+
hintEl.hidden = !on || !!picked;
|
|
171
|
+
}
|
|
172
|
+
pickBtn.addEventListener('click', () => fileEl.click());
|
|
173
|
+
fileEl.addEventListener('change', () => takeFile(fileEl.files?.[0]));
|
|
174
|
+
part(modal, 'file-clear').addEventListener('click', () => {
|
|
175
|
+
setFile(null);
|
|
176
|
+
pickBtn.focus();
|
|
177
|
+
});
|
|
178
|
+
// 창 위로 끌어다 놓기 · 붙여넣기 (입력 칸 안에서도 파일이면 담는다)
|
|
179
|
+
const hasFiles = e => [...(e.dataTransfer?.types || [])].includes('Files');
|
|
180
|
+
dlg.addEventListener('dragover', e => {
|
|
181
|
+
if (!hasFiles(e)) return;
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
dropEl.classList.toggle('is-over', uploadsOn());
|
|
184
|
+
});
|
|
185
|
+
dlg.addEventListener('dragleave', () => dropEl.classList.remove('is-over'));
|
|
186
|
+
dlg.addEventListener('drop', e => {
|
|
187
|
+
if (!hasFiles(e)) return;
|
|
188
|
+
e.preventDefault();
|
|
189
|
+
e.stopPropagation();
|
|
190
|
+
dropEl.classList.remove('is-over');
|
|
191
|
+
if (uploadsOn()) takeFile(e.dataTransfer?.files?.[0]);
|
|
192
|
+
else showErr(texts.board.noFiles);
|
|
193
|
+
});
|
|
194
|
+
dlg.addEventListener('paste', e => {
|
|
195
|
+
const file = e.clipboardData?.files?.[0];
|
|
196
|
+
if (!file) return;
|
|
197
|
+
e.preventDefault();
|
|
198
|
+
if (uploadsOn()) takeFile(file);
|
|
199
|
+
else showErr(texts.board.noPasteFiles);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/** 올리는 동안 버튼에 스피너와 진행 글 */
|
|
203
|
+
function setSending(on, label = t.sending) {
|
|
204
|
+
submitBtn.disabled = on;
|
|
205
|
+
if (!on) {
|
|
206
|
+
submitBtn.textContent = t.submit;
|
|
207
|
+
submitBtn.removeAttribute('aria-busy');
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const spin = document.createElement('span');
|
|
211
|
+
spin.className = 'bw-spin';
|
|
212
|
+
spin.setAttribute('aria-hidden', 'true');
|
|
213
|
+
const labelEl = document.createElement('span');
|
|
214
|
+
labelEl.textContent = label;
|
|
215
|
+
submitBtn.replaceChildren(spin, labelEl);
|
|
216
|
+
submitBtn.setAttribute('aria-busy', 'true');
|
|
217
|
+
}
|
|
218
|
+
|
|
102
219
|
// 색 (흰색이 기본). 화살표 키로 고름 (radiogroup)
|
|
103
220
|
const swatches = COLORS.map(k => {
|
|
104
221
|
const b = document.createElement('button');
|
|
@@ -179,31 +296,53 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
179
296
|
const title = titleEl.value.trim();
|
|
180
297
|
const text = bodyEl.value.trim();
|
|
181
298
|
const url = linkEl.value.trim();
|
|
182
|
-
|
|
183
|
-
|
|
299
|
+
const file = uploadsOn() ? picked : null;
|
|
300
|
+
// 제목 · 내용 · 링크 · 파일이 모두 비면 올리지 않는다
|
|
301
|
+
if (!title && !text && !url && !file) {
|
|
184
302
|
bodyEl.focus();
|
|
185
303
|
return;
|
|
186
304
|
}
|
|
187
305
|
const column = columnDd.get();
|
|
188
|
-
|
|
189
|
-
if (!
|
|
306
|
+
// 링크 · 길이를 파일을 올리기 전에 본다
|
|
307
|
+
if (!cardValue({ column, title, text: text || 'x', url, color })) {
|
|
190
308
|
showErr(t.badLink);
|
|
191
309
|
linkEl.focus();
|
|
192
310
|
return;
|
|
193
311
|
}
|
|
194
312
|
sending = true;
|
|
195
|
-
|
|
313
|
+
setSending(true);
|
|
196
314
|
showErr('');
|
|
197
|
-
|
|
315
|
+
let fileData = null;
|
|
316
|
+
if (file) {
|
|
317
|
+
try {
|
|
318
|
+
setSending(true, t.uploading(0));
|
|
319
|
+
fileData = await upload.send(file, ({ loaded, total }) =>
|
|
320
|
+
setSending(true, t.uploading(total ? Math.floor((loaded / total) * 100) : 0))
|
|
321
|
+
);
|
|
322
|
+
} catch (err) {
|
|
323
|
+
sending = false;
|
|
324
|
+
setSending(false);
|
|
325
|
+
showErr(upload.errorText(err));
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
setSending(true);
|
|
329
|
+
}
|
|
330
|
+
const value = cardValue({ column, title, text, url, color, file: fileData });
|
|
331
|
+
const failed = value
|
|
332
|
+
? await onSubmit(value).catch(() => texts.errors.failed)
|
|
333
|
+
: texts.errors.failed;
|
|
198
334
|
sending = false;
|
|
199
|
-
|
|
335
|
+
setSending(false);
|
|
200
336
|
if (failed) {
|
|
337
|
+
// 카드가 올라가지 않았으면 올린 파일을 지운다 (다시 올리면 새로 올림)
|
|
338
|
+
if (fileData) upload.discard(fileData);
|
|
201
339
|
showErr(failed);
|
|
202
340
|
// 섹션 구성은 저장되고 카드만 실패했을 수 있다: 안내를 지금 상태로
|
|
203
341
|
syncPreview();
|
|
204
342
|
return;
|
|
205
343
|
}
|
|
206
344
|
lastColumn = column;
|
|
345
|
+
setFile(null);
|
|
207
346
|
close(false);
|
|
208
347
|
}
|
|
209
348
|
submitBtn.addEventListener('click', submit);
|
|
@@ -229,8 +368,8 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
229
368
|
});
|
|
230
369
|
|
|
231
370
|
/**
|
|
232
|
-
* 창을 연다. column(누른 섹션) · title · body · link
|
|
233
|
-
* @param {{ column?: string | null, title?: string, body?: string, link?: string }} [pre]
|
|
371
|
+
* 창을 연다. column(누른 섹션) · title · body · link · file(붙여넣거나 끌어 놓은 파일)을 미리 채울 수 있다
|
|
372
|
+
* @param {{ column?: string | null, title?: string, body?: string, link?: string, file?: File | null }} [pre]
|
|
234
373
|
*/
|
|
235
374
|
function open(pre = {}) {
|
|
236
375
|
const list = columns();
|
|
@@ -248,7 +387,10 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
248
387
|
showErr('');
|
|
249
388
|
pickColor(DEFAULT_COLOR);
|
|
250
389
|
sending = false;
|
|
251
|
-
|
|
390
|
+
setSending(false);
|
|
391
|
+
setFile(null);
|
|
392
|
+
syncUploads();
|
|
393
|
+
if (pre.file) takeFile(pre.file);
|
|
252
394
|
returnFocus = document.activeElement;
|
|
253
395
|
isOpen = true;
|
|
254
396
|
modal.inert = false;
|
|
@@ -273,11 +415,13 @@ export function createComposer({ columns, placeholder, preview = false, onSubmit
|
|
|
273
415
|
* 보드 위 빈 곳 두 번 클릭 · 붙여넣기 · 파일 끌어 놓기로 카드 창 열기 (학생 · 교육자 · 편집 화면이 같이 씀)
|
|
274
416
|
* @param {{
|
|
275
417
|
* root: HTMLElement, board: HTMLElement, active: () => boolean,
|
|
276
|
-
* ignore: string, open: (pre: { column?: string | null, body?: string, link?: string }) => void,
|
|
418
|
+
* ignore: string, open: (pre: { column?: string | null, body?: string, link?: string, file?: File }) => void,
|
|
277
419
|
* columnAt: (x: number, y: number) => string | null, notify: (text: string) => void,
|
|
278
|
-
*
|
|
420
|
+
* files?: () => boolean,
|
|
421
|
+
* }} o ignore: 두 번 클릭을 받지 않을 요소 선택자. files: 파일을 올릴 수 있는지 (붙여넣거나 끌어 놓은 파일을 창에 담음,
|
|
422
|
+
* 아니면 안내만)
|
|
279
423
|
*/
|
|
280
|
-
export function attachQuickAdd({ root, active, ignore, open, columnAt, notify }) {
|
|
424
|
+
export function attachQuickAdd({ root, active, ignore, open, columnAt, notify, files = () => false }) {
|
|
281
425
|
root.addEventListener('dblclick', e => {
|
|
282
426
|
if (!active() || !(e.target instanceof Element) || e.target.closest(ignore)) return;
|
|
283
427
|
open({ column: columnAt(e.clientX, e.clientY) });
|
|
@@ -290,11 +434,13 @@ export function attachQuickAdd({ root, active, ignore, open, columnAt, notify })
|
|
|
290
434
|
const text = (e.clipboardData?.getData('text/plain') || '').trim();
|
|
291
435
|
if (!hasFile && !text) return;
|
|
292
436
|
e.preventDefault();
|
|
293
|
-
if (hasFile)
|
|
294
|
-
|
|
437
|
+
if (hasFile) {
|
|
438
|
+
if (files()) open({ file: e.clipboardData.files[0] });
|
|
439
|
+
else notify(texts.board.noPasteFiles);
|
|
440
|
+
} else if (/^https?:\/\/\S+$/i.test(text)) open({ link: text });
|
|
295
441
|
else open({ body: text.slice(0, TEXT_MAX) });
|
|
296
442
|
});
|
|
297
|
-
// 파일을 끌어다 놓으면 브라우저가 파일을 열어 버리므로
|
|
443
|
+
// 파일을 끌어다 놓으면 브라우저가 파일을 열어 버리므로 막고, 올릴 수 있으면 놓은 섹션의 창에 담는다 (아니면 안내)
|
|
298
444
|
const hasFiles = e => [...(e.dataTransfer?.types || [])].includes('Files');
|
|
299
445
|
root.addEventListener('dragover', e => {
|
|
300
446
|
if (hasFiles(e)) e.preventDefault();
|
|
@@ -302,7 +448,10 @@ export function attachQuickAdd({ root, active, ignore, open, columnAt, notify })
|
|
|
302
448
|
root.addEventListener('drop', e => {
|
|
303
449
|
if (!hasFiles(e)) return;
|
|
304
450
|
e.preventDefault();
|
|
305
|
-
if (active())
|
|
451
|
+
if (!active()) return;
|
|
452
|
+
const file = e.dataTransfer?.files?.[0];
|
|
453
|
+
if (file && files()) open({ column: columnAt(e.clientX, e.clientY), file });
|
|
454
|
+
else notify(texts.board.noFiles);
|
|
306
455
|
});
|
|
307
456
|
}
|
|
308
457
|
|
|
@@ -19,6 +19,8 @@ const PATHS = {
|
|
|
19
19
|
'<path d="M17.9 17.9A10 10 0 0 1 12 19c-6.4 0-10-7-10-7a18 18 0 0 1 4.1-5.1M9.9 5.2A9 9 0 0 1 12 5c6.4 0 10 7 10 7a18 18 0 0 1-2.2 3.2M14.1 14.1a3 3 0 1 1-4.2-4.2M2 2l20 20"/>',
|
|
20
20
|
pin: '<path d="M12 17v5M9 3h6l-1 6 3 3v2H7v-2l3-3z"/>',
|
|
21
21
|
lock: '<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>',
|
|
22
|
+
upload: '<path d="M12 16V4M7 9l5-5 5 5M4 20h16"/>',
|
|
23
|
+
file: '<path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/>',
|
|
22
24
|
unlock: '<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 7.9-1"/>',
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -44,8 +44,13 @@ export const texts = {
|
|
|
44
44
|
deleted: '카드를 삭제했어요.',
|
|
45
45
|
added: '카드를 추가했어요.',
|
|
46
46
|
cardMenu: '카드 메뉴',
|
|
47
|
-
noFiles: '
|
|
48
|
-
noPasteFiles: '
|
|
47
|
+
noFiles: '이 보드에서는 파일을 올릴 수 없어요. 글이나 링크로 올려 주세요.',
|
|
48
|
+
noPasteFiles: '이 보드에서는 파일을 올릴 수 없어요. 글이나 링크만 붙여넣을 수 있어요.',
|
|
49
|
+
/** 카드의 파일 */
|
|
50
|
+
image: '첨부 이미지',
|
|
51
|
+
openPdf: name => `${name} 새 탭에서 열기`,
|
|
52
|
+
fileDeleted: '삭제된 파일',
|
|
53
|
+
fileLoading: '파일을 불러오는 중…',
|
|
49
54
|
/** 보드 상태 */
|
|
50
55
|
closedNotice: '교육자가 보드를 닫았어요. 지금은 카드를 올릴 수 없어요.',
|
|
51
56
|
closedNoticeInstructor: '보드를 닫았어요. 학생은 지금 카드를 올릴 수 없어요.',
|
|
@@ -85,6 +90,10 @@ export const texts = {
|
|
|
85
90
|
shown: '다시 보이게 했어요.',
|
|
86
91
|
pinnedDone: '맨 위에 고정했어요.',
|
|
87
92
|
unpinned: '고정을 풀었어요.',
|
|
93
|
+
/** 교육자: 카드의 파일만 지움 (카드는 남고 모두에게 '삭제된 파일') */
|
|
94
|
+
deleteFile: '파일 삭제',
|
|
95
|
+
deleteFileHint: '카드는 남기고 파일만 지워요. 되돌릴 수 없어요.',
|
|
96
|
+
fileDeletedDone: '파일을 삭제했어요.',
|
|
88
97
|
},
|
|
89
98
|
|
|
90
99
|
/** 카드 추가 창 */
|
|
@@ -104,6 +113,21 @@ export const texts = {
|
|
|
104
113
|
preview: '올린 카드는 바로 보드에 저장돼 학생에게 보여요. (초안으로 저장과 상관없어요)',
|
|
105
114
|
cancel: '취소',
|
|
106
115
|
submit: '올리기',
|
|
116
|
+
/** 파일 올리기 (그림 · PDF, 종류 · 크기는 서버 기준) */
|
|
117
|
+
pickFile: '파일 올리기',
|
|
118
|
+
fileHint: '이미지(PNG, JPG, WebP)는 10MB, PDF는 20MB까지 올릴 수 있어요. 끌어다 놓거나 붙여넣어도 돼요.',
|
|
119
|
+
clearFile: '고른 파일 지우기',
|
|
120
|
+
sending: '카드를 추가하는 중',
|
|
121
|
+
uploading: percent => `파일을 올리는 중 ${percent}%`,
|
|
122
|
+
fileErrors: {
|
|
123
|
+
type: '이미지(PNG, JPG, WebP)와 PDF만 올릴 수 있어요.',
|
|
124
|
+
size: '파일이 너무 커요. 이미지는 10MB, PDF는 20MB까지 올릴 수 있어요.',
|
|
125
|
+
count: '파일은 한 사람이 50개까지 올릴 수 있어요. 파일이 있는 내 카드를 지운 뒤 다시 해 주세요.',
|
|
126
|
+
rate: '파일을 너무 자주 올리고 있어요. 1분쯤 뒤 다시 해 주세요.',
|
|
127
|
+
readOnly: '보기 전용 화면이라 파일을 올릴 수 없어요.',
|
|
128
|
+
session: '접속 시간이 지났습니다. 페이지를 새로고침해 주세요.',
|
|
129
|
+
failed: '파일을 올리지 못했어요. 잠시 뒤 다시 해 보거나 글만 올려 주세요.',
|
|
130
|
+
},
|
|
107
131
|
},
|
|
108
132
|
|
|
109
133
|
/** 쓰기 · 관리 실패 (보드 · SDK 오류 → core/model.js errorKind) */
|
|
@@ -146,6 +170,8 @@ export const texts = {
|
|
|
146
170
|
approve: '승인 후 공개',
|
|
147
171
|
approveHint: '학생 글은 교육자가 승인해야 다른 학생에게 보여요.',
|
|
148
172
|
reactions: '하트 반응',
|
|
173
|
+
fileUpload: '파일 업로드',
|
|
174
|
+
fileUploadHint: '켜면 카드에 파일(이미지, PDF)을 첨부할 수 있어요. 끄면 파일 올리기 버튼이 보이지 않아요.',
|
|
149
175
|
limit: '1인당 카드 수',
|
|
150
176
|
limitHint: '비우면 50개까지 올릴 수 있어요.',
|
|
151
177
|
writing: '카드 작성',
|